org.apache.openjpa.kernel
Class PNonTransState

java.lang.Object
  extended by org.apache.openjpa.kernel.PCState
      extended by org.apache.openjpa.kernel.PNonTransState
All Implemented Interfaces:
Serializable

 class PNonTransState
extends PCState

Lifecycle state. Represents a persistent instance that is not transactional, but that allows access to persistent data. This state is reachable only if the RetainState property is set.

Author:
Abe White

Field Summary
 
Fields inherited from class org.apache.openjpa.kernel.PCState
ECLEAN, ECOPY, EDELETED, EDIRTY, ENONTRANS, HOLLOW, PCLEAN, PDELETED, PDELETEDFLUSHED, PDIRTY, PNEW, PNEWDELETED, PNEWFLUSHEDDELETED, PNEWFLUSHEDDELETEDFLUSHED, PNEWPROVISIONAL, PNONTRANS, PNONTRANSDELETED, PNONTRANSDIRTY, PNONTRANSNEW, TCLEAN, TDIRTY, TLOADED, TRANSIENT
 
Constructor Summary
PNonTransState()
           
 
Method Summary
(package private)  PCState 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.
(package private)  PCState 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.
(package private)  PCState beforeRead(StateManagerImpl context, int field)
          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)  PCState 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.
(package private)  PCState delete(StateManagerImpl context)
          Perform any actions necesssary and return the proper lifecycle state on a call to Broker.delete(java.lang.Object, org.apache.openjpa.kernel.OpCallbacks) with the given instance.
(package private)  PCState evict(StateManagerImpl context)
          Perform any actions necesssary and return the proper lifecycle state on a call to Broker.evict(java.lang.Object, org.apache.openjpa.kernel.OpCallbacks) with the given instance.
(package private)  void initialize(StateManagerImpl context)
          Called when this state is first assigned to the given state manager.
(package private)  boolean isPersistent()
          Return whether this is a persistent state.
(package private)  PCState release(StateManagerImpl context)
          Perform any actions necesssary and return the proper lifecycle state on a call to Broker#makeTransient with the given instance.
 String toString()
           
(package private)  PCState transactional(StateManagerImpl context)
          Perform any actions necesssary and return the proper lifecycle state on a call to StoreContext.nontransactional(java.lang.Object, org.apache.openjpa.kernel.OpCallbacks) with the given instance.
 
Methods inherited from class org.apache.openjpa.kernel.PCState
afterNontransactionalRefresh, afterOptimisticRefresh, afterRefresh, beforeFlush, beforeNontransactionalRead, beforeOptimisticRead, commit, commitRetain, error, flush, isDeleted, isDirty, isNew, isPendingTransactional, isProvisional, isTransactional, isVersionCheckRequired, nonprovisional, nontransactional, persist, readResolve, rollback, rollbackRestore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PNonTransState

PNonTransState()
Method Detail

initialize

void initialize(StateManagerImpl context)
Description copied from class: PCState
Called when this state is first assigned to the given state manager.

Overrides:
initialize in class PCState

delete

PCState delete(StateManagerImpl context)
Description copied from class: PCState
Perform any actions necesssary and return the proper lifecycle state on a call to Broker.delete(java.lang.Object, org.apache.openjpa.kernel.OpCallbacks) with the given instance. Returns the this pointer by default.

Overrides:
delete in class PCState

transactional

PCState transactional(StateManagerImpl context)
Description copied from class: PCState
Perform any actions necesssary and return the proper lifecycle state on a call to StoreContext.nontransactional(java.lang.Object, org.apache.openjpa.kernel.OpCallbacks) with the given instance. Returns the this pointer by default.

Overrides:
transactional in class PCState

release

PCState release(StateManagerImpl context)
Description copied from class: PCState
Perform any actions necesssary and return the proper lifecycle state on a call to Broker#makeTransient with the given instance. Returns the this pointer by default.

Overrides:
release in class PCState

evict

PCState evict(StateManagerImpl context)
Description copied from class: PCState
Perform any actions necesssary and return the proper lifecycle state on a call to Broker.evict(java.lang.Object, org.apache.openjpa.kernel.OpCallbacks) with the given instance. Returns the this pointer by default.

Overrides:
evict in class PCState

beforeRead

PCState beforeRead(StateManagerImpl context,
                   int field)
Description copied from class: PCState
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.

Overrides:
beforeRead in class PCState

beforeWrite

PCState beforeWrite(StateManagerImpl context,
                    int field,
                    boolean mutate)
Description copied from class: PCState
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.

Overrides:
beforeWrite in class PCState

beforeOptimisticWrite

PCState beforeOptimisticWrite(StateManagerImpl context,
                              int field,
                              boolean mutate)
Description copied from class: PCState
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.

Overrides:
beforeOptimisticWrite in class PCState

beforeNontransactionalWrite

PCState beforeNontransactionalWrite(StateManagerImpl context,
                                    int field,
                                    boolean mutate)
Description copied from class: PCState
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.

Overrides:
beforeNontransactionalWrite in class PCState

isPersistent

boolean isPersistent()
Description copied from class: PCState
Return whether this is a persistent state. Returns false by default.

Overrides:
isPersistent in class PCState

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.