com.antelmann.sql
Class SQLTransaction
java.lang.Object
com.antelmann.db.AbstractDBTransaction
com.antelmann.sql.SQLTransaction
- All Implemented Interfaces:
- DBTransaction
@Todo(value="use savepoints to simulate nested transactions")
public class SQLTransaction
- extends AbstractDBTransaction
implements a DBTransaction based on JDBC access.
- Author:
- Holger Antelmann
- See Also:
SQLDatabase
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLTransaction
public SQLTransaction(Database<Connection> database)
throws SQLException
- the transaction within must support transactions and auto-commit must be set to false
- Throws:
SQLException
getDatabase
public Database<Connection> getDatabase()
- Description copied from interface:
DBTransaction
- gives access to the associated Database
- Specified by:
getDatabase in interface DBTransaction- Overrides:
getDatabase in class AbstractDBTransaction
doBegin
protected void doBegin()
throws TransactionException
- Specified by:
doBegin in class AbstractDBTransaction
- Throws:
TransactionException
doCommit
protected void doCommit()
throws DatabaseException
- Specified by:
doCommit in class AbstractDBTransaction
- Throws:
DatabaseException
doAbort
protected void doAbort()
throws DatabaseException
- Specified by:
doAbort in class AbstractDBTransaction
- Throws:
DatabaseException
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads