org.jpox.store.mapping
Class SingleFieldMultiMapping

java.lang.Object
  extended byorg.jpox.store.mapping.JavaTypeMapping
      extended byorg.jpox.store.mapping.SingleFieldMultiMapping
Direct Known Subclasses:
ColorMapping, GregorianCalendarMapping, PointMapping

public abstract class SingleFieldMultiMapping
extends JavaTypeMapping

Mapping to represent a field that is mapped to multiple datastore columns.

Version:
$Revision: 1.3 $

Field Summary
protected  DatastoreContainerObject datastoreContainer
          The datastore container storing this field.
 
Fields inherited from class org.jpox.store.mapping.JavaTypeMapping
datastoreMappings, dba, fmd, LOCALISER, referenceMapping, type
 
Constructor Summary
SingleFieldMultiMapping(DatastoreAdapter dba, AbstractPropertyMetaData fmd, DatastoreContainerObject datastoreContainer)
          Constructor.
SingleFieldMultiMapping(DatastoreAdapter dba, java.lang.String type)
          Constructor.
 
Method Summary
protected  void addDatastoreField(java.lang.String typeName)
          Convenience method to add a datastore field for this mapping.
 DatastoreContainerObject getDatastoreContainer()
          Accessor for the datastore class (e.g in an RDBMS context, the Table)
 boolean includeInFetchStatement()
          Accessor for whether this mapping is to be included in any fetch statement.
 boolean includeInInsertStatement()
          Accessor for whether this mapping is to be included in the insert statement.
 boolean includeInUpdateStatement()
          Accessor for whether this mapping is to be included in the update statement.
 
Methods inherited from class org.jpox.store.mapping.JavaTypeMapping
addDataStoreMapping, failureMessage, getBoolean, getByte, getChar, getDataStoreMapping, getDataStoreMappings, getDouble, getFieldMetaData, getFloat, getInt, getJavaType, getLong, getNumberOfDatastoreFields, getObject, getObject, getReferenceMapping, getSampleValue, getShort, getString, getType, isNullable, newLiteral, newScalarExpression, setBoolean, setByte, setChar, setDefault, setDouble, setFloat, setInt, setLong, setObject, setObject, setReferenceMapping, setShort, setString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

datastoreContainer

protected DatastoreContainerObject datastoreContainer
The datastore container storing this field.

Constructor Detail

SingleFieldMultiMapping

public SingleFieldMultiMapping(DatastoreAdapter dba,
                               java.lang.String type)
Constructor.

Parameters:
dba - Datastore Adapter
type - Type of the field

SingleFieldMultiMapping

public SingleFieldMultiMapping(DatastoreAdapter dba,
                               AbstractPropertyMetaData fmd,
                               DatastoreContainerObject datastoreContainer)
Constructor.

Parameters:
dba - Datastore Adapter
fmd - AbstractPropertyMetaData for the field being mapped
datastoreContainer - Table containing the mapped object
Method Detail

addDatastoreField

protected void addDatastoreField(java.lang.String typeName)
Convenience method to add a datastore field for this mapping. The column will be created using the ColumnMetaData for the respective position of this column. The column is added to the end of the list of datastore fields.

Parameters:
typeName - Java type of the field to add the column for.

getDatastoreContainer

public DatastoreContainerObject getDatastoreContainer()
Accessor for the datastore class (e.g in an RDBMS context, the Table)

Specified by:
getDatastoreContainer in class JavaTypeMapping
Returns:
The datastore class containing this mapped field.

includeInFetchStatement

public boolean includeInFetchStatement()
Accessor for whether this mapping is to be included in any fetch statement.

Specified by:
includeInFetchStatement in class JavaTypeMapping
Returns:
Whether to include this mapping in a fetch statement

includeInUpdateStatement

public boolean includeInUpdateStatement()
Accessor for whether this mapping is to be included in the update statement.

Specified by:
includeInUpdateStatement in class JavaTypeMapping
Returns:
Whether to include in update statement

includeInInsertStatement

public boolean includeInInsertStatement()
Accessor for whether this mapping is to be included in the insert statement.

Specified by:
includeInInsertStatement in class JavaTypeMapping
Returns:
Whether to include in insert statement


Copyright © -2007 . All Rights Reserved.