|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.state.LifeCycleState
org.apache.jdo.impl.state.PersistentDirty
org.apache.jdo.impl.state.PersistentDirtyFlushed
This class represents PersistentDirtyFlushedstate specific state transitions as requested by StateManagerImpl. This state differs from PersistentDirty in that it is the result of flush operation.
Field Summary | |
protected static int |
AP_NEW
Constants to specify the life cycle state type |
protected static int |
AP_NEW_FLUSHED
Constants to specify the life cycle state type |
protected static int |
AP_NEW_FLUSHED_DIRTY
Constants to specify the life cycle state type |
protected static int |
AP_PENDING
Constants to specify the life cycle state type |
protected static int |
HOLLOW
Constants to specify the life cycle state type |
protected boolean |
isAutoPersistent
|
protected boolean |
isBeforeImageUpdatable
|
protected boolean |
isDeleted
|
protected boolean |
isDirty
|
protected boolean |
isFlushed
|
protected boolean |
isNavigable
|
protected boolean |
isNew
|
protected boolean |
isPersistent
|
protected boolean |
isRefreshable
|
protected boolean |
isStored
|
protected boolean |
isTransactional
|
protected static I18NHelper |
msg
I18N message handler |
protected boolean |
needMerge
|
protected static int |
P_CLEAN
Constants to specify the life cycle state type |
protected static int |
P_CLEAN_TX
Constants to specify the life cycle state type |
protected static int |
P_DELETED
Constants to specify the life cycle state type |
protected static int |
P_DELETED_FLUSHED
Constants to specify the life cycle state type |
protected static int |
P_DIRTY
Constants to specify the life cycle state type |
protected static int |
P_DIRTY_FLUSHED
Constants to specify the life cycle state type |
protected static int |
P_NEW
Constants to specify the life cycle state type |
protected static int |
P_NEW_DELETED
Constants to specify the life cycle state type |
protected static int |
P_NEW_FLUSHED
Constants to specify the life cycle state type |
protected static int |
P_NEW_FLUSHED_DELETED
Constants to specify the life cycle state type |
protected static int |
P_NEW_FLUSHED_DIRTY
Constants to specify the life cycle state type |
protected static int |
P_NON_TX
Constants to specify the life cycle state type |
protected int |
stateType
|
protected static int |
T_CLEAN
Constants to specify the life cycle state type |
protected static int |
T_DIRTY
Constants to specify the life cycle state type |
protected static int |
TOTAL
Constants to specify the life cycle state type |
protected static int |
TRANSIENT
Constants to specify the life cycle state type |
Constructor Summary | |
(package private) |
PersistentDirtyFlushed()
|
Method Summary | |
protected void |
assertTransaction(boolean transactionActive)
Asserts that current transaction is active. |
protected LifeCycleState |
changeState(int newStateType)
Changes Life Cycle State. |
protected LifeCycleState |
flush(java.util.BitSet loadedFields,
java.util.BitSet dirtyFields,
StoreManager srm,
StateManagerImpl sm)
It is a no-op. |
protected static LifeCycleState |
getLifeCycleState(int state)
Returns the LifeCycleState for the state constant. |
protected static void |
initLifeCycleState()
Initialises the objects. |
protected boolean |
isAutoPersistent()
Return whether the object state is persistent by reachabilty only. |
protected boolean |
isBeforeImageUpdatable()
Return whether the beforeImage can be updated. |
protected boolean |
isDeleted()
Return whether the state represents a deleted object. |
protected boolean |
isDirty()
Return whether the object state is dirty, that is, the object has been changed (created, updated, deleted) in this Tx. |
protected boolean |
isFlushed()
Return whether the object has been flushed to the datastore. |
protected boolean |
isNavigable()
Return whether the object can dynamically navigate to fields that are not present. |
protected boolean |
isNew()
Return whether the state represents a newly created object. |
protected boolean |
isPersistent()
Return whether the object state is persistent. |
protected boolean |
isRefreshable()
Return whether the object can be refreshed from the datastore. |
protected boolean |
isStored()
Return whether the object is stored in the datastore. |
protected boolean |
isTransactional()
Return whether the object state is transactional. |
protected boolean |
needMerge()
Return whether the merge is needed. |
protected int |
stateType()
Returns the type of the life cycle state as an int. |
java.lang.String |
toString()
|
protected LifeCycleState |
transitionCommit(boolean retainValues,
StateManagerImpl sm)
Transitions LifeCycleState on commit. |
protected LifeCycleState |
transitionDeletePersistent(StateManagerImpl sm)
Transitions LifeCycleState on call to deletePersistent |
protected LifeCycleState |
transitionEvict(StateManagerImpl sm,
javax.jdo.Transaction tx)
Transitions LifeCycleState on call to evict an instance. |
protected LifeCycleState |
transitionFromAutoPersistent(StateManagerImpl sm)
Transitions LifeCycleState to transient for AutoPersistent instance that is not referenced anymore (persistence-by-reachability) |
protected LifeCycleState |
transitionMakeNontransactional(StateManagerImpl sm,
javax.jdo.Transaction tx)
Transitions LifeCycleState on call to makeNontransactional |
protected LifeCycleState |
transitionMakePersistent(StateManagerImpl sm)
Transitions LifeCycleState on call to makePersistent |
protected LifeCycleState |
transitionMakeTransactional(StateManagerImpl sm,
javax.jdo.Transaction tx)
Transitions LifeCycleState on call to makeTransactional |
protected LifeCycleState |
transitionMakeTransient(StateManagerImpl sm,
javax.jdo.Transaction tx)
Transitions LifeCycleState on call to makeTransient. |
protected LifeCycleState |
transitionReadField(StateManagerImpl sm,
javax.jdo.Transaction tx)
Transitions LifeCycleState on call to read a field. |
protected LifeCycleState |
transitionRefresh(StateManagerImpl sm,
javax.jdo.Transaction tx)
Transitions LifeCycleState on call to refresh an instance. |
protected LifeCycleState |
transitionReload(StateManagerImpl sm,
javax.jdo.Transaction tx)
Transitions LifeCycleState on call to reload an instance. |
protected LifeCycleState |
transitionReplace(StateManagerImpl sm,
javax.jdo.Transaction tx,
int[] fields,
FieldManager fieldManager)
Transitions the lifecycle state as if the instance is retrieved from the datastore, but use the specified field values instead of loading them from the datastore. |
protected LifeCycleState |
transitionRetrieve(StateManagerImpl sm,
javax.jdo.Transaction tx)
Transitions LifeCycleState on call to retrieve an instance. |
protected LifeCycleState |
transitionRollback(boolean restoreValues,
StateManagerImpl sm)
Transitions LifeCycleState on rollback. |
protected LifeCycleState |
transitionToAutoPersistent(StateManagerImpl sm)
Transitions LifeCycleState as a result of call to makePersistent of a referencing instance (persistence-by-reachability) |
protected LifeCycleState |
transitionWriteField(StateManagerImpl sm,
javax.jdo.Transaction tx)
Transitions LifeCycleState on call to write a field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final I18NHelper msg
protected boolean isPersistent
protected boolean isTransactional
protected boolean isDirty
protected boolean isNew
protected boolean isDeleted
protected boolean isNavigable
protected boolean isRefreshable
protected boolean isBeforeImageUpdatable
protected boolean isFlushed
protected boolean isAutoPersistent
protected boolean isStored
protected boolean needMerge
protected int stateType
protected static final int TRANSIENT
protected static final int HOLLOW
protected static final int P_NON_TX
protected static final int P_CLEAN
protected static final int P_CLEAN_TX
protected static final int P_DIRTY
protected static final int P_DIRTY_FLUSHED
protected static final int P_NEW
protected static final int P_NEW_FLUSHED
protected static final int P_NEW_FLUSHED_DELETED
protected static final int P_NEW_FLUSHED_DIRTY
protected static final int P_NEW_DELETED
protected static final int P_DELETED
protected static final int P_DELETED_FLUSHED
protected static final int T_CLEAN
protected static final int T_DIRTY
protected static final int AP_NEW
protected static final int AP_NEW_FLUSHED
protected static final int AP_NEW_FLUSHED_DIRTY
protected static final int AP_PENDING
protected static final int TOTAL
Constructor Detail |
PersistentDirtyFlushed()
Method Detail |
protected LifeCycleState transitionDeletePersistent(StateManagerImpl sm)
LifeCycleState
transitionDeletePersistent
in class PersistentDirty
LifeCycleState.transitionDeletePersistent(StateManagerImpl sm)
protected LifeCycleState transitionWriteField(StateManagerImpl sm, javax.jdo.Transaction tx)
LifeCycleState
transitionWriteField
in class LifeCycleState
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManager
LifeCycleState.transitionWriteField(StateManagerImpl sm,
Transaction tx)
protected LifeCycleState flush(java.util.BitSet loadedFields, java.util.BitSet dirtyFields, StoreManager srm, StateManagerImpl sm)
flush
in class PersistentDirty
LifeCycleState.flush(BitSet loadedFields, BitSet dirtyFields,
StoreManager srm, StateManagerImpl sm)
protected LifeCycleState transitionCommit(boolean retainValues, StateManagerImpl sm)
LifeCycleState
transitionCommit
in class LifeCycleState
retainValues
- the value of the flag in the Transaction instance
associated with the hashing PersistenceManagersm
- StateManagerImpl requested the transition.
LifeCycleState.transitionCommit(boolean retainValues, StateManagerImpl sm)
protected LifeCycleState transitionRefresh(StateManagerImpl sm, javax.jdo.Transaction tx)
LifeCycleState
transitionRefresh
in class LifeCycleState
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManager
LifeCycleState.transitionRefresh(StateManagerImpl sm, Transaction tx)
protected LifeCycleState transitionRetrieve(StateManagerImpl sm, javax.jdo.Transaction tx)
LifeCycleState
transitionRetrieve
in class LifeCycleState
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManager
LifeCycleState.transitionRetrieve(StateManagerImpl sm, Transaction tx)
protected static void initLifeCycleState()
protected static LifeCycleState getLifeCycleState(int state)
state
- the state type as integer
protected int stateType()
protected LifeCycleState transitionMakeTransient(StateManagerImpl sm, javax.jdo.Transaction tx)
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManager
PersistenceManager.makeTransient(Object pc)
protected LifeCycleState transitionMakeTransactional(StateManagerImpl sm, javax.jdo.Transaction tx)
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManager
PersistenceManager.makeTransactional(Object pc)
protected LifeCycleState transitionMakeNontransactional(StateManagerImpl sm, javax.jdo.Transaction tx)
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManager
PersistenceManager.makeNontransactional(Object pc)
protected LifeCycleState transitionMakePersistent(StateManagerImpl sm)
sm
- StateManagerImpl requested the transition.
PersistenceManager.makePersistent(Object pc)
protected LifeCycleState transitionToAutoPersistent(StateManagerImpl sm)
sm
- StateManagerImpl requested the transition.
PersistenceManager.makePersistent(Object pc)
protected LifeCycleState transitionFromAutoPersistent(StateManagerImpl sm)
sm
- StateManagerImpl requested the transition.
PersistenceManager.makePersistent(Object pc)
protected LifeCycleState transitionEvict(StateManagerImpl sm, javax.jdo.Transaction tx)
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManager
PersistenceManager.evict(Object pc)
protected LifeCycleState transitionReplace(StateManagerImpl sm, javax.jdo.Transaction tx, int[] fields, FieldManager fieldManager)
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManagerfields
- Indicates which fields should be replaced in the PC.fieldManager
- FieldManager from which the field's value should be
protected LifeCycleState transitionReload(StateManagerImpl sm, javax.jdo.Transaction tx)
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManager
PersistenceManager.getObjectById(Object oid, boolean validate)
protected LifeCycleState transitionRollback(boolean restoreValues, StateManagerImpl sm)
restoreValues
- the value of the flag in the Transaction instance
associated with the hashing PersistenceManagersm
- StateManagerImpl requested the transition.
protected LifeCycleState transitionReadField(StateManagerImpl sm, javax.jdo.Transaction tx)
sm
- StateManagerImpl requested the transition.tx
- Transaction associated with the hashing PersistenceManager
protected void assertTransaction(boolean transactionActive)
transactionActive
- true if the current transaction is active
javax.jdo.JDOUserException
- if transaction is not activeprotected boolean isPersistent()
protected boolean isTransactional()
protected boolean isDirty()
protected boolean isNew()
protected boolean isDeleted()
protected boolean isNavigable()
protected boolean isRefreshable()
protected boolean isBeforeImageUpdatable()
protected boolean isFlushed()
protected boolean isAutoPersistent()
protected boolean isStored()
protected boolean needMerge()
protected LifeCycleState changeState(int newStateType)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |