org.apache.openjpa.kernel
Class SavepointFieldManager

java.lang.Object
  extended by org.apache.openjpa.kernel.AbstractFieldManager
      extended by org.apache.openjpa.kernel.ClearFieldManager
          extended by org.apache.openjpa.kernel.SavepointFieldManager
All Implemented Interfaces:
Serializable, FieldConsumer, FieldManager, FieldSupplier

 class SavepointFieldManager
extends ClearFieldManager
implements Serializable

FieldManager type used to store information for savepoint rollback.

Since:
0.3.4
Author:
Steve Kim

Constructor Summary
SavepointFieldManager(StateManagerImpl sm, boolean copy)
          Constructor.
 
Method Summary
 Object fetchObjectField(int field)
          Return the value of the given field.
 PersistenceCapable getCopy()
          Return the persistence capable copy holding the savepoint field values.
 BitSet getDirty()
          Return the dirty fields during the saved state.
 BitSet getFlushed()
          Return the flushed fields during the saved state.
 BitSet getLoaded()
          Return the fields stored in this manager.
 Object getLoadVersion()
           
 PCState getPCState()
          Return the saved PCState
 StateManagerImpl getStateManager()
          Return the state manager that this manager is associated with.
 Object getVersion()
           
 boolean restoreField(int field)
          Restore the given field.
 void storeField(FieldMetaData field)
          Store the data for the given field.
 void storeObjectField(int field, Object curVal)
          Set the value of the given field.
 
Methods inherited from class org.apache.openjpa.kernel.ClearFieldManager
fetchBooleanField, fetchByteField, fetchCharField, fetchDoubleField, fetchFloatField, fetchIntField, fetchLongField, fetchShortField, fetchStringField, getInstance
 
Methods inherited from class org.apache.openjpa.kernel.AbstractFieldManager
storeBooleanField, storeByteField, storeCharField, storeDoubleField, storeFloatField, storeIntField, storeLongField, storeShortField, storeStringField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SavepointFieldManager

public SavepointFieldManager(StateManagerImpl sm,
                             boolean copy)
Constructor. Provide instance to save and indicate whether to copy persistent fields. Transactional fields will be copied regardless of copy setting.

Method Detail

getStateManager

public StateManagerImpl getStateManager()
Return the state manager that this manager is associated with.


getVersion

public Object getVersion()

getLoadVersion

public Object getLoadVersion()

getCopy

public PersistenceCapable getCopy()
Return the persistence capable copy holding the savepoint field values.


getPCState

public PCState getPCState()
Return the saved PCState


getLoaded

public BitSet getLoaded()
Return the fields stored in this manager.


getDirty

public BitSet getDirty()
Return the dirty fields during the saved state.


getFlushed

public BitSet getFlushed()
Return the flushed fields during the saved state.


storeField

public void storeField(FieldMetaData field)
Store the data for the given field.


restoreField

public boolean restoreField(int field)
Restore the given field. If this method returns true, then you need to use this field manager to replace the given field in the state manager's instance.


fetchObjectField

public Object fetchObjectField(int field)
Description copied from interface: FieldSupplier
Return the value of the given field.

Specified by:
fetchObjectField in interface FieldSupplier
Overrides:
fetchObjectField in class ClearFieldManager

storeObjectField

public void storeObjectField(int field,
                             Object curVal)
Description copied from interface: FieldConsumer
Set the value of the given field.

Specified by:
storeObjectField in interface FieldConsumer
Overrides:
storeObjectField in class AbstractFieldManager


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