Class PersistableIdMapping

  extended by
      extended by
          extended by
              extended by
                  extended by
All Implemented Interfaces:

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
cmd, javaTypeMappings
Fields inherited from class
datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type
Constructor Summary
PersistableIdMapping(PersistableMapping pcMapping)
          Constructor used to generate a PCMapping representing only the identity of the object.
Method Summary
 java.lang.Object getObject(ObjectManager om, java.lang.Object rs, int[] param)
          Returns an identity for a persistable class.
 void setObject(ObjectManager om, java.lang.Object ps, int[] param, java.lang.Object value)
          Method to set the object based on an input identity.
Methods inherited from class
addJavaTypeMapping, getDatastoreMapping, getDatastoreMappings, getJavaTypeMapping, getNumberOfDatastoreMappings, getValueForDatastoreMapping, initialize, insertPostProcessing, newLiteral, newScalarExpression, postFetch, postInsert, postUpdate, preDelete, prepareDatastoreMapping, prepareDatastoreMapping, setObject
Methods inherited from class
getJavaType, getSampleValue
Methods inherited from class
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
addDatastoreMapping, failureMessage, getColumnMetaDataForMember, getDatastoreContainer, getMemberMetaData, getObject, getReferenceMapping, getRoleForMember, getType, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setDatastoreContainer, setDefault, setMemberMetaData, setReferenceMapping, setRoleForMember
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


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.

pcMapping - The mapping to base it on
Method Detail


public java.lang.Object getObject(ObjectManager om,
                                  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.

getObject in class PersistableMapping
om - The ObjectManager
rs - The ResultSet
param - Array of parameter ids in the ResultSet to retrieve
The identity of the Persistence Capable object


public void setObject(ObjectManager om,
                      java.lang.Object ps,
                      int[] param,
                      java.lang.Object value)
Method to set the object based on an input identity.

setObject in class PersistableMapping
om - ObjectManager
ps - PreparedStatement
param - Parameter positions to populate when setting the value
value - The identity

Copyright © 2010. All Rights Reserved.