javax.jdo.spi.StateManager - JDO interface
javax.jdo.spi
Interface 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
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance
- Returns:
- the object representing the JDO identity of the calling instance
- Since:
- JDO 1.0
PersistenceManager
that owns this instance. - Parameters:
-
pc
- the callingPersistenceCapable
instance
- Returns:
- the
PersistenceManager
that owns this instance
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance
- Returns:
- the object representing the JDO identity of the calling instance
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance
- Returns:
- the object representing the version of the calling instance
- Since:
- JDO 2.0
true
. Transient instances return false
.
- Parameters:
-
pc
- the callingPersistenceCapable
instance
- Returns:
-
true
if this instance was deleted in the current transaction.
- Since:
- JDO 1.0
true
. Transient nontransactional instances return false
.
- Parameters:
-
pc
- the callingPersistenceCapable
instance
- Returns:
-
true
if this instance has been modified in the current transaction.
- Since:
- JDO 1.0
true
if the field is cached in the calling instance. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- whether the field is cached in the calling instance
- Since:
- JDO 1.0
true
. Transient instances return false
.
- Parameters:
-
pc
- the callingPersistenceCapable
instance
- Returns:
-
true
if this instance was made persistent in the current transaction.
- Since:
- JDO 1.0
true
. Transient instances return false
.
- Parameters:
-
pc
- the callingPersistenceCapable
instance
- Returns:
-
true
if this instance is persistent.
- 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
- Returns:
-
true
if this instance is transactional.
- Since:
- JDO 1.0
PersistenceCapable
field dirty. 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
instance -
fieldName
- 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
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
StateManager
. - Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingDetachable
instance -
state
- the current value of the detached state
- Returns:
- the replacement value for the detached state
- Since:
- JDO 2.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
StateManager
uses this method to supply the value of the flags to the PersistenceCapable
instance. - Parameters:
-
pc
- the callingPersistenceCapable
instance
- Returns:
- the value of
jdoFlags
to be stored in thePersistenceCapable
instance
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
jdoStateManager
. 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
instance -
sm
- the proposed new value for thejdoStateManager
- Returns:
- the new value for the
jdoStateManager
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number
- Returns:
- the new value for the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0
- Parameters:
-
pc
- the callingPersistenceCapable
instance -
field
- the field number -
currentValue
- the current value of the field -
newValue
- the proposed new value of the field
- Since:
- JDO 1.0