org.objectweb.jorm.mapper.rdb.metainfo
Class RdbClassMultiMapping

java.lang.Object
  extended byorg.objectweb.jorm.metainfo.lib.BasicMetaObject
      extended byorg.objectweb.jorm.metainfo.lib.BasicMappingStructure
          extended byorg.objectweb.jorm.metainfo.lib.BasicCommonClassMapping
              extended byorg.objectweb.jorm.metainfo.lib.BasicClassMapping
                  extended byorg.objectweb.jorm.mapper.rdb.metainfo.RdbClassMapping
                      extended byorg.objectweb.jorm.mapper.rdb.metainfo.RdbClassMultiMapping
All Implemented Interfaces:
ClassMapping, CommonClassMapping, Loggable, MappingStructure, MetaObject, RdbMappingInfos, java.io.Serializable

public class RdbClassMultiMapping
extends RdbClassMapping
implements RdbMappingInfos

Implementation of the RdbClassMultiMapping interface. BasicRdbClassMultiMapping contains mapping information referring to: - the primary table, - external tables, - join relationships between the primary table and an external table.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jorm.mapper.rdb.metainfo.RdbClassMapping
MAP_NEW_FIELDS_TO_ADDED_STRUCTURES, MAP_NEW_FIELDS_TO_EXTENDED_STRUCTURES, REMAP_FIELDS_TO_NEW_STRUCTURES
 
Fields inherited from class org.objectweb.jorm.metainfo.lib.BasicClassMapping
parentClassMappings
 
Fields inherited from class org.objectweb.jorm.metainfo.lib.BasicMappingStructure
linkedMO
 
Fields inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject
debug, logger, loggerFactory, parent
 
Constructor Summary
RdbClassMultiMapping(java.lang.String ruleName, MetaObject linkedMO, MetaObject parent)
          Builds a new BasicRdbClassMultiMapping object.
 
Method Summary
 RdbExternalTable createRdbExternalTable(java.lang.String tableName)
           
 void getAllRdbExternalTables(java.util.ArrayList res)
           
protected  java.util.Collection getChildren()
           
 java.util.List getExternalTableNames()
          get the list of external table names as a {String}
 java.util.List getExternalTables()
          get the list of external tables as a {RdbExternalTable}
 RdbTable getMainTable()
          Get the main table
 PrimitiveElementMapping getPrimitiveElementMapping(java.lang.String fieldName)
          Returns the PrimitiveElementMapping objects (hidden or not) matching a given fieldName.
 RdbExternalTable getRdbExternalTable(java.lang.String tableName)
           
 java.util.Collection getRdbExternalTables()
           
 RdbExternalTable removeRdbExternalTable(java.lang.String tableName)
           
 
Methods inherited from class org.objectweb.jorm.mapper.rdb.metainfo.RdbClassMapping
addImplicitDependencies, createImplicitParentClassMapping, createRdbFilter, createRdbInheritanceQuery, createRdbTable, getAddedOrExtendedParentClassMapping, getAllPrimitiveElementMappings, getMainRdbTable, getMainRdbTableOld, getMappingFilterFromNamingFilter, getMappingFilterFromNamingFilter, getParentClassMapping, getPrimitiveElementMapping, getRdbFilter, getRdbInheritanceQuery, getRdbTable, hasUnmappedPrimitiveElements, inheritsStructures, inheritsStructures
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicClassMapping
addParentClassMapping, addReferenceMapping, createParentClassMapping, createReferenceMapping, getJormClass, getParentClassMapping, getParentClassMappings, getReferenceMapping, getReferenceMappings, iterateParentClassMappings, iterateReferenceMappings
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicCommonClassMapping
addDependency, addPrimitiveElementMapping, addPrimitiveElementMapping, createIdentifierMapping, getDependencies, getIdentifierMapping, getPrimitiveElementMappings, getRuleName, primitiveElementMappingsIterator, removeDependency, setIdentifierMapping, setRuleName
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicMappingStructure
getLinkedMO, getMapperName, getProjectName, setLinkedMO
 
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.CommonClassMapping
addDependency, addPrimitiveElementMapping, addPrimitiveElementMapping, createIdentifierMapping, getDependencies, getIdentifierMapping, getPrimitiveElementMappings, getRuleName, primitiveElementMappingsIterator, removeDependency, setIdentifierMapping, setRuleName
 
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
 

Constructor Detail

RdbClassMultiMapping

public RdbClassMultiMapping(java.lang.String ruleName,
                            MetaObject linkedMO,
                            MetaObject parent)
Builds a new BasicRdbClassMultiMapping object. This object contains the mapping structure of the class it refers to. The parent object is a Mapping object that contains the mapper name.

Parameters:
ruleName - the name of the rule used to map the class, linkedMo the Class object referenced by the current object, parent the parent of the current object.
Method Detail

getPrimitiveElementMapping

public PrimitiveElementMapping getPrimitiveElementMapping(java.lang.String fieldName)
Description copied from interface: CommonClassMapping
Returns the PrimitiveElementMapping objects (hidden or not) matching a given fieldName.

Specified by:
getPrimitiveElementMapping in interface CommonClassMapping
Overrides:
getPrimitiveElementMapping in class BasicCommonClassMapping

createRdbExternalTable

public RdbExternalTable createRdbExternalTable(java.lang.String tableName)

removeRdbExternalTable

public RdbExternalTable removeRdbExternalTable(java.lang.String tableName)

getRdbExternalTables

public java.util.Collection getRdbExternalTables()

getAllRdbExternalTables

public void getAllRdbExternalTables(java.util.ArrayList res)

getRdbExternalTable

public RdbExternalTable getRdbExternalTable(java.lang.String tableName)

getChildren

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

getMainTable

public RdbTable getMainTable()
Description copied from interface: RdbMappingInfos
Get the main table

Specified by:
getMainTable in interface RdbMappingInfos
Returns:
the main table

getExternalTables

public java.util.List getExternalTables()
Description copied from interface: RdbMappingInfos
get the list of external tables as a {RdbExternalTable}

Specified by:
getExternalTables in interface RdbMappingInfos
Returns:
the list of external tables as a {RdbExternalTable}

getExternalTableNames

public java.util.List getExternalTableNames()
Description copied from interface: RdbMappingInfos
get the list of external table names as a {String}

Specified by:
getExternalTableNames in interface RdbMappingInfos
Returns:
the list of external table names as a {String}