Package org.jdbi.v3.core.transaction
Class DelegatingTransactionHandler
java.lang.Object
org.jdbi.v3.core.transaction.DelegatingTransactionHandler
- All Implemented Interfaces:
- TransactionHandler
- Direct Known Subclasses:
- RollbackOnlyTransactionHandler,- SerializableTransactionRunner
Simple delegating subclass that just invokes its delegate.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidBegin a transaction.voidCommit the transaction.<R,X extends Exception> 
 RinTransaction(Handle handle, HandleCallback<R, X> callback) Run a transaction.<R,X extends Exception> 
 RinTransaction(Handle handle, TransactionIsolationLevel level, HandleCallback<R, X> callback) Run a transaction.booleanisInTransaction(Handle handle) Returns whether a given Handle is in the transaction.voidreleaseSavepoint(Handle handle, String name) Release a previously created savepoint.voidRoll back the transaction.voidrollbackToSavepoint(Handle handle, String name) Roll back to a named savepoint.voidCreate a new savepoint.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jdbi.v3.core.transaction.TransactionHandlerspecialize
- 
Constructor Details- 
DelegatingTransactionHandler
 
- 
- 
Method Details- 
beginDescription copied from interface:TransactionHandlerBegin a transaction.- Specified by:
- beginin interface- TransactionHandler
- Parameters:
- handle- the handle the transaction is being started on
 
- 
commitDescription copied from interface:TransactionHandlerCommit the transaction.- Specified by:
- commitin interface- TransactionHandler
- Parameters:
- handle- the handle the commit is being performed on
 
- 
rollbackDescription copied from interface:TransactionHandlerRoll back the transaction.- Specified by:
- rollbackin interface- TransactionHandler
- Parameters:
- handle- the handle the rollback is being performed on
 
- 
rollbackToSavepointDescription copied from interface:TransactionHandlerRoll back to a named savepoint.- Specified by:
- rollbackToSavepointin interface- TransactionHandler
- Parameters:
- handle- the handle the rollback is being performed on
- name- the name of the savepoint to rollback to
 
- 
isInTransactionDescription copied from interface:TransactionHandlerReturns whether a given Handle is in the transaction.- Specified by:
- isInTransactionin interface- TransactionHandler
- Parameters:
- handle- the handle to test
- Returns:
- whether the given handle is in a transaction
 
- 
savepointDescription copied from interface:TransactionHandlerCreate a new savepoint.- Specified by:
- savepointin interface- TransactionHandler
- Parameters:
- handle- the handle on which the transaction is being savepointed
- name- The name of the savepoint, used to rollback to or release later
 
- 
releaseSavepointDescription copied from interface:TransactionHandlerRelease a previously created savepoint.- Specified by:
- releaseSavepointin interface- TransactionHandler
- Parameters:
- handle- the handle on which the savepoint is being released
- name- the savepoint to release
 
- 
inTransactionpublic <R,X extends Exception> R inTransaction(Handle handle, HandleCallback<R, X> callback) throws XDescription copied from interface:TransactionHandlerRun a transaction.- Specified by:
- inTransactionin interface- TransactionHandler
- Type Parameters:
- R- the callback return type
- X- the exception type thrown by the callback, if any
- Parameters:
- handle- the handle to the database
- callback- a callback which will receive the open handle, in a transaction.
- Returns:
- the value returned by the callback.
- Throws:
- X- any exception thrown by the callback.
- See Also:
 
- 
inTransactionpublic <R,X extends Exception> R inTransaction(Handle handle, TransactionIsolationLevel level, HandleCallback<R, X> callback) throws XDescription copied from interface:TransactionHandlerRun a transaction.- Specified by:
- inTransactionin interface- TransactionHandler
- Type Parameters:
- R- the callback return type
- X- the exception type thrown by the callback, if any
- Parameters:
- handle- the handle to the database
- level- the isolation level for the transaction
- callback- a callback which will receive the open handle, in a transaction.
- Returns:
- the value returned by the callback.
- Throws:
- X- any exception thrown by the callback.
- See Also:
 
 
-