Holger's
Java API

com.antelmann.sql
Class SQLTransaction

java.lang.Object
  extended by com.antelmann.db.AbstractDBTransaction
      extended by 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

Field Summary
 
Fields inherited from class com.antelmann.db.AbstractDBTransaction
database
 
Constructor Summary
SQLTransaction(Database<Connection> database)
          the transaction within must support transactions and auto-commit must be set to false
 
Method Summary
protected  void doAbort()
           
protected  void doBegin()
           
protected  void doCommit()
           
 Database<Connection> getDatabase()
          gives access to the associated Database
 
Methods inherited from class com.antelmann.db.AbstractDBTransaction
abort, addTransactionListener, begin, commit, getTransactionListeners, isActive, isReadOnly, removeTransactionListener, setNextToReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLTransaction

public SQLTransaction(Database<Connection> database)
               throws SQLException
the transaction within must support transactions and auto-commit must be set to false

Throws:
SQLException
Method Detail

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