org.jpox.store.mapped.mapping
Class SingleFieldMultiMapping

java.lang.Object
  extended by org.jpox.store.mapped.mapping.JavaTypeMapping
      extended by org.jpox.store.mapped.mapping.SingleFieldMultiMapping
Direct Known Subclasses:
Arc2dDoubleMapping, Arc2dFloatMapping, ColorMapping, CubicCurve2dDoubleMapping, CubicCurve2dFloatMapping, Ellipse2dDoubleMapping, Ellipse2dFloatMapping, GregorianCalendarMapping, Line2dDoubleMapping, Line2dFloatMapping, Point2dDoubleMapping, Point2dFloatMapping, PointMapping, PolygonMapping, QuadCurve2dDoubleMapping, QuadCurve2dFloatMapping, Rectangle2dDoubleMapping, Rectangle2dFloatMapping, RectangleMapping, RoundRectangle2dDoubleMapping, RoundRectangle2dFloatMapping

public abstract class SingleFieldMultiMapping
extends JavaTypeMapping

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

Version:
$Revision: 1.8 $

Field Summary
 
Fields inherited from class org.jpox.store.mapped.mapping.JavaTypeMapping
datastoreContainer, datastoreMappings, dba, fmd, LOCALISER, MAPPING_ARRAY_ELEMENT, MAPPING_COLLECTION_ELEMENT, MAPPING_FIELD, MAPPING_MAP_KEY, MAPPING_MAP_VALUE, referenceMapping, roleForField, type
 
Constructor Summary
SingleFieldMultiMapping()
           
 
Method Summary
protected  void addDatastoreField(java.lang.String typeName)
          Convenience method to add a datastore field for this mapping.
 java.lang.String getJavaTypeForDatastoreMapping(int index)
          Accessor for the name of the java-type actually used when mapping the particular datastore field.
 
Methods inherited from class org.jpox.store.mapped.mapping.JavaTypeMapping
addDataStoreMapping, failureMessage, getBoolean, getByte, getChar, getDatastoreContainer, getDataStoreMapping, getDataStoreMappings, getDouble, getFieldMetaData, getFloat, getInt, getJavaType, getLong, getNumberOfDatastoreFields, getObject, getObject, getReferenceMapping, getRoleForField, getSampleValue, getShort, getString, getType, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, initialize, isNullable, isSerialised, newLiteral, newScalarExpression, setBoolean, setByte, setChar, setDefault, setDouble, setFieldInformation, setFloat, setInt, setLong, setObject, setObject, setReferenceMapping, setRoleForField, setShort, setString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleFieldMultiMapping

public SingleFieldMultiMapping()
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.

getJavaTypeForDatastoreMapping

public java.lang.String getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore field. This java-type must have an entry in the datastore mappings.

Overrides:
getJavaTypeForDatastoreMapping in class JavaTypeMapping
Parameters:
index - requested datastore field index.
Returns:
the name of java-type for the requested datastore field.


Copyright © -2008 . All Rights Reserved.