org.datanucleus.store.mapped.mapping
Class SingleFieldMultiMapping

java.lang.Object
  extended by org.datanucleus.store.mapped.mapping.JavaTypeMapping
      extended by org.datanucleus.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.


Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, 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.
 boolean hasSimpleDatastoreRepresentation()
          Whether the mapping has a simple (single column) datastore representation.
 
Methods inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
addDatastoreMapping, equals, failureMessage, getBoolean, getByte, getChar, getColumnMetaDataForMember, getDatastoreContainer, getDatastoreMapping, getDatastoreMappings, getDouble, getFloat, getInt, getJavaType, getLong, getMemberMetaData, getNumberOfDatastoreMappings, getObject, getObject, getReferenceMapping, getRoleForMember, getSampleValue, getShort, getString, getType, getValueForDatastoreMapping, hashCode, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, initialize, isNullable, isSerialised, newLiteral, newScalarExpression, setBoolean, setByte, setChar, setDatastoreContainer, setDefault, setDouble, setFloat, setInt, setLong, setMemberMetaData, setObject, setObject, setReferenceMapping, setRoleForMember, setShort, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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. If this mapping is a "full" mapping (for a field in a table) then a Column will be added, otherwise (mapping representing a parameter in a query) will just add a datastore mapping. The datastore mapping is added to the end of the datastoreMappings.

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.

hasSimpleDatastoreRepresentation

public boolean hasSimpleDatastoreRepresentation()
Whether the mapping has a simple (single column) datastore representation.

Overrides:
hasSimpleDatastoreRepresentation in class JavaTypeMapping
Returns:
Whether it has a simple datastore representation (single column)


Copyright © 2010. All Rights Reserved.