org.jcreme.sql
Class IsolationLevel

java.lang.Object
  extended byorg.jcreme.enumerations.Enumeration
      extended byorg.jcreme.sql.IsolationLevel
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class IsolationLevel
extends Enumeration

This class represents the IsolationLevel of a database transaction. The value associated to the objects can be used in the java.sql.Connection interface to set the transactions isolation level.

Version:
$Revision: 1.1 $
Author:
$Author: dbregeon $
See Also:
Serialized Form

Field Summary
static java.lang.Integer I_NONE
          The value for the 'NONE' isolation level.
static java.lang.Integer I_READ_COMMITTED
          The value for the 'READ_COMMITTED' isolation level.
static java.lang.Integer I_READ_UNCOMMITTED
          The value for the 'READ_UNCOMMITTED' isolation level.
static java.lang.Integer I_REPEATABLE_READ
          The value for the 'REPEATABLE_READ' isolation level.
static java.lang.Integer I_SERIALIZABLE
          The value for the 'SERIALIZABLE' isolation level.
static IsolationLevel NONE
          The 'NONE' isolation level.
static IsolationLevel READ_COMMITTED
          The 'READ_COMMITTED' isolation level.
static IsolationLevel READ_UNCOMMITTED
          The 'READ_UNCOMMITTED' isolation level.
static IsolationLevel REPEATABLE_READ
          The 'REPEATABLE_READ' isolation level.
static java.lang.String S_NONE
          The name for the 'NONE' isolation level.
static java.lang.String S_READ_COMMITTED
          The name for the 'READ_COMMITTED' isolation level.
static java.lang.String S_READ_UNCOMMITTED
          The name for the 'READ_UNCOMMITTED' isolation level.
static java.lang.String S_REPEATABLE_READ
          The name for the 'REPEATABLE_READ' isolation level.
static java.lang.String S_SERIALIZABLE
          The name for the 'SERIALIZABLE' isolation level.
static IsolationLevel SERIALIZABLE
          The 'SERIALIZABLE' isolation level.
protected  java.lang.Integer value
          The value of the IsolationLevel as defined in the java.sql.Connection interface.
 
Fields inherited from class org.jcreme.enumerations.Enumeration
 
Constructor Summary
protected IsolationLevel(java.lang.String name, java.lang.Integer value)
          Creates a new instance of IsolationLevel
 
Method Summary
static IsolationLevel get(java.lang.Integer value)
          Retrieves the IsolationLevel that corresponds to the given id.
static IsolationLevel get(java.lang.String name)
          Retrieves the IsolationLevel that corresponds to the given name.
protected  java.util.Hashtable getFromName()
          This method is for internal use only.
protected  java.util.Hashtable getFromValue()
          This method is for internal use only.
 java.lang.Integer getValue()
          Gives access to the value of the IsolationLevel.
 
Methods inherited from class org.jcreme.enumerations.Enumeration
compareTo, getName, getValues, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected java.lang.Integer value
The value of the IsolationLevel as defined in the java.sql.Connection interface.


S_NONE

public static final java.lang.String S_NONE
The name for the 'NONE' isolation level.

See Also:
Constant Field Values

I_NONE

public static final java.lang.Integer I_NONE
The value for the 'NONE' isolation level.


NONE

public static final IsolationLevel NONE
The 'NONE' isolation level.


S_READ_COMMITTED

public static final java.lang.String S_READ_COMMITTED
The name for the 'READ_COMMITTED' isolation level.

See Also:
Constant Field Values

I_READ_COMMITTED

public static final java.lang.Integer I_READ_COMMITTED
The value for the 'READ_COMMITTED' isolation level.


READ_COMMITTED

public static final IsolationLevel READ_COMMITTED
The 'READ_COMMITTED' isolation level.


S_READ_UNCOMMITTED

public static final java.lang.String S_READ_UNCOMMITTED
The name for the 'READ_UNCOMMITTED' isolation level.

See Also:
Constant Field Values

I_READ_UNCOMMITTED

public static final java.lang.Integer I_READ_UNCOMMITTED
The value for the 'READ_UNCOMMITTED' isolation level.


READ_UNCOMMITTED

public static final IsolationLevel READ_UNCOMMITTED
The 'READ_UNCOMMITTED' isolation level.


S_REPEATABLE_READ

public static final java.lang.String S_REPEATABLE_READ
The name for the 'REPEATABLE_READ' isolation level.

See Also:
Constant Field Values

I_REPEATABLE_READ

public static final java.lang.Integer I_REPEATABLE_READ
The value for the 'REPEATABLE_READ' isolation level.


REPEATABLE_READ

public static final IsolationLevel REPEATABLE_READ
The 'REPEATABLE_READ' isolation level.


S_SERIALIZABLE

public static final java.lang.String S_SERIALIZABLE
The name for the 'SERIALIZABLE' isolation level.

See Also:
Constant Field Values

I_SERIALIZABLE

public static final java.lang.Integer I_SERIALIZABLE
The value for the 'SERIALIZABLE' isolation level.


SERIALIZABLE

public static final IsolationLevel SERIALIZABLE
The 'SERIALIZABLE' isolation level.

Constructor Detail

IsolationLevel

protected IsolationLevel(java.lang.String name,
                         java.lang.Integer value)
                  throws java.security.InvalidParameterException
Creates a new instance of IsolationLevel

Parameters:
name - the name of this enumerated value. It cannot be null.
value - the id for this enmerated value. It cannot be null.
Throws:
java.security.InvalidParameterException - if one of the parameters is null.
Method Detail

getFromName

protected java.util.Hashtable getFromName()
This method is for internal use only.

Specified by:
getFromName in class Enumeration
Returns:
the Hashtable that links the enumerated values names with the actual enumerated value.

getFromValue

protected java.util.Hashtable getFromValue()
This method is for internal use only.

Returns:
the Hashtable that links the enumerated values id with the actual enumerated value.

get

public static IsolationLevel get(java.lang.String name)
Retrieves the IsolationLevel that corresponds to the given name.

Parameters:
name - the name of the IsolationLevel to retrieve.
Returns:
the IsolationLevel that corresponds to the given name. Null if it does not exist.

get

public static IsolationLevel get(java.lang.Integer value)
Retrieves the IsolationLevel that corresponds to the given id.

Parameters:
value - the id of the IsolationLevel to retrieve.
Returns:
the IsolationLevel that corresponds to the given id. Null if it does not exist.

getValue

public java.lang.Integer getValue()
Gives access to the value of the IsolationLevel.

Returns:
the value associated to the IsolationLevel (the int given in the Connection interface).


Copyright 2006 null. All Rights Reserved.