StateManager
PersistenceCapable
classes and the JDO implementation. It contains the methods used by PersistenceCapable
instances to delegate behavior to the JDO implementation. Each managed PersistenceCapable
instance contains a reference to a StateManager
. A StateManager
might manage one or multiple instances of PersistenceCapable
instances, at the choice of the implementation.
- Since:
- JDO 1.0
Public Methods
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
- the object representing the JDO identity of the calling instance
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
- the
PersistenceManager
that owns this instance
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
- the object representing the JDO identity of the calling instance
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
- the object representing the version of the calling instance
- Since:
- JDO 2.0
true
. Transient instances return false
.
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
-
true
if this instance was deleted in the current transaction.
- See Also:
PersistenceManager.deletePersistent(Object pc)
- Since:
- JDO 1.0
true
. Transient nontransactional instances return false
.
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
-
true
if this instance has been modified in the current transaction.
- See Also:
PersistenceCapable(String fieldName)
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- whether the field is cached in the calling instance
- Since:
- JDO 1.0
true
. Transient instances return false
.
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
-
true
if this instance was made persistent in the current transaction.
- See Also:
PersistenceManager.makePersistent(Object pc)
- Since:
- JDO 1.0
true
. Transient instances return false
.
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
-
true
if this instance is persistent.
- See Also:
PersistenceManager.makePersistent(Object pc)
- Since:
- JDO 1.0
true
. These instances include transient instances made transactional as a result of being the target of a makeTransactional
method call; newly made persistent or deleted persistent instances; persistent instances read in data store transactions; and persistent instances modified in optimistic transactions. Transient nontransactional instances return false
.
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
-
true
if this instance is transactional.
- Since:
- JDO 1.0
The StateManager
will make a copy of the field so it can be restored if needed later, and then mark the field as modified in the current transaction.
- Parameters:
pc
- the callingPersistenceCapable
instancefieldName
- the name of the field
- Since:
- JDO 1.0
jdoPreSerialize
method prior to serialization of the instance. - Parameters:
pc
- the callingPersistenceCapable
instance
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingDetachable
instancestate
- the current value of the detached state
- Return:
- the replacement value for the detached state
- Since:
- JDO 2.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instance
- Return:
- the value of
jdoFlags
to be stored in thePersistenceCapable
instance
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
This method is called by the PersistenceCapable
whenever jdoReplaceStateManager
is called and there is already an owning StateManager
. This is a security precaution to ensure that the owning StateManager
is the only source of any change to its reference in the PersistenceCapable
.
- Parameters:
pc
- the callingPersistenceCapable
instancesm
- the proposed new value for thejdoStateManager
- Return:
- the new value for the
jdoStateManager
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field number
- Return:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
pc
- the callingPersistenceCapable
instancefield
- the field numbercurrentValue
- the current value of the fieldnewValue
- the proposed new value of the field
- Since:
- JDO 1.0