|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.solarmetric.kodo.runtime.JDOState
Base class for all JDO lifecycle states. Each JDO instance is managed by
a StateManagerImpl, which in turn keeps a reference to its current
state.
The state governs the behavior of the instance during all JDO lifecycle events. The class itself is stateless, and is provided its context on each method call. This base class provides no-op implementations of all methods and maintains static singelton shared references to each possible JDO state.
| Field Summary | |
static JDOState |
HOLLOW
Hollow; exists in data store |
static JDOState |
PCLEAN
Persistent-Clean |
static JDOState |
PDELETED
Persistent-Deleted |
static JDOState |
PDELETEDFLUSHED
Persistent-Deleted-Flushed |
static JDOState |
PDIRTY
Persistent-Dirty |
static JDOState |
PNEW
Persistent-New |
static JDOState |
PNEWDELETED
Persistent-New-Deleted |
static JDOState |
PNEWDELETEDFLUSHED
Persistent-New-Deleted |
static JDOState |
PNEWFLUSHED
Persistent-New-Flushed |
static JDOState |
PNEWFLUSHEDDELETED
Persistent-New-Flushed-Deleted |
static JDOState |
PNEWFLUSHEDDELETEDFLUSHED
Persistent-New-Flushed-Deleted-Flushed |
static JDOState |
PNONTRANS
Persistent-Nontransactinoal |
static JDOState |
TCLEAN
Transient-Clean |
static JDOState |
TDIRTY
Transient-Dirty |
static JDOState |
TRANSIENT
Transient; unmanaged instance |
| Constructor Summary | |
JDOState()
|
|
| Method Summary | |
(package private) JDOState |
afterNontransactionalRefresh()
Return the state to transition to after refresh. |
(package private) JDOState |
afterOptimisticRefresh()
Return the state to transition to after refresh. |
(package private) JDOState |
afterRefresh()
Return the state to transition to after refresh. |
(package private) void |
beforeCommit(StateManagerImpl context)
Called before the state is committed. |
(package private) void |
beforeFlush(StateManagerImpl context)
Called before the state is flushed. |
(package private) JDOState |
beforeNontransactionalRead(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state prior to the state of the given instance being read outside of an active transaction. |
(package private) JDOState |
beforeNontransactionalWrite(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state prior to the state of the given instance being written outside of an active transaction. |
(package private) JDOState |
beforeOptimisticRead(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state prior to the state of the given instance being read in an optimistic transaction. |
(package private) JDOState |
beforeOptimisticWrite(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state prior to the state of the given instance being written within an optimistic transaction. |
(package private) JDOState |
beforeRead(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state prior to the state of the given instance being read within an active transaction. |
(package private) JDOState |
beforeWrite(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state prior to the state of the given instance being written within an active transaction. |
(package private) JDOState |
commit(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on transaction commit. |
(package private) JDOState |
commitRetain(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on transaction commit with the retainValues flag set. |
(package private) JDOState |
deletePersistent(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on a call to PersistenceManager.deletePersistent(java.lang.Object)
with the given instance. |
(package private) JDOState |
error(String key,
StateManagerImpl context)
Throw an error with a localized message identified by the given key. |
(package private) JDOState |
evict(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on a call to PersistenceManager.evict(java.lang.Object)
with the given instance. |
(package private) JDOState |
flush(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on transaction flush. |
(package private) void |
initialize(StateManagerImpl context)
Called when this state is first assigned to the given state manager. |
(package private) boolean |
isDeleted()
Return whether this is a deleted state. |
(package private) boolean |
isDirty()
Return whether this is a dirty state. |
(package private) boolean |
isFlushed()
Return whether this is a flushed state. |
(package private) boolean |
isNew()
Return whether this is a new state. |
(package private) boolean |
isPersistent()
Return whether this is a persistent state. |
(package private) boolean |
isTransactional()
Return whether this is a transactional state. |
(package private) JDOState |
makeNontransactional(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on a call to PersistenceManager.makeNontransactional(java.lang.Object)
with the given instance. |
(package private) JDOState |
makePersistent(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on a call to PersistenceManager.makePersistent(java.lang.Object)
with the given instance. |
(package private) JDOState |
makeTransactional(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on a call to PersistenceManager.makeNontransactional(java.lang.Object)
with the given instance. |
(package private) JDOState |
makeTransient(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on a call to PersistenceManager.makeTransient(java.lang.Object)
with the given instance. |
(package private) JDOState |
rollback(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on transaction rollback. |
(package private) JDOState |
rollbackRetain(StateManagerImpl context)
Perform any actions necesssary and return the proper lifecycle state on transaction rollback with the retainValues flag set. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final JDOState PNEW
public static final JDOState PNEWFLUSHED
public static final JDOState PNEWFLUSHEDDELETED
public static final JDOState PNEWFLUSHEDDELETEDFLUSHED
public static final JDOState PCLEAN
public static final JDOState PDIRTY
public static final JDOState PDELETED
public static final JDOState PDELETEDFLUSHED
public static final JDOState PNEWDELETED
public static final JDOState PNEWDELETEDFLUSHED
public static final JDOState PNONTRANS
public static final JDOState HOLLOW
public static final JDOState TRANSIENT
public static final JDOState TCLEAN
public static final JDOState TDIRTY
| Constructor Detail |
public JDOState()
| Method Detail |
void initialize(StateManagerImpl context)
void beforeFlush(StateManagerImpl context)
PersistenceManagerImpl.flush(). That is, it is not invoked when
flushing due to a commit operation.JDOState flush(StateManagerImpl context)
PersistenceManagerImpl.flush(). That
is, it is not invoked when flushing due to a commit
operation. That is Returns the this pointer by
default.void beforeCommit(StateManagerImpl context)
JDOState commit(StateManagerImpl context)
this pointer by default.JDOState commitRetain(StateManagerImpl context)
this pointer by default.JDOState rollback(StateManagerImpl context)
this pointer by default.JDOState rollbackRetain(StateManagerImpl context)
this pointer by default.JDOState makePersistent(StateManagerImpl context)
PersistenceManager.makePersistent(java.lang.Object)
with the given instance.
Returns the this pointer by default.JDOState deletePersistent(StateManagerImpl context)
PersistenceManager.deletePersistent(java.lang.Object)
with the given instance.
Returns the this pointer by default.JDOState makeNontransactional(StateManagerImpl context)
PersistenceManager.makeNontransactional(java.lang.Object)
with the given instance.
Returns the this pointer by default.JDOState makeTransactional(StateManagerImpl context)
PersistenceManager.makeNontransactional(java.lang.Object)
with the given instance.
Returns the this pointer by default.JDOState makeTransient(StateManagerImpl context)
PersistenceManager.makeTransient(java.lang.Object)
with the given instance.
Returns the this pointer by default.JDOState evict(StateManagerImpl context)
PersistenceManager.evict(java.lang.Object)
with the given instance.
Returns the this pointer by default.JDOState afterRefresh()
JDOState afterOptimisticRefresh()
JDOState afterNontransactionalRefresh()
JDOState beforeRead(StateManagerImpl context)
this pointer by default.JDOState beforeNontransactionalRead(StateManagerImpl context)
this pointer by default.JDOState beforeOptimisticRead(StateManagerImpl context)
this pointer by default.JDOState beforeWrite(StateManagerImpl context)
this pointer by default.JDOState beforeOptimisticWrite(StateManagerImpl context)
this pointer by default.JDOState beforeNontransactionalWrite(StateManagerImpl context)
this pointer by default.boolean isTransactional()
false by default.boolean isPersistent()
false by default.boolean isNew()
false by default.boolean isDeleted()
false by default.boolean isDirty()
false by default.boolean isFlushed()
false by default. Flushed states are those for
which PersistenceManagerImpl.flush() has been invoked at
least once. That is, PNewFlushed returns
true, and so does PNewFlushedDeleted. So,
it is not sufficient to check if this returns
true to know if there are outstanding changes
that need to be flushed.
JDOState error(String key,
StateManagerImpl context)
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||