org.datanucleus.identity
Class IdentityUtils

java.lang.Object
  extended by org.datanucleus.identity.IdentityUtils

public class IdentityUtils
extends java.lang.Object

Series of utilities for handling identities of objects.


Constructor Summary
IdentityUtils()
           
 
Method Summary
static java.lang.Object getApplicationIdentityForResultSetRow(ExecutionContext ec, AbstractClassMetaData cmd, java.lang.Class pcClass, boolean inheritanceCheck, FieldManager resultsFM)
          Method to return the object application identity for a row of the result set.
static java.lang.Object getDatastoreIdentityForResultSetRow(ExecutionContext ec, AbstractClassMetaData cmd, java.lang.Class pcClass, boolean inheritanceCheck, java.lang.Object resultSet, StatementClassMapping mappingDefinition)
          Method to return the object datastore identity for a row of the result set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityUtils

public IdentityUtils()
Method Detail

getDatastoreIdentityForResultSetRow

public static java.lang.Object getDatastoreIdentityForResultSetRow(ExecutionContext ec,
                                                                   AbstractClassMetaData cmd,
                                                                   java.lang.Class pcClass,
                                                                   boolean inheritanceCheck,
                                                                   java.lang.Object resultSet,
                                                                   StatementClassMapping mappingDefinition)
Method to return the object datastore identity for a row of the result set. If the class isn't using datastore identity then returns null

Parameters:
ec - Execution Context
cmd - Metadata for the class
pcClass - The class required
inheritanceCheck - Whether need an inheritance check (may be for a subclass)
resultSet - Result set
mappingDefinition - Mapping definition for the candidate class
Returns:
The identity (if found) or null (if either not sure of inheritance, or not known).

getApplicationIdentityForResultSetRow

public static java.lang.Object getApplicationIdentityForResultSetRow(ExecutionContext ec,
                                                                     AbstractClassMetaData cmd,
                                                                     java.lang.Class pcClass,
                                                                     boolean inheritanceCheck,
                                                                     FieldManager resultsFM)
Method to return the object application identity for a row of the result set. If the class isn't using application identity then returns null

Parameters:
ec - Execution Context
cmd - Metadata for the class
pcClass - The class required
inheritanceCheck - Whether need an inheritance check (may be for a subclass)
resultsFM - FieldManager servicing the results
Returns:
The identity (if found) or null (if either not sure of inheritance, or not known).


Copyright © 2011. All Rights Reserved.