Class PersistableIdMapping
- java.lang.Object
-
- org.datanucleus.store.rdbms.mapping.java.JavaTypeMapping
-
- org.datanucleus.store.rdbms.mapping.java.MultiMapping
-
- org.datanucleus.store.rdbms.mapping.java.PersistableMapping
-
- org.datanucleus.store.rdbms.mapping.java.PersistableIdMapping
-
- All Implemented Interfaces:
MappingCallbacks
public class PersistableIdMapping extends PersistableMapping
Maps to identity objects of persistable values. Used only from within JDOQL queries on JDOHelper.getObjectId expressions
-
-
Field Summary
-
Fields inherited from class org.datanucleus.store.rdbms.mapping.java.PersistableMapping
cmd
-
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 PersistableIdMapping(PersistableMapping pcMapping)Constructor used to generate a PCMapping representing only the identity of the object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetObject(org.datanucleus.ExecutionContext ec, ResultSet rs, int[] param)Returns an identity for a persistable class.voidsetObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] param, Object value)Method to set the object based on an input identity.-
Methods inherited from class org.datanucleus.store.rdbms.mapping.java.PersistableMapping
getClassMetaData, getJavaType, getValueForColumnMapping, initialize, initialize, insertPostProcessing, postFetch, postInsert, postUpdate, preDelete, prepareColumnMapping, 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, getJavaTypeForColumnMapping, getLong, getMemberMetaData, getObject, getReferenceMapping, getRoleForMember, getShort, getStoreManager, getString, getTable, getType, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, isNullable, isSerialised, representableAsStringLiteralInStatement, requiresInsertPostProcessing, requiresUpdatePostProcessing, setAbsFieldNumber, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setMemberMetaData, setReferenceMapping, setRoleForMember, setShort, setString, setTable, updatePostProcessing
-
-
-
-
Constructor Detail
-
PersistableIdMapping
public PersistableIdMapping(PersistableMapping pcMapping)
Constructor used to generate a PCMapping representing only the identity of the object. This is typically used where the user has selected the id in a JDOQL query as a result field.- Parameters:
pcMapping- The mapping to base it on
-
-
Method Detail
-
getObject
public Object getObject(org.datanucleus.ExecutionContext ec, ResultSet rs, int[] param)
Returns an identity for a persistable class. Processes a FK field and finds the object that it relates to, then returns the identity.- Overrides:
getObjectin classPersistableMapping- Parameters:
ec- The ExecutionContextrs- The ResultSetparam- Array of parameter ids in the ResultSet to retrieve- Returns:
- The identity of the Persistence Capable object
-
setObject
public void setObject(org.datanucleus.ExecutionContext ec, PreparedStatement ps, int[] param, Object value)Method to set the object based on an input identity.- Overrides:
setObjectin classPersistableMapping- Parameters:
ec- ExecutionContextps- PreparedStatementparam- Parameter positions to populate when setting the valuevalue- The identity
-
-