org.objectweb.jorm.metainfo.lib
Class BasicClassProject

java.lang.Object
  extended byorg.objectweb.jorm.metainfo.lib.BasicMetaObject
      extended byorg.objectweb.jorm.metainfo.lib.BasicClassProject
All Implemented Interfaces:
ClassProject, Loggable, MetaObject, java.io.Serializable

public class BasicClassProject
extends BasicMetaObject
implements ClassProject

Implementation of ClassProject. The notion of project allows the developer to define multiple mappings for a class. There is at most one mapping per mapper name in a project.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject
debug, logger, loggerFactory, parent
 
Constructor Summary
BasicClassProject(java.lang.String projectName, MetaObject parent)
          Builds a new BasicClassProject object.
 
Method Summary
 Mapping createMapping(java.lang.String mapperName)
          Creates a new Mapping object using a MappingFactory object.
protected  java.util.Collection getChildren()
           
 java.util.Set getMappers()
          Returns a set of mapper names.
 Mapping getMapping(java.lang.String mapperName)
          Returns a Mapping object.
 java.util.Collection getMappings()
          Returns a collection of Mapping objects.
 java.lang.String getProjectName()
          Returns the project name.
 void setProjectName(java.lang.String name)
          Sets the project name.
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject
getLogger, getLoggerFactory, getManager, getParent, setLogger, setLoggerFactory, setLoggingOnChild, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Constructor Detail

BasicClassProject

public BasicClassProject(java.lang.String projectName,
                         MetaObject parent)
Builds a new BasicClassProject object. The parent object is a Class object.

Parameters:
projectName - the project name, parent the parent of the current object.
Method Detail

getProjectName

public java.lang.String getProjectName()
Returns the project name.

Specified by:
getProjectName in interface ClassProject
Returns:
the project name.

setProjectName

public void setProjectName(java.lang.String name)
Sets the project name.

Specified by:
setProjectName in interface ClassProject
Parameters:
name - the project name.

getMappings

public java.util.Collection getMappings()
Returns a collection of Mapping objects.

Specified by:
getMappings in interface ClassProject
Returns:
a collection.

getMapping

public Mapping getMapping(java.lang.String mapperName)
Returns a Mapping object.

Specified by:
getMapping in interface ClassProject
Parameters:
mapperName - a mapper name.
Returns:
a collection.

getMappers

public java.util.Set getMappers()
Returns a set of mapper names.

Specified by:
getMappers in interface ClassProject
Returns:
a set of mapper names.

createMapping

public Mapping createMapping(java.lang.String mapperName)
Creates a new Mapping object using a MappingFactory object.

Specified by:
createMapping in interface ClassProject
Parameters:
mapperName - the name of the mapper.
Returns:
a new Mapping object or an existing one.

getChildren

protected java.util.Collection getChildren()
Overrides:
getChildren in class BasicMetaObject