|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.sql.SQLTransaction
public class SQLTransaction
implements a DBTransaction based on JDBC access.
| Constructor Summary | |
|---|---|
SQLTransaction(SQLDatabase transaction)
|
|
| Method Summary | |
|---|---|
void |
abort()
aborts this transaction |
void |
begin()
sets the transaction to active and allows access to the Resources provided that the calling thread holds the lock on this instance. |
void |
commit()
commits all data within the transaction scope to the underlying database |
Database |
getDatabase()
gives access to the associated Database |
boolean |
isActive()
if true, the transaction has begun and not yet committed or aborted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SQLTransaction(SQLDatabase transaction)
| Method Detail |
|---|
public Database getDatabase()
DBTransaction
getDatabase in interface DBTransaction
public void begin()
throws TransactionException
DBTransaction
begin in interface DBTransactionTransactionException - if the transaction is already active
public void commit()
throws DatabaseException
DBTransaction
commit in interface DBTransactionTransactionException - if the transaction is already active
DatabaseException - if the transaction could not be committed to the underlying service
public void abort()
throws DatabaseException
DBTransaction
abort in interface DBTransactionTransactionException - if the transaction is already active
DatabaseException - if the transaction could not be aborted from the underlying servicepublic boolean isActive()
DBTransaction
isActive in interface DBTransaction
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||