org.datanucleus.store.mapped.mapping
Class ObjectMapping

java.lang.Object
  extended by org.datanucleus.store.mapped.mapping.JavaTypeMapping
      extended by org.datanucleus.store.mapped.mapping.MultiMapping
          extended by org.datanucleus.store.mapped.mapping.ReferenceMapping
              extended by org.datanucleus.store.mapped.mapping.ObjectMapping
All Implemented Interfaces:
MappingCallbacks

public class ObjectMapping
extends ReferenceMapping

Mapping for Object fields. An Object field can represent two things

  1. An object of a series of possible PC types ("implementation-classes") and each implementation type is represented in the datastore by a FK to the PC table
  2. An object of a series of possible non-PC types (e.g String, Long, Double etc) and each implementation type is represented in the datastore by a separate column


Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.mapping.ReferenceMapping
ID_MAPPING, LOCALISER_MAPPED, mappingStrategy, PER_IMPLEMENTATION_MAPPING, XCALIA_MAPPING
 
Fields inherited from class org.datanucleus.store.mapped.mapping.MultiMapping
javaTypeMappings, numberOfDatastoreMappings
 
Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type
 
Constructor Summary
ObjectMapping()
           
 
Method Summary
 java.lang.Class getJavaType()
          Accessor for the Java type being represented.
 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.datanucleus.store.mapped.mapping.ReferenceMapping
getMappingNumberForValue, getMappingStrategy, getObject, getObjectForReferenceString, getReferenceStringForObject, initialize, insertPostProcessing, postFetch, postInsert, postUpdate, preDelete, prepareDatastoreMapping, setObject
 
Methods inherited from class org.datanucleus.store.mapped.mapping.MultiMapping
addJavaTypeMapping, getDatastoreMapping, getDatastoreMappings, getJavaTypeMapping, getNumberOfDatastoreMappings, setObject
 
Methods inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
addDatastoreMapping, equals, failureMessage, getBoolean, getByte, getChar, getColumnMetaDataForMember, getDatastoreContainer, getDouble, getFloat, getInt, getLong, getMemberMetaData, getObject, getReferenceMapping, getRoleForMember, getShort, getString, getType, getValueForDatastoreMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setBoolean, setByte, setChar, setDatastoreContainer, setDouble, setFloat, setInt, setLong, setMemberMetaData, setReferenceMapping, setRoleForMember, setShort, setString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectMapping

public ObjectMapping()
Method Detail

getJavaType

public java.lang.Class getJavaType()
Accessor for the Java type being represented.

Overrides:
getJavaType in class ReferenceMapping
Returns:
java.lang.Object

getJavaTypeForDatastoreMapping

public java.lang.String getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore field. Returns Serializable since the object needs to be serialisable

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


Copyright © 2011. All Rights Reserved.