newObjectIdInstance(pcClass, obj) - JDO JDOImplHelper's method
Method javax.jdo.spi.JDOImplHelper
Object newObjectIdInstance(
Class pcClass,
Object obj
)
For classes that use single field identity, if the parameter is of one of the following types, the behavior must be as specified:
Number
orCharacter
: the parameter must be the single field type or the wrapper class of the primitive field type; the parameter is passed to the single field identity constructorObjectIdFieldSupplier
: the field value is fetched from theObjectIdFieldSupplier
and passed to the single field identity constructorString
: the String is passed to the single field identity constructor
- Parameters:
-
pcClass
- thePersistenceCapable
class. -
obj
- theObject
form of the object id
- Returns:
- the new ObjectId instance, or
null
if the class is not registered.
- Since:
- JDO 2.0