|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is implemented by a non-binary-compatible JDO implementation
to provide state interrogation for non-enhanced persistent classes.
An instance that implements this interface is registered with the
JDOImplHelper
.
Method Summary | |
java.lang.Object |
getObjectId(java.lang.Object pc)
Return a copy of the JDO identity associated with the parameter instance. |
PersistenceManager |
getPersistenceManager(java.lang.Object pc)
Return the associated PersistenceManager if there is one.
|
java.lang.Object |
getTransactionalObjectId(java.lang.Object pc)
Return a copy of the JDO identity associated with the parameter instance. |
java.lang.Boolean |
isDeleted(java.lang.Object pc)
Tests whether the parameter instance has been deleted. |
java.lang.Boolean |
isDirty(java.lang.Object pc)
Tests whether the parameter instance is dirty. |
java.lang.Boolean |
isNew(java.lang.Object pc)
Tests whether the parameter instance has been newly made persistent. |
java.lang.Boolean |
isPersistent(java.lang.Object pc)
Tests whether the parameter instance is persistent. |
java.lang.Boolean |
isTransactional(java.lang.Object pc)
Tests whether the parameter instance is transactional. |
boolean |
makeDirty(java.lang.Object pc,
java.lang.String fieldName)
Explicitly mark the parameter instance and field dirty. |
Method Detail |
public java.lang.Boolean isPersistent(java.lang.Object pc)
true
.
Transient instances and instances of classes
that do not implement PersistenceCapable
return false
.
pc
- the PersistenceCapable
instance.
true
if the parameter instance is persistent.PersistenceManager.makePersistent(Object pc)
,
PersistenceCapable.jdoIsPersistent()
public java.lang.Boolean isTransactional(java.lang.Object pc)
Transient instances and instances of classes
that do not implement PersistenceCapable
return false
.
pc
- the PersistenceCapable
instance.
true
if the parameter instance is transactional.PersistenceCapable.jdoIsTransactional()
public java.lang.Boolean isDirty(java.lang.Object pc)
true
.
Transient instances and instances of classes
that do not implement PersistenceCapable
return false
.
pc
- the PersistenceCapable
instance.
true
if the parameter instance has been modified in the current transaction.StateManager.makeDirty(PersistenceCapable pc, String fieldName)
,
PersistenceCapable.jdoIsDirty()
public java.lang.Boolean isNew(java.lang.Object pc)
true
.
Transient instances and instances of classes
that do not implement PersistenceCapable
return false
.
pc
- the PersistenceCapable
instance.
true
if the parameter instance was made persistent
in the current transaction.PersistenceManager.makePersistent(Object pc)
,
PersistenceCapable.jdoIsNew()
public java.lang.Boolean isDeleted(java.lang.Object pc)
true
.
Transient instances and instances of classes
that do not implement PersistenceCapable
return false
.
pc
- the PersistenceCapable
instance.
true
if the parameter instance was deleted
in the current transaction.PersistenceManager.deletePersistent(Object pc)
,
PersistenceCapable.jdoIsDeleted()
public PersistenceManager getPersistenceManager(java.lang.Object pc)
PersistenceManager
if there is one.
Transactional and persistent instances return the associated
PersistenceManager
.
Transient non-transactional instances and instances of classes
that do not implement PersistenceCapable
return null
.
pc
- the PersistenceCapable
instance.
PersistenceManager
associated with the parameter instance.PersistenceCapable.jdoGetPersistenceManager()
public java.lang.Object getObjectId(java.lang.Object pc)
Persistent instances of PersistenceCapable
classes have a JDO identity
managed by the PersistenceManager
. This method returns a copy of the
ObjectId that represents the JDO identity.
Transient instances and instances of classes
that do not implement PersistenceCapable
return null
.
The ObjectId may be serialized
and later restored, and used with a PersistenceManager
from the same JDO
implementation to locate a persistent instance with the same data store
identity.
If the JDO identity is managed by the application, then the ObjectId may
be used with a PersistenceManager
from any JDO implementation that supports
the PersistenceCapable
class.
If the JDO identity is not managed by the application or the data store, then the ObjectId returned is only valid within the current transaction.
pc
- the PersistenceCapable instance.
PersistenceManager.getObjectId(Object pc)
,
PersistenceCapable.jdoGetObjectId()
,
PersistenceManager.getObjectById(Object oid, boolean validate)
public java.lang.Object getTransactionalObjectId(java.lang.Object pc)
pc
- the PersistenceCapable
instance.
PersistenceCapable.jdoGetTransactionalObjectId()
,
PersistenceManager.getObjectById(Object oid, boolean validate)
public boolean makeDirty(java.lang.Object pc, java.lang.String fieldName)
PersistenceCapable
classes are able to detect changes made
to their fields. However, if a reference to an array is given to a
method outside the class, and the array is modified, then the
persistent instance is not aware of the change. This API allows the
application to notify the instance that a change was made to a field.
Transient instances and instances of classes
that do not implement PersistenceCapable
ignore this method.
pc
- the PersistenceCapable
instance.fieldName
- the name of the field to be marked dirty.PersistenceCapable.jdoMakeDirty(String fieldName)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |