SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.impl.jdbc.meta
Class FieldMapping

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
        |
        +--com.solarmetric.rd.kodo.impl.jdbc.meta.ExtensionsMapping
              |
              +--com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping
All Implemented Interfaces:
java.lang.Comparable, Extensions, FieldMetaData
Direct Known Subclasses:
ReferenceMapping

public abstract class FieldMapping
extends com.solarmetric.rd.kodo.impl.jdbc.meta.ExtensionsMapping
implements FieldMetaData

Maps a persistent field to the relational schema.


Field Summary
static java.lang.String CONTAINER_META
          Extension key used to mark whether collection/map mappings should use a metadata column to differentiate between null and empty containers, and to store comparator information.
static java.lang.String DELETE_ACTION
          Extension key used to mark the foreign key delete action to use for the field, if it represents a foreign key to a related object.
static java.lang.String ELEMENT_DELETE_ACTION
          Extension key used to mark the foreign key delete action to use for the element values of a collection, if they represent a foreign key to a related object.
static java.lang.String ELEMENT_INDEXED
          Extension key used to mark whether element columns are indexed.
static java.lang.String ELEMENT_SIZE
          Extension key used to mark the size of element data columns.
protected static com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] EMPTY_COLUMNS
           
static java.lang.String INDEXED
          Extension key used to mark whether data columns are indexed.
static java.lang.String KEY_DELETE_ACTION
          Extension key used to mark the foreign key delete action to use for the keys of a map, if they represent a foreign key to a related object.
static java.lang.String KEY_INDEXED
          Extension key used to mark whether key columns are indexed.
static java.lang.String KEY_SIZE
          Extension key used to mark the size of key data columns.
static java.lang.String ORDERED
          Extension key used to mark whether a collection/array mapping should use an extra column to maintain order.
static java.lang.String REF_DELETE_ACTION
          Extension key used to mark the foreign key delete action on reference columns.
static java.lang.String REF_INDEXED
          Extension key used to mark whether reference columns are indexed.
static java.lang.String SIZE
          Extension key used to mark the size of data columns.
static int TYPE_ASCII_STREAM
           
static int TYPE_BINARY_STREAM
           
static int TYPE_BLOB
           
static int TYPE_BYTES
           
static int TYPE_CHAR_STREAM
           
static int TYPE_CLOB
           
static int TYPE_JDBC_DEFAULT
           
static int TYPE_REF
           
static int TYPE_SQL_ARRAY
           
static int TYPE_SQL_DATE
           
static int TYPE_SQL_OBJECT
           
static int TYPE_TIME
           
static int TYPE_TIMESTAMP
           
static java.lang.String USE_FIELD_MAP
          Extension key used to indicate the type of field mapping to use.
static java.lang.String USE_NULL_IND
          Extension key used to specify the null-indicator field name to use for an embedded mapping.
static java.lang.String VALUE_DELETE_ACTION
          Extension key used to mark the foreign key delete action to use for the values of a map, if they represent a foreign key to a related object.
static java.lang.String VALUE_INDEXED
          Extension key used to mark whether value columns are indexed.
static java.lang.String VALUE_SIZE
          Extension key used to mark the size of value data columns.
 
Fields inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
DEFAULT, FALSE, LOB, TRUE, UNIQUE
 
Fields inherited from interface com.solarmetric.rd.kodo.meta.FieldMetaData
DEPENDENT, ELEMENT_DEPENDENT, ELEMENT_PC_CLASS, INVERSE_OWNER, KEY_DEPENDENT, KEY_PC_CLASS, MANAGE_NONE, MANAGE_PERSISTENT, MANAGE_TRANSACTIONAL, NULL_DEFAULT, NULL_EXCEPTION, NULL_NONE, PC_CLASS, TYPE_ARRAY, TYPE_BIGDECIMAL, TYPE_BIGINTEGER, TYPE_BOOLEAN, TYPE_BOOLEAN_OBJ, TYPE_BYTE, TYPE_BYTE_OBJ, TYPE_CHAR, TYPE_CHAR_OBJ, TYPE_COLLECTION, TYPE_DATE, TYPE_DOUBLE, TYPE_DOUBLE_OBJ, TYPE_FCO, TYPE_FLOAT, TYPE_FLOAT_OBJ, TYPE_INT, TYPE_INT_OBJ, TYPE_LOCALE, TYPE_LONG, TYPE_LONG_OBJ, TYPE_MAP, TYPE_NUMBER, TYPE_OBJECT, TYPE_PC_OBJECT, TYPE_SHORT, TYPE_SHORT_OBJ, TYPE_STRING, VALUE_DEPENDENT, VALUE_PC_CLASS
 
Constructor Summary
FieldMapping(com.solarmetric.rd.kodo.meta.FieldMetaData meta)
          Constructor.
 
Method Summary
 void addExtension(java.lang.String key, java.lang.Object value)
          Add a kodo vendor extension to this entity.
 void addExtension(java.lang.String vendor, java.lang.String key, java.lang.Object value)
          Add a vendor extension to this entity.
abstract  void appendIsEmpty(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql, com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
          Create a where clause to the given statement asking if this value is empty.
abstract  void appendIsNotNull(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql, com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
          Add a where clause to the given statement asking if this value is not null.
abstract  void appendIsNull(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql, com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
          Add a where clause to the given statement asking if this value is null.
protected  com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository checkRepository()
           
 int compareTo(java.lang.Object other)
           
 void deleteEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store, java.sql.Connection conn)
          Override this method to customize deleting the given mapping (used with embedded values only).
 void deleteEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
          Delete values for the mapping.
 boolean getBooleanExtension(java.lang.String key)
          Get the value as a boolean.
 boolean getBooleanExtension(java.lang.String vendor, java.lang.String key)
          Get the value as a boolean.
abstract  com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] getColumns()
          Return the data columns for this mapping.
 int getContainerMeta()
           
 java.lang.Object getDataStoreValue(java.lang.Object val)
          Translate the given field value to its datastore equivalent.
 java.lang.Class getDeclaredElementType()
          Return the declared class of the described field.
 int getDeclaredIndex()
          Return the relative index of this persistent/transactional field.
 java.lang.Class getDeclaredKeyType()
          Return the declared class of the described field.
 java.lang.Class getDeclaredType()
          Return the declared class of the described field.
static com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[] getDefaults()
          Return the default set of available field mappings.
 int getDeleteAction()
           
 double getDoubleExtension(java.lang.String key)
          Get the value as a double.
 double getDoubleExtension(java.lang.String vendor, java.lang.String key)
          Get the value as a double.
 int getElementDeleteAction()
           
 int getElementIndexed()
           
 java.lang.String getElementPCClass()
          The value of the FieldMetaData.ELEMENT_PC_CLASS extension key.
 int getElementSize()
           
 java.lang.Class getElementType()
          Return the type of objects stored in the array/collection/map; defaults to Object if not specified, or null if this field does not represent an array/collection/map type.
 int getElementTypeCode()
          Return the type code of objects stored in the array/collection/map, or -1 if not an array/collection/map.
 com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getElementTypeMapping()
          Convenience method to make casting from getElementTypeMetaData() unnecessary.
 com.solarmetric.rd.kodo.meta.ClassMetaData getElementTypeMetaData()
          Return metadata for the element type, or null if not persistent.
 com.solarmetric.rd.kodo.meta.Extensions getEmbeddedExtensions(java.lang.String key, boolean create)
          Return the embedded extensions under the extension with the given key.
 com.solarmetric.rd.kodo.meta.Extensions getEmbeddedExtensions(java.lang.String vendor, java.lang.String key, boolean create)
          Return the embedded extensions under the extension with the given key.
 java.lang.String[] getExtensionKeys()
          Return all extension keys for vendor kodo.
 java.lang.String[] getExtensionKeys(java.lang.String vendor)
          Return all extension keys for the given vendor.
 java.lang.String[] getExtensionVendors()
          Return all vendors who have extension keys at this level.
 byte getFieldFlag()
          Returns the JDO flag type for this field.
 java.lang.String getFullName()
          Return the full name of the described field, in the form <class>.<field>.
 int getIndex()
          Return the absolute index of this persistent/transactional field.
 int getIndexed()
           
 int getIntExtension(java.lang.String key)
          Get the value as an int.
 int getIntExtension(java.lang.String vendor, java.lang.String key)
          Get the value as an int.
 java.lang.String getInverseOwner()
          Return the field marked as an inverse via the FieldMetaData.INVERSE_OWNER extension key.
 com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping getInverseOwnerMapping()
          Convenience method to avoid casting the result of getInverseOwnerMetaData().
 com.solarmetric.rd.kodo.meta.FieldMetaData getInverseOwnerMetaData()
          Return the metadata for the field's inverse.
abstract  com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] getKeyColumns()
          Return the key columns for this mapping, or empty array if none.
 java.lang.Object getKeyDataStoreValue(java.lang.Object val)
          Translate the given key value to its datastore equivalent.
 int getKeyDeleteAction()
           
 int getKeyIndexed()
           
 java.lang.String getKeyPCClass()
          The value of the FieldMetaData.KEY_PC_CLASS extension key.
 int getKeySize()
           
 java.lang.Class getKeyType()
          The type of objects used as keys in the map; defaults to Object if not specified, or null if this field is not a map.
 int getKeyTypeCode()
          The type code of objects used as keys in the map.
 com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getKeyTypeMapping()
          Convenience method to make casting from getKeyTypeMetaData() unnecessary.
 com.solarmetric.rd.kodo.meta.ClassMetaData getKeyTypeMetaData()
          Return metadata for the key type, or null if not persistent.
 int getManagement()
          Return the management level for the field.
 com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository getMappingRepository()
          Return the repository for this mapping.
 com.solarmetric.rd.kodo.meta.FieldMetaData getMetaData()
          Return the underlying metadata.
 java.lang.String getName()
          Return the name of the described field.
 int getNullValue()
          How the data store should treat null values for this field: FieldMetaData.NULL_NONE: leave null values as null in the data store FieldMetaData.NULL_EXCEPTION: throw an exception if this field is null at commit FieldMetaData.NULL_DEFAULT: use the database default if this field is null at commit Defaults to FieldMetaData.NULL_NONE.
 java.lang.Object getObjectExtension(java.lang.String key)
          Get the value of a kodo extension.
 java.lang.Object getObjectExtension(java.lang.String vendor, java.lang.String key)
          Get the value of an extension.
 int getOrdered()
           
 com.solarmetric.rd.kodo.meta.ClassMetaData getOwner()
          Return the owning metadata for this field.
 com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getOwnerMapping()
          Convenience method to make casting getOwner() unnecessary.
 java.lang.String getPCClass()
          The value of the FieldMetaData.PC_CLASS extension key.
 int getRefDeleteAction()
           
 int getRefIndexed()
           
 int getSize()
           
 java.lang.String getStringExtension(java.lang.String key)
          Get the value as a string.
 java.lang.String getStringExtension(java.lang.String vendor, java.lang.String key)
          Get the value as a string.
 java.lang.Class getType()
          Return the class of the described field.
 int getTypeCode()
          Return the type code of the described field.
 com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getTypeMapping()
          Convenience method to make casting from getTypeMetaData() unnecessary.
 com.solarmetric.rd.kodo.meta.ClassMetaData getTypeMetaData()
          Return metadata for the field's type, if the type is persistent.
 java.lang.String getUseFieldMapping()
           
 int getUseNullIndicator()
           
abstract  com.solarmetric.rd.kodo.impl.jdbc.schema.Table getVRowTable()
          Return the table this mapping uses for the columns that are part of the 'virtual row' that this object spans in the database.
 boolean hasExtension(java.lang.String key)
          Return true if the extension with the given key exists for vendor kodo.
 boolean hasExtension(java.lang.String vendor, java.lang.String key)
          Return true if the extension with the given key exists for the given vendor.
 void invalidateResolve()
          For implemntation use.
 java.lang.Boolean isCustomDeleteEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
          Return Boolean.FALSE if this mapping does not customize the delete process, Boolean.TRUE if it does, or null if it does customize the delete, but also relies on the standard delete method being called.
 java.lang.Boolean isCustomNullEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
          Return Boolean.FALSE if this mapping does not customize the nulling process, Boolean.TRUE if it does, or null if it does customize the nulling, but also relies on the standard nulling method being called.
 boolean isDeleteActionDeferred()
           
 boolean isDependent()
          Return true if the FieldMetaData.DEPENDENT extension key is true and the field is a first class object.
protected  boolean isEager()
          Return whether this mapping can be selected in "eagerly" in batch mode, rather than on-demand.
 boolean isElementDeleteActionDeferred()
           
 boolean isElementDependent()
          Return true if the FieldMetaData.ELEMENT_DEPENDENT/FieldMetaData.VALUE_DEPENDENT extension key is true and the element/value contains first class objects.
protected  boolean isElementEager()
          Return whether this mapping can be selected in "eagerly" in batch mode, rather than on-demand.
 boolean isEmbedded()
          This attribute is a hint to the JDO implementation to store this field in the same instance as the class, rather than as a separate datastore instance.
 boolean isEmbeddedElement()
          A hint to the JDO implementation on whether the arary/collection/map values should be stored as part of the instance rather than as their own instances in the data store.
 boolean isEmbeddedKey()
          A hint to the JDO implementation on whether the map keys should be stored as part of the instance rather than as their own instances in the data store.
 boolean isEmpty()
          Return true if there are no keys for any vendor.
 boolean isExplicit()
          Return true if the field is explicitly declared in the metadata.
 boolean isInDefaultFetchGroup()
          Return true if the field should be fetched at once along with all other default fetch group fields, rather than individually.
 boolean isKeyDeleteActionDeferred()
           
 boolean isKeyDependent()
          Return true if the FieldMetaData.KEY_DEPENDENT extension key is true and the key contains first class objects.
protected  boolean isKeyEager()
          Return whether this mapping can be selected in "eagerly" in batch mode, rather than on-demand.
 boolean isPrimaryKey()
          If true, the field was specified in the meta data to be a primary key field.
 boolean isRefDeleteActionDeferred()
           
protected static boolean isValue(int type)
          Return true if the given type code represents a simple JDBC value.
abstract  void join(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
          Join this value to the class table.
abstract  void joinKey(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
          Join the key value to the class table.
abstract  void joinKeyRelation(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
          Join this value's table to the table for the related first class object key type, if any.
abstract  void joinRelation(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
          Join this value's table to the table for the related first class object type, if any.
abstract  void load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store, java.sql.Connection conn)
          Load secondary data.
abstract  void load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store, com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res)
          Load virtual row data; the given result is not guaranteed to contain data for this field, so the field mapping should make sure the result contains its needed column data before loading.
 com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping newInstance(com.solarmetric.rd.kodo.meta.FieldMetaData meta)
          Return a new instance of this class.
static com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping newInstance(java.lang.String type, com.solarmetric.rd.kodo.meta.FieldMetaData meta)
          Return the mapping for the given mapping name.
 void nullEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store, java.sql.Connection conn)
          Override this method to customize nulling the given mapping (used with embedded values only).
 void nullEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
          Null values for the mapping.
 boolean removeEmbeddedExtensions(java.lang.String key)
          Remove the embedded extensions for the given key.
 boolean removeEmbeddedExtensions(java.lang.String vendor, java.lang.String key)
          Remove the embedded extensions for the given key.
 boolean removeExtension(java.lang.String key)
          Remove a kodo vendor extension to this entity.
 boolean removeExtension(java.lang.String vendor, java.lang.String key)
          Remove a vendor extension to this entity.
 void resolve()
          For implementation use.
abstract  void select(com.solarmetric.rd.kodo.impl.jdbc.runtime.Select sel, boolean multiple)
          Select the virtual row columns of this mapping.
abstract  java.lang.Boolean selectVRowData(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
          Return Boolean.TRUE if 'virtual row' data needs to be selected, Boolean.FALSE if it does not need to be, and null if it would be desirable to select it, but is not necessary.
 void setContainerMeta(int meta)
           
 void setDeclaredIndex(int index)
          Used by ClassMetaData to set index.
 void setDeleteAction(int action, boolean deferred)
           
 void setDependent(boolean cascade)
          Set the value of the FieldMetaData.DEPENDENT standard extension.
 void setElementDeleteAction(int action, boolean deferred)
           
 void setElementDependent(boolean cascade)
          Set the value of the FieldMetaData.ELEMENT_DEPENDENT extension key.
 void setElementIndexed(int idx)
           
 void setElementPCClass(java.lang.String pc)
          The value of the FieldMetaData.ELEMENT_PC_CLASS extension key.
 void setElementSize(int size)
           
 void setElementType(java.lang.Class cls)
          Set the element class for this array/collection/map field.
 void setEmbedded(boolean embedded)
          Set the embedded value for the field.
 void setEmbeddedElement(boolean embedded)
          Set whether the elements should be embedded.
 void setEmbeddedKey(boolean embedded)
          Set whether the keys are embedded.
 void setExplicit(boolean explicit)
          Set whether the field was explicitly declared in the metadata.
 void setInDefaultFetchGroup(boolean dfg)
          Set whether the field is in the default fetch group.
 void setIndex(int index)
          Used by ClassMetaData to set index.
 void setIndexed(int idx)
           
 void setInverseOwner(java.lang.String inverse)
          Set the field marked as an inverse via the FieldMetaData.INVERSE_OWNER extension key.
 void setKeyDeleteAction(int action, boolean deferred)
           
 void setKeyDependent(boolean cascade)
          Set the value of the FieldMetaData.KEY_DEPENDENT extension key.
 void setKeyIndexed(int idx)
           
 void setKeyPCClass(java.lang.String pc)
          The value of the FieldMetaData.KEY_PC_CLASS extension key.
 void setKeySize(int size)
           
 void setKeyType(java.lang.Class cls)
          Set the key type for this map field.
 void setManagement(int manage)
          Set the management level for the field.
 void setName(java.lang.String name)
          Set the name of the described field.
 void setNullValue(int nullValue)
          Set the null action for the field.
 void setOrdered(int ordered)
           
 void setOwner(com.solarmetric.rd.kodo.meta.ClassMetaData owner)
          Set the owning metadata for this field.
 void setPCClass(java.lang.String pc)
          The value of the FieldMetaData.PC_CLASS extension key.
 void setPrimaryKey(boolean primKey)
          Set whether this is a primary key field.
 void setRefDeleteAction(int action, boolean deferred)
           
 void setRefIndexed(int idx)
           
 void setSize(int size)
           
 void setType(java.lang.Class type)
          Set the class of the described field.
 void setUseFieldMapping(java.lang.String map)
           
 void setUseNullIndicator(int ind)
           
 java.lang.String toString()
           
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
checkIndex, createColumn, delete, delete, fromMappingInfo, getDBDictionary, getForeignKey, getLog, getMappingType, getSchemaGroup, getTable, insert, insert, invalidMapping, isCustomDelete, isCustomInsert, isCustomUpdate, map, refSchemaComponents, reverseMap, setForeignKey, toMappingInfo, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.solarmetric.rd.kodo.meta.Extensions
addExtension, addExtension, getBooleanExtension, getBooleanExtension, getDoubleExtension, getDoubleExtension, getEmbeddedExtensions, getEmbeddedExtensions, getExtensionKeys, getExtensionKeys, getExtensionVendors, getIntExtension, getIntExtension, getObjectExtension, getObjectExtension, getStringExtension, getStringExtension, hasExtension, hasExtension, isEmpty, removeEmbeddedExtensions, removeEmbeddedExtensions, removeExtension, removeExtension
 

Field Detail

USE_FIELD_MAP

public static final java.lang.String USE_FIELD_MAP
Extension key used to indicate the type of field mapping to use.

See Also:
Constant Field Values

SIZE

public static final java.lang.String SIZE
Extension key used to mark the size of data columns. Use -1 to indicate a LOB column. Default is the database defualt, or 255 for strings.

See Also:
Constant Field Values

ELEMENT_SIZE

public static final java.lang.String ELEMENT_SIZE
Extension key used to mark the size of element data columns.

See Also:
SIZE, Constant Field Values

VALUE_SIZE

public static final java.lang.String VALUE_SIZE
Extension key used to mark the size of value data columns.

See Also:
SIZE, Constant Field Values

KEY_SIZE

public static final java.lang.String KEY_SIZE
Extension key used to mark the size of key data columns.

See Also:
SIZE, Constant Field Values

INDEXED

public static final java.lang.String INDEXED
Extension key used to mark whether data columns are indexed. Set to true, false, or unique. Default depends on the mapping involved.

See Also:
Constant Field Values

ELEMENT_INDEXED

public static final java.lang.String ELEMENT_INDEXED
Extension key used to mark whether element columns are indexed.

See Also:
INDEXED, Constant Field Values

VALUE_INDEXED

public static final java.lang.String VALUE_INDEXED
Extension key used to mark whether value columns are indexed.

See Also:
INDEXED, Constant Field Values

KEY_INDEXED

public static final java.lang.String KEY_INDEXED
Extension key used to mark whether key columns are indexed.

See Also:
INDEXED, Constant Field Values

REF_INDEXED

public static final java.lang.String REF_INDEXED
Extension key used to mark whether reference columns are indexed.

See Also:
INDEXED, Constant Field Values

CONTAINER_META

public static final java.lang.String CONTAINER_META
Extension key used to mark whether collection/map mappings should use a metadata column to differentiate between null and empty containers, and to store comparator information. Set to true or false . Defaults to false.

See Also:
Constant Field Values

ORDERED

public static final java.lang.String ORDERED
Extension key used to mark whether a collection/array mapping should use an extra column to maintain order. The default is true for fields declared as array or list types, and false otherwise. Note that only the owner of a field can maintain ordering on it, so inverses in two-sided relations and 1-many relation't can't be ordered. Legal values are true and false.

See Also:
Constant Field Values

DELETE_ACTION

public static final java.lang.String DELETE_ACTION
Extension key used to mark the foreign key delete action to use for the field, if it represents a foreign key to a related object. Legal values are none, null, null-deferred, default, default-deferred, exception, exception-deferred, cascade, cascade-deferred. Default depends on mapping involved.

See Also:
Constant Field Values

ELEMENT_DELETE_ACTION

public static final java.lang.String ELEMENT_DELETE_ACTION
Extension key used to mark the foreign key delete action to use for the element values of a collection, if they represent a foreign key to a related object.

See Also:
DELETE_ACTION, Constant Field Values

KEY_DELETE_ACTION

public static final java.lang.String KEY_DELETE_ACTION
Extension key used to mark the foreign key delete action to use for the keys of a map, if they represent a foreign key to a related object.

See Also:
DELETE_ACTION, Constant Field Values

VALUE_DELETE_ACTION

public static final java.lang.String VALUE_DELETE_ACTION
Extension key used to mark the foreign key delete action to use for the values of a map, if they represent a foreign key to a related object.

See Also:
DELETE_ACTION, Constant Field Values

REF_DELETE_ACTION

public static final java.lang.String REF_DELETE_ACTION
Extension key used to mark the foreign key delete action on reference columns.

See Also:
DELETE_ACTION, Constant Field Values

USE_NULL_IND

public static final java.lang.String USE_NULL_IND
Extension key used to specify the null-indicator field name to use for an embedded mapping. Legal values are true or false. Defaults to true.

See Also:
Constant Field Values

TYPE_SQL_ARRAY

public static final int TYPE_SQL_ARRAY
See Also:
Constant Field Values

TYPE_ASCII_STREAM

public static final int TYPE_ASCII_STREAM
See Also:
Constant Field Values

TYPE_BINARY_STREAM

public static final int TYPE_BINARY_STREAM
See Also:
Constant Field Values

TYPE_BLOB

public static final int TYPE_BLOB
See Also:
Constant Field Values

TYPE_BYTES

public static final int TYPE_BYTES
See Also:
Constant Field Values

TYPE_CHAR_STREAM

public static final int TYPE_CHAR_STREAM
See Also:
Constant Field Values

TYPE_CLOB

public static final int TYPE_CLOB
See Also:
Constant Field Values

TYPE_SQL_DATE

public static final int TYPE_SQL_DATE
See Also:
Constant Field Values

TYPE_SQL_OBJECT

public static final int TYPE_SQL_OBJECT
See Also:
Constant Field Values

TYPE_REF

public static final int TYPE_REF
See Also:
Constant Field Values

TYPE_TIME

public static final int TYPE_TIME
See Also:
Constant Field Values

TYPE_TIMESTAMP

public static final int TYPE_TIMESTAMP
See Also:
Constant Field Values

TYPE_JDBC_DEFAULT

public static final int TYPE_JDBC_DEFAULT
See Also:
Constant Field Values

EMPTY_COLUMNS

protected static final com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] EMPTY_COLUMNS
Constructor Detail

FieldMapping

public FieldMapping(com.solarmetric.rd.kodo.meta.FieldMetaData meta)
Constructor. Supply underlying metadata.

Method Detail

newInstance

public static com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping newInstance(java.lang.String type,
                                                                              com.solarmetric.rd.kodo.meta.FieldMetaData meta)
Return the mapping for the given mapping name.


getDefaults

public static com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping[] getDefaults()
Return the default set of available field mappings.


getMetaData

public com.solarmetric.rd.kodo.meta.FieldMetaData getMetaData()
Return the underlying metadata.


getColumns

public abstract com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] getColumns()
Return the data columns for this mapping. This corresponds to the field-order foreign key columns in relations.


getKeyColumns

public abstract com.solarmetric.rd.kodo.impl.jdbc.schema.Column[] getKeyColumns()
Return the key columns for this mapping, or empty array if none.


getVRowTable

public abstract com.solarmetric.rd.kodo.impl.jdbc.schema.Table getVRowTable()
Return the table this mapping uses for the columns that are part of the 'virtual row' that this object spans in the database. The virtual row can include multiple tables if some fields are stored in joined tables. However, the virtual row includes only those other tables that are guaranteed to have exactly one row in them for the object's corresponding row in the primary table.


selectVRowData

public abstract java.lang.Boolean selectVRowData(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
Return Boolean.TRUE if 'virtual row' data needs to be selected, Boolean.FALSE if it does not need to be, and null if it would be desirable to select it, but is not necessary.


select

public abstract void select(com.solarmetric.rd.kodo.impl.jdbc.runtime.Select sel,
                            boolean multiple)
Select the virtual row columns of this mapping.

Parameters:
sel - the select to add to
multiple - whether this select is expected to match multiple objects

load

public abstract void load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                          com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
                          com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res)
                   throws java.sql.SQLException
Load virtual row data; the given result is not guaranteed to contain data for this field, so the field mapping should make sure the result contains its needed column data before loading.

java.sql.SQLException

load

public abstract void load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                          com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
                          java.sql.Connection conn)
                   throws java.sql.SQLException
Load secondary data.

java.sql.SQLException

nullEmbedded

public void nullEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                         com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
                  throws java.sql.SQLException
Null values for the mapping. This method is used when embedded values are nulled or replaced. The given state manager will be the owner of the object whose fields are now being nulled.

java.sql.SQLException
See Also:
Mapping.insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager)

deleteEmbedded

public void deleteEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                           com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
                    throws java.sql.SQLException
Delete values for the mapping. This method is used when embedded values are deleted. The given state manager will be the owner of the object that is being deleted.

java.sql.SQLException
See Also:
Mapping.insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager)

isCustomNullEmbedded

public java.lang.Boolean isCustomNullEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
Return Boolean.FALSE if this mapping does not customize the nulling process, Boolean.TRUE if it does, or null if it does customize the nulling, but also relies on the standard nulling method being called. Implement the nullEmbedded(StateManagerImpl,JDBCStoreManager,Connection) method to override the default update behavior.


isCustomDeleteEmbedded

public java.lang.Boolean isCustomDeleteEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
Return Boolean.FALSE if this mapping does not customize the delete process, Boolean.TRUE if it does, or null if it does customize the delete, but also relies on the standard delete method being called. Implement the deleteEmbedded(StateManagerImpl,JDBCStoreManager,Connection) method to override the default update behavior.


nullEmbedded

public void nullEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                         com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
                         java.sql.Connection conn)
                  throws java.sql.SQLException
Override this method to customize nulling the given mapping (used with embedded values only). The given state manager will represent the object that embeds the object being nulled.

java.sql.SQLException

deleteEmbedded

public void deleteEmbedded(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
                           com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
                           java.sql.Connection conn)
                    throws java.sql.SQLException
Override this method to customize deleting the given mapping (used with embedded values only). The given state manager will represent the object that embeds the object being deleted.

java.sql.SQLException

getDataStoreValue

public java.lang.Object getDataStoreValue(java.lang.Object val)
Translate the given field value to its datastore equivalent. If the mapping occupies multiple columns in the datastore, return an object array, else return a single object. Simply returns the given object by default.


getKeyDataStoreValue

public java.lang.Object getKeyDataStoreValue(java.lang.Object val)
Translate the given key value to its datastore equivalent. If the mapping occupies multiple columns in the datastore, return an object array, else return a single object. Simply returns the given object by default.


appendIsEmpty

public abstract void appendIsEmpty(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql,
                                   com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
Create a where clause to the given statement asking if this value is empty.


appendIsNull

public abstract void appendIsNull(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql,
                                  com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
Add a where clause to the given statement asking if this value is null.


appendIsNotNull

public abstract void appendIsNotNull(com.solarmetric.rd.kodo.impl.jdbc.schema.SQLBuffer sql,
                                     com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
Add a where clause to the given statement asking if this value is not null.


join

public abstract void join(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
Join this value to the class table.


joinKey

public abstract void joinKey(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
Join the key value to the class table.


joinRelation

public abstract void joinRelation(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
Join this value's table to the table for the related first class object type, if any.


joinKeyRelation

public abstract void joinKeyRelation(com.solarmetric.rd.kodo.impl.jdbc.runtime.Joins joins)
Join this value's table to the table for the related first class object key type, if any.


newInstance

public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping newInstance(com.solarmetric.rd.kodo.meta.FieldMetaData meta)
Return a new instance of this class.


isValue

protected static boolean isValue(int type)
Return true if the given type code represents a simple JDBC value.


isEager

protected boolean isEager()
Return whether this mapping can be selected in "eagerly" in batch mode, rather than on-demand.


isElementEager

protected boolean isElementEager()
Return whether this mapping can be selected in "eagerly" in batch mode, rather than on-demand.


isKeyEager

protected boolean isKeyEager()
Return whether this mapping can be selected in "eagerly" in batch mode, rather than on-demand.


getUseFieldMapping

public java.lang.String getUseFieldMapping()

setUseFieldMapping

public void setUseFieldMapping(java.lang.String map)

getSize

public int getSize()

setSize

public void setSize(int size)

getElementSize

public int getElementSize()

setElementSize

public void setElementSize(int size)

getKeySize

public int getKeySize()

setKeySize

public void setKeySize(int size)

getIndexed

public int getIndexed()

setIndexed

public void setIndexed(int idx)

getElementIndexed

public int getElementIndexed()

setElementIndexed

public void setElementIndexed(int idx)

getKeyIndexed

public int getKeyIndexed()

setKeyIndexed

public void setKeyIndexed(int idx)

getRefIndexed

public int getRefIndexed()

setRefIndexed

public void setRefIndexed(int idx)

getContainerMeta

public int getContainerMeta()

setContainerMeta

public void setContainerMeta(int meta)

getOrdered

public int getOrdered()

setOrdered

public void setOrdered(int ordered)

getDeleteAction

public int getDeleteAction()

isDeleteActionDeferred

public boolean isDeleteActionDeferred()

setDeleteAction

public void setDeleteAction(int action,
                            boolean deferred)

getElementDeleteAction

public int getElementDeleteAction()

isElementDeleteActionDeferred

public boolean isElementDeleteActionDeferred()

setElementDeleteAction

public void setElementDeleteAction(int action,
                                   boolean deferred)

getKeyDeleteAction

public int getKeyDeleteAction()

isKeyDeleteActionDeferred

public boolean isKeyDeleteActionDeferred()

setKeyDeleteAction

public void setKeyDeleteAction(int action,
                               boolean deferred)

getRefDeleteAction

public int getRefDeleteAction()

isRefDeleteActionDeferred

public boolean isRefDeleteActionDeferred()

setRefDeleteAction

public void setRefDeleteAction(int action,
                               boolean deferred)

getUseNullIndicator

public int getUseNullIndicator()

setUseNullIndicator

public void setUseNullIndicator(int ind)

getOwner

public com.solarmetric.rd.kodo.meta.ClassMetaData getOwner()
Description copied from interface: FieldMetaData
Return the owning metadata for this field.

Specified by:
getOwner in interface FieldMetaData

getOwnerMapping

public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getOwnerMapping()
Convenience method to make casting getOwner() unnecessary.


setOwner

public void setOwner(com.solarmetric.rd.kodo.meta.ClassMetaData owner)
Description copied from interface: FieldMetaData
Set the owning metadata for this field.

Specified by:
setOwner in interface FieldMetaData

getName

public java.lang.String getName()
Description copied from interface: FieldMetaData
Return the name of the described field.

Specified by:
getName in interface FieldMetaData

setName

public void setName(java.lang.String name)
Description copied from interface: FieldMetaData
Set the name of the described field.

Specified by:
setName in interface FieldMetaData

getFullName

public java.lang.String getFullName()
Description copied from interface: FieldMetaData
Return the full name of the described field, in the form <class>.<field>.

Specified by:
getFullName in interface FieldMetaData

getType

public java.lang.Class getType()
Description copied from interface: FieldMetaData
Return the class of the described field.

Specified by:
getType in interface FieldMetaData

setType

public void setType(java.lang.Class type)
Description copied from interface: FieldMetaData
Set the class of the described field.

Specified by:
setType in interface FieldMetaData

getDeclaredType

public java.lang.Class getDeclaredType()
Description copied from interface: FieldMetaData
Return the declared class of the described field. This can differ from the return value of FieldMetaData.getType() if the user indicates a more specific type with the FieldMetaData.PC_CLASS extension.

Specified by:
getDeclaredType in interface FieldMetaData

getTypeCode

public int getTypeCode()
Description copied from interface: FieldMetaData
Return the type code of the described field.

Specified by:
getTypeCode in interface FieldMetaData

getTypeMetaData

public com.solarmetric.rd.kodo.meta.ClassMetaData getTypeMetaData()
Description copied from interface: FieldMetaData
Return metadata for the field's type, if the type is persistent.

Specified by:
getTypeMetaData in interface FieldMetaData

getTypeMapping

public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getTypeMapping()
Convenience method to make casting from getTypeMetaData() unnecessary.


getIndex

public int getIndex()
Description copied from interface: FieldMetaData
Return the absolute index of this persistent/transactional field.

Specified by:
getIndex in interface FieldMetaData

setIndex

public void setIndex(int index)
Description copied from interface: FieldMetaData
Used by ClassMetaData to set index.

Specified by:
setIndex in interface FieldMetaData

getDeclaredIndex

public int getDeclaredIndex()
Description copied from interface: FieldMetaData
Return the relative index of this persistent/transactional field.

Specified by:
getDeclaredIndex in interface FieldMetaData

setDeclaredIndex

public void setDeclaredIndex(int index)
Description copied from interface: FieldMetaData
Used by ClassMetaData to set index.

Specified by:
setDeclaredIndex in interface FieldMetaData

getManagement

public int getManagement()
Description copied from interface: FieldMetaData
Return the management level for the field. Will be one of: Defaults to FieldMetaData.MANAGE_PERSISTENT.

Specified by:
getManagement in interface FieldMetaData

setManagement

public void setManagement(int manage)
Description copied from interface: FieldMetaData
Set the management level for the field.

Specified by:
setManagement in interface FieldMetaData
See Also:
FieldMetaData.getManagement()

isPrimaryKey

public boolean isPrimaryKey()
Description copied from interface: FieldMetaData
If true, the field was specified in the meta data to be a primary key field.

Specified by:
isPrimaryKey in interface FieldMetaData

setPrimaryKey

public void setPrimaryKey(boolean primKey)
Description copied from interface: FieldMetaData
Set whether this is a primary key field.

Specified by:
setPrimaryKey in interface FieldMetaData

getFieldFlag

public byte getFieldFlag()
Description copied from interface: FieldMetaData
Returns the JDO flag type for this field. See the field types in the PersistenceCapable interface.

Specified by:
getFieldFlag in interface FieldMetaData

getNullValue

public int getNullValue()
Description copied from interface: FieldMetaData
How the data store should treat null values for this field: Defaults to FieldMetaData.NULL_NONE.

Specified by:
getNullValue in interface FieldMetaData

setNullValue

public void setNullValue(int nullValue)
Description copied from interface: FieldMetaData
Set the null action for the field.

Specified by:
setNullValue in interface FieldMetaData
See Also:
FieldMetaData.getNullValue()

isExplicit

public boolean isExplicit()
Description copied from interface: FieldMetaData
Return true if the field is explicitly declared in the metadata.

Specified by:
isExplicit in interface FieldMetaData

setExplicit

public void setExplicit(boolean explicit)
Description copied from interface: FieldMetaData
Set whether the field was explicitly declared in the metadata.

Specified by:
setExplicit in interface FieldMetaData

isInDefaultFetchGroup

public boolean isInDefaultFetchGroup()
Description copied from interface: FieldMetaData
Return true if the field should be fetched at once along with all other default fetch group fields, rather than individually. Defaults to true if the field is not a collection or map or array or first class object or unknown object; defaults to false otherwise.

Specified by:
isInDefaultFetchGroup in interface FieldMetaData

setInDefaultFetchGroup

public void setInDefaultFetchGroup(boolean dfg)
Description copied from interface: FieldMetaData
Set whether the field is in the default fetch group.

Specified by:
setInDefaultFetchGroup in interface FieldMetaData

isEmbedded

public boolean isEmbedded()
Description copied from interface: FieldMetaData
This attribute is a hint to the JDO implementation to store this field in the same instance as the class, rather than as a separate datastore instance. Defaults to true if the field is not a collection or map or first class object; defaults to false otherwise. Implementations are permitted to ignore this attribute.

Specified by:
isEmbedded in interface FieldMetaData

setEmbedded

public void setEmbedded(boolean embedded)
Description copied from interface: FieldMetaData
Set the embedded value for the field.

Specified by:
setEmbedded in interface FieldMetaData

getElementType

public java.lang.Class getElementType()
Description copied from interface: FieldMetaData
Return the type of objects stored in the array/collection/map; defaults to Object if not specified, or null if this field does not represent an array/collection/map type.

Specified by:
getElementType in interface FieldMetaData

getDeclaredElementType

public java.lang.Class getDeclaredElementType()
Description copied from interface: FieldMetaData
Return the declared class of the described field. This can differ from the return value of FieldMetaData.getElementType() if the user indicates a more specific type with the FieldMetaData.ELEMENT_PC_CLASS extension.

Specified by:
getDeclaredElementType in interface FieldMetaData

getElementTypeCode

public int getElementTypeCode()
Description copied from interface: FieldMetaData
Return the type code of objects stored in the array/collection/map, or -1 if not an array/collection/map.

Specified by:
getElementTypeCode in interface FieldMetaData

getElementTypeMetaData

public com.solarmetric.rd.kodo.meta.ClassMetaData getElementTypeMetaData()
Description copied from interface: FieldMetaData
Return metadata for the element type, or null if not persistent.

Specified by:
getElementTypeMetaData in interface FieldMetaData

getElementTypeMapping

public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getElementTypeMapping()
Convenience method to make casting from getElementTypeMetaData() unnecessary.


setElementType

public void setElementType(java.lang.Class cls)
Description copied from interface: FieldMetaData
Set the element class for this array/collection/map field.

Specified by:
setElementType in interface FieldMetaData

isEmbeddedElement

public boolean isEmbeddedElement()
Description copied from interface: FieldMetaData
A hint to the JDO implementation on whether the arary/collection/map values should be stored as part of the instance rather than as their own instances in the data store. Implementations are permitted to ignore this attribute.

Specified by:
isEmbeddedElement in interface FieldMetaData

setEmbeddedElement

public void setEmbeddedElement(boolean embedded)
Description copied from interface: FieldMetaData
Set whether the elements should be embedded.

Specified by:
setEmbeddedElement in interface FieldMetaData

getKeyType

public java.lang.Class getKeyType()
Description copied from interface: FieldMetaData
The type of objects used as keys in the map; defaults to Object if not specified, or null if this field is not a map.

Specified by:
getKeyType in interface FieldMetaData

getDeclaredKeyType

public java.lang.Class getDeclaredKeyType()
Description copied from interface: FieldMetaData
Return the declared class of the described field. This can differ from the return value of FieldMetaData.getKeyType() if the user indicates a more specific type with the FieldMetaData.KEY_PC_CLASS extension.

Specified by:
getDeclaredKeyType in interface FieldMetaData

getKeyTypeCode

public int getKeyTypeCode()
Description copied from interface: FieldMetaData
The type code of objects used as keys in the map.

Specified by:
getKeyTypeCode in interface FieldMetaData

getKeyTypeMetaData

public com.solarmetric.rd.kodo.meta.ClassMetaData getKeyTypeMetaData()
Description copied from interface: FieldMetaData
Return metadata for the key type, or null if not persistent.

Specified by:
getKeyTypeMetaData in interface FieldMetaData

getKeyTypeMapping

public com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping getKeyTypeMapping()
Convenience method to make casting from getKeyTypeMetaData() unnecessary.


setKeyType

public void setKeyType(java.lang.Class cls)
Description copied from interface: FieldMetaData
Set the key type for this map field.

Specified by:
setKeyType in interface FieldMetaData

isEmbeddedKey

public boolean isEmbeddedKey()
Description copied from interface: FieldMetaData
A hint to the JDO implementation on whether the map keys should be stored as part of the instance rather than as their own instances in the data store. Implementations are permitted to ignore this attribute.

Specified by:
isEmbeddedKey in interface FieldMetaData

setEmbeddedKey

public void setEmbeddedKey(boolean embedded)
Description copied from interface: FieldMetaData
Set whether the keys are embedded.

Specified by:
setEmbeddedKey in interface FieldMetaData

getInverseOwner

public java.lang.String getInverseOwner()
Description copied from interface: FieldMetaData
Return the field marked as an inverse via the FieldMetaData.INVERSE_OWNER extension key.

Specified by:
getInverseOwner in interface FieldMetaData

setInverseOwner

public void setInverseOwner(java.lang.String inverse)
Description copied from interface: FieldMetaData
Set the field marked as an inverse via the FieldMetaData.INVERSE_OWNER extension key.

Specified by:
setInverseOwner in interface FieldMetaData

getInverseOwnerMetaData

public com.solarmetric.rd.kodo.meta.FieldMetaData getInverseOwnerMetaData()
Description copied from interface: FieldMetaData
Return the metadata for the field's inverse.

Specified by:
getInverseOwnerMetaData in interface FieldMetaData

getInverseOwnerMapping

public com.solarmetric.rd.kodo.impl.jdbc.meta.FieldMapping getInverseOwnerMapping()
Convenience method to avoid casting the result of getInverseOwnerMetaData().


isDependent

public boolean isDependent()
Description copied from interface: FieldMetaData
Return true if the FieldMetaData.DEPENDENT extension key is true and the field is a first class object.

Specified by:
isDependent in interface FieldMetaData

setDependent

public void setDependent(boolean cascade)
Description copied from interface: FieldMetaData
Set the value of the FieldMetaData.DEPENDENT standard extension.

Specified by:
setDependent in interface FieldMetaData

isElementDependent

public boolean isElementDependent()
Description copied from interface: FieldMetaData
Return true if the FieldMetaData.ELEMENT_DEPENDENT/FieldMetaData.VALUE_DEPENDENT extension key is true and the element/value contains first class objects.

Specified by:
isElementDependent in interface FieldMetaData

setElementDependent

public void setElementDependent(boolean cascade)
Description copied from interface: FieldMetaData
Set the value of the FieldMetaData.ELEMENT_DEPENDENT extension key.

Specified by:
setElementDependent in interface FieldMetaData

isKeyDependent

public boolean isKeyDependent()
Description copied from interface: FieldMetaData
Return true if the FieldMetaData.KEY_DEPENDENT extension key is true and the key contains first class objects.

Specified by:
isKeyDependent in interface FieldMetaData

setKeyDependent

public void setKeyDependent(boolean cascade)
Description copied from interface: FieldMetaData
Set the value of the FieldMetaData.KEY_DEPENDENT extension key.

Specified by:
setKeyDependent in interface FieldMetaData

getPCClass

public java.lang.String getPCClass()
Description copied from interface: FieldMetaData
The value of the FieldMetaData.PC_CLASS extension key.

Specified by:
getPCClass in interface FieldMetaData

setPCClass

public void setPCClass(java.lang.String pc)
Description copied from interface: FieldMetaData
The value of the FieldMetaData.PC_CLASS extension key.

Specified by:
setPCClass in interface FieldMetaData

getElementPCClass

public java.lang.String getElementPCClass()
Description copied from interface: FieldMetaData
The value of the FieldMetaData.ELEMENT_PC_CLASS extension key.

Specified by:
getElementPCClass in interface FieldMetaData

setElementPCClass

public void setElementPCClass(java.lang.String pc)
Description copied from interface: FieldMetaData
The value of the FieldMetaData.ELEMENT_PC_CLASS extension key.

Specified by:
setElementPCClass in interface FieldMetaData

getKeyPCClass

public java.lang.String getKeyPCClass()
Description copied from interface: FieldMetaData
The value of the FieldMetaData.KEY_PC_CLASS extension key.

Specified by:
getKeyPCClass in interface FieldMetaData

setKeyPCClass

public void setKeyPCClass(java.lang.String pc)
Description copied from interface: FieldMetaData
The value of the FieldMetaData.KEY_PC_CLASS extension key.

Specified by:
setKeyPCClass in interface FieldMetaData

compareTo

public int compareTo(java.lang.Object other)
Specified by:
compareTo in interface java.lang.Comparable

resolve

public void resolve()
Description copied from interface: FieldMetaData
For implementation use. This method resolves fields that might be other first class objects. It requires access to a respository. It is called automatically when the owning class metadata is resolved.

Specified by:
resolve in interface FieldMetaData

invalidateResolve

public void invalidateResolve()
Description copied from interface: FieldMetaData
For implemntation use. Concrete implementations should call this method when changing something that requires the field to be re-resolved.

Specified by:
invalidateResolve in interface FieldMetaData

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getMappingRepository

public com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository getMappingRepository()
Description copied from class: Mapping
Return the repository for this mapping.

Specified by:
getMappingRepository in class Mapping

checkRepository

protected com.solarmetric.rd.kodo.impl.jdbc.meta.MappingRepository checkRepository()

isEmpty

public boolean isEmpty()
Description copied from interface: Extensions
Return true if there are no keys for any vendor.

Specified by:
isEmpty in interface Extensions

getExtensionVendors

public java.lang.String[] getExtensionVendors()
Description copied from interface: Extensions
Return all vendors who have extension keys at this level.

Specified by:
getExtensionVendors in interface Extensions

getExtensionKeys

public java.lang.String[] getExtensionKeys()
Description copied from interface: Extensions
Return all extension keys for vendor kodo.

Specified by:
getExtensionKeys in interface Extensions

getExtensionKeys

public java.lang.String[] getExtensionKeys(java.lang.String vendor)
Description copied from interface: Extensions
Return all extension keys for the given vendor.

Specified by:
getExtensionKeys in interface Extensions

hasExtension

public boolean hasExtension(java.lang.String key)
Description copied from interface: Extensions
Return true if the extension with the given key exists for vendor kodo.

Specified by:
hasExtension in interface Extensions

hasExtension

public boolean hasExtension(java.lang.String vendor,
                            java.lang.String key)
Description copied from interface: Extensions
Return true if the extension with the given key exists for the given vendor.

Specified by:
hasExtension in interface Extensions

addExtension

public void addExtension(java.lang.String key,
                         java.lang.Object value)
Description copied from interface: Extensions
Add a kodo vendor extension to this entity.

Specified by:
addExtension in interface Extensions

addExtension

public void addExtension(java.lang.String vendor,
                         java.lang.String key,
                         java.lang.Object value)
Description copied from interface: Extensions
Add a vendor extension to this entity.

Specified by:
addExtension in interface Extensions

removeExtension

public boolean removeExtension(java.lang.String key)
Description copied from interface: Extensions
Remove a kodo vendor extension to this entity.

Specified by:
removeExtension in interface Extensions

removeExtension

public boolean removeExtension(java.lang.String vendor,
                               java.lang.String key)
Description copied from interface: Extensions
Remove a vendor extension to this entity.

Specified by:
removeExtension in interface Extensions

getObjectExtension

public java.lang.Object getObjectExtension(java.lang.String key)
Description copied from interface: Extensions
Get the value of a kodo extension.

Specified by:
getObjectExtension in interface Extensions

getObjectExtension

public java.lang.Object getObjectExtension(java.lang.String vendor,
                                           java.lang.String key)
Description copied from interface: Extensions
Get the value of an extension.

Specified by:
getObjectExtension in interface Extensions

getStringExtension

public java.lang.String getStringExtension(java.lang.String key)
Description copied from interface: Extensions
Get the value as a string.

Specified by:
getStringExtension in interface Extensions

getStringExtension

public java.lang.String getStringExtension(java.lang.String vendor,
                                           java.lang.String key)
Description copied from interface: Extensions
Get the value as a string.

Specified by:
getStringExtension in interface Extensions

getIntExtension

public int getIntExtension(java.lang.String key)
Description copied from interface: Extensions
Get the value as an int.

Specified by:
getIntExtension in interface Extensions

getIntExtension

public int getIntExtension(java.lang.String vendor,
                           java.lang.String key)
Description copied from interface: Extensions
Get the value as an int.

Specified by:
getIntExtension in interface Extensions

getDoubleExtension

public double getDoubleExtension(java.lang.String key)
Description copied from interface: Extensions
Get the value as a double.

Specified by:
getDoubleExtension in interface Extensions

getDoubleExtension

public double getDoubleExtension(java.lang.String vendor,
                                 java.lang.String key)
Description copied from interface: Extensions
Get the value as a double.

Specified by:
getDoubleExtension in interface Extensions

getBooleanExtension

public boolean getBooleanExtension(java.lang.String key)
Description copied from interface: Extensions
Get the value as a boolean.

Specified by:
getBooleanExtension in interface Extensions

getBooleanExtension

public boolean getBooleanExtension(java.lang.String vendor,
                                   java.lang.String key)
Description copied from interface: Extensions
Get the value as a boolean.

Specified by:
getBooleanExtension in interface Extensions

getEmbeddedExtensions

public com.solarmetric.rd.kodo.meta.Extensions getEmbeddedExtensions(java.lang.String key,
                                                                     boolean create)
Description copied from interface: Extensions
Return the embedded extensions under the extension with the given key. If there are no embedded extensions, a new extensions object will be created and returned if the create parameter is true.

Specified by:
getEmbeddedExtensions in interface Extensions

getEmbeddedExtensions

public com.solarmetric.rd.kodo.meta.Extensions getEmbeddedExtensions(java.lang.String vendor,
                                                                     java.lang.String key,
                                                                     boolean create)
Description copied from interface: Extensions
Return the embedded extensions under the extension with the given key. If there are no embedded extensions, a new extensions object will be created and returned if the create parameter is true.

Specified by:
getEmbeddedExtensions in interface Extensions

removeEmbeddedExtensions

public boolean removeEmbeddedExtensions(java.lang.String key)
Description copied from interface: Extensions
Remove the embedded extensions for the given key.

Specified by:
removeEmbeddedExtensions in interface Extensions

removeEmbeddedExtensions

public boolean removeEmbeddedExtensions(java.lang.String vendor,
                                        java.lang.String key)
Description copied from interface: Extensions
Remove the embedded extensions for the given key.

Specified by:
removeEmbeddedExtensions in interface Extensions

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.