org.sape.carbon.services.sql
Class ResultSetTypeEnum

java.lang.Object
  |
  +--org.sape.carbon.core.util.enum.BaseEnum
        |
        +--org.sape.carbon.services.sql.ResultSetTypeEnum
All Implemented Interfaces:
Serializable

public class ResultSetTypeEnum
extends BaseEnum
implements Serializable

This is an enumeration of the supported Result Set types. These types are used in the creation of a connection for the purposes of configuring the type of Result Set that will be returned.

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.6 $($Author: dvoet $ / $Date: 2003/05/05 21:21:36 $)
Author:
Greg Hinkle, July 2002
See Also:
ResultSet, Serialized Form

Nested Class Summary
static class ResultSetTypeEnum.ResultSetTypeEnumNotFoundException
          This class is a typesafe retriever excepection for an enumeration
 
Nested classes inherited from class org.sape.carbon.core.util.enum.BaseEnum
 
Field Summary
static ResultSetTypeEnum FORWARD_ONLY
          Represents the forward only type of result set
static ResultSetTypeEnum SCROLL_INSENSITIVE
          Represents the scroll insensitive type of result set
static ResultSetTypeEnum SCROLL_SENSITIVE
          Represents the scroll sensitive type of result set
 
Fields inherited from class org.sape.carbon.core.util.enum.BaseEnum
name, ordinal
 
Constructor Summary
private ResultSetTypeEnum(String name, int ordinal)
          Constructs a enumeration of type ResultSetTypeEnum
 
Method Summary
static ResultSetTypeEnum getByName(String name)
          Looks up a ResultSetTypeEnum by its string representation
static ResultSetTypeEnum getByOrdinal(int ordinal)
          Looks up a ResultSetTypeEnum by its ordinal representation
static Iterator iterator()
          Retrieves and iterator by ascending ordinal order for all enumerations of this type.
(package private)  Object readResolve()
          Overrides part of serialization to return a reference to an enumeration instance that is managed by the Enumeration Subsystem.
 
Methods inherited from class org.sape.carbon.core.util.enum.BaseEnum
equals, getByName, getByOrdinal, getName, getOrdinal, hashCode, iterator, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FORWARD_ONLY

public static final ResultSetTypeEnum FORWARD_ONLY
Represents the forward only type of result set

See Also:
ResultSet.TYPE_FORWARD_ONLY

SCROLL_INSENSITIVE

public static final ResultSetTypeEnum SCROLL_INSENSITIVE
Represents the scroll insensitive type of result set

See Also:
ResultSet.TYPE_SCROLL_INSENSITIVE

SCROLL_SENSITIVE

public static final ResultSetTypeEnum SCROLL_SENSITIVE
Represents the scroll sensitive type of result set

See Also:
ResultSet.TYPE_SCROLL_SENSITIVE
Constructor Detail

ResultSetTypeEnum

private ResultSetTypeEnum(String name,
                          int ordinal)
Constructs a enumeration of type ResultSetTypeEnum

Parameters:
name - the String name of a enumeration instance
ordinal - the integer ordinal value of a specific enumeration instance
Method Detail

getByName

public static final ResultSetTypeEnum getByName(String name)
                                         throws ResultSetTypeEnum.ResultSetTypeEnumNotFoundException
Looks up a ResultSetTypeEnum by its string representation

Parameters:
name - the String name of a enumeration instance
Returns:
an specific ResultSetTypeEnum
Throws:
ResultSetTypeEnum.ResultSetTypeEnumNotFoundException - when there is no enumeration instance for the given name

getByOrdinal

public static ResultSetTypeEnum getByOrdinal(int ordinal)
                                      throws ResultSetTypeEnum.ResultSetTypeEnumNotFoundException
Looks up a ResultSetTypeEnum by its ordinal representation

Parameters:
ordinal - the integer ordinal value of a specific enumeration instance
Returns:
an specific ResultSetTypeEnum
Throws:
ResultSetTypeEnum.ResultSetTypeEnumNotFoundException - when there is no enumeration instance for the given ordinal

iterator

public static Iterator iterator()
Retrieves and iterator by ascending ordinal order for all enumerations of this type.

Returns:
an iterator over all ResultSetTypeEnum

readResolve

final Object readResolve()
                  throws ObjectStreamException
Overrides part of serialization to return a reference to an enumeration instance that is managed by the Enumeration Subsystem. This will always return the SAME object instance for any single enum instance and is what allows the "==" operator to be used for comparisons.

Returns:
the object instance that should be resolved by this class
Throws:
ObjectStreamException - indicates there is a failure to resolve the streamed object due to a format or read io exception


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.