|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface gather methods to the ClassMapping and GenClassMapping
interfaces. It defines getter/setter for
- mapping rule name: it defines how the class on the database structures.
it is usefull when a class can be mapped in different ways.
For instance, with a mapping to relational tables, a class
can be mapped to one or more joined tables.
Even though this method is shared by all class mapping implementation,
values set and get are only meaningfull in those implementations
- identifier mapping: it defines how the identifier of the class is mapped
- primitive element mappings (PEMs): they defined how primitive elements are
mapped at this level. Note that the referenced primitive element can
be defined at an upper level in the inheritance hierarchy. Also note
that PEMs are inherited and that inherited PEMs can be retrieved using the
getAllPrimitiveElements()
method
- reference mappings (RMs): TODO: description
- dependencies: TODO: description
Method Summary | |
---|---|
void |
addDependency(java.lang.String jormClassName)
add a dependency to a given jorm class |
void |
addPrimitiveElementMapping(PrimitiveElementMapping pemapping)
Adds a PrimitiveElementMapping object. |
void |
addPrimitiveElementMapping(java.lang.String fieldName,
PrimitiveElementMapping pemapping)
Adds a PrimitiveElementMapping object. |
IdentifierMapping |
createIdentifierMapping(NameDef nd)
Creates a new IdentifierMapping object. |
ReferenceMapping |
createReferenceMapping(java.lang.String ruleName,
NameDef nd)
Creates a new ReferenceMapping object. |
java.util.List |
getAllPrimitiveElementMappings()
Returns the list of PEM of the current class and its super classes. |
java.util.Collection |
getDependencies()
Returns the set of class names (Strings) of which the class mapping is dependent |
IdentifierMapping |
getIdentifierMapping()
Returns the IdentifierMapping in this class mapping. |
PrimitiveElementMapping |
getPrimitiveElementMapping(java.lang.String fieldName)
Returns the PrimitiveElementMapping objects (hidden or not) matching a given fieldName. |
java.util.Collection |
getPrimitiveElementMappings()
Returns the collection of PEM of the current class only defined at the inheritance level, that is, without the inherited ones. |
java.lang.String |
getRuleName()
Returns the name of the rule used to map the class. |
java.util.Iterator |
primitiveElementMappingsIterator()
Returns an Iterator over PrimitiveElementMapping objects. |
void |
removeDependency(java.lang.String jormClassName)
remove a dependency to a given jorm class |
void |
setIdentifierMapping(IdentifierMapping idmapping)
Sets the IdentifierMapping object. |
void |
setRuleName(java.lang.String rulename)
Sets the name of the rule used to map the class. |
Methods inherited from interface org.objectweb.jorm.metainfo.api.MappingStructure |
---|
getLinkedMO, getMapperName, getProjectName, setLinkedMO |
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject |
---|
getParent, setParent |
Method Detail |
public java.lang.String getRuleName()
public void setRuleName(java.lang.String rulename)
rulename
- the class mapping rule name.public IdentifierMapping getIdentifierMapping()
public void setIdentifierMapping(IdentifierMapping idmapping)
idmapping
- the IdentifierMapping object.public java.util.Collection getPrimitiveElementMappings()
public java.util.List getAllPrimitiveElementMappings()
public PrimitiveElementMapping getPrimitiveElementMapping(java.lang.String fieldName)
fieldName
- the name of the primitivite field (hidden or not) of
the class of which the PEM must be returned
public void addPrimitiveElementMapping(PrimitiveElementMapping pemapping)
pemapping
- the PrimitiveElementMapping object to add to the list.public void addPrimitiveElementMapping(java.lang.String fieldName, PrimitiveElementMapping pemapping)
pemapping
- the PrimitiveElementMapping object to add to the list.public java.util.Iterator primitiveElementMappingsIterator()
public IdentifierMapping createIdentifierMapping(NameDef nd)
nd
- the NameDef object that defines an object identifier.
public ReferenceMapping createReferenceMapping(java.lang.String ruleName, NameDef nd)
ruleName
- the name of the rule used to map the reference,
nd the NameDef object that defines an object reference.
public void addDependency(java.lang.String jormClassName)
jormClassName
- the name of the class to which depends the class mappingpublic void removeDependency(java.lang.String jormClassName)
jormClassName
- the name of the class to which the class mapping does
not depend anymorepublic java.util.Collection getDependencies()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |