|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<TxType> com.avaje.ebean.TxType
public enum TxType
Used to define the transactional scope for executing a method. Matches the types defined in the EJB TransactionAttributeType.
Used with the Transactional annotation and the TxScope
with
Ebean.execute(TxScope, TxCallable)
and
Ebean.execute(TxScope, TxRunnable)
.
TxScope
Enum Constant Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
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 final TxType NEVER
Method Detail |
---|
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 name
NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |