public static enum RuntimeContext.TransactionState extends Enum<RuntimeContext.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
abort this
transaction. |
boolean |
canCommit()
Whether it is valid to
commit this
transaction. |
boolean |
canFlush()
Whether it is valid to
flush this
transaction. |
boolean |
isComplete()
Whether the
transaction is complete (and so a
new one can be started). |
boolean |
mustAbort() |
static RuntimeContext.TransactionState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RuntimeContext.TransactionState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RuntimeContext.TransactionState NONE
public static final RuntimeContext.TransactionState IN_PROGRESS
May flush,
commit or
abort.
public static final RuntimeContext.TransactionState MUST_ABORT
May not IsisTransaction#flush() or
commit (will throw an
IllegalStateException), but can only
abort.
Similar to setRollbackOnly in EJBs.
public static final RuntimeContext.TransactionState COMMITTED
May not IsisTransaction#flush() or
abort or
commit (will throw
IllegalStateException).
public static final RuntimeContext.TransactionState ABORTED
May not IsisTransaction#flush(),
commit or
abort (will throw
IllegalStateException).
public static RuntimeContext.TransactionState[] values()
for (RuntimeContext.TransactionState c : RuntimeContext.TransactionState.values()) System.out.println(c);
public static RuntimeContext.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()
flush this
transaction.public boolean canCommit()
commit this
transaction.public boolean canAbort()
abort this
transaction.public boolean isComplete()
transaction is complete (and so a
new one can be started).public boolean mustAbort()
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.