public enum TransactionState extends Enum<TransactionState>
Enum Constant and Description |
---|
ABORTED
Completed, having aborted.
|
COMMITTED
Completed, having successfully committed.
|
IN_PROGRESS
Started, still in progress.
|
MUST_ABORT
Started, but has hit an exception.
|
NONE
No transaction exists.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAbort()
Whether it is valid to mark as aborted this transaction}.
|
boolean |
canCommit()
Whether it is valid to commit the transaction.
|
boolean |
canFlush()
Whether it is valid to flush the transaction.
|
boolean |
isComplete()
Whether the transaction is complete (and so a new one can be started).
|
boolean |
mustAbort() |
static TransactionState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TransactionState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TransactionState NONE
public static final TransactionState IN_PROGRESS
public static final TransactionState MUST_ABORT
IllegalStateException
),
can only abort.
Similar to setRollbackOnly in EJBs.public static final TransactionState COMMITTED
IllegalStateException
).public static final TransactionState ABORTED
IllegalStateException
).public static TransactionState[] values()
for (TransactionState c : TransactionState.values()) System.out.println(c);
public static TransactionState 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 nullpublic boolean canFlush()
public boolean canCommit()
public boolean canAbort()
public boolean isComplete()
public boolean mustAbort()
Copyright © 2010–2019 The Apache Software Foundation. All rights reserved.