| java.lang.Object org.jpox.state.LifeCycleState
All known Subclasses: org.jpox.jdo.state.DetachedDirty, org.jpox.jdo.state.TransientClean, org.jpox.jdo.state.PersistentNontransactionalDirty, org.jpox.jdo.state.TransientDirty, org.jpox.jdo.state.PersistentNewDeleted, org.jpox.jdo.state.PersistentClean, org.jpox.jdo.state.PersistentDeleted, org.jpox.jdo.state.PersistentNontransactional, org.jpox.jdo.state.Hollow, org.jpox.jdo.state.PersistentNew, org.jpox.jdo.state.PersistentDirty, org.jpox.jdo.state.DetachedClean,
LifeCycleState | abstract public class LifeCycleState (Code) | | Base Class representing the life cycle state. Implemented for individual
states.
version: $Revision: 1.26 $ |
Method Summary | |
final protected LifeCycleState | changeState(StateManager sm, int newStateType) Utility to change state to a new state. | final protected LifeCycleState | changeTransientState(StateManager sm, int newStateType) Utility to change state to a new state. | final public boolean | isDeleted() Return whether the object is deleted.
Whether the object is deleted. | final public boolean | isDirty() Return whether the object is dirty, ie has been changed
(created, updated, deleted) in this Tx.
Whether the object is dirty. | final public boolean | isNew() Return whether the object was newly created.
Whether the object is new. | final public boolean | isPersistent() Return whether the object is persistent.
Whether the object is persistent. | final public boolean | isTransactional() Return whether the object is transactional.
Whether the object is transactional. | final public int | stateType() | abstract public String | toString() Method to return a string version of this object. | public LifeCycleState | transitionAttach(StateManager sm) Method to transition to persistent-clean.
Parameters: sm - StateManager. | public LifeCycleState | transitionBegin(StateManager sm, org.jpox.Transaction tx) Method to transition to transaction begin state.
Parameters: sm - StateManager. Parameters: tx - Transaction. | public LifeCycleState | transitionCommit(StateManager sm, org.jpox.Transaction tx) Method to transition to commit state.
Parameters: sm - StateManager. Parameters: tx - the Transaction been committed. | public LifeCycleState | transitionDeletePersistent(StateManager sm) Method to transition to delete persistent state.
Parameters: sm - StateManager. | public LifeCycleState | transitionDetach(StateManager sm) Method to transition to detached-clean.
Parameters: sm - StateManager. | public LifeCycleState | transitionEvict(StateManager sm) Method to transition to evict state.
Parameters: sm - StateManager. | public LifeCycleState | transitionMakeNontransactional(StateManager sm) Method to transition to nontransactional state.
Parameters: sm - StateManager. | public LifeCycleState | transitionMakePersistent(StateManager sm) Method to transition to persistent state.
Parameters: sm - StateManager. | public LifeCycleState | transitionMakeTransactional(StateManager sm) Method to transition to transactional state.
Parameters: sm - StateManager. | public LifeCycleState | transitionMakeTransient(StateManager sm, boolean useFetchPlan, boolean detachAllOnCommit) Method to transition to transient state. | public LifeCycleState | transitionReadField(StateManager sm, boolean isLoaded) Method to transition to read-field state. | public LifeCycleState | transitionRefresh(StateManager sm) Method to transition to refresh state.
Parameters: sm - StateManager. | public LifeCycleState | transitionRetrieve(StateManager sm, boolean fgOnly) Method to transition to retrieve state. | public LifeCycleState | transitionRetrieve(StateManager sm, FetchPlan fetchPlan) Method to transition to retrieve state. | public LifeCycleState | transitionRollback(StateManager sm, org.jpox.Transaction tx) Method to transition to rollback state.
Parameters: sm - StateManager. Parameters: tx - Transaction. | public LifeCycleState | transitionSerialize(StateManager sm) Method to transition when serialised. | public LifeCycleState | transitionWriteField(StateManager sm) Method to transition to write-field state.
Parameters: sm - StateManager. |
DETACHED_CLEAN | final public static int DETACHED_CLEAN(Code) | | Detached-Clean *
|
DETACHED_DIRTY | final public static int DETACHED_DIRTY(Code) | | Detached-Dirty *
|
HOLLOW | final public static int HOLLOW(Code) | | Hollow *
|
ILLEGAL_STATE | final public static int ILLEGAL_STATE(Code) | | illegal state *
|
P_CLEAN | final public static int P_CLEAN(Code) | | Persistent-Clean *
|
P_DELETED | final public static int P_DELETED(Code) | | Persistent-Deleted *
|
P_DIRTY | final public static int P_DIRTY(Code) | | Persistent-Dirty *
|
P_NEW | final public static int P_NEW(Code) | | Persistent-New *
|
P_NEW_DELETED | final public static int P_NEW_DELETED(Code) | | Persistent-New-Deleted *
|
P_NONTRANS | final public static int P_NONTRANS(Code) | | Persistent-NonTransactional *
|
P_NONTRANS_DIRTY | final public static int P_NONTRANS_DIRTY(Code) | | Persistent-NonTransactionalDirty *
|
TOTAL | final public static int TOTAL(Code) | | total number of states *
|
TRANSIENT | final public static int TRANSIENT(Code) | | transient *
|
T_CLEAN | final public static int T_CLEAN(Code) | | Transaction-Clean *
|
T_DIRTY | final public static int T_DIRTY(Code) | | Transaction-Dirty *
|
isDeleted | protected boolean isDeleted(Code) | | |
isDirty | protected boolean isDirty(Code) | | |
isNew | protected boolean isNew(Code) | | |
isPersistent | protected boolean isPersistent(Code) | | |
isTransactional | protected boolean isTransactional(Code) | | |
stateType | protected int stateType(Code) | | |
changeState | final protected LifeCycleState changeState(StateManager sm, int newStateType)(Code) | | Utility to change state to a new state.
Parameters: sm - The state manager. Parameters: newStateType - The new state new LifeCycle state. |
changeTransientState | final protected LifeCycleState changeTransientState(StateManager sm, int newStateType)(Code) | | Utility to change state to a new state.
Parameters: sm - The state manager. Parameters: newStateType - The new state new LifeCycle state. |
isDeleted | final public boolean isDeleted()(Code) | | Return whether the object is deleted.
Whether the object is deleted. |
isDirty | final public boolean isDirty()(Code) | | Return whether the object is dirty, ie has been changed
(created, updated, deleted) in this Tx.
Whether the object is dirty. |
isNew | final public boolean isNew()(Code) | | Return whether the object was newly created.
Whether the object is new. |
isPersistent | final public boolean isPersistent()(Code) | | Return whether the object is persistent.
Whether the object is persistent. |
isTransactional | final public boolean isTransactional()(Code) | | Return whether the object is transactional.
Whether the object is transactional. |
stateType | final public int stateType()(Code) | | Returns the type of the life cycle state
the type of this life cycle state |
toString | abstract public String toString()(Code) | | Method to return a string version of this object.
String version of the object. |
transitionAttach | public LifeCycleState transitionAttach(StateManager sm)(Code) | | Method to transition to persistent-clean.
Parameters: sm - StateManager. new LifeCycle state. |
transitionDeletePersistent | public LifeCycleState transitionDeletePersistent(StateManager sm)(Code) | | Method to transition to delete persistent state.
Parameters: sm - StateManager. new LifeCycle state. |
transitionDetach | public LifeCycleState transitionDetach(StateManager sm)(Code) | | Method to transition to detached-clean.
Parameters: sm - StateManager. new LifeCycle state. |
transitionEvict | public LifeCycleState transitionEvict(StateManager sm)(Code) | | Method to transition to evict state.
Parameters: sm - StateManager. new LifeCycle state. |
transitionMakeNontransactional | public LifeCycleState transitionMakeNontransactional(StateManager sm)(Code) | | Method to transition to nontransactional state.
Parameters: sm - StateManager. new LifeCycle state. |
transitionMakePersistent | public LifeCycleState transitionMakePersistent(StateManager sm)(Code) | | Method to transition to persistent state.
Parameters: sm - StateManager. new LifeCycle state. |
transitionMakeTransactional | public LifeCycleState transitionMakeTransactional(StateManager sm)(Code) | | Method to transition to transactional state.
Parameters: sm - StateManager. new LifeCycle state. |
transitionMakeTransient | public LifeCycleState transitionMakeTransient(StateManager sm, boolean useFetchPlan, boolean detachAllOnCommit)(Code) | | Method to transition to transient state.
Parameters: sm - StateManager. Parameters: useFetchPlan - to make transient the fields in the fetch plan new LifeCycle state. |
transitionReadField | public LifeCycleState transitionReadField(StateManager sm, boolean isLoaded)(Code) | | Method to transition to read-field state.
Parameters: sm - StateManager. Parameters: isLoaded - if the field was previously loaded new LifeCycle state. |
transitionRefresh | public LifeCycleState transitionRefresh(StateManager sm)(Code) | | Method to transition to refresh state.
Parameters: sm - StateManager. new LifeCycle state. |
transitionRetrieve | public LifeCycleState transitionRetrieve(StateManager sm, boolean fgOnly)(Code) | | Method to transition to retrieve state.
Parameters: sm - StateManager. Parameters: fgOnly - only retrieve the current fetch group fields new LifeCycle state. |
transitionRetrieve | public LifeCycleState transitionRetrieve(StateManager sm, FetchPlan fetchPlan)(Code) | | Method to transition to retrieve state.
Parameters: sm - StateManager. Parameters: fetchPlan - the fetch plan to load fields new LifeCycle state. |
transitionSerialize | public LifeCycleState transitionSerialize(StateManager sm)(Code) | | Method to transition when serialised.
Parameters: sm - State Manager The new LifeCycle state |
transitionWriteField | public LifeCycleState transitionWriteField(StateManager sm)(Code) | | Method to transition to write-field state.
Parameters: sm - StateManager. new LifeCycle state. |
|
|