Package org.dalesbred.transaction
Interface TransactionManager
- All Known Implementing Classes:
AbstractTransactionManager
,DefaultTransactionManager
,SingleConnectionTransactionManager
,SpringTransactionManager
public interface TransactionManager
Abstract the mechanism in which transactions are handled.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if the code is executing inside transaction.<T> T
withCurrentTransaction
(@NotNull TransactionCallback<T> callback, @NotNull Dialect dialect) Executes given callback within current transaction.<T> T
withTransaction
(@NotNull TransactionSettings settings, @NotNull TransactionCallback<T> callback, @NotNull Dialect dialect) Executes given callback with given transaction settings.
-
Method Details
-
withTransaction
<T> T withTransaction(@NotNull @NotNull TransactionSettings settings, @NotNull @NotNull TransactionCallback<T> callback, @NotNull @NotNull Dialect dialect) Executes given callback with given transaction settings. -
withCurrentTransaction
<T> T withCurrentTransaction(@NotNull @NotNull TransactionCallback<T> callback, @NotNull @NotNull Dialect dialect) Executes given callback within current transaction. -
hasActiveTransaction
boolean hasActiveTransaction()Returns true if the code is executing inside transaction.
-