- All Implemented Interfaces:
Serializable,Comparable<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 TxScope with
- Ebean execute(TxScope, Runnable)
- Ebean executeCall(TxScope, Callable)
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA transaction MUST already have been started.If there is an existing transaction throws an Exception.Suspends an existing transaction if required.Uses an existing transaction and if none exists will starts a new Transaction.Always start a new transaction.Uses the existing transaction if one exists, otherwise the method does not run with a transaction. -
Method Summary
-
Enum Constant Details
-
REQUIRED
Uses an existing transaction and if none exists will starts a new Transaction. This is the default. -
MANDATORY
A transaction MUST already have been started. Throws TransactionRequiredException. -
SUPPORTS
Uses the existing transaction if one exists, otherwise the method does not run with a transaction. Used this with caution. -
REQUIRES_NEW
Always start a new transaction. Suspend an existing once if required. -
NOT_SUPPORTED
Suspends an existing transaction if required. Method runs without a transaction. -
NEVER
If there is an existing transaction throws an Exception. Method runs without a transaction.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-