org.objectweb.jorm.metainfo.lib
Class BasicHelperClassMapping

java.lang.Object
  extended byorg.objectweb.jorm.metainfo.lib.BasicMetaObject
      extended byorg.objectweb.jorm.metainfo.lib.BasicMappingStructure
          extended byorg.objectweb.jorm.metainfo.lib.BasicHelperClassMapping
All Implemented Interfaces:
HelperClassMapping, Loggable, MappingStructure, MetaObject, java.io.Serializable
Direct Known Subclasses:
BasicClassMapping, BasicGenClassMapping

public class BasicHelperClassMapping
extends BasicMappingStructure
implements HelperClassMapping

Description

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jorm.metainfo.lib.BasicMappingStructure
logger
 
Constructor Summary
BasicHelperClassMapping(java.lang.String ruleName, MetaObject linkedMO, MetaObject parent)
          Builds a new BasicHelperClassMapping object.
 
Method Summary
 void addDependency(java.lang.String jormClassName)
           
 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.Collection getDependencies()
           
 IdentifierMapping getIdentifierMapping()
          Returns the IdentifierMapping object.
 PrimitiveElementMapping getPrimitiveElementMapping(java.lang.String fieldName)
          Returns the PrimitiveElementMapping objects matching to the fieldName specified.
 java.util.Collection getPrimitiveElementMappings()
          Returns a collection of PrimitiveElementMapping objects.
 java.lang.String getRuleName()
          Returns the name of the rule used to map the class.
 java.util.Iterator iteratePrimitiveElementMappings()
          Returns an Iterator over PrimitiveElementMapping objects.
 void removeDependency(java.lang.String jormClassName)
           
 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 class org.objectweb.jorm.metainfo.lib.BasicMappingStructure
getLinkedMO, getLogger, getLoggerFactory, getMapperName, getProjectName, setLinkedMO, setLogger, setLoggerFactory
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject
getManager, getParent, 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.MappingStructure
getLinkedMO, getLogger, getLoggerFactory, getMapperName, getProjectName, setLinkedMO, setLogger, setLoggerFactory
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Constructor Detail

BasicHelperClassMapping

public BasicHelperClassMapping(java.lang.String ruleName,
                               MetaObject linkedMO,
                               MetaObject parent)
Builds a new BasicHelperClassMapping object.

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.
Method Detail

getRuleName

public java.lang.String getRuleName()
Returns the name of the rule used to map the class.

Specified by:
getRuleName in interface HelperClassMapping
Returns:
the name of the rule.

setRuleName

public void setRuleName(java.lang.String rulename)
Sets the name of the rule used to map the class.

Specified by:
setRuleName in interface HelperClassMapping
Parameters:
rulename - the name of the rule.

getIdentifierMapping

public IdentifierMapping getIdentifierMapping()
Returns the IdentifierMapping object.

Specified by:
getIdentifierMapping in interface HelperClassMapping
Returns:
an IdentifierMapping object.

setIdentifierMapping

public void setIdentifierMapping(IdentifierMapping idmapping)
Sets the IdentifierMapping object.

Specified by:
setIdentifierMapping in interface HelperClassMapping
Parameters:
idmapping - the IdentifierMapping object.

getPrimitiveElementMappings

public java.util.Collection getPrimitiveElementMappings()
Returns a collection of PrimitiveElementMapping objects.

Specified by:
getPrimitiveElementMappings in interface HelperClassMapping
Returns:
a collection.

getPrimitiveElementMapping

public PrimitiveElementMapping getPrimitiveElementMapping(java.lang.String fieldName)
Description copied from interface: HelperClassMapping
Returns the PrimitiveElementMapping objects matching to the fieldName specified.

Specified by:
getPrimitiveElementMapping in interface HelperClassMapping
Parameters:
fieldName - is a name of a primitivite field (hidden or not) of the class
Returns:
a collection.

addPrimitiveElementMapping

public void addPrimitiveElementMapping(PrimitiveElementMapping peMapping)
Adds a PrimitiveElementMapping object.

Specified by:
addPrimitiveElementMapping in interface HelperClassMapping
Parameters:
peMapping - the PrimitiveElementMapping object to add to the list.

addPrimitiveElementMapping

public void addPrimitiveElementMapping(java.lang.String fieldName,
                                       PrimitiveElementMapping peMapping)
Adds a PrimitiveElementMapping object.

Specified by:
addPrimitiveElementMapping in interface HelperClassMapping
Parameters:
peMapping - the PrimitiveElementMapping object to add to the list.

iteratePrimitiveElementMappings

public java.util.Iterator iteratePrimitiveElementMappings()
Returns an Iterator over PrimitiveElementMapping objects.

Specified by:
iteratePrimitiveElementMappings in interface HelperClassMapping
Returns:
an Iterator.

createIdentifierMapping

public IdentifierMapping createIdentifierMapping(NameDef nd)
Creates a new IdentifierMapping object.

Specified by:
createIdentifierMapping in interface HelperClassMapping
Parameters:
nd - the NameDef object that defines an object identifier.
Returns:
an IdentifierMapping object.

createReferenceMapping

public ReferenceMapping createReferenceMapping(java.lang.String ruleName,
                                               NameDef nd)
Creates a new ReferenceMapping object.

Specified by:
createReferenceMapping in interface HelperClassMapping
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.

addDependency

public void addDependency(java.lang.String jormClassName)
Specified by:
addDependency in interface HelperClassMapping

removeDependency

public void removeDependency(java.lang.String jormClassName)
Specified by:
removeDependency in interface HelperClassMapping

getDependencies

public java.util.Collection getDependencies()
Specified by:
getDependencies in interface HelperClassMapping