Package org.apache.openjpa.jdbc.kernel
Class AbstractJDBCSavepointManager.ConnectionSavepoint
- java.lang.Object
-
- org.apache.openjpa.kernel.OpenJPASavepoint
-
- org.apache.openjpa.jdbc.kernel.AbstractJDBCSavepointManager.ConnectionSavepoint
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- AbstractJDBCSavepointManager
protected class AbstractJDBCSavepointManager.ConnectionSavepoint extends OpenJPASavepoint
A savepoint which provides access to the current transactional connection.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConnectionSavepoint(Broker broker, java.lang.String name, boolean copy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.sql.Connection
getConnection()
Return the currentConnection
for this savepoint.java.lang.Object
getDataStoreSavepoint()
Return the stored savepoint objectjava.util.Collection
rollback(java.util.Collection previous)
Handle the rolled back state, returning saved data.void
save(java.util.Collection states)
Set this savepoint, saving any state for the passed-inOpenJPAStateManager
s as necessary.void
setDataStoreSavepoint(java.lang.Object savepoint)
Set the implementation specific savepoint object-
Methods inherited from class org.apache.openjpa.kernel.OpenJPASavepoint
getBroker, getCopyFieldState, getName, getStates, release
-
-
-
-
Constructor Detail
-
ConnectionSavepoint
public ConnectionSavepoint(Broker broker, java.lang.String name, boolean copy)
-
-
Method Detail
-
getDataStoreSavepoint
public java.lang.Object getDataStoreSavepoint()
Return the stored savepoint object
-
setDataStoreSavepoint
public void setDataStoreSavepoint(java.lang.Object savepoint)
Set the implementation specific savepoint object
-
getConnection
public java.sql.Connection getConnection()
Return the currentConnection
for this savepoint.
-
rollback
public java.util.Collection rollback(java.util.Collection previous)
Description copied from class:OpenJPASavepoint
Handle the rolled back state, returning saved data. Subclasses should return the collection returned from this method.- Overrides:
rollback
in classOpenJPASavepoint
- Parameters:
previous
- previous savepoints set in the transaction
-
save
public void save(java.util.Collection states)
Description copied from class:OpenJPASavepoint
Set this savepoint, saving any state for the passed-inOpenJPAStateManager
s as necessary.- Overrides:
save
in classOpenJPASavepoint
-
-