org.datanucleus.store.mapped.mapping
Class PersistableIdMapping
java.lang.Object
org.datanucleus.store.mapped.mapping.JavaTypeMapping
org.datanucleus.store.mapped.mapping.SingleFieldMapping
org.datanucleus.store.mapped.mapping.OIDMapping
org.datanucleus.store.mapped.mapping.PersistableMapping
org.datanucleus.store.mapped.mapping.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
|
Method Summary |
java.lang.Object |
getObject(ExecutionContext ec,
java.lang.Object rs,
int[] param)
Returns an identity for a persistable class. |
void |
setObject(ExecutionContext ec,
java.lang.Object ps,
int[] param,
java.lang.Object value)
Method to set the object based on an input identity. |
| Methods inherited from class org.datanucleus.store.mapped.mapping.PersistableMapping |
addJavaTypeMapping, getDatastoreMapping, getDatastoreMappings, getJavaTypeMapping, getNumberOfDatastoreMappings, getValueForDatastoreMapping, initialize, insertPostProcessing, postFetch, postInsert, postUpdate, preDelete, prepareDatastoreMapping, prepareDatastoreMapping, setObject |
| Methods inherited from class org.datanucleus.store.mapped.mapping.SingleFieldMapping |
equals, getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getJavaTypeForDatastoreMapping, getLong, getShort, getString, getValidValues, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString |
| Methods inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping |
addDatastoreMapping, failureMessage, getColumnMetaDataForMember, getDatastoreContainer, getMemberMetaData, getObject, getReferenceMapping, getRoleForMember, getType, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setDatastoreContainer, setMemberMetaData, setReferenceMapping, setRoleForMember |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
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
getObject
public java.lang.Object getObject(ExecutionContext ec,
java.lang.Object 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:
getObject in class PersistableMapping
- Parameters:
ec - The ObjectManagerrs - The ResultSetparam - Array of parameter ids in the ResultSet to retrieve
- Returns:
- The identity of the Persistence Capable object
setObject
public void setObject(ExecutionContext ec,
java.lang.Object ps,
int[] param,
java.lang.Object value)
- Method to set the object based on an input identity.
- Overrides:
setObject in class PersistableMapping
- Parameters:
ec - ObjectManagerps - PreparedStatementparam - Parameter positions to populate when setting the valuevalue - The identity
Copyright © 2011. All Rights Reserved.