jdoNewObjectIdInstance() - JDO PersistenceCapable's method

Method
javax.jdo.spi.PersistenceCapable
Object jdoNewObjectIdInstance()

Create a new instance of the ObjectId class for this PersistenceCapable class and initialize the key fields from the instance on which this method is called. This method creates a new instance of the class used for JDO identity. It is intended only for application identity. If the class has been enhanced for datastore identity, or if the class is abstract, null is returned.

For classes using single field identity, this method must be called on an instance of a persistence-capable class with its primary key field initialized (not null), or a JDONullIdentityException is thrown.

The instance returned is initialized with the value(s) of the primary key field(s) of the instance on which the method is called.

Returns:
the new instance created.
Since:
JDO 1.0