org.objectweb.jorm.metainfo.rdb
Class BasicRDBValueMapping

java.lang.Object
  |
  +--org.objectweb.jorm.metainfo.lib.BasicValueMapping
        |
        +--org.objectweb.jorm.metainfo.rdb.BasicRDBValueMapping
All Implemented Interfaces:
Loggable, MetaObject, RDBValueMapping, java.io.Serializable, ValueMapping

public class BasicRDBValueMapping
extends BasicValueMapping
implements RDBValueMapping, java.io.Serializable

BasicRDBValueMapping defines all the columns which compose a value mapping.

Author:
X. Spengler
See Also:
Serialized Form

Fields inherited from class org.objectweb.jorm.metainfo.lib.BasicValueMapping
logger, parent
 
Constructor Summary
BasicRDBValueMapping(java.lang.String mapperName, java.lang.String mappingName, MetaObject parent)
          Build a new BasicRDBValueMapping object.
 
Method Summary
 RDBColumnSpec createRDBColumnSpec(java.lang.String name, java.lang.String type, boolean notNull)
          Creates a new RDBColumnSpec for the current RDBValueMapping object.
 RDBColumnSpec getRDBColumnSpec(java.lang.String name)
          Returns the RDBColumnSpec object corresponding to its name.
 java.util.Iterator iterateRDBColumnSpec()
          Allows to know all the RDBColumnSpec defined in the current RDBValueMapping object.
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicValueMapping
getLogger, getLoggerFactory, getMapperName, getMappingName, getParent, setLogger, setLoggerFactory, 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.ValueMapping
getMapperName, getMappingName
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Constructor Detail

BasicRDBValueMapping

public BasicRDBValueMapping(java.lang.String mapperName,
                            java.lang.String mappingName,
                            MetaObject parent)
Build a new BasicRDBValueMapping object.
Parameters:
mapperName - the name of the mapper
mappingName - the name of the mapping
parent - the parent of the current object
Method Detail

createRDBColumnSpec

public RDBColumnSpec createRDBColumnSpec(java.lang.String name,
                                         java.lang.String type,
                                         boolean notNull)
Creates a new RDBColumnSpec for the current RDBValueMapping object. If the column already exists, it is returned.
Specified by:
createRDBColumnSpec in interface RDBValueMapping
Parameters:
columnName - the name of the column
type - the type of the column
notNull - true, if "notnull" is defined, else false
Returns:
a new RDBColumnSpec object or if the column already exists, it is returned

getRDBColumnSpec

public RDBColumnSpec getRDBColumnSpec(java.lang.String name)
Returns the RDBColumnSpec object corresponding to its name. If the column object does not exist, null is returned.
Specified by:
getRDBColumnSpec in interface RDBValueMapping
Parameters:
columnName - the name of the RDBColumnSpec object (column name)
Returns:
the corresponding RDBColumnSpec object or null if it does not exist

iterateRDBColumnSpec

public java.util.Iterator iterateRDBColumnSpec()
Allows to know all the RDBColumnSpec defined in the current RDBValueMapping object. If no object is defined, an empty iterator is returned. For the moment, only one element is returned. This iterator contains RDBColumnSpec objects.
Specified by:
iterateRDBColumnSpec in interface RDBValueMapping
Returns:
an iterator on RDBColumnSpec object