public enum ResultSetFetchDirection extends Enum<ResultSetFetchDirection> implements FieldEnum<ResultSetFetchDirection,Integer>
ResultSet's fetch directions.| Enum Constant and Description |
|---|
FETCH_FORWARD
Constant for
ResultSet.FETCH_FORWARD. |
FETCH_REVERSE
Constant for
ResultSet.FETCH_REVERSE. |
FETCH_UNKNOWN
Constant for
ResultSet.FETCH_UNKNOWN. |
| Modifier and Type | Method and Description |
|---|---|
static Integer[] |
fieldValues()
Returns an array containing the field values of this enum type, in the
order they are declared.
|
static ResultSetFetchDirection |
fromFieldValue(int fieldValue)
Returns the enum constant of this type with the specified fetch direction
value.
|
static ResultSetFetchDirection |
fromResultSet(ResultSet resultSet)
Returns the enum constant of this type with the specified result set's
current fetch direction value.
|
Integer |
getFieldValue()
Returns field value.
|
void |
set(ResultSet resultSet)
Invokes
ResultSet.setFetchDirection(int) on specified result set
with the field value of this constant. |
static ResultSetFetchDirection |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResultSetFetchDirection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResultSetFetchDirection FETCH_FORWARD
ResultSet.FETCH_FORWARD.ResultSet.FETCH_REVERSEpublic static final ResultSetFetchDirection FETCH_REVERSE
ResultSet.FETCH_REVERSE.ResultSet.FETCH_REVERSEpublic static final ResultSetFetchDirection FETCH_UNKNOWN
ResultSet.FETCH_UNKNOWN.ResultSet.FETCH_UNKNOWNpublic static ResultSetFetchDirection[] values()
for (ResultSetFetchDirection c : ResultSetFetchDirection.values()) System.out.println(c);
public static ResultSetFetchDirection 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 ResultSetFetchDirection fromFieldValue(int fieldValue)
fieldValue - the fetch direction value; one of
ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or
ResultSet.FETCH_UNKNOWN.IllegalArgumentException - if this enum type has no constant with
the specified fetch direction value.public static ResultSetFetchDirection fromResultSet(ResultSet resultSet) throws SQLException
resultSet - the result setSQLException - if a database access error occurs or this method is
called on a closed result setResultSet.getFetchDirection()public static Integer[] fieldValues()
public Integer getFieldValue()
FieldEnumgetFieldValue in interface FieldEnum<ResultSetFetchDirection,Integer>public void set(ResultSet resultSet) throws SQLException
ResultSet.setFetchDirection(int) on specified result set
with the field value of this constant.resultSet - the result set.SQLException - if a database access error occurs.ResultSet.setFetchDirection(int)Copyright © 2011-2013. All Rights Reserved.