|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface TransactionQuery
An extension to the default BaseQuery that holds a transaction.
A TransactionQuery opens a database transaction when it is
created, and as a side-effect, also holds a Connection to the
database. Unlike a normal BaseQuery, a
TransactionQuery will not affect the database until the
commit() method is invoked.
| Method Summary | |
|---|---|
void |
close(boolean commit)
Closes this TransactionQuery optionally calling
commit() before closing the Connection to the
database. |
void |
commit()
Makes all the changes to the database since the last commit / rollback permanent. |
void |
rollback()
Undoes any changes made by this TransactionQuery. |
void |
rollback(Savepoint savepoint)
Undoes any changes from the specified Savepoint up to the
current location in the transaction. |
Savepoint |
setSavepoint()
Sets an unnamed savepoint at the current location in the transaction. |
Savepoint |
setSavepoint(String name)
Sets a named Savepoint at the current position within the
transaction. |
| Methods inherited from interface net.sf.eodsql.BaseQuery |
|---|
close, isClosed |
| Method Detail |
|---|
void close(boolean commit)
TransactionQuery optionally calling
commit() before closing the Connection to the
database.
commit - true if commit() should be called
before closing, or false if nothing is done to the
underlying Connection before closing.void commit()
void rollback()
TransactionQuery.
void rollback(Savepoint savepoint)
Savepoint up to the
current location in the transaction.
savepoint - the Savepoint that marks the current position in the transactionSavepoint setSavepoint()
Savepoint can be used to
rollback the transaction to this point.
Savepoint for this location in the
transactionSavepoint setSavepoint(String name)
Savepoint at the current position within the
transaction.
name - the name of the new Savepoint
Savepoint at the current location in the transaction
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||