|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResultSet
A set of tuples, modelled on the java.sql.ResultSet and providing a subset of its functionality. Note that the behaviour of java.sql.ResultSet is not always completely intuitive and consequently this class has been tailored carefully to match it.
Method Summary | |
---|---|
void |
afterLast()
Moves the cursor to the end of this ResultSet object, just
after the last row. |
void |
beforeFirst()
Moves the cursor to the front of this ResultSet object,
just before the first row. |
boolean |
endOfResults()
Reports whether this ResultSet is the last one to be returned by a Consumer. |
int |
findColumn(java.lang.String columnName)
Maps the given ResultSet column name to its
ResultSet column index. |
boolean |
first()
Moves the cursor to the first row in this ResultSet object. |
boolean |
getBoolean(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as an boolean in the Java
programming language. |
boolean |
getBoolean(java.lang.String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java
programming language. |
double |
getDouble(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java
programming language. |
double |
getDouble(java.lang.String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java
programming language. |
float |
getFloat(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java
programming language. |
float |
getFloat(java.lang.String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java
programming language. |
int |
getInt(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java
programming language. |
int |
getInt(java.lang.String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java
programming language. |
ResultSetMetaData |
getMetaData()
Retrieves the number, types and properties of this ResultSet object's columns. |
int |
getRow()
Retrieves the current row number. |
java.lang.String |
getString(int columnIndex)
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java
programming language. |
java.lang.String |
getString(java.lang.String columnName)
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java
programming language. |
RGMAWarning |
getWarning()
Gets the RGMAWarning associated with this ResultSet. |
boolean |
isAfterLast()
Retrieves whether the cursor is after the last row in this ResultSet object. |
boolean |
isBeforeFirst()
Retrieves whether the cursor is before the first row in this ResultSet object. |
boolean |
isFirst()
Retrieves whether the cursor is on the first row of this ResultSet object. |
boolean |
isLast()
Retrieves whether the cursor is on the last row of this ResultSet object. |
boolean |
last()
Moves the cursor to the last row in this ResultSet object. |
boolean |
next()
Moves the cursor down one row from its current position. |
boolean |
previous()
Moves the cursor to the previous row in this ResultSet
object. |
int |
size()
Gets the number of tuples in this ResultSet. |
boolean |
wasNull()
Reports whether the last column read had a value of SQL NULL . |
Method Detail |
---|
boolean isAfterLast()
ResultSet
object.
true
if the cursor is after the last row;
false
if the cursor is at any other position or
the result set contains no rowsboolean isBeforeFirst()
ResultSet
object.
true
if the cursor is before the first row;
false
if the cursor is at any other position or
the result set contains no rowsdouble getDouble(int columnIndex) throws RGMAException
ResultSet
object as a double
in the Java
programming language.
columnIndex
- the first column is 1, the second is 2, ...
NULL
, the
value returned is 0
RGMAException
- if an RGMA access error occursdouble getDouble(java.lang.String columnName) throws RGMAException
ResultSet
object as a double
in the Java
programming language.
columnName
- the SQL name of the column
NULL
, the
value returned is 0
RGMAException
- if an RGMA access error occursboolean isFirst()
ResultSet
object.
true
if the cursor is on the first row;
false
otherwisefloat getFloat(int columnIndex) throws RGMAException
ResultSet
object as a float
in the Java
programming language.
columnIndex
- the first column is 1, the second is 2, ...
NULL
, the
value returned is 0
RGMAException
- if an RGMA access error occursfloat getFloat(java.lang.String columnName) throws RGMAException
ResultSet
object as a float
in the Java
programming language.
columnName
- the SQL name of the column
NULL
, the
value returned is 0
RGMAException
- if an RGMA access error occursint getInt(int columnIndex) throws RGMAException
ResultSet
object as an int
in the Java
programming language.
columnIndex
- the first column is 1, the second is 2, ...
NULL
, the
value returned is 0
RGMAException
- if an RGMA access error occursint getInt(java.lang.String columnName) throws RGMAException
ResultSet
object as an int
in the Java
programming language.
columnName
- the SQL name of the column
NULL
, the
value returned is 0
RGMAException
- if an RGMA access error occursboolean getBoolean(int columnIndex) throws RGMAException
ResultSet
object as an boolean
in the Java
programming language.
columnIndex
- the first column is 1, the second is 2, ...
NULL
, the
value returned is false
RGMAException
- if an RGMA access error occursboolean getBoolean(java.lang.String columnName) throws RGMAException
ResultSet
object as a boolean
in the Java
programming language.
columnName
- the SQL name of the column
NULL
, the
value returned is false
RGMAException
- if an RGMA access error occursboolean isLast()
ResultSet
object. Note: Calling the method
isLast
may be expensive because the JDBC driver might need
to fetch ahead one row in order to determine whether the current row
is the last row in the result set.
true
if the cursor is on the last row;
false
otherwiseResultSetMetaData getMetaData()
ResultSet
object's columns.
ResultSet
object's columnsint getRow()
0
if there is no current
rowjava.lang.String getString(int columnIndex) throws RGMAException
ResultSet
object as a String
in the Java
programming language.
columnIndex
- the first column is 1, the second is 2, ...
NULL
, the
value returned is null
RGMAException
- if an RGMA access error occursjava.lang.String getString(java.lang.String columnName) throws RGMAException
ResultSet
object as a String
in the Java
programming language.
columnName
- the SQL name of the column
NULL
, the
value returned is null
RGMAException
- if an RGMA access error occursRGMAWarning getWarning()
null
if no warning has been set.void afterLast()
ResultSet
object, just
after the last row. This method has no effect if the result set
contains no rows.
void beforeFirst()
ResultSet
object,
just before the first row. This method has no effect if the result set
contains no rows.
int findColumn(java.lang.String columnName) throws RGMAException
ResultSet
column name to its
ResultSet
column index.
columnName
- the name of the column
RGMAException
- if theResultSet
object does not
contain columnName
or an RGMA access error
occursboolean first()
ResultSet
object.
true
if the cursor is on a valid row;
false
if there are no rows in the result setboolean last()
ResultSet
object.
true
if the cursor is on a valid row;
false
if there are no rows in the result setboolean next()
ResultSet
cursor is initially positioned before the first
row; the first call to the method next
makes the first row
the current row; the second call makes the second row the current row,
and so on.
If an input stream is open for the current row, a call to the method
next
will implicitly close it. A ResultSet
object's warning chain is cleared when a new row is read.
true
if the new current row is valid;
false
if there are no more rowsboolean previous()
ResultSet
object.
true
if the cursor is on a valid row;
false
if it is off the result setboolean wasNull()
NULL
. Note that you must first call one of the getter
methods on a column to try to read its value and then call the method
wasNull
to see if the value read was SQL
NULL
.
true
if the last column value read was SQL
NULL
and false
otherwiseboolean endOfResults()
true
if there are no more ResultSets that need to be
popped for this query.int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |