org.apache.openjpa.kernel
Class PNewProvisionalState

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

 class PNewProvisionalState
extends PCState

Lifecycle state. Represents an instance that was made persistent via reachability within the current transaction.

Author:
Steve Kim

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
PNewProvisionalState()
           
 
Method Summary
(package private)  PCState commit(StateManagerImpl context)
          Perform any actions necesssary and return the proper lifecycle state on transaction commit.
(package private)  PCState commitRetain(StateManagerImpl context)
          Perform any actions necesssary and return the proper lifecycle state on transaction commit with the retainValues flag set.
(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)  void initialize(StateManagerImpl context)
          Called when this state is first assigned to the given state manager.
(package private)  boolean isDirty()
          Return whether this is a dirty 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 isProvisional()
          Return whether this is a state that will become transient at the end of the next transaction.
(package private)  boolean isTransactional()
          Return whether this is a transactional state.
(package private)  PCState nonprovisional(StateManagerImpl context, boolean logical, OpCallbacks call)
          Return the state to transition to after making no longer provisional.
(package private)  PCState persist(StateManagerImpl context)
          Perform any actions necesssary and return the proper lifecycle state on a call to Broker.persist(java.lang.Object, org.apache.openjpa.kernel.OpCallbacks) with the given instance.
(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.
(package private)  PCState rollback(StateManagerImpl context)
          Perform any actions necesssary and return the proper lifecycle state on transaction rollback.
(package private)  PCState rollbackRestore(StateManagerImpl context)
          Perform any actions necesssary and return the proper lifecycle state on transaction rollback with the restoreValues flag set.
 String toString()
           
 
Methods inherited from class org.apache.openjpa.kernel.PCState
afterNontransactionalRefresh, afterOptimisticRefresh, afterRefresh, beforeFlush, beforeNontransactionalRead, beforeNontransactionalWrite, beforeOptimisticRead, beforeOptimisticWrite, beforeRead, beforeWrite, error, evict, flush, isDeleted, isPendingTransactional, isVersionCheckRequired, nontransactional, readResolve, transactional
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PNewProvisionalState

PNewProvisionalState()
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

persist

PCState persist(StateManagerImpl context)
Description copied from class: PCState
Perform any actions necesssary and return the proper lifecycle state on a call to Broker.persist(java.lang.Object, org.apache.openjpa.kernel.OpCallbacks) with the given instance. Returns the this pointer by default. Note: this method is not called for embedded states, and is only called when an existing managed instance is the target of a persist call.

Overrides:
persist in class PCState

nonprovisional

PCState nonprovisional(StateManagerImpl context,
                       boolean logical,
                       OpCallbacks call)
Description copied from class: PCState
Return the state to transition to after making no longer provisional. Returns the this pointer by default.

Overrides:
nonprovisional in class PCState

commit

PCState commit(StateManagerImpl context)
Description copied from class: PCState
Perform any actions necesssary and return the proper lifecycle state on transaction commit. Returns the this pointer by default.

Overrides:
commit in class PCState

commitRetain

PCState commitRetain(StateManagerImpl context)
Description copied from class: PCState
Perform any actions necesssary and return the proper lifecycle state on transaction commit with the retainValues flag set. Returns the this pointer by default.

Overrides:
commitRetain in class PCState

rollback

PCState rollback(StateManagerImpl context)
Description copied from class: PCState
Perform any actions necesssary and return the proper lifecycle state on transaction rollback. Returns the this pointer by default.

Overrides:
rollback in class PCState

rollbackRestore

PCState rollbackRestore(StateManagerImpl context)
Description copied from class: PCState
Perform any actions necesssary and return the proper lifecycle state on transaction rollback with the restoreValues flag set. Returns the this pointer by default.

Overrides:
rollbackRestore 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

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

isTransactional

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

Overrides:
isTransactional 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

isNew

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

Overrides:
isNew in class PCState

isDirty

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

Overrides:
isDirty in class PCState

isProvisional

boolean isProvisional()
Description copied from class: PCState
Return whether this is a state that will become transient at the end of the next transaction. Returns false by default.

Overrides:
isProvisional in class PCState

toString

public String toString()
Overrides:
toString in class Object


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