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

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.BasicGenClassMapping
                  extended byorg.objectweb.jorm.mapper.rdb.metainfo.RdbGenClassMapping
All Implemented Interfaces:
CommonClassMapping, GenClassMapping, Loggable, MappingStructure, MetaObject, RdbMappingInfos, java.io.Serializable

public class RdbGenClassMapping
extends BasicGenClassMapping
implements RdbMappingInfos

Description

See Also:
Serialized Form

Field Summary
 
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
RdbGenClassMapping(java.lang.String ruleName, MetaObject linkedMO, MetaObject parent)
          Builds a new BasicRdbGenClassMapping object.
 
Method Summary
 RdbExternalTable createRdbExternalTable(java.lang.String tableName)
           
 RdbTable createRdbTable(java.lang.String tablename)
          Sets the name of the primary table
 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
 RdbExternalTable getRdbExternalTable(java.lang.String tableName)
           
 java.util.Collection getRdbExternalTables()
           
 RdbTable getRdbTable()
          Returns the name of the primary table.
 RdbExternalTable removeRdbExternalTable(java.lang.String tableName)
           
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicGenClassMapping
createReferenceMapping, getReferenceMapping, setReferenceMapping
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicCommonClassMapping
addDependency, addPrimitiveElementMapping, addPrimitiveElementMapping, createIdentifierMapping, getAllPrimitiveElementMappings, getChildren, getDependencies, getIdentifierMapping, getPrimitiveElementMapping, 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, getAllPrimitiveElementMappings, getDependencies, getIdentifierMapping, getPrimitiveElementMapping, 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

RdbGenClassMapping

public RdbGenClassMapping(java.lang.String ruleName,
                          MetaObject linkedMO,
                          MetaObject parent)
Builds a new BasicRdbGenClassMapping 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 GenClassRef object referenced by the current object, ruleName the name of the rule used to map the class, parent the parent of the current object.
Method Detail

createRdbTable

public RdbTable createRdbTable(java.lang.String tablename)
Sets the name of the primary table

Parameters:
tablename - the name of the primary table

getRdbTable

public RdbTable getRdbTable()
Returns the name of the primary table.

Returns:
a String object, the name of the primary table

createRdbExternalTable

public RdbExternalTable createRdbExternalTable(java.lang.String tableName)

removeRdbExternalTable

public RdbExternalTable removeRdbExternalTable(java.lang.String tableName)

getRdbExternalTables

public java.util.Collection getRdbExternalTables()

getRdbExternalTable

public RdbExternalTable getRdbExternalTable(java.lang.String tableName)

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}