Class ReferenceIdMapping

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

public class ReferenceIdMapping
extends ReferenceMapping

Maps to identity objects of reference values. Used only from within JDOQL queries on JDOHelper.getObjectId expressions

Field Summary
Fields inherited from class
Fields inherited from class
javaTypeMappings, numberOfDatastoreMappings
Fields inherited from class
datastoreContainer, datastoreMappings, LOCALISER, mmd, referenceMapping, roleForMember, storeMgr, type
Constructor Summary
ReferenceIdMapping(ReferenceMapping refMapping)
          Constructor used to generate a ReferenceMapping 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
getJavaType, getJavaTypeForDatastoreMapping, getMappingNumberForValue, getMappingStrategy, getObjectForReferenceString, getReferenceStringForObject, getSampleValue, initialize, insertPostProcessing, newLiteral, newScalarExpression, postFetch, postInsert, postUpdate, preDelete, prepareDatastoreMapping, setObject
Methods inherited from class
addJavaTypeMapping, getDatastoreMapping, getDatastoreMappings, getJavaTypeMapping, getNumberOfDatastoreMappings
Methods inherited from class
addDatastoreMapping, equals, failureMessage, getBoolean, getByte, getChar, getColumnMetaDataForMember, getDatastoreContainer, getDouble, getFloat, getInt, getLong, getMemberMetaData, getObject, getReferenceMapping, getRoleForMember, getShort, getString, getType, getValueForDatastoreMapping, hashCode, hasSimpleDatastoreRepresentation, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setBoolean, setByte, setChar, setDatastoreContainer, setDefault, setDouble, setFloat, setInt, setLong, setMemberMetaData, setReferenceMapping, setRoleForMember, setShort, setString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ReferenceIdMapping(ReferenceMapping refMapping)
Constructor used to generate a ReferenceMapping 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.

refMapping - 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 ReferenceMapping
om - The ObjectManager
rs - The ResultSet
param - Array of parameter ids in the ResultSet to retrieve
The id of the PC 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 MultiMapping
om - ObjectManager
ps - PreparedStatement
param - Parameter positions to populate when setting the value
value - The identity

Copyright © 2010. All Rights Reserved.