public interface TransactionHelper
| Modifier and Type | Method and Description |
|---|---|
<R> R |
mandatory(java.util.function.Supplier<R> callback)
Support a current transaction, throw an exception if none exists.
|
<R> R |
never(java.util.function.Supplier<R> callback)
Execute non-transactionally, throw an exception if a transaction exists.
|
<R> R |
notSupported(java.util.function.Supplier<R> callback)
Execute non-transactionally, suspend the current transaction if one exists.
|
<R> R |
required(java.util.function.Supplier<R> callback)
Support a current transaction, create a new one if none exists.
|
<R> R |
requiresNew(java.util.function.Supplier<R> callback)
Create a new transaction, suspend the current transaction if one exists.
|
<R> R |
supports(java.util.function.Supplier<R> callback)
Support a current transaction, execute non-transactionally if none exists.
|
<R> R mandatory(java.util.function.Supplier<R> callback)
R - Return type.callback - The callback instance will be called inside.IllegalStateException - if there is no active transaction.<R> R never(java.util.function.Supplier<R> callback)
R - Return type.callback - The callback instance will be called inside.IllegalStateException - if the status of the current thread is different from
Status.STATUS_NO_TRANSACTION.<R> R notSupported(java.util.function.Supplier<R> callback)
R - Return type.callback - The callback instance will be called inside.IllegalStateException - if the transaction status at the time of calling this function is neither
Status.STATUS_ACTIVE nor
Status.STATUS_NO_TRANSACTION.<R> R required(java.util.function.Supplier<R> callback)
R - Return type.callback - The callback instance will be called inside.IllegalStateException - if the transaction status at the time of calling this function is neither
Status.STATUS_ACTIVE nor
Status.STATUS_NO_TRANSACTION.<R> R requiresNew(java.util.function.Supplier<R> callback)
R - Return type.callback - The callback instance will be called inside.<R> R supports(java.util.function.Supplier<R> callback)
R - Return type.callback - The callback instance will be called inside.IllegalStateException - if the transaction status at the time of calling this function is neither
Status.STATUS_ACTIVE nor
Status.STATUS_NO_TRANSACTION.Copyright © 2011–2015 Everit Kft.. All rights reserved.