public enum TransactionIsolationLevel extends Enum<TransactionIsolationLevel> implements FieldEnum<TransactionIsolationLevel,Integer>
| Enum Constant and Description |
|---|
TRANSACTION_NONE
A constant for
Connection.TRANSACTION_NONE. |
TRANSACTION_READ_COMMITTED
A constant for
Connection.TRANSACTION_READ_COMMITTED. |
TRANSACTION_READ_UNCOMMITTED
A constant for
Connection.TRANSACTION_READ_UNCOMMITTED. |
TRANSACTION_REPEATABLE_READ
A constant for
Connection.TRANSACTION_REPEATABLE_READ. |
TRANSACTION_SERIALIZABLE
A constant for
Connection.TRANSACTION_SERIALIZABLE. |
| Modifier and Type | Method and Description |
|---|---|
static Integer[] |
fieldValues()
Returns an array containing the field values of this enum type.
|
static TransactionIsolationLevel |
fromConnection(Connection connection)
Returns the enum constant of this type with the specified connection's
current transaction isolation level.
|
static TransactionIsolationLevel |
fromFieldValue(int fieldValue)
Returns the enum constant of this type with the specified transaction
isolation level.
|
Integer |
getFieldValue()
Returns field value.
|
void |
set(Connection connection)
Attempts to change the transaction isolation level for given connection
to this constant's field value.
|
static TransactionIsolationLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TransactionIsolationLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TransactionIsolationLevel TRANSACTION_NONE
Connection.TRANSACTION_NONE.public static final TransactionIsolationLevel TRANSACTION_READ_UNCOMMITTED
Connection.TRANSACTION_READ_UNCOMMITTED.public static final TransactionIsolationLevel TRANSACTION_READ_COMMITTED
Connection.TRANSACTION_READ_COMMITTED.public static final TransactionIsolationLevel TRANSACTION_REPEATABLE_READ
Connection.TRANSACTION_REPEATABLE_READ.public static final TransactionIsolationLevel TRANSACTION_SERIALIZABLE
Connection.TRANSACTION_SERIALIZABLE.public static TransactionIsolationLevel[] values()
for (TransactionIsolationLevel c : TransactionIsolationLevel.values()) System.out.println(c);
public static TransactionIsolationLevel 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 static TransactionIsolationLevel fromFieldValue(int fieldValue)
fieldValue - the transaction isolation levelpublic static TransactionIsolationLevel fromConnection(Connection connection) throws SQLException
connection - the connectionSQLException - if a database access error occurs or this method is
called on a closed connectionConnection.getTransactionIsolation()public static Integer[] fieldValues()
public Integer getFieldValue()
FieldEnumgetFieldValue in interface FieldEnum<TransactionIsolationLevel,Integer>public void set(Connection connection) throws SQLException
connection - the connectionSQLException - if a database access error occurs, this method is
called on a closed connectionConnection.setTransactionIsolation(int)Copyright © 2011-2013. All Rights Reserved.