Package net.sf.basedb.core.hibernate
Class SavePointWork<R>
java.lang.Object
net.sf.basedb.core.hibernate.SavePointWork<R>
- All Implemented Interfaces:
ReturningWork<R>
A wrapper work that protects a parent work with a savepoint.
Before executing the parent work, a
Savepoint
is
created on the Connection
. If the parent work
results throws an SQLException
the connection is
rolled back to the savepoint. Other exceptions and a normal
completion just releases the savepoint.- Since:
- 3.1
- Author:
- nicklas
- Last modified
- $Date: 2014-06-10 13:27:02 +0200 (ti, 10 jun 2014) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(Connection connection) From the Work interface -----------------------
-
Field Details
-
work
-
-
Constructor Details
-
SavePointWork
Create a new work item.- Parameters:
work
- The parent work
-
-
Method Details
-
execute
From the Work interface ------------------------ Specified by:
execute
in interfaceReturningWork<R>
- Throws:
SQLException
-