Package org.apache.openjpa.jdbc.kernel
Class AbstractJDBCSavepointManager
java.lang.Object
org.apache.openjpa.jdbc.kernel.AbstractJDBCSavepointManager
- All Implemented Interfaces:
SavepointManager
,Configurable
- Direct Known Subclasses:
JDBC3SavepointManager
public abstract class AbstractJDBCSavepointManager
extends Object
implements SavepointManager, 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
Modifier and TypeClassDescriptionprotected class
A savepoint which provides access to the current transactional connection. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked upon completion of bean property configuration for this object.boolean
Return whether to retain in-memory copies of field values for restore on rollback.newSavepoint
(String name, Broker broker) Return a new savepoint for the given name, which may be null.protected abstract void
Rollback the datastore savepoint.void
Invoked prior to setting bean properties.protected abstract void
Set the datastore savepoint.void
setRestoreFieldState
(boolean restore) Set whether to retain in-memory copies of field values for restore on rollback.void
Invoked before bean property configuration is begun on this object.boolean
Return whether the savepoints generated by this manager can handle incremental flushes to the datastore.
-
Constructor Details
-
AbstractJDBCSavepointManager
public AbstractJDBCSavepointManager()
-
-
Method Details
-
startConfiguration
public void startConfiguration()Description copied from interface:Configurable
Invoked before bean property configuration is begun on this object.- Specified by:
startConfiguration
in interfaceConfigurable
-
setConfiguration
Description copied from interface:Configurable
Invoked prior to setting bean properties.- Specified by:
setConfiguration
in interfaceConfigurable
-
endConfiguration
public void endConfiguration()Description copied from interface:Configurable
Invoked upon completion of bean property configuration for this object.- Specified by:
endConfiguration
in interfaceConfigurable
-
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 toOpenJPAConfiguration.getRestoreState()
. -
newSavepoint
Description copied from interface:SavepointManager
Return a new savepoint for the given name, which may be null.- Specified by:
newSavepoint
in interfaceSavepointManager
-
supportsIncrementalFlush
public boolean supportsIncrementalFlush()Description copied from interface:SavepointManager
Return whether the savepoints generated by this manager can handle incremental flushes to the datastore.- Specified by:
supportsIncrementalFlush
in interfaceSavepointManager
-
rollbackDataStore
protected abstract void rollbackDataStore(AbstractJDBCSavepointManager.ConnectionSavepoint savepoint) Rollback the datastore savepoint. -
setDataStore
Set the datastore savepoint.
-