Class ObjectMapping
- java.lang.Object
-
- org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
-
- org.datanucleus.store.rdbms.mapping.java.MultiMapping
-
- org.datanucleus.store.rdbms.mapping.java.MultiPersistableMapping
-
- org.datanucleus.store.rdbms.mapping.java.ReferenceMapping
-
- org.datanucleus.store.rdbms.mapping.java.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
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.rdbms.mapping.java.ReferenceMapping
ID_MAPPING, mappingStrategy, PER_IMPLEMENTATION_MAPPING, XCALIA_MAPPING
-
Fields inherited from class org.datanucleus.store.rdbms.mapping.java.MultiMapping
javaTypeMappings, numberOfColumnMappings
-
Fields inherited from class org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
absFieldNumber, columnMappings, mmd, referenceMapping, roleForMember, storeMgr, table, type
-
-
Constructor Summary
Constructors Constructor Description ObjectMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
getJavaType()
Accessor for the java type being mapped.String
getJavaTypeForColumnMapping(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.rdbms.mapping.java.ReferenceMapping
getJavaTypeMappingForType, getMappingNumberForValue, getMappingStrategy, getObject, getObjectForReferenceString, getReferenceStringForObject, initialize, preDelete, prepareColumnMapping, setObject
-
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.MultiPersistableMapping
setObject
-
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.MultiMapping
addJavaTypeMapping, getColumnMapping, getColumnMappings, getJavaTypeMapping, getNumberOfColumnMappings
-
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
addColumnMapping, equals, failureMessage, getAbsoluteFieldNumber, getBoolean, getByte, getChar, getColumnMetaDataForMember, getDouble, getFloat, getInt, getLong, getMemberMetaData, getObject, getReferenceMapping, getRoleForMember, getShort, getStoreManager, getString, getTable, getType, getValueForColumnMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, performSetPostProcessing, representableAsStringLiteralInStatement, requiresSetPostProcessing, setAbsFieldNumber, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setMemberMetaData, setReferenceMapping, setRoleForMember, setShort, setString, setTable
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.datanucleus.store.rdbms.mapping.MappingCallbacks
postFetch, postInsert, postUpdate
-
-
-
-
Method Detail
-
getJavaType
public Class getJavaType()
Description copied from class:JavaTypeMapping
Accessor for the java type being mapped. This is the java type that the mapping represents. Some examples :- if the field is of type "MyClass" then the mapping will be OIDMapping (or subclass) the javaType will be OID, and the type will be MyClass.
- if the field is of type "int" then the mapping will be IntegerMapping, the javaType will be Integer, and the type will be int.
- Overrides:
getJavaType
in classReferenceMapping
- Returns:
- The java type
-
getJavaTypeForColumnMapping
public String getJavaTypeForColumnMapping(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:
getJavaTypeForColumnMapping
in classReferenceMapping
- Parameters:
index
- requested column index.- Returns:
- the name of java-type for the requested column.
-
-