public class JDBCResultSet extends Object implements ResultSet
| Modifier and Type | Field and Description |
|---|---|
protected TableResult |
tr
Table returned by Database.get_table()
|
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE| Constructor and Description |
|---|
JDBCResultSet(TableResult tr,
JDBCStatement s) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
absolute(int row)
Moves the cursor to a specified row number in the
ResultSet. |
void |
afterLast()
Moves the cursor to the end of the
ResultSet, after the last row. |
void |
beforeFirst()
Moves the cursor to the start of the
ResultSet, before the first
row. |
void |
cancelRowUpdates()
Cancels any updates made to the current row in the
ResultSet. |
void |
clearWarnings()
Clears all warnings related to this
ResultSet. |
void |
close()
Releases this
ResultSet's database and JDBC resources. |
void |
deleteRow()
Deletes the current row from the
ResultSet and from the
underlying database. |
void |
fillRowbuf() |
int |
findColumn(String columnName)
Gets the index number for a column in the
ResultSet from the
provided column name. |
boolean |
first()
Shifts the cursor position to the first row in the
ResultSet. |
Array |
getArray(int columnIndex)
Gets the content of a column specified by column index in the current row
of this
ResultSet as a java.sql.Array. |
Array |
getArray(String columnName)
Gets the value of a column specified by column name as a
java.sql.Array. |
InputStream |
getAsciiStream(int columnIndex)
Gets the value of a column specified by column index as an ASCII
character stream.
|
InputStream |
getAsciiStream(String columnName)
Gets the value of a column specified by column name as an ASCII character
stream.
|
BigDecimal |
getBigDecimal(int columnIndex)
Gets the value of a column specified by column index as a
java.math.BigDecimal. |
BigDecimal |
getBigDecimal(int columnIndex,
int scale)
Deprecated.
|
BigDecimal |
getBigDecimal(String columnName)
Gets the value of a column specified by column name, as a
java.math.BigDecimal. |
BigDecimal |
getBigDecimal(String columnName,
int scale)
Deprecated.
|
InputStream |
getBinaryStream(int columnIndex)
Gets the value of a column specified by column index as a binary
stream.
|
InputStream |
getBinaryStream(String columnName)
Gets the value of a column specified by column name as a binary stream.
|
Blob |
getBlob(int columnIndex)
Gets the value of a column specified by column index as a
java.sql.Blob object. |
Blob |
getBlob(String columnName)
Gets the value of a column specified by column name, as a
java.sql.Blob object. |
boolean |
getBoolean(int columnIndex)
Gets the value of a column specified by column index as a
boolean
. |
boolean |
getBoolean(String columnName)
Gets the value of a column specified by column name, as a
boolean
. |
byte |
getByte(int columnIndex)
Gets the value of a column specified by column index as a
byte. |
byte |
getByte(String columnName)
Gets the value of a column specified by column name as a
byte. |
byte[] |
getBytes(int columnIndex)
Gets the value of a column specified by column index as a byte array.
|
byte[] |
getBytes(String columnName)
Gets the value of a column specified by column name as a byte array.
|
Reader |
getCharacterStream(int columnIndex)
Gets the value of a column specified by column index as a
java.io.Reader object. |
Reader |
getCharacterStream(String columnName)
Gets the value of a column specified by column name as a
java.io.Reader object. |
Clob |
getClob(int columnIndex)
Gets the value of a column specified by column index as a
java.sql.Clob. |
Clob |
getClob(String columnName)
Gets the value of a column specified by column name as a
java.sql.Clob. |
int |
getConcurrency()
Gets the concurrency mode of this
ResultSet. |
String |
getCursorName()
Gets the name of the SQL cursor of this
ResultSet. |
Date |
getDate(int columnIndex)
Gets the value of a column specified by column index as a
java.sql.Date. |
Date |
getDate(int columnIndex,
Calendar cal)
Gets the value of a column specified by column index as a
java.sql.Date. |
Date |
getDate(String columnName)
Gets the value of a column specified by column name as a
java.sql.Date. |
Date |
getDate(String columnName,
Calendar cal)
Gets the value of a column specified by column name, as a
java.sql.Date object. |
double |
getDouble(int columnIndex)
Gets the value of a column specified by column index as a
double
value. |
double |
getDouble(String columnName)
Gets the value of a column specified by column name as a
double
value. |
int |
getFetchDirection()
Gets the direction in which rows are fetched for this
ResultSet
object. |
int |
getFetchSize()
Gets the fetch size (in number of rows) for this
ResultSet. |
float |
getFloat(int columnIndex)
Gets the value of a column specified by column index as a
float
value. |
float |
getFloat(String columnName)
Gets the value of a column specified by column name as a
float
value. |
int |
getHoldability()
Returns the holdability of this result set:
ResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMIT. |
int |
getInt(int columnIndex)
Gets the value of a column specified by column index as an
int
value. |
int |
getInt(String columnName)
Gets the value of a column specified by column name, as an
int
value. |
long |
getLong(int columnIndex)
Gets the value of a column specified by column index as a
long
value. |
long |
getLong(String columnName)
Gets the value of a column specified by column name, as a
long
value. |
ResultSetMetaData |
getMetaData()
Gets the metadata for this
ResultSet. |
Reader |
getNCharacterStream(int colIndex)
Returns a
Reader corresponding to the value at the 1-based columnIndex. |
Reader |
getNCharacterStream(String colName)
Returns a
Reader corresponding to the value in the named column. |
NClob |
getNClob(int colIndex)
Returns an
NClob corresponding to the value at the 1-based columnIndex. |
NClob |
getNClob(String colName)
Returns an
NClob corresponding to the value in the named column. |
String |
getNString(int colIndex)
Returns a
String corresponding to the value at the 1-based columnIndex. |
String |
getNString(String colName)
Returns a
String corresponding to the value in the named column. |
Object |
getObject(int columnIndex)
Gets the value of a specified column as a Java
Object. |
Object |
getObject(int columnIndex,
Map map)
Gets the value of a column specified by column index as a Java
Object. |
Object |
getObject(String columnName)
Gets the value of a specified column as a Java
Object. |
Object |
getObject(String columnName,
Map map)
Gets the value of a column specified by column name as a Java
Object. |
Ref |
getRef(int columnIndex)
Gets the value of a column specified by column index as a Java
java.sql.Ref. |
Ref |
getRef(String columnName)
Gets the value of a column specified by column name as a Java
java.sql.Ref. |
int |
getRow()
Gets the number of the current row in the
ResultSet. |
RowId |
getRowId(int colIndex)
Returns a
RowId corresponding to the SQL ROWID at the 1-based columnIndex. |
RowId |
getRowId(String colName)
Returns a
RowId corresponding to the SQL ROWID at the named column. |
short |
getShort(int columnIndex)
Gets the value of a column specified by column index as a short value.
|
short |
getShort(String columnName)
Gets the value of a column specified by column name, as a short value.
|
SQLXML |
getSQLXML(int colIndex)
Returns an
SQLXML corresponding to the value at the 1-based columnIndex. |
SQLXML |
getSQLXML(String colName)
Returns an
SQLXML corresponding to the value in the named column. |
Statement |
getStatement()
Gets the statement that produced this
ResultSet. |
String |
getString(int columnIndex)
Gets the value of a column specified by column index as a String.
|
String |
getString(String columnName)
Gets the value of a column specified by column name, as a String.
|
Time |
getTime(int columnIndex)
Gets the value of a column specified by column index as a
java.sql.Time value. |
Time |
getTime(int columnIndex,
Calendar cal)
Gets the value of a column specified by column index as a
java.sql.Time value. |
Time |
getTime(String columnName)
Gets the value of a column specified by column name, as a
java.sql.Time value. |
Time |
getTime(String columnName,
Calendar cal)
Gets the value of a column specified by column index, as a
java.sql.Time value. |
Timestamp |
getTimestamp(int columnIndex)
Gets the value of a column specified by column index as a
java.sql.Timestamp value. |
Timestamp |
getTimestamp(int columnIndex,
Calendar cal)
Gets the value of a column specified by column index, as a
java.sql.Timestamp value. |
Timestamp |
getTimestamp(String columnName)
Gets the value of a column specified by column name, as a
java.sql.Timestamp value. |
Timestamp |
getTimestamp(String columnName,
Calendar cal)
Gets the value of a column specified by column name, as a
java.sql.Timestamp value. |
int |
getType()
Gets the type of the
ResultSet. |
InputStream |
getUnicodeStream(int columnIndex)
Deprecated.
|
InputStream |
getUnicodeStream(String columnName)
Deprecated.
|
URL |
getURL(int colIndex)
Gets the value of a column specified by column index as a
java.net.URL. |
URL |
getURL(String colName)
Gets the value of a column specified by column name as a
java.net.URL object. |
SQLWarning |
getWarnings()
Gets the first warning generated by calls on this
ResultSet. |
void |
insertRow()
Insert the insert row into the
ResultSet and into the underlying
database. |
boolean |
isAfterLast()
Gets if the cursor is after the last row of the
ResultSet. |
boolean |
isBeforeFirst()
Gets if the cursor is before the first row of the
ResultSet. |
boolean |
isClosed()
Returns true if this result set has been closed, false otherwise.
|
boolean |
isFirst()
Gets if the cursor is on the first row of the
ResultSet. |
boolean |
isLast()
Gets if the cursor is on the last row of the
ResultSet |
boolean |
isUpdatable() |
boolean |
isWrapperFor(Class iface)
If the caller is a wrapper of the class or implements the given
interface, the methods return false and vice versa.
|
boolean |
last()
Shifts the cursor position to the last row of the
ResultSet. |
void |
moveToCurrentRow()
Moves the cursor to the remembered position, namely the
row that was the current row before a call to
moveToInsertRow. |
void |
moveToInsertRow()
Moves the cursor position to the Insert Row.
|
boolean |
next()
Shifts the cursor position down one row in this
ResultSet object. |
boolean |
previous()
Relocates the cursor position to the preceding row in this
ResultSet. |
void |
refreshRow()
Refreshes the current row with its most up to date value in the database.
|
boolean |
relative(int row)
Moves the cursor position up or down by a specified number of rows.
|
boolean |
rowDeleted()
Indicates whether a row has been deleted.
|
boolean |
rowInserted()
Indicates whether the current row has had an insertion operation.
|
boolean |
rowUpdated()
Indicates whether the current row has been updated.
|
void |
setFetchDirection(int dir)
Indicates which direction (forward/reverse) will be used to process the
rows of this
ResultSet object. |
void |
setFetchSize(int fsize)
Indicates the number of rows to fetch from the database when extra rows
are required for this
ResultSet. |
<T> T |
unwrap(Class<T> iface)
Returns an object that implements the given interface.
|
void |
updateArray(int colIndex,
Array x)
Updates a column specified by a column index with a
java.sql.Array value. |
void |
updateArray(String colName,
Array x)
Updates a column specified by a column name with a
java.sql.Array
value. |
void |
updateAsciiStream(int colIndex,
InputStream x)
Updates the value at the 1-based
columnIndex. |
void |
updateAsciiStream(int colIndex,
InputStream in,
int s)
Updates a column specified by a column index with an ASCII stream value.
|
void |
updateAsciiStream(int colIndex,
InputStream x,
long len)
Updates the value at the 1-based
columnIndex. |
void |
updateAsciiStream(String colName,
InputStream x)
Updates the value in the named column.
|
void |
updateAsciiStream(String colName,
InputStream in,
int s)
Updates a column specified by a column name with an Ascii stream value.
|
void |
updateAsciiStream(String colName,
InputStream x,
long len)
Updates the value in the named column.
|
void |
updateBigDecimal(int colIndex,
BigDecimal f)
Updates a column specified by a column index with a
java.sql.BigDecimal value. |
void |
updateBigDecimal(String colName,
BigDecimal f)
Updates a column specified by a column name with a
java.sql.BigDecimal value. |
void |
updateBinaryStream(int colIndex,
InputStream x)
Updates the value at the 1-based
columnIndex. |
void |
updateBinaryStream(int colIndex,
InputStream in,
int s)
Updates a column specified by a column index with a binary stream value.
|
void |
updateBinaryStream(int colIndex,
InputStream x,
long len)
Updates the value at the 1-based
columnIndex. |
void |
updateBinaryStream(String colName,
InputStream x)
Updates the value in the named column.
|
void |
updateBinaryStream(String colName,
InputStream in,
int s)
Updates a column specified by a column name with a binary stream value.
|
void |
updateBinaryStream(String colName,
InputStream x,
long len)
Updates the value in the named column.
|
void |
updateBlob(int colIndex,
Blob x)
Updates a column specified by a column index with a
java.sql.Blob
value. |
void |
updateBlob(int colIndex,
InputStream x)
Updates the value at the 1-based
columnIndex. |
void |
updateBlob(int colIndex,
InputStream x,
long len)
Updates the value at the 1-based
columnIndex. |
void |
updateBlob(String colName,
Blob x)
Updates a column specified by a column name with a
java.sql.Blob
value. |
void |
updateBlob(String colName,
InputStream x)
Updates the value in the named column.
|
void |
updateBlob(String colName,
InputStream x,
long len)
Updates the value in the named column.
|
void |
updateBoolean(int colIndex,
boolean b)
Updates a column specified by a column index with a
boolean
value. |
void |
updateBoolean(String colName,
boolean b)
Updates a column specified by a column name with a
boolean value. |
void |
updateByte(int colIndex,
byte b)
Updates a column specified by a column index with a
byte value. |
void |
updateByte(String colName,
byte b)
Updates a column specified by a column name with a
byte value. |
void |
updateBytes(int colIndex,
byte[] s)
Updates a column specified by a column index with a
byte array
value. |
void |
updateBytes(String colName,
byte[] s)
Updates a column specified by a column name with a byte array value.
|
void |
updateCharacterStream(int colIndex,
Reader x)
Updates the value at the 1-based
columnIndex. |
void |
updateCharacterStream(int colIndex,
Reader in,
int s)
Updates a column specified by a column index with a character stream
value.
|
void |
updateCharacterStream(int colIndex,
Reader x,
long len)
Updates the value at the 1-based
columnIndex. |
void |
updateCharacterStream(String colName,
Reader x)
Updates the value in the named column.
|
void |
updateCharacterStream(String colName,
Reader in,
int s)
Updates a column specified by a column name with a character stream
value.
|
void |
updateCharacterStream(String colName,
Reader x,
long len)
Updates the value in the named column.
|
void |
updateClob(int colIndex,
Clob x)
Updates a column specified by a column index with a
java.sql.Clob
value. |
void |
updateClob(int colIndex,
Reader x)
Updates the value at the 1-based
columnIndex. |
void |
updateClob(int colIndex,
Reader x,
long len)
Updates the value at the 1-based
columnIndex. |
void |
updateClob(String colName,
Clob x)
Updates a column specified by a column name with a
java.sql.Clob
value. |
void |
updateClob(String colName,
Reader x)
Updates the value in the named column.
|
void |
updateClob(String colName,
Reader x,
long len)
Updates the value in the named column.
|
void |
updateDate(int colIndex,
Date d)
Updates a column specified by a column index with a
java.sql.Date
value. |
void |
updateDate(String colName,
Date d)
Updates a column specified by a column name with a
java.sql.Date
value. |
void |
updateDouble(int colIndex,
double f)
Updates a column specified by a column index with a
double value. |
void |
updateDouble(String colName,
double f)
Updates a column specified by a column name with a
double value. |
void |
updateFloat(int colIndex,
float f)
Updates a column specified by a column index with a
float value. |
void |
updateFloat(String colName,
float f)
Updates a column specified by a column name with a
float value. |
void |
updateInt(int colIndex,
int b)
Updates a column specified by a column index with an
int value. |
void |
updateInt(String colName,
int b)
Updates a column specified by a column name with an
int value. |
void |
updateLong(int colIndex,
long b)
Updates a column specified by a column index with a
long value. |
void |
updateLong(String colName,
long b)
Updates a column specified by a column name with a
long value. |
void |
updateNCharacterStream(int colIndex,
Reader x)
Updates the value at the 1-based
columnIndex. |
void |
updateNCharacterStream(int colIndex,
Reader x,
long len)
Updates the value at the 1-based
columnIndex. |
void |
updateNCharacterStream(String colName,
Reader x)
Updates the value in the named column.
|
void |
updateNCharacterStream(String colName,
Reader x,
long len)
Updates the value in the named column.
|
void |
updateNClob(int colIndex,
NClob nclob)
Updates the value at the 1-based
columnIndex. |
void |
updateNClob(int colIndex,
Reader x)
Updates the value at the 1-based
columnIndex. |
void |
updateNClob(int colIndex,
Reader x,
long len)
Updates the value at the 1-based
columnIndex. |
void |
updateNClob(String colName,
NClob nclob)
Updates the value in the named column.
|
void |
updateNClob(String colName,
Reader x)
Updates the value in the named column.
|
void |
updateNClob(String colName,
Reader x,
long len)
Updates the value in the named column.
|
void |
updateNString(int colIndex,
String nString)
Updates the value at the 1-based
columnIndex. |
void |
updateNString(String colName,
String nString)
Updates the value in the named column.
|
void |
updateNull(int colIndex)
Updates a column specified by a column index with a
null value. |
void |
updateNull(String colName)
Updates a column specified by a column name with a
null value. |
void |
updateObject(int colIndex,
Object obj)
Updates a column specified by a column index with an
Object
value. |
void |
updateObject(int colIndex,
Object obj,
int s)
Updates a column specified by a column index with an
Object
value. |
void |
updateObject(String colName,
Object obj)
Updates a column specified by a column name with an
Object value. |
void |
updateObject(String colName,
Object obj,
int s)
Updates a column specified by a column name with an
Object value. |
void |
updateRef(int colIndex,
Ref x)
Updates a column specified by a column index with a
java.sql.Ref
value. |
void |
updateRef(String colName,
Ref x)
Updates a column specified by a column name with a
java.sql.Ref
value. |
void |
updateRow()
Updates the database with the new contents of the current row of this
ResultSet object. |
void |
updateRowId(int colIndex,
RowId x)
Updates the value at the 1-based
columnIndex. |
void |
updateRowId(String colName,
RowId x)
Updates the value in the named column.
|
void |
updateShort(int colIndex,
short b)
Updates a column specified by a column index with a
short value. |
void |
updateShort(String colName,
short b)
Updates a column specified by a column name with a
short value. |
void |
updateSQLXML(int colIndex,
SQLXML xml)
Updates the value at the 1-based
columnIndex. |
void |
updateSQLXML(String colName,
SQLXML xml)
Updates the value in the named column.
|
void |
updateString(int colIndex,
String s)
Updates a column specified by a column index with a
String value. |
void |
updateString(String colName,
String s)
Updates a column specified by a column name with a
String value. |
void |
updateTime(int colIndex,
Time t)
Updates a column specified by a column index with a
Time value. |
void |
updateTime(String colName,
Time t)
Updates a column specified by a column name with a
Time value. |
void |
updateTimestamp(int colIndex,
Timestamp t)
Updates a column specified by a column index with a
Timestamp
value. |
void |
updateTimestamp(String colName,
Timestamp t)
Updates a column specified by column name with a
Timestamp value. |
boolean |
wasNull()
Determines whether the last column read from this
ResultSet
contained SQL NULL. |
protected TableResult tr
public JDBCResultSet(TableResult tr, JDBCStatement s)
public boolean isUpdatable()
throws SQLException
SQLExceptionpublic void fillRowbuf()
throws SQLException
SQLExceptionpublic boolean next()
throws SQLException
ResultSetResultSet object.
Any input streams associated with the current row are closed and any warnings are cleared.
next in interface ResultSettrue if the updated cursor position is pointing to a
valid row, false otherwise (i.e. when the cursor is after
the last row in the ResultSet).SQLException - if a database error happens.public int findColumn(String columnName) throws SQLException
ResultSetResultSet from the
provided column name.findColumn in interface ResultSetcolumnName - the column name.ResultSet identified by column
name.SQLException - if a database error happens.public int getRow()
throws SQLException
ResultSetResultSet. Row numbers
start at 1 for the first row.getRow in interface ResultSet0 is returned if
there is no current row.SQLException - if a database error happens.public boolean previous()
throws SQLException
ResultSetResultSet.previous in interface ResultSettrue if the new position is in a legitimate row, false if the cursor is now before the first row.SQLException - if a database error happens.public boolean absolute(int row)
throws SQLException
ResultSetResultSet.absolute in interface ResultSetrow - the index of the row starting at index 1. Index -1
returns the last row.true if the new cursor position is on the ResultSet, false otherwise.SQLException - if a database error happens.public boolean relative(int row)
throws SQLException
ResultSetrelative in interface ResultSetrow - a number of rows to move the cursor - may be positive or
negativetrue if the new cursor position is on a row, false otherwiseSQLException - if a database error happens.public void setFetchDirection(int dir)
throws SQLException
ResultSetResultSet object. This is treated as a hint by the
JDBC driver.setFetchDirection in interface ResultSetdir - can be ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWNSQLException - if there is a database error.public int getFetchDirection()
throws SQLException
ResultSetResultSet
object.getFetchDirection in interface ResultSetSQLException - if a database error happens.public void setFetchSize(int fsize)
throws SQLException
ResultSetResultSet. This used as a hint to the JDBC
driver.setFetchSize in interface ResultSetfsize - the number of rows to fetch. 0 implies that the JDBC
driver can make its own decision about the fetch size. The
number should not be greater than the maximum number of rows
established by the statement that generated the ResultSet.SQLException - if a database error happens.public int getFetchSize()
throws SQLException
ResultSetResultSet.getFetchSize in interface ResultSetSQLException - if a database error happens.public String getString(int columnIndex) throws SQLException
ResultSetgetString in interface ResultSetcolumnIndex - the index of the column to read.null if
the column is SQL NULL.SQLException - if a database error happens.public String getString(String columnName) throws SQLException
ResultSetgetString in interface ResultSetcolumnName - the name of the column to read.null if
the column is SQL NULL.SQLException - if a database error happens.public int getInt(int columnIndex)
throws SQLException
ResultSetint
value.getInt in interface ResultSetcolumnIndex - the index of the column to read.int equal to the column value. 0 if the
column is SQL NULL.SQLException - if a database error happens.public int getInt(String columnName) throws SQLException
ResultSetint
value.getInt in interface ResultSetcolumnName - the name of the column to read.int equal to the column value. 0 if the
column is SQL NULL.SQLException - if a database error happens.public boolean getBoolean(int columnIndex)
throws SQLException
ResultSetboolean
.getBoolean in interface ResultSetcolumnIndex - the index of the column to read.boolean value from the column. If the column is SQL
NULL, false is returned.SQLException - if a database error happens.public boolean getBoolean(String columnName) throws SQLException
ResultSetboolean
.getBoolean in interface ResultSetcolumnName - the name of the column to read.boolean value from the column. If the column is SQL
NULL, false is returned.SQLException - if a database error happens.public ResultSetMetaData getMetaData() throws SQLException
ResultSetResultSet. This defines the number,
types and properties of the columns in the ResultSet.getMetaData in interface ResultSetResultSetMetaData object with information about this
ResultSet.SQLException - if a database error happens.public short getShort(int columnIndex)
throws SQLException
ResultSetgetShort in interface ResultSetcolumnIndex - the index of the column to read.0 if
the value is SQL NULL.SQLException - if a database error happens.public short getShort(String columnName) throws SQLException
ResultSetgetShort in interface ResultSetcolumnName - the name of the column to read.0 if
the value is SQL NULL.SQLException - if a database error happens.public Time getTime(int columnIndex) throws SQLException
ResultSetjava.sql.Time value.getTime in interface ResultSetcolumnIndex - the index of the column to read.null if the column
value is SQL NULL.SQLException - if a database error happens.public Time getTime(String columnName) throws SQLException
ResultSetjava.sql.Time value.getTime in interface ResultSetcolumnName - the name of the column to read.null if the column value is SQL NULL.SQLException - if a database error happens.public Time getTime(int columnIndex, Calendar cal) throws SQLException
ResultSetjava.sql.Time value. The supplied Calendar is used to
map the SQL Time value to a Java Time value.getTime in interface ResultSetcolumnIndex - the index of the column to read.cal - a Calendar to use in creating the Java Time value.null if the column
value is SQL NULL.SQLException - if a database error happens.public Time getTime(String columnName, Calendar cal) throws SQLException
ResultSetjava.sql.Time value. The supplied Calendar is used to
map the SQL Time value to a Java Time value.getTime in interface ResultSetcolumnName - the name of the column to read.cal - a Calendar to use in creating the Java time value.null if the column
value is SQL NULL.SQLException - if a database error happens.public Timestamp getTimestamp(int columnIndex) throws SQLException
ResultSetjava.sql.Timestamp value.getTimestamp in interface ResultSetcolumnIndex - the index of the column to read.null if the
column value is SQL NULL.SQLException - if a database error happens.public Timestamp getTimestamp(String columnName) throws SQLException
ResultSetjava.sql.Timestamp value.getTimestamp in interface ResultSetcolumnName - the name of the column to read.null if the
column value is SQL NULL.SQLException - if a database error happens.public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException
ResultSetjava.sql.Timestamp value. The supplied Calendar is used when mapping
the SQL Timestamp value to a Java Timestamp value.getTimestamp in interface ResultSetcolumnIndex - the index of the column to read.cal - Calendar to use in creating the Java timestamp value.null if the
column value is SQL NULL.SQLException - if a database error happens.public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException
ResultSetjava.sql.Timestamp value. The supplied Calendar is used when mapping
the SQL Timestamp value to a Java Timestamp value.getTimestamp in interface ResultSetcolumnName - the name of the column to read.cal - Calendar to use in creating the Java Timestamp value.null if the
column value is SQL NULL.SQLException - if a database error happens.public Date getDate(int columnIndex) throws SQLException
ResultSetjava.sql.Date.getDate in interface ResultSetcolumnIndex - the index of the column to read.java.sql.Date matching the column value. null
if the column is SQL NULL.SQLException - if a database error happens.public Date getDate(String columnName) throws SQLException
ResultSetjava.sql.Date.getDate in interface ResultSetcolumnName - the name of the column to read.java.sql.Date matching the column value. null
if the column is SQL NULL.SQLException - if a database error happens.public Date getDate(int columnIndex, Calendar cal) throws SQLException
ResultSetjava.sql.Date. This method uses a supplied calendar to compute the Date.getDate in interface ResultSetcolumnIndex - the index of the column to read.cal - a java.util.Calendar to use in constructing the Date.java.sql.Date matching the column value. null
if the column is SQL NULL.SQLException - if a database error happens.public Date getDate(String columnName, Calendar cal) throws SQLException
ResultSetjava.sql.Date object.getDate in interface ResultSetcolumnName - the name of the column to read.cal - java.util.Calendar to use in constructing the Date.java.sql.Date matching the column value. null
if the column is SQL NULL.SQLException - if a database error happens.public double getDouble(int columnIndex)
throws SQLException
ResultSetdouble
value.getDouble in interface ResultSetcolumnIndex - the index of the column to read.double equal to the column value. 0.0 if the
column is SQL NULL.SQLException - if a database error happens.public double getDouble(String columnName) throws SQLException
ResultSetdouble
value.getDouble in interface ResultSetcolumnName - the name of the column to read.double equal to the column value. 0.0 if the
column is SQL NULL.SQLException - if a database error happens.public float getFloat(int columnIndex)
throws SQLException
ResultSetfloat
value.getFloat in interface ResultSetcolumnIndex - the index of the column to read.float equal to the column value. 0.0 if the
column is SQL NULL.SQLException - if a database error happens.public float getFloat(String columnName) throws SQLException
ResultSetfloat
value.getFloat in interface ResultSetcolumnName - the name of the column to read.float equal to the column value. 0.0 if the
column is SQL NULL.SQLException - if a database error happens.public long getLong(int columnIndex)
throws SQLException
ResultSetlong
value.getLong in interface ResultSetcolumnIndex - the index of the column to read.long equal to the column value. 0 if the
column is SQL NULL.SQLException - if a database error happens.public long getLong(String columnName) throws SQLException
ResultSetlong
value.getLong in interface ResultSetcolumnName - the name of the column to read.long equal to the column value. 0 if the
column is SQL NULL.SQLException - if a database error happens.@Deprecated public InputStream getUnicodeStream(int columnIndex) throws SQLException
ResultSetInputStream of unicode
characters.getUnicodeStream in interface ResultSetcolumnIndex - the index of the column to read.InputStream holding the value of the column. null if the column value is SQL NULL.SQLException - if a database error happens.@Deprecated public InputStream getUnicodeStream(String columnName) throws SQLException
ResultSetInputStream of Unicode
characters.getUnicodeStream in interface ResultSetcolumnName - the name of the column to read.InputStream holding the value of the column. null if the column value is SQL NULL.SQLException - if a database error happens.public InputStream getAsciiStream(String columnName) throws SQLException
ResultSetgetAsciiStream in interface ResultSetcolumnName - the name of the column to readInputStream with the data from the column.SQLException - if a database error happens.public InputStream getAsciiStream(int columnIndex) throws SQLException
ResultSetgetAsciiStream in interface ResultSetcolumnIndex - the index of the column to read.InputStream with the data from the column.SQLException - if a database error happens.public BigDecimal getBigDecimal(String columnName) throws SQLException
ResultSetjava.math.BigDecimal.getBigDecimal in interface ResultSetcolumnName - the name of the column to read.SQLException - if a database error happens.@Deprecated public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException
ResultSetjava.math.BigDecimal.getBigDecimal in interface ResultSetcolumnName - the name of the column to read.scale - the number of digits after the decimal pointSQLException - if a database error happens.public BigDecimal getBigDecimal(int columnIndex) throws SQLException
ResultSetjava.math.BigDecimal.getBigDecimal in interface ResultSetcolumnIndex - the index of the column to read.BigDecimal with the value of the column.SQLException - if a database error happens.@Deprecated public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException
ResultSetjava.math.BigDecimal.getBigDecimal in interface ResultSetcolumnIndex - the index of the column to read.scale - the number of digits after the decimal pointBigDecimal with the value of the column.SQLException - if a database error happens.public InputStream getBinaryStream(int columnIndex) throws SQLException
ResultSet
This method can be used to read LONGVARBINARY values. All of the
data in the InputStream should be read before getting data from
any other column. A further call to a getter method will implicitly close
the InputStream.
getBinaryStream in interface ResultSetcolumnIndex - the index of the column to read.InputStream with the data from the column. If the
column value is SQL NULL, null is returned.SQLException - if a database error happens.public InputStream getBinaryStream(String columnName) throws SQLException
ResultSet
This method can be used to read LONGVARBINARY values. All of the
data in the InputStream should be read before getting data from
any other column. A further call to a getter method will implicitly close
the InputStream.
getBinaryStream in interface ResultSetcolumnName - the name of the column to read.InputStream with the data from the column if the
column value is SQL NULL, null is returned.SQLException - if a database error happens.public byte getByte(int columnIndex)
throws SQLException
ResultSetbyte.getByte in interface ResultSetcolumnIndex - the index of the column to read.byte equal to the value of the column. 0 if the value
is SQL NULL.SQLException - if a database error happens.public byte getByte(String columnName) throws SQLException
ResultSetbyte.getByte in interface ResultSetcolumnName - the name of the column to read.byte equal to the value of the column. 0 if the value
is SQL NULL.SQLException - if a database error happens.public byte[] getBytes(int columnIndex)
throws SQLException
ResultSetgetBytes in interface ResultSetcolumnIndex - the index of the column to read.null if
the column contains SQL NULL.SQLException - if a database error happens.public byte[] getBytes(String columnName) throws SQLException
ResultSetgetBytes in interface ResultSetcolumnName - the name of the column to read.null if
the column contains SQL NULL.SQLException - if a database error happens.public String getCursorName() throws SQLException
ResultSetResultSet.getCursorName in interface ResultSetSQLException - if a database error happens.public Object getObject(int columnIndex) throws SQLException
ResultSetObject. 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: getObject(columnIndex,this.getStatement().getConnection().getTypeMap())
getObject in interface ResultSetcolumnIndex - the index of the column to read.Object containing the value of the column. null if the column value is SQL NULL.SQLException - if a database error happens.public Object getObject(String columnName) throws SQLException
ResultSetObject. 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: getObject(columnIndex,this.getStatement().getConnection().getTypeMap())
getObject in interface ResultSetcolumnName - the name of the column to read.Object containing the value of the column. null if the column value is SQL NULL.SQLException - if a database error happens.public Object getObject(int columnIndex, Map map) throws SQLException
ResultSetObject.
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.
getObject in interface ResultSetcolumnIndex - the index of the column to read.map - a java.util.Map containing a mapping from SQL Type
names to Java classes.Object containing the value of the column. null if the column value is SQL NULL.SQLException - if a database error happens.public Object getObject(String columnName, Map map) throws SQLException
ResultSetObject.
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.
getObject in interface ResultSetcolumnName - the name of the column to read.map - a java.util.Map containing a mapping from SQL Type names to
Java classes.Object containing the value of the column. null if the column value is SQL NULL.SQLException - if a database error happens.public Ref getRef(int columnIndex) throws SQLException
ResultSetjava.sql.Ref.getRef in interface ResultSetcolumnIndex - the index of the column to read.SQLException - if a database error happens.public Ref getRef(String columnName) throws SQLException
ResultSetjava.sql.Ref.getRef in interface ResultSetcolumnName - the name of the column to read.REF in the columnSQLException - if a database error happens.public Blob getBlob(int columnIndex) throws SQLException
ResultSetjava.sql.Blob object.getBlob in interface ResultSetcolumnIndex - the index of the column to read.java.sql.Blob with the value of the column.SQLException - if a database error happens.public Blob getBlob(String columnName) throws SQLException
ResultSetjava.sql.Blob object.getBlob in interface ResultSetcolumnName - the name of the column to read.java.sql.Blob with the value of the column.SQLException - if a database error happens.public Clob getClob(int columnIndex) throws SQLException
ResultSetjava.sql.Clob.getClob in interface ResultSetcolumnIndex - the index of the column to read.Clob object representing the value in the column.
null if the value is SQL NULL.SQLException - if a database error happens.public Clob getClob(String columnName) throws SQLException
ResultSetjava.sql.Clob.getClob in interface ResultSetcolumnName - the name of the column to read.Clob object representing the value in the column.
null if the value is SQL NULL.SQLException - if a database error happens.public Array getArray(int columnIndex) throws SQLException
ResultSetResultSet as a java.sql.Array.getArray in interface ResultSetcolumnIndex - the index of the column to readjava.sql.Array with the data from the column.SQLException - if a database error happens.public Array getArray(String columnName) throws SQLException
ResultSetjava.sql.Array.getArray in interface ResultSetcolumnName - the name of the column to read.java.sql.Array with the data from the specified column.SQLException - if a database error happens.public Reader getCharacterStream(int columnIndex) throws SQLException
ResultSetjava.io.Reader object.getCharacterStream in interface ResultSetcolumnIndex - the index of the column to read.Reader holding the value of the column. null if
the column value is SQL NULL.SQLException - if a database error happens.Readerpublic Reader getCharacterStream(String columnName) throws SQLException
ResultSetjava.io.Reader object.getCharacterStream in interface ResultSetcolumnName - the name of the column to read.Reader holding the value of the column. null if
the column value is SQL NULL.SQLException - if a database error happens.public SQLWarning getWarnings() throws SQLException
ResultSetResultSet.
Subsequent warnings on this ResultSet are chained to the first
one.
The warnings are cleared when a new Row is read from the ResultSet. The warnings returned by this method are only the warnings
generated by ResultSet method calls - warnings generated by
Statement methods are held by the Statement.
An SQLException is generated if this method is called on a closed
ResultSet.
getWarnings in interface ResultSetResultSet. null if there are no warnings.SQLException - if a database error happens.public boolean wasNull()
throws SQLException
ResultSetResultSet
contained SQL NULL.wasNull in interface ResultSetSQLException - if a database error happens.public void clearWarnings()
throws SQLException
ResultSetResultSet.clearWarnings in interface ResultSetSQLException - if a database error happens.public boolean isFirst()
throws SQLException
ResultSetResultSet.isFirst in interface ResultSettrue if the cursor is on the first row in the ResultSet, false if the cursor is at any other position
in the ResultSet.SQLException - if a database error happens.public boolean isBeforeFirst()
throws SQLException
ResultSetResultSet.isBeforeFirst in interface ResultSettrue if the cursor is before the first row in the ResultSet, false if the cursor is at any other position
in the ResultSet.SQLException - if a database error happens.public void beforeFirst()
throws SQLException
ResultSetResultSet, before the first
row.beforeFirst in interface ResultSetSQLException - if a database error happens.public boolean first()
throws SQLException
ResultSetResultSet.first in interface ResultSettrue if the position is in a legitimate row, false if the ResultSet contains no rows.SQLException - if a database error happens.public boolean isAfterLast()
throws SQLException
ResultSetResultSet.isAfterLast in interface ResultSettrue if the cursor is after the last row in the ResultSet, false if the cursor is at any other position
in the ResultSet.SQLException - if a database error happens.public void afterLast()
throws SQLException
ResultSetResultSet, after the last row.afterLast in interface ResultSetSQLException - if a database error happens.public boolean isLast()
throws SQLException
ResultSetResultSetisLast in interface ResultSettrue if the cursor is on the last row in the ResultSet, false if the cursor is at any other position
in the ResultSet.SQLException - if a database error happens.public boolean last()
throws SQLException
ResultSetResultSet.last in interface ResultSettrue if the new position is in a legitimate row, false if the ResultSet contains no rows.SQLException - if there is a database error.public int getType()
throws SQLException
ResultSetResultSet.getType in interface ResultSetResultSet type, one of:
ResultSet.TYPE_FORWARD_ONLYResultSet.TYPE_SCROLL_INSENSITIVEResultSet.TYPE_SCROLL_SENSITIVESQLException - if there is a database error.public int getConcurrency()
throws SQLException
ResultSetResultSet.getConcurrency in interface ResultSetResultSet.CONCUR_READ_ONLY
, ResultSet.CONCUR_UPDATABLE.SQLException - if a database error happens.public boolean rowUpdated()
throws SQLException
ResultSetrowUpdated in interface ResultSettrue if the current row has been updated and if updates
can be detected, false otherwise.SQLException - if a database error happens.public boolean rowInserted()
throws SQLException
ResultSetrowInserted in interface ResultSettrue if a row has been inserted and if insertions are
detected, false otherwise.SQLException - if a database error happens.public boolean rowDeleted()
throws SQLException
ResultSetrowDeleted in interface ResultSettrue if a row has been deleted and if deletions are
detected, false otherwise.SQLException - if a database error happens.public void insertRow()
throws SQLException
ResultSetResultSet and into the underlying
database. The cursor must be set to the Insert Row before this method is
invoked.insertRow in interface ResultSetSQLException - if a database error happens. Particular cases include the
cursor not being on the Insert Row or if any columns in the
row do not have a value where the column is declared as
not-nullable.public void updateRow()
throws SQLException
ResultSetResultSet object.updateRow in interface ResultSetSQLException - if a database error happens.public void deleteRow()
throws SQLException
ResultSetResultSet and from the
underlying database.deleteRow in interface ResultSetSQLException - if a database error happens.public void refreshRow()
throws SQLException
ResultSet
If any columns in the current row have been updated but the updateRow has not been called, then the updates are lost when this
method is called.
refreshRow in interface ResultSetSQLException - if a database error happens., including if the current row is
the Insert row.public void cancelRowUpdates()
throws SQLException
ResultSetResultSet.cancelRowUpdates in interface ResultSetSQLException - if a database error happens.public void moveToInsertRow()
throws SQLException
ResultSetinsertRow to insert the new row into the database.moveToInsertRow in interface ResultSetSQLException - if a database error happens.public void moveToCurrentRow()
throws SQLException
ResultSetmoveToInsertRow.
This only applies if the cursor is on the Insert Row.moveToCurrentRow in interface ResultSetSQLException - if a database error happens.public void updateNull(int colIndex)
throws SQLException
ResultSetnull value.updateNull in interface ResultSetcolIndex - the index of the column to update.SQLException - if a database error happens.public void updateBoolean(int colIndex,
boolean b)
throws SQLException
ResultSetboolean
value.updateBoolean in interface ResultSetcolIndex - the index of the column to update.b - the new value for the specified column.SQLException - if a database error happens.public void updateByte(int colIndex,
byte b)
throws SQLException
ResultSetbyte value.updateByte in interface ResultSetcolIndex - the index of the column to update.b - the new value for the specified column.SQLException - if a database error happens.public void updateShort(int colIndex,
short b)
throws SQLException
ResultSetshort value.updateShort in interface ResultSetcolIndex - the index of the column to update.b - the new value for the specified column.SQLException - if a database error happens.public void updateInt(int colIndex,
int b)
throws SQLException
ResultSetint value.updateInt in interface ResultSetcolIndex - the index of the column to update.b - the new value for the specified column.SQLException - if a database error happens.public void updateLong(int colIndex,
long b)
throws SQLException
ResultSetlong value.updateLong in interface ResultSetcolIndex - the index of the column to update.b - the new value for the specified column..SQLException - if a database error happens.public void updateFloat(int colIndex,
float f)
throws SQLException
ResultSetfloat value.updateFloat in interface ResultSetcolIndex - the index of the column to update.f - the new value for the specified column.SQLException - if a database error happens.public void updateDouble(int colIndex,
double f)
throws SQLException
ResultSetdouble value.updateDouble in interface ResultSetcolIndex - the index of the column to update.f - the new value for the specified column.SQLException - if a database error happens.public void updateBigDecimal(int colIndex,
BigDecimal f)
throws SQLException
ResultSetjava.sql.BigDecimal value.updateBigDecimal in interface ResultSetcolIndex - the index of the column to update.f - the new value for the specified column.SQLException - if a database error happens.public void updateString(int colIndex,
String s)
throws SQLException
ResultSetString value.updateString in interface ResultSetcolIndex - the index of the column to update.s - the new value for the specified column.SQLException - if a database error happens.public void updateBytes(int colIndex,
byte[] s)
throws SQLException
ResultSetbyte array
value.updateBytes in interface ResultSetcolIndex - the index of the column to update.s - the new value for the specified column.SQLException - if a database error happens.public void updateDate(int colIndex,
Date d)
throws SQLException
ResultSetjava.sql.Date
value.updateDate in interface ResultSetcolIndex - the index of the column to update.d - the new value for the specified column.SQLException - if a database error happens.public void updateTime(int colIndex,
Time t)
throws SQLException
ResultSetTime value.updateTime in interface ResultSetcolIndex - the index of the column to update.t - the new value for the specified column.SQLException - if a database error happens.public void updateTimestamp(int colIndex,
Timestamp t)
throws SQLException
ResultSetTimestamp
value.updateTimestamp in interface ResultSetcolIndex - the index of the column to update.t - the new timestamp value for the specified column.SQLException - if a database error happens.public void updateAsciiStream(int colIndex,
InputStream in,
int s)
throws SQLException
ResultSetupdateAsciiStream in interface ResultSetcolIndex - the index of the column to update.in - the new value for the specified column.s - the length of the data to write from the streamSQLException - if a database error happens.public void updateBinaryStream(int colIndex,
InputStream in,
int s)
throws SQLException
ResultSetupdateBinaryStream in interface ResultSetcolIndex - the index of the column to update.in - the new value for the specified column.s - the number of bytes to be read from the the stream.SQLException - if a database error happens.public void updateCharacterStream(int colIndex,
Reader in,
int s)
throws SQLException
ResultSetupdateCharacterStream in interface ResultSetcolIndex - the index of the column to update.in - the new value for the specified column.s - the length of data to write from the streamSQLException - if a database error happens.public void updateObject(int colIndex,
Object obj)
throws SQLException
ResultSetObject
value.updateObject in interface ResultSetcolIndex - the index of the column to update.obj - the new value for the specified column.SQLException - if a database error happens.public void updateObject(int colIndex,
Object obj,
int s)
throws SQLException
ResultSetObject
value.updateObject in interface ResultSetcolIndex - the index of the column to update.obj - the new value for the specified column.s - for the types java.sql.Types.DECIMAL or java.sql.Types.NUMERIC, this specifies the number of digits
after the decimal point.SQLException - if a database error happens.public void updateNull(String colName) throws SQLException
ResultSetnull value.updateNull in interface ResultSetcolName - the name of the column to update.SQLException - if a database error happens.public void updateBoolean(String colName, boolean b) throws SQLException
ResultSetboolean value.updateBoolean in interface ResultSetcolName - the name of the column to update.b - the new value for the specified column.SQLException - if a database error happens.public void updateByte(String colName, byte b) throws SQLException
ResultSetbyte value.updateByte in interface ResultSetcolName - the name of the column to update.b - the new value for the specified column.SQLException - if a database error happens.public void updateShort(String colName, short b) throws SQLException
ResultSetshort value.updateShort in interface ResultSetcolName - the name of the column to update.b - the new value for the specified column.SQLException - if a database error happens.public void updateInt(String colName, int b) throws SQLException
ResultSetint value.updateInt in interface ResultSetcolName - the name of the column to update.b - the new value for the specified column.SQLException - if a database error happens.public void updateLong(String colName, long b) throws SQLException
ResultSetlong value.updateLong in interface ResultSetcolName - the name of the column to update.b - the new value for the specified column.SQLException - if a database error happens.public void updateFloat(String colName, float f) throws SQLException
ResultSetfloat value.updateFloat in interface ResultSetcolName - the name of the column to update.f - the new value for the specified column.SQLException - if a database error happens.public void updateDouble(String colName, double f) throws SQLException
ResultSetdouble value.updateDouble in interface ResultSetcolName - the name of the column to update.f - the new value for the specified column.SQLException - if a database error happens.public void updateBigDecimal(String colName, BigDecimal f) throws SQLException
ResultSetjava.sql.BigDecimal value.updateBigDecimal in interface ResultSetcolName - the name of the column to update.f - the new value for the specified column.SQLException - if a database error happens.public void updateString(String colName, String s) throws SQLException
ResultSetString value.updateString in interface ResultSetcolName - the name of the column to update.s - the new value for the specified column.SQLException - if a database error happens.public void updateBytes(String colName, byte[] s) throws SQLException
ResultSetupdateBytes in interface ResultSetcolName - the name of the column to update.s - the new value for the specified column.SQLException - if a database error happens.public void updateDate(String colName, Date d) throws SQLException
ResultSetjava.sql.Date
value.updateDate in interface ResultSetcolName - the name of the column to update.d - the new value for the specified column.SQLException - if a database error happens.public void updateTime(String colName, Time t) throws SQLException
ResultSetTime value.updateTime in interface ResultSetcolName - the name of the column to update.t - the new value for the specified column.SQLException - if a database error happens.public void updateTimestamp(String colName, Timestamp t) throws SQLException
ResultSetTimestamp value.updateTimestamp in interface ResultSetcolName - the name of the column to update.t - the new timestamp value for the specified column.SQLException - if a database error happens.public void updateAsciiStream(String colName, InputStream in, int s) throws SQLException
ResultSetupdateAsciiStream in interface ResultSetcolName - the name of the column to update.in - the new value for the specified column.s - the length of the data to write from the streamSQLException - if a database error happens.public void updateBinaryStream(String colName, InputStream in, int s) throws SQLException
ResultSetupdateBinaryStream in interface ResultSetcolName - the name of the column to update.in - the new value for the specified column.s - he number of bytes to be read from the the stream.SQLException - if a database error happens.public void updateCharacterStream(String colName, Reader in, int s) throws SQLException
ResultSetupdateCharacterStream in interface ResultSetcolName - the name of the column to update.in - the new value for the specified column.s - the length of data to write from the ReaderSQLException - if a database error happens.public void updateObject(String colName, Object obj) throws SQLException
ResultSetObject value.updateObject in interface ResultSetcolName - the name of the column to update.obj - the new value for the specified column.SQLException - if a database error happens.public void updateObject(String colName, Object obj, int s) throws SQLException
ResultSetObject value.updateObject in interface ResultSetcolName - the name of the column to update.obj - the new value for the specified column.s - for the types java.sql.Types.DECIMAL or java.sql.Types.NUMERIC, this specifies the number of digits
after the decimal point.SQLException - if a database error happens.public Statement getStatement() throws SQLException
ResultSetResultSet. If the ResultSet was not created by a statement (i.e. because it was returned
from one of the DatabaseMetaData methods), null is
returned.getStatement in interface ResultSetResultSet, or null if the ResultSet was not created by a Statement.SQLException - if a database error happens.public void close()
throws SQLException
ResultSetResultSet's database and JDBC resources. You are
strongly advised to use this method rather than relying on the release
being done when the ResultSet's finalize method is called during
garbage collection process. Note that the 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.close in interface AutoCloseableclose in interface ResultSetSQLException - if a database error happens.public URL getURL(int colIndex) throws SQLException
ResultSetjava.net.URL.getURL in interface ResultSetcolIndex - the index of the column to read.null if the column value is SQL NULL.SQLException - if a database error happens.public URL getURL(String colName) throws SQLException
ResultSetjava.net.URL object.getURL in interface ResultSetcolName - the name of the column to read.null if the column value is SQL NULL.SQLException - if a database error happens.public void updateRef(int colIndex,
Ref x)
throws SQLException
ResultSetjava.sql.Ref
value.updateRef in interface ResultSetcolIndex - the index of the column to update.x - the new value for the specified column.SQLException - if a database error happens.public void updateRef(String colName, Ref x) throws SQLException
ResultSetjava.sql.Ref
value.updateRef in interface ResultSetcolName - the name of the column to update.x - the new value for the specified column.SQLException - if a database error happens.public void updateBlob(int colIndex,
Blob x)
throws SQLException
ResultSetjava.sql.Blob
value.updateBlob in interface ResultSetcolIndex - the index of the column to update.x - the new value for the specified column.SQLException - if a database error happens.public void updateBlob(String colName, Blob x) throws SQLException
ResultSetjava.sql.Blob
value.updateBlob in interface ResultSetcolName - the name of the column to update.x - the new value for the specified column.SQLException - if a database error happens.public void updateClob(int colIndex,
Clob x)
throws SQLException
ResultSetjava.sql.Clob
value.updateClob in interface ResultSetcolIndex - the index of the column to update.x - the new value for the specified column.SQLException - if a database error happens.public void updateClob(String colName, Clob x) throws SQLException
ResultSetjava.sql.Clob
value.updateClob in interface ResultSetcolName - the name of the column to update.x - the new value for the specified column.SQLException - if a database error happens.public void updateArray(int colIndex,
Array x)
throws SQLException
ResultSetjava.sql.Array value.updateArray in interface ResultSetcolIndex - the index of the column to update.x - the new value for the specified column.SQLException - if a database error happens.public void updateArray(String colName, Array x) throws SQLException
ResultSetjava.sql.Array
value.updateArray in interface ResultSetcolName - the name of the column to update.x - the new value for the specified column.SQLException - if a database error happens.public RowId getRowId(int colIndex) throws SQLException
ResultSetRowId corresponding to the SQL ROWID at the 1-based columnIndex.getRowId in interface ResultSetSQLExceptionpublic RowId getRowId(String colName) throws SQLException
ResultSetRowId corresponding to the SQL ROWID at the named column.getRowId in interface ResultSetSQLExceptionpublic void updateRowId(int colIndex,
RowId x)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateRowId in interface ResultSetSQLExceptionpublic void updateRowId(String colName, RowId x) throws SQLException
ResultSetupdateRowId in interface ResultSetSQLExceptionpublic int getHoldability()
throws SQLException
ResultSetResultSet.HOLD_CURSORS_OVER_COMMIT or
ResultSet.CLOSE_CURSORS_AT_COMMIT.getHoldability in interface ResultSetSQLExceptionpublic boolean isClosed()
throws SQLException
ResultSetisClosed in interface ResultSetSQLExceptionpublic void updateNString(int colIndex,
String nString)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateNString in interface ResultSetSQLExceptionpublic void updateNString(String colName, String nString) throws SQLException
ResultSetupdateNString in interface ResultSetSQLExceptionpublic void updateNClob(int colIndex,
NClob nclob)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateNClob in interface ResultSetSQLExceptionpublic void updateNClob(String colName, NClob nclob) throws SQLException
ResultSetupdateNClob in interface ResultSetSQLExceptionpublic NClob getNClob(int colIndex) throws SQLException
ResultSetNClob corresponding to the value at the 1-based columnIndex.getNClob in interface ResultSetSQLExceptionpublic NClob getNClob(String colName) throws SQLException
ResultSetNClob corresponding to the value in the named column.getNClob in interface ResultSetSQLExceptionpublic SQLXML getSQLXML(int colIndex) throws SQLException
ResultSetSQLXML corresponding to the value at the 1-based columnIndex.getSQLXML in interface ResultSetSQLExceptionpublic SQLXML getSQLXML(String colName) throws SQLException
ResultSetSQLXML corresponding to the value in the named column.getSQLXML in interface ResultSetSQLExceptionpublic void updateSQLXML(int colIndex,
SQLXML xml)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateSQLXML in interface ResultSetSQLExceptionpublic void updateSQLXML(String colName, SQLXML xml) throws SQLException
ResultSetupdateSQLXML in interface ResultSetSQLExceptionpublic String getNString(int colIndex) throws SQLException
ResultSetString corresponding to the value at the 1-based columnIndex.getNString in interface ResultSetSQLExceptionpublic String getNString(String colName) throws SQLException
ResultSetString corresponding to the value in the named column.getNString in interface ResultSetSQLExceptionpublic Reader getNCharacterStream(int colIndex) throws SQLException
ResultSetReader corresponding to the value at the 1-based columnIndex.getNCharacterStream in interface ResultSetSQLExceptionpublic Reader getNCharacterStream(String colName) throws SQLException
ResultSetReader corresponding to the value in the named column.getNCharacterStream in interface ResultSetSQLExceptionpublic void updateNCharacterStream(int colIndex,
Reader x,
long len)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateNCharacterStream in interface ResultSetSQLExceptionpublic void updateNCharacterStream(String colName, Reader x, long len) throws SQLException
ResultSetupdateNCharacterStream in interface ResultSetSQLExceptionpublic void updateAsciiStream(int colIndex,
InputStream x,
long len)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateAsciiStream in interface ResultSetSQLExceptionpublic void updateAsciiStream(String colName, InputStream x, long len) throws SQLException
ResultSetupdateAsciiStream in interface ResultSetSQLExceptionpublic void updateBinaryStream(int colIndex,
InputStream x,
long len)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateBinaryStream in interface ResultSetSQLExceptionpublic void updateBinaryStream(String colName, InputStream x, long len) throws SQLException
ResultSetupdateBinaryStream in interface ResultSetSQLExceptionpublic void updateCharacterStream(int colIndex,
Reader x,
long len)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateCharacterStream in interface ResultSetSQLExceptionpublic void updateCharacterStream(String colName, Reader x, long len) throws SQLException
ResultSetupdateCharacterStream in interface ResultSetSQLExceptionpublic void updateBlob(int colIndex,
InputStream x,
long len)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateBlob in interface ResultSetSQLExceptionpublic void updateBlob(String colName, InputStream x, long len) throws SQLException
ResultSetupdateBlob in interface ResultSetSQLExceptionpublic void updateClob(int colIndex,
Reader x,
long len)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateClob in interface ResultSetSQLExceptionpublic void updateClob(String colName, Reader x, long len) throws SQLException
ResultSetupdateClob in interface ResultSetSQLExceptionpublic void updateNClob(int colIndex,
Reader x,
long len)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateNClob in interface ResultSetSQLExceptionpublic void updateNClob(String colName, Reader x, long len) throws SQLException
ResultSetupdateNClob in interface ResultSetSQLExceptionpublic void updateNCharacterStream(int colIndex,
Reader x)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateNCharacterStream in interface ResultSetSQLExceptionpublic void updateNCharacterStream(String colName, Reader x) throws SQLException
ResultSetupdateNCharacterStream in interface ResultSetSQLExceptionpublic void updateAsciiStream(int colIndex,
InputStream x)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateAsciiStream in interface ResultSetSQLExceptionpublic void updateAsciiStream(String colName, InputStream x) throws SQLException
ResultSetupdateAsciiStream in interface ResultSetSQLExceptionpublic void updateBinaryStream(int colIndex,
InputStream x)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateBinaryStream in interface ResultSetSQLExceptionpublic void updateBinaryStream(String colName, InputStream x) throws SQLException
ResultSetupdateBinaryStream in interface ResultSetSQLExceptionpublic void updateCharacterStream(int colIndex,
Reader x)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateCharacterStream in interface ResultSetSQLExceptionpublic void updateCharacterStream(String colName, Reader x) throws SQLException
ResultSetupdateCharacterStream in interface ResultSetSQLExceptionpublic void updateBlob(int colIndex,
InputStream x)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateBlob in interface ResultSetSQLExceptionpublic void updateBlob(String colName, InputStream x) throws SQLException
ResultSetupdateBlob in interface ResultSetSQLExceptionpublic void updateClob(int colIndex,
Reader x)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateClob in interface ResultSetSQLExceptionpublic void updateClob(String colName, Reader x) throws SQLException
ResultSetupdateClob in interface ResultSetSQLExceptionpublic void updateNClob(int colIndex,
Reader x)
throws SQLException
ResultSetcolumnIndex.
The underlying database isn't changed until the next row update or insert operation.updateNClob in interface ResultSetSQLExceptionpublic void updateNClob(String colName, Reader x) throws SQLException
ResultSetupdateNClob in interface ResultSetSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
Wrapperunwrap in interface Wrapperiface - -
the class that defines the interfaceSQLException - -
if there is no object implementing the specific interfacepublic boolean isWrapperFor(Class iface) throws SQLException
WrapperisWrapperFor in interface Wrapperiface - -
the class that defines the interfaceSQLException - -
when an error occurs when judges the object