Methods Summary |
---|
public boolean | absolute(int row)Moves the cursor to a specified row number in the {@code ResultSet}.
|
public void | afterLast()Moves the cursor to the end of the {@code ResultSet}, after the last row.
|
public void | beforeFirst()Moves the cursor to the start of the {@code ResultSet}, before the first
row.
|
public void | cancelRowUpdates()Cancels any updates made to the current row in the {@code ResultSet}.
|
public void | clearWarnings()Clears all warnings related to this {@code ResultSet}.
|
public void | close()Releases this {@code ResultSet}'s database and JDBC resources. You are
strongly advised to use this method rather than relying on the release
being done when the {@code ResultSet}'s finalize method is called during
garbage collection process. Note that the {@code close()} method might
take some time to complete since it is dependent on the behavior of the
connection to the database and the database itself.
|
public void | deleteRow()Deletes the current row from the {@code ResultSet} and from the
underlying database.
|
public int | findColumn(java.lang.String columnName)Gets the index number for a column in the {@code ResultSet} from the
provided column name.
|
public boolean | first()Shifts the cursor position to the first row in the {@code ResultSet}.
|
public java.sql.Array | getArray(int columnIndex)Gets the content of a column specified by column index in the current row
of this {@code ResultSet} as a {@code java.sql.Array}.
|
public java.sql.Array | getArray(java.lang.String colName)Gets the value of a column specified by column name as a {@code
java.sql.Array}.
|
public java.io.InputStream | getAsciiStream(int columnIndex)Gets the value of a column specified by column index as an ASCII
character stream.
|
public java.io.InputStream | getAsciiStream(java.lang.String columnName)Gets the value of a column specified by column name as an ASCII character
stream.
|
public java.math.BigDecimal | getBigDecimal(int columnIndex)Gets the value of a column specified by column index as a {@code
java.math.BigDecimal}.
|
public java.math.BigDecimal | getBigDecimal(int columnIndex, int scale)Gets the value of a column specified by column index as a {@code
java.math.BigDecimal}.
|
public java.math.BigDecimal | getBigDecimal(java.lang.String columnName)Gets the value of a column specified by column name, as a {@code
java.math.BigDecimal}.
|
public java.math.BigDecimal | getBigDecimal(java.lang.String columnName, int scale)Gets the value of a column specified by column name, as a {@code
java.math.BigDecimal}.
|
public java.io.InputStream | getBinaryStream(int columnIndex)Gets the value of a column specified by column index as a binary
stream.
This method can be used to read {@code LONGVARBINARY} values. All of the
data in the {@code InputStream} should be read before getting data from
any other column. A further call to a getter method will implicitly close
the {@code InputStream}.
|
public java.io.InputStream | getBinaryStream(java.lang.String columnName)Gets the value of a column specified by column name as a binary stream.
This method can be used to read {@code LONGVARBINARY} values. All of the
data in the {@code InputStream} should be read before getting data from
any other column. A further call to a getter method will implicitly close
the {@code InputStream}.
|
public java.sql.Blob | getBlob(int columnIndex)Gets the value of a column specified by column index as a {@code
java.sql.Blob} object.
|
public java.sql.Blob | getBlob(java.lang.String columnName)Gets the value of a column specified by column name, as a {@code
java.sql.Blob} object.
|
public boolean | getBoolean(int columnIndex)Gets the value of a column specified by column index as a {@code boolean}
.
|
public boolean | getBoolean(java.lang.String columnName)Gets the value of a column specified by column name, as a {@code boolean}
.
|
public byte | getByte(int columnIndex)Gets the value of a column specified by column index as a {@code byte}.
|
public byte | getByte(java.lang.String columnName)Gets the value of a column specified by column name as a {@code byte}.
|
public byte[] | getBytes(int columnIndex)Gets the value of a column specified by column index as a byte array.
|
public byte[] | getBytes(java.lang.String columnName)Gets the value of a column specified by column name as a byte array.
|
public java.io.Reader | getCharacterStream(int columnIndex)Gets the value of a column specified by column index as a {@code
java.io.Reader} object.
|
public java.io.Reader | getCharacterStream(java.lang.String columnName)Gets the value of a column specified by column name as a {@code
java.io.Reader} object.
|
public java.sql.Clob | getClob(int columnIndex)Gets the value of a column specified by column index as a {@code
java.sql.Clob}.
|
public java.sql.Clob | getClob(java.lang.String colName)Gets the value of a column specified by column name as a {@code
java.sql.Clob}.
|
public int | getConcurrency()Gets the concurrency mode of this {@code ResultSet}.
|
public java.lang.String | getCursorName()Gets the name of the SQL cursor of this {@code ResultSet}.
|
public java.sql.Date | getDate(int columnIndex)Gets the value of a column specified by column index as a {@code
java.sql.Date}.
|
public java.sql.Date | getDate(int columnIndex, java.util.Calendar cal)Gets the value of a column specified by column index as a {@code
java.sql.Date}. This method uses a supplied calendar to compute the Date.
|
public java.sql.Date | getDate(java.lang.String columnName)Gets the value of a column specified by column name as a {@code
java.sql.Date}.
|
public java.sql.Date | getDate(java.lang.String columnName, java.util.Calendar cal)Gets the value of a column specified by column name, as a {@code
java.sql.Date} object.
|
public double | getDouble(int columnIndex)Gets the value of a column specified by column index as a {@code double}
value.
|
public double | getDouble(java.lang.String columnName)Gets the value of a column specified by column name as a {@code double}
value.
|
public int | getFetchDirection()Gets the direction in which rows are fetched for this {@code ResultSet}
object.
|
public int | getFetchSize()Gets the fetch size (in number of rows) for this {@code ResultSet}.
|
public float | getFloat(int columnIndex)Gets the value of a column specified by column index as a {@code float}
value.
|
public float | getFloat(java.lang.String columnName)Gets the value of a column specified by column name as a {@code float}
value.
|
public int | getInt(int columnIndex)Gets the value of a column specified by column index as an {@code int}
value.
|
public int | getInt(java.lang.String columnName)Gets the value of a column specified by column name, as an {@code int}
value.
|
public long | getLong(int columnIndex)Gets the value of a column specified by column index as a {@code long}
value.
|
public long | getLong(java.lang.String columnName)Gets the value of a column specified by column name, as a {@code long}
value.
|
public java.sql.ResultSetMetaData | getMetaData()Gets the metadata for this {@code ResultSet}. This defines the number,
types and properties of the columns in the {@code ResultSet}.
|
public java.lang.Object | getObject(int columnIndex)Gets the value of a specified column as a Java {@code Object}. The type
of the returned object will be the default according to the column's SQL
type, following the JDBC specification for built-in types.
For SQL User Defined Types, if a column value is Structured or Distinct,
this method behaves the same as a call to: {@code
getObject(columnIndex,this.getStatement().getConnection().getTypeMap())}
|
public java.lang.Object | getObject(int columnIndex, java.util.Map map)Gets the value of a column specified by column index as a Java {@code
Object}.
The type of the Java object will be determined by the supplied Map to
perform the mapping of SQL {@code Struct} or Distinct types into Java
objects.
|
public java.lang.Object | getObject(java.lang.String columnName)Gets the value of a specified column as a Java {@code Object}. The type
of the returned object will be the default according to the column's SQL
type, following the JDBC specification for built-in types.
For SQL User Defined Types, if a column value is structured or distinct,
this method behaves the same as a call to: {@code
getObject(columnIndex,this.getStatement().getConnection().getTypeMap())}
|
public java.lang.Object | getObject(java.lang.String columnName, java.util.Map map)Gets the value of a column specified by column name as a Java {@code
Object}.
The type of the Java object will be determined by the supplied Map to
perform the mapping of SQL Struct or Distinct types into Java objects.
|
public java.sql.Ref | getRef(int columnIndex)Gets the value of a column specified by column index as a Java {@code
java.sql.Ref}.
|
public java.sql.Ref | getRef(java.lang.String colName)Gets the value of a column specified by column name as a Java {@code
java.sql.Ref}.
|
public int | getRow()Gets the number of the current row in the {@code ResultSet}. Row numbers
start at 1 for the first row.
|
public short | getShort(int columnIndex)Gets the value of a column specified by column index as a short value.
|
public short | getShort(java.lang.String columnName)Gets the value of a column specified by column name, as a short value.
|
public java.sql.Statement | getStatement()Gets the statement that produced this {@code ResultSet}. If the {@code
ResultSet} was not created by a statement (i.e. because it was returned
from one of the {@link DatabaseMetaData} methods), {@code null} is
returned.
|
public java.lang.String | getString(int columnIndex)Gets the value of a column specified by column index as a String.
|
public java.lang.String | getString(java.lang.String columnName)Gets the value of a column specified by column name, as a String.
|
public java.sql.Time | getTime(int columnIndex)Gets the value of a column specified by column index as a {@code
java.sql.Time} value.
|
public java.sql.Time | getTime(int columnIndex, java.util.Calendar cal)Gets the value of a column specified by column index as a {@code
java.sql.Time} value. The supplied {@code Calendar} is used to
map the SQL {@code Time} value to a Java Time value.
|
public java.sql.Time | getTime(java.lang.String columnName)Gets the value of a column specified by column name, as a {@code
java.sql.Time} value.
|
public java.sql.Time | getTime(java.lang.String columnName, java.util.Calendar cal)Gets the value of a column specified by column index, as a {@code
java.sql.Time} value. The supplied {@code Calendar} is used to
map the SQL {@code Time} value to a Java Time value.
|
public java.sql.Timestamp | getTimestamp(int columnIndex)Gets the value of a column specified by column index as a {@code
java.sql.Timestamp} value.
|
public java.sql.Timestamp | getTimestamp(int columnIndex, java.util.Calendar cal)Gets the value of a column specified by column index, as a {@code
java.sql.Timestamp} value. The supplied Calendar is used when mapping
the SQL {@code Timestamp} value to a Java {@code Timestamp} value.
|
public java.sql.Timestamp | getTimestamp(java.lang.String columnName)Gets the value of a column specified by column name, as a {@code
java.sql.Timestamp} value.
|
public java.sql.Timestamp | getTimestamp(java.lang.String columnName, java.util.Calendar cal)Gets the value of a column specified by column name, as a {@code
java.sql.Timestamp} value. The supplied Calendar is used when mapping
the SQL {@code Timestamp} value to a Java {@code Timestamp} value.
|
public int | getType()Gets the type of the {@code ResultSet}.
|
public java.net.URL | getURL(int columnIndex)Gets the value of a column specified by column index as a {@code
java.net.URL}.
|
public java.net.URL | getURL(java.lang.String columnName)Gets the value of a column specified by column name as a {@code
java.net.URL} object.
|
public java.io.InputStream | getUnicodeStream(int columnIndex)Gets the value of the column as an {@code InputStream} of unicode
characters.
|
public java.io.InputStream | getUnicodeStream(java.lang.String columnName)Gets the value of the column as an {@code InputStream} of Unicode
characters.
|
public java.sql.SQLWarning | getWarnings()Gets the first warning generated by calls on this {@code ResultSet}.
Subsequent warnings on this {@code ResultSet} are chained to the first
one.
The warnings are cleared when a new Row is read from the {@code
ResultSet}. The warnings returned by this method are only the warnings
generated by {@code ResultSet} method calls - warnings generated by
Statement methods are held by the Statement.
An {@code SQLException} is generated if this method is called on a closed
{@code ResultSet}.
|
public void | insertRow()Insert the insert row into the {@code ResultSet} and into the underlying
database. The cursor must be set to the Insert Row before this method is
invoked.
|
public boolean | isAfterLast()Gets if the cursor is after the last row of the {@code ResultSet}.
|
public boolean | isBeforeFirst()Gets if the cursor is before the first row of the {@code ResultSet}.
|
public boolean | isFirst()Gets if the cursor is on the first row of the {@code ResultSet}.
|
public boolean | isLast()Gets if the cursor is on the last row of the {@code ResultSet}
|
public boolean | last()Shifts the cursor position to the last row of the {@code ResultSet}.
|
public void | moveToCurrentRow()Moves the cursor to the remembered position, namely the
row that was the current row before a call to {@code moveToInsertRow}.
This only applies if the cursor is on the Insert Row.
|
public void | moveToInsertRow()Moves the cursor position to the Insert Row. The current position is
remembered and the cursor is positioned at the Insert Row. The columns in
the Insert Row should be filled in with the appropriate update methods,
before calling {@code insertRow} to insert the new row into the database.
|
public boolean | next()Shifts the cursor position down one row in this {@code ResultSet} object.
Any input streams associated with the current row are closed and any
warnings are cleared.
|
public boolean | previous()Relocates the cursor position to the preceding row in this {@code
ResultSet}.
|
public void | refreshRow()Refreshes the current row with its most up to date value in the database.
Must not be called when the cursor is on the Insert Row.
If any columns in the current row have been updated but the {@code
updateRow} has not been called, then the updates are lost when this
method is called.
|
public boolean | relative(int rows)Moves the cursor position up or down by a specified number of rows. If
the new position is beyond the start row (or end row), the cursor position is
set before the first row (or, respectively, after the last row).
|
public boolean | rowDeleted()Indicates whether a row has been deleted. This method depends on whether
the JDBC driver and database can detect deletions.
|
public boolean | rowInserted()Indicates whether the current row has had an insertion operation. This
method depends on whether the JDBC driver and database can detect
insertions.
|
public boolean | rowUpdated()Indicates whether the current row has been updated. This method depends
on whether the JDBC driver and database can detect updates.
|
public void | setFetchDirection(int direction)Indicates which direction (forward/reverse) will be used to process the
rows of this {@code ResultSet} object. This is treated as a hint by the
JDBC driver.
|
public void | setFetchSize(int rows)Indicates the number of rows to fetch from the database when extra rows
are required for this {@code ResultSet}. This used as a hint to the JDBC
driver.
|
public void | updateArray(int columnIndex, java.sql.Array x)Updates a column specified by a column index with a {@code
java.sql.Array} value.
|
public void | updateArray(java.lang.String columnName, java.sql.Array x)Updates a column specified by a column name with a {@code java.sql.Array}
value.
|
public void | updateAsciiStream(int columnIndex, java.io.InputStream x, int length)Updates a column specified by a column index with an ASCII stream value.
|
public void | updateAsciiStream(java.lang.String columnName, java.io.InputStream x, int length)Updates a column specified by a column name with an Ascii stream value.
|
public void | updateBigDecimal(int columnIndex, java.math.BigDecimal x)Updates a column specified by a column index with a {@code
java.sql.BigDecimal} value.
|
public void | updateBigDecimal(java.lang.String columnName, java.math.BigDecimal x)Updates a column specified by a column name with a {@code
java.sql.BigDecimal} value.
|
public void | updateBinaryStream(int columnIndex, java.io.InputStream x, int length)Updates a column specified by a column index with a binary stream value.
|
public void | updateBinaryStream(java.lang.String columnName, java.io.InputStream x, int length)Updates a column specified by a column name with a binary stream value.
|
public void | updateBlob(int columnIndex, java.sql.Blob x)Updates a column specified by a column index with a {@code java.sql.Blob}
value.
|
public void | updateBlob(java.lang.String columnName, java.sql.Blob x)Updates a column specified by a column name with a {@code java.sql.Blob}
value.
|
public void | updateBoolean(int columnIndex, boolean x)Updates a column specified by a column index with a {@code boolean}
value.
|
public void | updateBoolean(java.lang.String columnName, boolean x)Updates a column specified by a column name with a {@code boolean} value.
|
public void | updateByte(int columnIndex, byte x)Updates a column specified by a column index with a {@code byte} value.
|
public void | updateByte(java.lang.String columnName, byte x)Updates a column specified by a column name with a {@code byte} value.
|
public void | updateBytes(int columnIndex, byte[] x)Updates a column specified by a column index with a {@code byte} array
value.
|
public void | updateBytes(java.lang.String columnName, byte[] x)Updates a column specified by a column name with a byte array value.
|
public void | updateCharacterStream(int columnIndex, java.io.Reader x, int length)Updates a column specified by a column index with a character stream
value.
|
public void | updateCharacterStream(java.lang.String columnName, java.io.Reader reader, int length)Updates a column specified by a column name with a character stream
value.
|
public void | updateClob(int columnIndex, java.sql.Clob x)Updates a column specified by a column index with a {@code java.sql.Clob}
value.
|
public void | updateClob(java.lang.String columnName, java.sql.Clob x)Updates a column specified by a column name with a {@code java.sql.Clob}
value.
|
public void | updateDate(int columnIndex, java.sql.Date x)Updates a column specified by a column index with a {@code java.sql.Date}
value.
|
public void | updateDate(java.lang.String columnName, java.sql.Date x)Updates a column specified by a column name with a {@code java.sql.Date}
value.
|
public void | updateDouble(int columnIndex, double x)Updates a column specified by a column index with a {@code double} value.
|
public void | updateDouble(java.lang.String columnName, double x)Updates a column specified by a column name with a {@code double} value.
|
public void | updateFloat(int columnIndex, float x)Updates a column specified by a column index with a {@code float} value.
|
public void | updateFloat(java.lang.String columnName, float x)Updates a column specified by a column name with a {@code float} value.
|
public void | updateInt(int columnIndex, int x)Updates a column specified by a column index with an {@code int} value.
|
public void | updateInt(java.lang.String columnName, int x)Updates a column specified by a column name with an {@code int} value.
|
public void | updateLong(int columnIndex, long x)Updates a column specified by a column index with a {@code long} value.
|
public void | updateLong(java.lang.String columnName, long x)Updates a column specified by a column name with a {@code long} value.
|
public void | updateNull(int columnIndex)Updates a column specified by a column index with a {@code null} value.
|
public void | updateNull(java.lang.String columnName)Updates a column specified by a column name with a {@code null} value.
|
public void | updateObject(int columnIndex, java.lang.Object x)Updates a column specified by a column index with an {@code Object}
value.
|
public void | updateObject(int columnIndex, java.lang.Object x, int scale)Updates a column specified by a column index with an {@code Object}
value.
|
public void | updateObject(java.lang.String columnName, java.lang.Object x)Updates a column specified by a column name with an {@code Object} value.
|
public void | updateObject(java.lang.String columnName, java.lang.Object x, int scale)Updates a column specified by a column name with an {@code Object} value.
|
public void | updateRef(int columnIndex, java.sql.Ref x)Updates a column specified by a column index with a {@code java.sql.Ref}
value.
|
public void | updateRef(java.lang.String columnName, java.sql.Ref x)Updates a column specified by a column name with a {@code java.sql.Ref}
value.
|
public void | updateRow()Updates the database with the new contents of the current row of this
{@code ResultSet} object.
|
public void | updateShort(int columnIndex, short x)Updates a column specified by a column index with a {@code short} value.
|
public void | updateShort(java.lang.String columnName, short x)Updates a column specified by a column name with a {@code short} value.
|
public void | updateString(int columnIndex, java.lang.String x)Updates a column specified by a column index with a {@code String} value.
|
public void | updateString(java.lang.String columnName, java.lang.String x)Updates a column specified by a column name with a {@code String} value.
|
public void | updateTime(int columnIndex, java.sql.Time x)Updates a column specified by a column index with a {@code Time} value.
|
public void | updateTime(java.lang.String columnName, java.sql.Time x)Updates a column specified by a column name with a {@code Time} value.
|
public void | updateTimestamp(int columnIndex, java.sql.Timestamp x)Updates a column specified by a column index with a {@code Timestamp}
value.
|
public void | updateTimestamp(java.lang.String columnName, java.sql.Timestamp x)Updates a column specified by column name with a {@code Timestamp} value.
|
public boolean | wasNull()Determines whether the last column read from this {@code ResultSet}
contained SQL {@code NULL}.
|