org.objectweb.jorm.metainfo.lib
Class BasicClassMapping
java.lang.Object
org.objectweb.jorm.metainfo.lib.BasicMetaObject
org.objectweb.jorm.metainfo.lib.BasicMappingStructure
org.objectweb.jorm.metainfo.lib.BasicHelperClassMapping
org.objectweb.jorm.metainfo.lib.BasicClassMapping
- All Implemented Interfaces:
- ClassMapping, HelperClassMapping, Loggable, MappingStructure, MetaObject, java.io.Serializable
- Direct Known Subclasses:
- FosClassMapping, RdbClassMapping
- public class BasicClassMapping
- extends BasicHelperClassMapping
- implements ClassMapping
BasicClassMapping is THE basic implementation of the ClassMapping interface. * Its defines basic methods, and must be extended to different mappers.
- Author:
- X. Spengler
- See Also:
- Serialized Form
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicHelperClassMapping |
addDependency, addPrimitiveElementMapping, addPrimitiveElementMapping, createIdentifierMapping, getDependencies, getIdentifierMapping, getPrimitiveElementMapping, getPrimitiveElementMappings, getRuleName, iteratePrimitiveElementMappings, removeDependency, setIdentifierMapping, setRuleName |
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.HelperClassMapping |
addDependency, addPrimitiveElementMapping, addPrimitiveElementMapping, createIdentifierMapping, getDependencies, getIdentifierMapping, getPrimitiveElementMapping, getPrimitiveElementMappings, getRuleName, iteratePrimitiveElementMappings, removeDependency, setIdentifierMapping, setRuleName |
BasicClassMapping
public BasicClassMapping(java.lang.String ruleName,
MetaObject linkedMO,
MetaObject parent)
- Builds a new BasicClassMapping.
- Parameters:
ruleName
- the name of the rule used to map the class,
linkedMO the object referenced by the current object,
parent the parent of the current object.
addReferenceMapping
public void addReferenceMapping(ReferenceMapping refMapping)
- Adds a ReferenceMapping object.
- Specified by:
addReferenceMapping
in interface ClassMapping
- Parameters:
refMapping
- the ReferenceMapping object to add to the list.
createReferenceMapping
public ReferenceMapping createReferenceMapping(java.lang.String ruleName,
NameDef nd)
- Description copied from interface:
HelperClassMapping
- Creates a new ReferenceMapping object.
- Specified by:
createReferenceMapping
in interface HelperClassMapping
- Overrides:
createReferenceMapping
in class BasicHelperClassMapping
- Parameters:
ruleName
- the name of the rule used to map the reference,
nd the NameDef object that defines an object reference.
- Returns:
- a ReferenceMapping object.
getReferenceMapping
public ReferenceMapping getReferenceMapping(java.lang.String referenceName)
- Description copied from interface:
ClassMapping
- Retrieves the ReferenceMapping instance corresponding to the name of
a reference field.
- Specified by:
getReferenceMapping
in interface ClassMapping
- Parameters:
referenceName
- is the name of a reference field
- Returns:
- a ReferenceMapping instance or a null value if no mapping is
defined for the reference name
iterateReferenceMappings
public java.util.Iterator iterateReferenceMappings()
- Returns an Iterator over ReferenceMapping objects.
- Specified by:
iterateReferenceMappings
in interface ClassMapping
- Returns:
- an Iterator.
getReferenceMappings
public java.util.Collection getReferenceMappings()
- Returns a collection of ReferenceMapping objects.
- Specified by:
getReferenceMappings
in interface ClassMapping
- Returns:
- a collection.