Base class for all lifecycle states. Each instance is managed by
a OpenJPAStateManager, which in turn keeps a reference to its current
state.
The state governs the behavior of the instance during all 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 state.

beforeNontransactionalRead(StateManagerImpl context,
int field)
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.

beforeNontransactionalWrite(StateManagerImpl context,
int field,
boolean mutate)
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.

beforeOptimisticRead(StateManagerImpl context,
int field)
Perform any actions necesssary and return the proper lifecycle state
prior to the state of the given instance being read in an optimistic
transaction.

beforeOptimisticWrite(StateManagerImpl context,
int field,
boolean mutate)
Perform any actions necesssary and return the proper lifecycle state
prior to the state of the given instance being written within
an optimistic transaction.

beforeWrite(StateManagerImpl context,
int field,
boolean mutate)
Perform any actions necesssary and return the proper lifecycle state
prior to the state of the given instance being written within
an active transaction.

beforeRead

Perform any actions necesssary and return the proper lifecycle state
prior to the state of the given instance being read within
an active transaction. The given field number can be -1 if it is
a general object read. Returns the this pointer by default.

beforeNontransactionalRead

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. The given field number can be -1 if it is
a general object read. Returns the this pointer by default.

beforeOptimisticRead

Perform any actions necesssary and return the proper lifecycle state
prior to the state of the given instance being read in an optimistic
transaction. The given field number can be -1 if it is
a general object read. Returns the this pointer by default.

beforeWrite

Perform any actions necesssary and return the proper lifecycle state
prior to the state of the given instance being written within
an active transaction. The mutate parameter tells if it is a
direct mutation on an SCO field.
Returns the this pointer by default.

beforeOptimisticWrite

Perform any actions necesssary and return the proper lifecycle state
prior to the state of the given instance being written within
an optimistic transaction. The mutate parameter tells if it is a
direct mutation on an SCO field.
Returns the this pointer by default.

beforeNontransactionalWrite

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. The mutate parameter tells if it is a
direct mutation on an SCO field.
Returns the this pointer by default.

isTransactional

boolean isTransactional()

Return whether this is a transactional state.
Returns false by default.

isPersistent

boolean isPersistent()

Return whether this is a persistent state.
Returns false by default.

isNew

boolean isNew()

Return whether this is a new state.
Returns false by default.

isDeleted

boolean isDeleted()

Return whether this is a deleted state.
Returns false by default.

isDirty

boolean isDirty()

Return whether this is a dirty state.
Returns false by default.

isPendingTransactional

boolean isPendingTransactional()

Return whether this is a state that will become transactional
upon the begin of the next transaction.
Returns false by default.

isProvisional

boolean isProvisional()

Return whether this is a state that will become transient
at the end of the next transaction.
Returns false by default.