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
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 ReferenceMapping
ID_MAPPING, mappingStrategy, PER_IMPLEMENTATION_MAPPING, XCALIA_MAPPINGFields inherited from class MultiMapping
javaTypeMappings, numberOfColumnMappingsFields inherited from class JavaTypeMapping
absFieldNumber, columnMappings, mmd, referenceMapping, roleForMember, storeMgr, table, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAccessor for the java type being mapped.getJavaTypeForColumnMapping(int index) Accessor for the name of the java-type actually used when mapping the particular datastore field.Methods inherited from class ReferenceMapping
createPerImplementationColumnsForReferenceField, getJavaTypeMappingForType, getMappingNumberForValue, getMappingStrategy, getObject, getObjectForReferenceString, getReferenceStringForObject, initialize, preDelete, prepareColumnMapping, setObjectMethods inherited from class MultiPersistableMapping
setObjectMethods inherited from class MultiMapping
addJavaTypeMapping, getColumnMapping, getColumnMappings, getJavaTypeMapping, getNumberOfColumnMappingsMethods inherited from class 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, setTableMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MappingCallbacks
postFetch, postInsert, postUpdate
-
Constructor Details
-
ObjectMapping
public ObjectMapping()
-
-
Method Details
-
getJavaType
Description copied from class:JavaTypeMappingAccessor 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:
getJavaTypein classReferenceMapping- Returns:
- The java type
-
getJavaTypeForColumnMapping
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:
getJavaTypeForColumnMappingin classReferenceMapping- Parameters:
index- requested column index.- Returns:
- the name of java-type for the requested column.
-