public enum TxType extends Enum<TxType>
Used with the Transactional annotation and the TxScope with
Ebean.execute(TxScope, TxCallable) and
Ebean.execute(TxScope, TxRunnable).
TxScope| Enum Constant and Description |
|---|
MANDATORY
A transaction MUST already have been started.
|
NEVER
If there is an existing transaction throws an Exception.
|
NOT_SUPPORTED
Suspends an existing transaction if required.
|
REQUIRED
Uses an existing transaction and if none exists will starts a new
Transaction.
|
REQUIRES_NEW
Always start a new transaction.
|
SUPPORTS
Uses the existing transaction if one exists, otherwise the method does not
run with a transaction.
|
| Modifier and Type | Method and Description |
|---|---|
static TxType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TxType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TxType REQUIRED
public static final TxType MANDATORY
public static final TxType SUPPORTS
public static final TxType REQUIRES_NEW
public static final TxType NOT_SUPPORTED
public static TxType[] values()
for (TxType c : TxType.values()) System.out.println(c);
public static TxType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2016. All rights reserved.