org.objectweb.jorm.metainfo.lib.rdb
Class BasicRDBValueMapping
java.lang.Object
|
+--org.objectweb.jorm.metainfo.lib.BasicValueMapping
|
+--org.objectweb.jorm.metainfo.lib.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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicRDBValueMapping
public BasicRDBValueMapping(java.lang.String mapperName,
java.lang.String mappingName,
MetaObject parent)
- Build a new BasicRDBValueMapping object.
- Parameters:
mapperName - the name of the mappermappingName - the name of the mappingparent - the parent of the current object
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 columntype - the type of the columnnotNull - 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