Class RollbackOnlyTransactionHandler
java.lang.Object
org.jdbi.v3.core.transaction.DelegatingTransactionHandler
org.jdbi.v3.core.transaction.RollbackOnlyTransactionHandler
- All Implemented Interfaces:
TransactionHandler
A transaction handler that always calls
DelegatingTransactionHandler.rollback(org.jdbi.v3.core.Handle) instead
of commit(org.jdbi.v3.core.Handle).-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Methods inherited from class DelegatingTransactionHandler
begin, inTransaction, inTransaction, isInTransaction, releaseSavepoint, rollback, rollbackToSavepoint, savepointModifier and TypeMethodDescriptionvoidBegin a 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 Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TransactionHandler
specializeModifier and TypeMethodDescriptiondefault TransactionHandlerspecialize(Handle handle) Bind a TransactionHandler to a Handle, to allow it to track handle-local state.
-
Constructor Details
-
RollbackOnlyTransactionHandler
public RollbackOnlyTransactionHandler() -
RollbackOnlyTransactionHandler
-
-
Method Details
-
commit
Description copied from interface:TransactionHandlerCommit the transaction.- Specified by:
commitin interfaceTransactionHandler- Overrides:
commitin classDelegatingTransactionHandler- Parameters:
handle- the handle the commit is being performed on
-