|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.util.AIDUtils
Application Identity 'id' utils.
Method Summary | |
static java.lang.Object |
getNewObjectId(javax.jdo.spi.PersistenceCapable pc,
AbstractClassMetaData cmd)
Create a new ObjectId instance and copy the key fields from the persistence capable instance to the objectId instance |
static javax.jdo.identity.SingleFieldIdentity |
getNewSingleFieldIdentity(java.lang.Class idType,
java.lang.Class pcType,
java.lang.Object value)
Utility to create a new SingleFieldIdentity using reflection when you know the type of the PersistenceCapable, and also which SingleFieldIdentity, and the value of the key. |
static java.lang.Object |
getPKFieldValueFromId(java.lang.Object id,
int fieldNumber,
AbstractClassMetaData cmd)
Method to extract the value for a field of a PK from the identity object. |
static boolean |
isSingleFieldIdentityClass(java.lang.String className)
Checks whether the argument is equals to one the single field identity class names |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.Object getPKFieldValueFromId(java.lang.Object id, int fieldNumber, AbstractClassMetaData cmd)
id
- The identity valuefieldNumber
- Absolute field number of the fieldcmd
- MetaData for the class that this id pertains to
public static java.lang.Object getNewObjectId(javax.jdo.spi.PersistenceCapable pc, AbstractClassMetaData cmd)
pc
- The persistence capable objectcmd
- The AbstractClassMetaData
public static javax.jdo.identity.SingleFieldIdentity getNewSingleFieldIdentity(java.lang.Class idType, java.lang.Class pcType, java.lang.Object value)
idType
- Type of SingleFieldIdentitypcType
- Type of the PersistenceCapablevalue
- The value for the identity (the Long, or Int, or ... etc).
public static boolean isSingleFieldIdentityClass(java.lang.String className)
className
- the full class name
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |