org.datanucleus.store.mapped.mapping
Class ObjectMapping
java.lang.Object
org.datanucleus.store.mapped.mapping.JavaTypeMapping
org.datanucleus.store.mapped.mapping.MultiMapping
org.datanucleus.store.mapped.mapping.MultiPersistableMapping
org.datanucleus.store.mapped.mapping.ReferenceMapping
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
- 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
- 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
| 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.JavaTypeMapping |
addDatastoreMapping, equals, failureMessage, getAbsoluteFieldNumber, getBoolean, getByte, getChar, getColumnMetaDataForMember, getDatastoreContainer, getDouble, getFloat, getInt, getLong, getMemberMetaData, getObject, getReferenceMapping, getRoleForMember, getShort, getStoreManager, getString, getType, getValueForDatastoreMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, representableAsStringLiteralInStatement, setAbsFieldNumber, setBoolean, setByte, setChar, setDatastoreContainer, setDouble, setFloat, setInt, setLong, setMemberMetaData, setReferenceMapping, setRoleForMember, setShort, setString |
ObjectMapping
public ObjectMapping()
getJavaType
public Class getJavaType()
- Accessor for the Java type being represented.
- Overrides:
getJavaType in class ReferenceMapping
- Returns:
- java.lang.Object
getJavaTypeForDatastoreMapping
public 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 © 2012. All Rights Reserved.