org.jpox.store.mapped.mapping
Class ObjectIdClassMapping

java.lang.Object
  extended by org.jpox.store.mapped.mapping.JavaTypeMapping
      extended by org.jpox.store.mapped.mapping.SingleFieldMapping
          extended by org.jpox.store.mapped.mapping.OIDMapping
              extended by org.jpox.store.mapped.mapping.PersistenceCapableMapping
                  extended by org.jpox.store.mapped.mapping.ObjectIdClassMapping
All Implemented Interfaces:
MappingCallbacks, SimpleDatastoreRepresentation

public class ObjectIdClassMapping
extends PersistenceCapableMapping

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

Version:
$Revision: 1.4 $

Field Summary
 
Fields inherited from class org.jpox.store.mapped.mapping.PersistenceCapableMapping
javaTypeMappings
 
Fields inherited from class org.jpox.store.mapped.mapping.JavaTypeMapping
datastoreContainer, datastoreMappings, dba, fmd, LOCALISER, MAPPING_ARRAY_ELEMENT, MAPPING_COLLECTION_ELEMENT, MAPPING_FIELD, MAPPING_MAP_KEY, MAPPING_MAP_VALUE, referenceMapping, roleForField, type
 
Constructor Summary
ObjectIdClassMapping(PersistenceCapableMapping 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 a instance of a PersistenceCapable class.
 
Methods inherited from class org.jpox.store.mapped.mapping.PersistenceCapableMapping
addJavaTypeMapping, getDataStoreMapping, getJavaTypeMapping, getNumberOfDatastoreFields, initialize, newLiteral, newScalarExpression, postFetch, postInsert, postUpdate, preDelete, prepareDatastoreMapping, prepareDatastoreMapping, setObject, setObject
 
Methods inherited from class org.jpox.store.mapped.mapping.OIDMapping
getJavaType, getSampleValue
 
Methods inherited from class org.jpox.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.jpox.store.mapped.mapping.JavaTypeMapping
addDataStoreMapping, failureMessage, getDatastoreContainer, getDataStoreMappings, getFieldMetaData, getObject, getReferenceMapping, getRoleForField, getType, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setDefault, setFieldInformation, setReferenceMapping, setRoleForField
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectIdClassMapping

public ObjectIdClassMapping(PersistenceCapableMapping 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 java.lang.Object getObject(ObjectManager om,
                                  java.lang.Object rs,
                                  int[] param)
Returns a instance of a PersistenceCapable class. Processes a FK field and converts the id stored firstly into an OID/AID and then into the object that the FK id relates to.

Overrides:
getObject in class PersistenceCapableMapping
Parameters:
om - The ObjectManager
rs - The ResultSet
param - Array of parameter ids in the ResultSet to retrieve
Returns:
The Persistence Capable object


Copyright © -2008 . All Rights Reserved.