org.apache.openjpa.jdbc.kernel
Class AbstractJDBCSavepointManager

java.lang.Object
  extended by org.apache.openjpa.jdbc.kernel.AbstractJDBCSavepointManager
All Implemented Interfaces:
org.apache.openjpa.kernel.SavepointManager, org.apache.openjpa.lib.conf.Configurable

public abstract class AbstractJDBCSavepointManager
extends java.lang.Object
implements org.apache.openjpa.kernel.SavepointManager, org.apache.openjpa.lib.conf.Configurable

Abstract SavepointManager implementation that delegates to the subclass for savepoint operations on the active Connection. This implementation issues a flush and relies on the driver/db to restore back to the flushed state.

Since:
0.3.4
Author:
Steve Kim

Nested Class Summary
protected  class AbstractJDBCSavepointManager.ConnectionSavepoint
          A savepoint which provides access to the current transactional connection.
 
Constructor Summary
AbstractJDBCSavepointManager()
           
 
Method Summary
 void endConfiguration()
           
 boolean getRestoreFieldState()
          Return whether to retain in-memory copies of field values for restore on rollback.
 org.apache.openjpa.kernel.OpenJPASavepoint newSavepoint(java.lang.String name, org.apache.openjpa.kernel.Broker broker)
           
protected abstract  void rollbackDataStore(AbstractJDBCSavepointManager.ConnectionSavepoint savepoint)
          Rollback the datastore savepoint.
 void setConfiguration(org.apache.openjpa.lib.conf.Configuration conf)
           
protected abstract  void setDataStore(AbstractJDBCSavepointManager.ConnectionSavepoint savepoint)
          Set the datastore savepoint.
 void setRestoreFieldState(boolean restore)
          Set whether to retain in-memory copies of field values for restore on rollback.
 void startConfiguration()
           
 boolean supportsIncrementalFlush()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJDBCSavepointManager

public AbstractJDBCSavepointManager()
Method Detail

startConfiguration

public void startConfiguration()
Specified by:
startConfiguration in interface org.apache.openjpa.lib.conf.Configurable

setConfiguration

public void setConfiguration(org.apache.openjpa.lib.conf.Configuration conf)
Specified by:
setConfiguration in interface org.apache.openjpa.lib.conf.Configurable

endConfiguration

public void endConfiguration()
Specified by:
endConfiguration in interface org.apache.openjpa.lib.conf.Configurable

getRestoreFieldState

public boolean getRestoreFieldState()
Return whether to retain in-memory copies of field values for restore on rollback. Defaults to {@link OpenJPAConfiguration#getRestoreState).


setRestoreFieldState

public void setRestoreFieldState(boolean restore)
Set whether to retain in-memory copies of field values for restore on rollback. Defaults to OpenJPAConfiguration.getRestoreState().


newSavepoint

public org.apache.openjpa.kernel.OpenJPASavepoint newSavepoint(java.lang.String name,
                                                               org.apache.openjpa.kernel.Broker broker)
Specified by:
newSavepoint in interface org.apache.openjpa.kernel.SavepointManager

supportsIncrementalFlush

public boolean supportsIncrementalFlush()
Specified by:
supportsIncrementalFlush in interface org.apache.openjpa.kernel.SavepointManager

rollbackDataStore

protected abstract void rollbackDataStore(AbstractJDBCSavepointManager.ConnectionSavepoint savepoint)
Rollback the datastore savepoint.


setDataStore

protected abstract void setDataStore(AbstractJDBCSavepointManager.ConnectionSavepoint savepoint)
Set the datastore savepoint.



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