Class JDBCResultSet
- All Implemented Interfaces:
AutoCloseable,ResultSet,Wrapper
public class JDBCResultSet extends Object implements ResultSet
-
Field Summary
Fields Modifier and Type Field Description protected TableResulttrTable returned by Database.get_table()Fields inherited from interface java.sql.ResultSet
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 Summary
Constructors Constructor Description JDBCResultSet(TableResult tr, JDBCStatement s) -
Method Summary
Modifier and Type Method Description booleanabsolute(int row)Moves the cursor to a specified row number in theResultSet.voidafterLast()Moves the cursor to the end of theResultSet, after the last row.voidbeforeFirst()Moves the cursor to the start of theResultSet, before the first row.voidcancelRowUpdates()Cancels any updates made to the current row in theResultSet.voidclearWarnings()Clears all warnings related to thisResultSet.voidclose()Releases thisResultSet's database and JDBC resources.voiddeleteRow()Deletes the current row from theResultSetand from the underlying database.voidfillRowbuf()intfindColumn(String columnName)Gets the index number for a column in theResultSetfrom the provided column name.booleanfirst()Shifts the cursor position to the first row in theResultSet.ArraygetArray(int columnIndex)Gets the content of a column specified by column index in the current row of thisResultSetas ajava.sql.Array.ArraygetArray(String columnName)Gets the value of a column specified by column name as ajava.sql.Array.InputStreamgetAsciiStream(int columnIndex)Gets the value of a column specified by column index as an ASCII character stream.InputStreamgetAsciiStream(String columnName)Gets the value of a column specified by column name as an ASCII character stream.BigDecimalgetBigDecimal(int columnIndex)Gets the value of a column specified by column index as ajava.math.BigDecimal.BigDecimalgetBigDecimal(int columnIndex, int scale)Deprecated.BigDecimalgetBigDecimal(String columnName)Gets the value of a column specified by column name, as ajava.math.BigDecimal.BigDecimalgetBigDecimal(String columnName, int scale)Deprecated.InputStreamgetBinaryStream(int columnIndex)Gets the value of a column specified by column index as a binary stream.InputStreamgetBinaryStream(String columnName)Gets the value of a column specified by column name as a binary stream.BlobgetBlob(int columnIndex)Gets the value of a column specified by column index as ajava.sql.Blobobject.BlobgetBlob(String columnName)Gets the value of a column specified by column name, as ajava.sql.Blobobject.booleangetBoolean(int columnIndex)Gets the value of a column specified by column index as aboolean.booleangetBoolean(String columnName)Gets the value of a column specified by column name, as aboolean.bytegetByte(int columnIndex)Gets the value of a column specified by column index as abyte.bytegetByte(String columnName)Gets the value of a column specified by column name as abyte.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.ReadergetCharacterStream(int columnIndex)Gets the value of a column specified by column index as ajava.io.Readerobject.ReadergetCharacterStream(String columnName)Gets the value of a column specified by column name as ajava.io.Readerobject.ClobgetClob(int columnIndex)Gets the value of a column specified by column index as ajava.sql.Clob.ClobgetClob(String columnName)Gets the value of a column specified by column name as ajava.sql.Clob.intgetConcurrency()Gets the concurrency mode of thisResultSet.StringgetCursorName()Gets the name of the SQL cursor of thisResultSet.DategetDate(int columnIndex)Gets the value of a column specified by column index as ajava.sql.Date.DategetDate(int columnIndex, Calendar cal)Gets the value of a column specified by column index as ajava.sql.Date.DategetDate(String columnName)Gets the value of a column specified by column name as ajava.sql.Date.DategetDate(String columnName, Calendar cal)Gets the value of a column specified by column name, as ajava.sql.Dateobject.doublegetDouble(int columnIndex)Gets the value of a column specified by column index as adoublevalue.doublegetDouble(String columnName)Gets the value of a column specified by column name as adoublevalue.intgetFetchDirection()Gets the direction in which rows are fetched for thisResultSetobject.intgetFetchSize()Gets the fetch size (in number of rows) for thisResultSet.floatgetFloat(int columnIndex)Gets the value of a column specified by column index as afloatvalue.floatgetFloat(String columnName)Gets the value of a column specified by column name as afloatvalue.intgetHoldability()Returns the holdability of this result set:ResultSet.HOLD_CURSORS_OVER_COMMITorResultSet.CLOSE_CURSORS_AT_COMMIT.intgetInt(int columnIndex)Gets the value of a column specified by column index as anintvalue.intgetInt(String columnName)Gets the value of a column specified by column name, as anintvalue.longgetLong(int columnIndex)Gets the value of a column specified by column index as alongvalue.longgetLong(String columnName)Gets the value of a column specified by column name, as alongvalue.ResultSetMetaDatagetMetaData()Gets the metadata for thisResultSet.ReadergetNCharacterStream(int colIndex)Returns aReadercorresponding to the value at the 1-basedcolumnIndex.ReadergetNCharacterStream(String colName)Returns aReadercorresponding to the value in the named column.NClobgetNClob(int colIndex)Returns anNClobcorresponding to the value at the 1-basedcolumnIndex.NClobgetNClob(String colName)Returns anNClobcorresponding to the value in the named column.StringgetNString(int colIndex)Returns aStringcorresponding to the value at the 1-basedcolumnIndex.StringgetNString(String colName)Returns aStringcorresponding to the value in the named column.ObjectgetObject(int columnIndex)Gets the value of a specified column as a JavaObject.ObjectgetObject(int columnIndex, Map map)Gets the value of a column specified by column index as a JavaObject.ObjectgetObject(String columnName)Gets the value of a specified column as a JavaObject.ObjectgetObject(String columnName, Map map)Gets the value of a column specified by column name as a JavaObject.RefgetRef(int columnIndex)Gets the value of a column specified by column index as a Javajava.sql.Ref.RefgetRef(String columnName)Gets the value of a column specified by column name as a Javajava.sql.Ref.intgetRow()Gets the number of the current row in theResultSet.RowIdgetRowId(int colIndex)Returns aRowIdcorresponding to the SQL ROWID at the 1-basedcolumnIndex.RowIdgetRowId(String colName)Returns aRowIdcorresponding to the SQL ROWID at the named column.shortgetShort(int columnIndex)Gets the value of a column specified by column index as a short value.shortgetShort(String columnName)Gets the value of a column specified by column name, as a short value.SQLXMLgetSQLXML(int colIndex)Returns anSQLXMLcorresponding to the value at the 1-basedcolumnIndex.SQLXMLgetSQLXML(String colName)Returns anSQLXMLcorresponding to the value in the named column.StatementgetStatement()Gets the statement that produced thisResultSet.StringgetString(int columnIndex)Gets the value of a column specified by column index as a String.StringgetString(String columnName)Gets the value of a column specified by column name, as a String.TimegetTime(int columnIndex)Gets the value of a column specified by column index as ajava.sql.Timevalue.TimegetTime(int columnIndex, Calendar cal)Gets the value of a column specified by column index as ajava.sql.Timevalue.TimegetTime(String columnName)Gets the value of a column specified by column name, as ajava.sql.Timevalue.TimegetTime(String columnName, Calendar cal)Gets the value of a column specified by column index, as ajava.sql.Timevalue.TimestampgetTimestamp(int columnIndex)Gets the value of a column specified by column index as ajava.sql.Timestampvalue.TimestampgetTimestamp(int columnIndex, Calendar cal)Gets the value of a column specified by column index, as ajava.sql.Timestampvalue.TimestampgetTimestamp(String columnName)Gets the value of a column specified by column name, as ajava.sql.Timestampvalue.TimestampgetTimestamp(String columnName, Calendar cal)Gets the value of a column specified by column name, as ajava.sql.Timestampvalue.intgetType()Gets the type of theResultSet.InputStreamgetUnicodeStream(int columnIndex)Deprecated.InputStreamgetUnicodeStream(String columnName)Deprecated.URLgetURL(int colIndex)Gets the value of a column specified by column index as ajava.net.URL.URLgetURL(String colName)Gets the value of a column specified by column name as ajava.net.URLobject.SQLWarninggetWarnings()Gets the first warning generated by calls on thisResultSet.voidinsertRow()Insert the insert row into theResultSetand into the underlying database.booleanisAfterLast()Gets if the cursor is after the last row of theResultSet.booleanisBeforeFirst()Gets if the cursor is before the first row of theResultSet.booleanisClosed()Returns true if this result set has been closed, false otherwise.booleanisFirst()Gets if the cursor is on the first row of theResultSet.booleanisLast()Gets if the cursor is on the last row of theResultSetbooleanisUpdatable()booleanisWrapperFor(Class iface)If the caller is a wrapper of the class or implements the given interface, the methods return false and vice versa.booleanlast()Shifts the cursor position to the last row of theResultSet.voidmoveToCurrentRow()Moves the cursor to the remembered position, namely the row that was the current row before a call tomoveToInsertRow.voidmoveToInsertRow()Moves the cursor position to the Insert Row.booleannext()Shifts the cursor position down one row in thisResultSetobject.booleanprevious()Relocates the cursor position to the preceding row in thisResultSet.voidrefreshRow()Refreshes the current row with its most up to date value in the database.booleanrelative(int row)Moves the cursor position up or down by a specified number of rows.booleanrowDeleted()Indicates whether a row has been deleted.booleanrowInserted()Indicates whether the current row has had an insertion operation.booleanrowUpdated()Indicates whether the current row has been updated.voidsetFetchDirection(int dir)Indicates which direction (forward/reverse) will be used to process the rows of thisResultSetobject.voidsetFetchSize(int fsize)Indicates the number of rows to fetch from the database when extra rows are required for thisResultSet.<T> Tunwrap(Class<T> iface)Returns an object that implements the given interface.voidupdateArray(int colIndex, Array x)Updates a column specified by a column index with ajava.sql.Arrayvalue.voidupdateArray(String colName, Array x)Updates a column specified by a column name with ajava.sql.Arrayvalue.voidupdateAsciiStream(int colIndex, InputStream x)Updates the value at the 1-basedcolumnIndex.voidupdateAsciiStream(int colIndex, InputStream in, int s)Updates a column specified by a column index with an ASCII stream value.voidupdateAsciiStream(int colIndex, InputStream x, long len)Updates the value at the 1-basedcolumnIndex.voidupdateAsciiStream(String colName, InputStream x)Updates the value in the named column.voidupdateAsciiStream(String colName, InputStream in, int s)Updates a column specified by a column name with an Ascii stream value.voidupdateAsciiStream(String colName, InputStream x, long len)Updates the value in the named column.voidupdateBigDecimal(int colIndex, BigDecimal f)Updates a column specified by a column index with ajava.sql.BigDecimalvalue.voidupdateBigDecimal(String colName, BigDecimal f)Updates a column specified by a column name with ajava.sql.BigDecimalvalue.voidupdateBinaryStream(int colIndex, InputStream x)Updates the value at the 1-basedcolumnIndex.voidupdateBinaryStream(int colIndex, InputStream in, int s)Updates a column specified by a column index with a binary stream value.voidupdateBinaryStream(int colIndex, InputStream x, long len)Updates the value at the 1-basedcolumnIndex.voidupdateBinaryStream(String colName, InputStream x)Updates the value in the named column.voidupdateBinaryStream(String colName, InputStream in, int s)Updates a column specified by a column name with a binary stream value.voidupdateBinaryStream(String colName, InputStream x, long len)Updates the value in the named column.voidupdateBlob(int colIndex, InputStream x)Updates the value at the 1-basedcolumnIndex.voidupdateBlob(int colIndex, InputStream x, long len)Updates the value at the 1-basedcolumnIndex.voidupdateBlob(int colIndex, Blob x)Updates a column specified by a column index with ajava.sql.Blobvalue.voidupdateBlob(String colName, InputStream x)Updates the value in the named column.voidupdateBlob(String colName, InputStream x, long len)Updates the value in the named column.voidupdateBlob(String colName, Blob x)Updates a column specified by a column name with ajava.sql.Blobvalue.voidupdateBoolean(int colIndex, boolean b)Updates a column specified by a column index with abooleanvalue.voidupdateBoolean(String colName, boolean b)Updates a column specified by a column name with abooleanvalue.voidupdateByte(int colIndex, byte b)Updates a column specified by a column index with abytevalue.voidupdateByte(String colName, byte b)Updates a column specified by a column name with abytevalue.voidupdateBytes(int colIndex, byte[] s)Updates a column specified by a column index with abytearray value.voidupdateBytes(String colName, byte[] s)Updates a column specified by a column name with a byte array value.voidupdateCharacterStream(int colIndex, Reader x)Updates the value at the 1-basedcolumnIndex.voidupdateCharacterStream(int colIndex, Reader in, int s)Updates a column specified by a column index with a character stream value.voidupdateCharacterStream(int colIndex, Reader x, long len)Updates the value at the 1-basedcolumnIndex.voidupdateCharacterStream(String colName, Reader x)Updates the value in the named column.voidupdateCharacterStream(String colName, Reader in, int s)Updates a column specified by a column name with a character stream value.voidupdateCharacterStream(String colName, Reader x, long len)Updates the value in the named column.voidupdateClob(int colIndex, Reader x)Updates the value at the 1-basedcolumnIndex.voidupdateClob(int colIndex, Reader x, long len)Updates the value at the 1-basedcolumnIndex.voidupdateClob(int colIndex, Clob x)Updates a column specified by a column index with ajava.sql.Clobvalue.voidupdateClob(String colName, Reader x)Updates the value in the named column.voidupdateClob(String colName, Reader x, long len)Updates the value in the named column.voidupdateClob(String colName, Clob x)Updates a column specified by a column name with ajava.sql.Clobvalue.voidupdateDate(int colIndex, Date d)Updates a column specified by a column index with ajava.sql.Datevalue.voidupdateDate(String colName, Date d)Updates a column specified by a column name with ajava.sql.Datevalue.voidupdateDouble(int colIndex, double f)Updates a column specified by a column index with adoublevalue.voidupdateDouble(String colName, double f)Updates a column specified by a column name with adoublevalue.voidupdateFloat(int colIndex, float f)Updates a column specified by a column index with afloatvalue.voidupdateFloat(String colName, float f)Updates a column specified by a column name with afloatvalue.voidupdateInt(int colIndex, int b)Updates a column specified by a column index with anintvalue.voidupdateInt(String colName, int b)Updates a column specified by a column name with anintvalue.voidupdateLong(int colIndex, long b)Updates a column specified by a column index with alongvalue.voidupdateLong(String colName, long b)Updates a column specified by a column name with alongvalue.voidupdateNCharacterStream(int colIndex, Reader x)Updates the value at the 1-basedcolumnIndex.voidupdateNCharacterStream(int colIndex, Reader x, long len)Updates the value at the 1-basedcolumnIndex.voidupdateNCharacterStream(String colName, Reader x)Updates the value in the named column.voidupdateNCharacterStream(String colName, Reader x, long len)Updates the value in the named column.voidupdateNClob(int colIndex, Reader x)Updates the value at the 1-basedcolumnIndex.voidupdateNClob(int colIndex, Reader x, long len)Updates the value at the 1-basedcolumnIndex.voidupdateNClob(int colIndex, NClob nclob)Updates the value at the 1-basedcolumnIndex.voidupdateNClob(String colName, Reader x)Updates the value in the named column.voidupdateNClob(String colName, Reader x, long len)Updates the value in the named column.voidupdateNClob(String colName, NClob nclob)Updates the value in the named column.voidupdateNString(int colIndex, String nString)Updates the value at the 1-basedcolumnIndex.voidupdateNString(String colName, String nString)Updates the value in the named column.voidupdateNull(int colIndex)Updates a column specified by a column index with anullvalue.voidupdateNull(String colName)Updates a column specified by a column name with anullvalue.voidupdateObject(int colIndex, Object obj)Updates a column specified by a column index with anObjectvalue.voidupdateObject(int colIndex, Object obj, int s)Updates a column specified by a column index with anObjectvalue.voidupdateObject(String colName, Object obj)Updates a column specified by a column name with anObjectvalue.voidupdateObject(String colName, Object obj, int s)Updates a column specified by a column name with anObjectvalue.voidupdateRef(int colIndex, Ref x)Updates a column specified by a column index with ajava.sql.Refvalue.voidupdateRef(String colName, Ref x)Updates a column specified by a column name with ajava.sql.Refvalue.voidupdateRow()Updates the database with the new contents of the current row of thisResultSetobject.voidupdateRowId(int colIndex, RowId x)Updates the value at the 1-basedcolumnIndex.voidupdateRowId(String colName, RowId x)Updates the value in the named column.voidupdateShort(int colIndex, short b)Updates a column specified by a column index with ashortvalue.voidupdateShort(String colName, short b)Updates a column specified by a column name with ashortvalue.voidupdateSQLXML(int colIndex, SQLXML xml)Updates the value at the 1-basedcolumnIndex.voidupdateSQLXML(String colName, SQLXML xml)Updates the value in the named column.voidupdateString(int colIndex, String s)Updates a column specified by a column index with aStringvalue.voidupdateString(String colName, String s)Updates a column specified by a column name with aStringvalue.voidupdateTime(int colIndex, Time t)Updates a column specified by a column index with aTimevalue.voidupdateTime(String colName, Time t)Updates a column specified by a column name with aTimevalue.voidupdateTimestamp(int colIndex, Timestamp t)Updates a column specified by a column index with aTimestampvalue.voidupdateTimestamp(String colName, Timestamp t)Updates a column specified by column name with aTimestampvalue.booleanwasNull()Determines whether the last column read from thisResultSetcontained SQLNULL.
-
Field Details
-
tr
Table returned by Database.get_table()
-
-
Constructor Details
-
JDBCResultSet
-
-
Method Details
-
isUpdatable
- Throws:
SQLException
-
fillRowbuf
- Throws:
SQLException
-
next
Description copied from interface:ResultSetShifts the cursor position down one row in thisResultSetobject.Any input streams associated with the current row are closed and any warnings are cleared.
- Specified by:
nextin interfaceResultSet- Returns:
trueif the updated cursor position is pointing to a valid row,falseotherwise (i.e. when the cursor is after the last row in theResultSet).- Throws:
SQLException- if a database error happens.
-
findColumn
Description copied from interface:ResultSetGets the index number for a column in theResultSetfrom the provided column name.- Specified by:
findColumnin interfaceResultSet- Parameters:
columnName- the column name.- Returns:
- the column's index in the
ResultSetidentified by column name. - Throws:
SQLException- if a database error happens.
-
getRow
Description copied from interface:ResultSetGets the number of the current row in theResultSet. Row numbers start at 1 for the first row.- Specified by:
getRowin interfaceResultSet- Returns:
- the index number of the current row.
0is returned if there is no current row. - Throws:
SQLException- if a database error happens.
-
previous
Description copied from interface:ResultSetRelocates the cursor position to the preceding row in thisResultSet.- Specified by:
previousin interfaceResultSet- Returns:
trueif the new position is in a legitimate row,falseif the cursor is now before the first row.- Throws:
SQLException- if a database error happens.
-
absolute
Description copied from interface:ResultSetMoves the cursor to a specified row number in theResultSet.- Specified by:
absolutein interfaceResultSet- Parameters:
row- the index of the row starting at index 1. Index-1returns the last row.- Returns:
trueif the new cursor position is on theResultSet,falseotherwise.- Throws:
SQLException- if a database error happens.
-
relative
Description copied from interface:ResultSetMoves 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).- Specified by:
relativein interfaceResultSet- Parameters:
row- a number of rows to move the cursor - may be positive or negative- Returns:
trueif the new cursor position is on a row,falseotherwise- Throws:
SQLException- if a database error happens.
-
setFetchDirection
Description copied from interface:ResultSetIndicates which direction (forward/reverse) will be used to process the rows of thisResultSetobject. This is treated as a hint by the JDBC driver.- Specified by:
setFetchDirectionin interfaceResultSet- Parameters:
dir- can beResultSet.FETCH_FORWARD,ResultSet.FETCH_REVERSE, orResultSet.FETCH_UNKNOWN- Throws:
SQLException- if there is a database error.
-
getFetchDirection
Description copied from interface:ResultSetGets the direction in which rows are fetched for thisResultSetobject.- Specified by:
getFetchDirectionin interfaceResultSet- Returns:
- the fetch direction. Will be one of:
- ResultSet.FETCH_FORWARD
- ResultSet.FETCH_REVERSE
- ResultSet.FETCH_UNKNOWN
- Throws:
SQLException- if a database error happens.
-
setFetchSize
Description copied from interface:ResultSetIndicates the number of rows to fetch from the database when extra rows are required for thisResultSet. This used as a hint to the JDBC driver.- Specified by:
setFetchSizein interfaceResultSet- Parameters:
fsize- the number of rows to fetch.0implies 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 theResultSet.- Throws:
SQLException- if a database error happens.
-
getFetchSize
Description copied from interface:ResultSetGets the fetch size (in number of rows) for thisResultSet.- Specified by:
getFetchSizein interfaceResultSet- Returns:
- the fetch size as an int
- Throws:
SQLException- if a database error happens.
-
getString
Description copied from interface:ResultSetGets the value of a column specified by column index as a String.- Specified by:
getStringin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- the String representing the value of the column,
nullif the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getString
Description copied from interface:ResultSetGets the value of a column specified by column name, as a String.- Specified by:
getStringin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- the String representing the value of the column,
nullif the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getInt
Description copied from interface:ResultSetGets the value of a column specified by column index as anintvalue.- Specified by:
getIntin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- an
intequal to the column value.0if the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getInt
Description copied from interface:ResultSetGets the value of a column specified by column name, as anintvalue.- Specified by:
getIntin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- an
intequal to the column value.0if the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getBoolean
Description copied from interface:ResultSetGets the value of a column specified by column index as aboolean.- Specified by:
getBooleanin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
booleanvalue from the column. If the column is SQLNULL,falseis returned. - Throws:
SQLException- if a database error happens.
-
getBoolean
Description copied from interface:ResultSetGets the value of a column specified by column name, as aboolean.- Specified by:
getBooleanin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
booleanvalue from the column. If the column is SQLNULL,falseis returned. - Throws:
SQLException- if a database error happens.
-
getMetaData
Description copied from interface:ResultSetGets the metadata for thisResultSet. This defines the number, types and properties of the columns in theResultSet.- Specified by:
getMetaDatain interfaceResultSet- Returns:
- a
ResultSetMetaDataobject with information about thisResultSet. - Throws:
SQLException- if a database error happens.
-
getShort
Description copied from interface:ResultSetGets the value of a column specified by column index as a short value.- Specified by:
getShortin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a short value equal to the value of the column.
0if the value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getShort
Description copied from interface:ResultSetGets the value of a column specified by column name, as a short value.- Specified by:
getShortin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a short value equal to the value of the column.
0if the value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getTime
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.sql.Timevalue.- Specified by:
getTimein interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a Time representing the column value,
nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getTime
Description copied from interface:ResultSetGets the value of a column specified by column name, as ajava.sql.Timevalue.- Specified by:
getTimein interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- the column value,
nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getTime
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.sql.Timevalue. The suppliedCalendaris used to map the SQLTimevalue to a Java Time value.- Specified by:
getTimein interfaceResultSet- Parameters:
columnIndex- the index of the column to read.cal- aCalendarto use in creating the Java Time value.- Returns:
- a Time representing the column value,
nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getTime
Description copied from interface:ResultSetGets the value of a column specified by column index, as ajava.sql.Timevalue. The suppliedCalendaris used to map the SQLTimevalue to a Java Time value.- Specified by:
getTimein interfaceResultSet- Parameters:
columnName- the name of the column to read.cal- aCalendarto use in creating the Java time value.- Returns:
- a Time representing the column value,
nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getTimestamp
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.sql.Timestampvalue.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a timestamp representing the column value,
nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getTimestamp
Description copied from interface:ResultSetGets the value of a column specified by column name, as ajava.sql.Timestampvalue.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a timestamp representing the column value,
nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getTimestamp
Description copied from interface:ResultSetGets the value of a column specified by column index, as ajava.sql.Timestampvalue. The supplied Calendar is used when mapping the SQLTimestampvalue to a JavaTimestampvalue.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.cal- Calendar to use in creating the Java timestamp value.- Returns:
- a timestamp representing the column value,
nullif the column value is SQL NULL. - Throws:
SQLException- if a database error happens.
-
getTimestamp
Description copied from interface:ResultSetGets the value of a column specified by column name, as ajava.sql.Timestampvalue. The supplied Calendar is used when mapping the SQLTimestampvalue to a JavaTimestampvalue.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnName- the name of the column to read.cal- Calendar to use in creating the JavaTimestampvalue.- Returns:
- a timestamp representing the column value,
nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getDate
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.sql.Date.- Specified by:
getDatein interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
java.sql.Datematching the column value.nullif the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getDate
Description copied from interface:ResultSetGets the value of a column specified by column name as ajava.sql.Date.- Specified by:
getDatein interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
java.sql.Datematching the column value.nullif the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getDate
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.sql.Date. This method uses a supplied calendar to compute the Date.- Specified by:
getDatein interfaceResultSet- Parameters:
columnIndex- the index of the column to read.cal- ajava.util.Calendarto use in constructing the Date.- Returns:
- a
java.sql.Datematching the column value.nullif the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getDate
Description copied from interface:ResultSetGets the value of a column specified by column name, as ajava.sql.Dateobject.- Specified by:
getDatein interfaceResultSet- Parameters:
columnName- the name of the column to read.cal-java.util.Calendarto use in constructing the Date.- Returns:
- a
java.sql.Datematching the column value.nullif the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getDouble
Description copied from interface:ResultSetGets the value of a column specified by column index as adoublevalue.- Specified by:
getDoublein interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
doubleequal to the column value.0.0if the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getDouble
Description copied from interface:ResultSetGets the value of a column specified by column name as adoublevalue.- Specified by:
getDoublein interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
doubleequal to the column value.0.0if the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getFloat
Description copied from interface:ResultSetGets the value of a column specified by column index as afloatvalue.- Specified by:
getFloatin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
floatequal to the column value.0.0if the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getFloat
Description copied from interface:ResultSetGets the value of a column specified by column name as afloatvalue.- Specified by:
getFloatin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
floatequal to the column value.0.0if the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getLong
Description copied from interface:ResultSetGets the value of a column specified by column index as alongvalue.- Specified by:
getLongin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
longequal to the column value.0if the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getLong
Description copied from interface:ResultSetGets the value of a column specified by column name, as alongvalue.- Specified by:
getLongin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
longequal to the column value.0if the column is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getUnicodeStream
Deprecated.Description copied from interface:ResultSetGets the value of the column as anInputStreamof unicode characters.- Specified by:
getUnicodeStreamin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- an
InputStreamholding the value of the column.nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getUnicodeStream
Deprecated.Description copied from interface:ResultSetGets the value of the column as anInputStreamof Unicode characters.- Specified by:
getUnicodeStreamin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- an
InputStreamholding the value of the column.nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getAsciiStream
Description copied from interface:ResultSetGets the value of a column specified by column name as an ASCII character stream.- Specified by:
getAsciiStreamin interfaceResultSet- Parameters:
columnName- the name of the column to read- Returns:
- an
InputStreamwith the data from the column. - Throws:
SQLException- if a database error happens.
-
getAsciiStream
Description copied from interface:ResultSetGets the value of a column specified by column index as an ASCII character stream.- Specified by:
getAsciiStreamin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- an
InputStreamwith the data from the column. - Throws:
SQLException- if a database error happens.
-
getBigDecimal
Description copied from interface:ResultSetGets the value of a column specified by column name, as ajava.math.BigDecimal.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a BigDecimal with value of the column.
- Throws:
SQLException- if a database error happens.
-
getBigDecimal
Deprecated.Description copied from interface:ResultSetGets the value of a column specified by column name, as ajava.math.BigDecimal.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnName- the name of the column to read.scale- the number of digits after the decimal point- Returns:
- a BigDecimal with value of the column.
- Throws:
SQLException- if a database error happens.
-
getBigDecimal
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.math.BigDecimal.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
BigDecimalwith the value of the column. - Throws:
SQLException- if a database error happens.
-
getBigDecimal
Deprecated.Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.math.BigDecimal.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.scale- the number of digits after the decimal point- Returns:
- a
BigDecimalwith the value of the column. - Throws:
SQLException- if a database error happens.
-
getBinaryStream
Description copied from interface:ResultSetGets the value of a column specified by column index as a binary stream.This method can be used to read
LONGVARBINARYvalues. All of the data in theInputStreamshould be read before getting data from any other column. A further call to a getter method will implicitly close theInputStream.- Specified by:
getBinaryStreamin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- an
InputStreamwith the data from the column. If the column value is SQLNULL,nullis returned. - Throws:
SQLException- if a database error happens.
-
getBinaryStream
Description copied from interface:ResultSetGets the value of a column specified by column name as a binary stream.This method can be used to read
LONGVARBINARYvalues. All of the data in theInputStreamshould be read before getting data from any other column. A further call to a getter method will implicitly close theInputStream.- Specified by:
getBinaryStreamin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- an
InputStreamwith the data from the column if the column value is SQLNULL,nullis returned. - Throws:
SQLException- if a database error happens.
-
getByte
Description copied from interface:ResultSetGets the value of a column specified by column index as abyte.- Specified by:
getBytein interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
byteequal to the value of the column. 0 if the value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getByte
Description copied from interface:ResultSetGets the value of a column specified by column name as abyte.- Specified by:
getBytein interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
byteequal to the value of the column. 0 if the value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getBytes
Description copied from interface:ResultSetGets the value of a column specified by column index as a byte array.- Specified by:
getBytesin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a byte array containing the value of the column.
nullif the column contains SQLNULL. - Throws:
SQLException- if a database error happens.
-
getBytes
Description copied from interface:ResultSetGets the value of a column specified by column name as a byte array.- Specified by:
getBytesin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a byte array containing the value of the column.
nullif the column contains SQLNULL. - Throws:
SQLException- if a database error happens.
-
getCursorName
Description copied from interface:ResultSetGets the name of the SQL cursor of thisResultSet.- Specified by:
getCursorNamein interfaceResultSet- Returns:
- the SQL cursor name.
- Throws:
SQLException- if a database error happens.
-
getObject
Description copied from interface:ResultSetGets the value of a specified column as a JavaObject. 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())- Specified by:
getObjectin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- an
Objectcontaining the value of the column.nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getObject
Description copied from interface:ResultSetGets the value of a specified column as a JavaObject. 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())- Specified by:
getObjectin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- an
Objectcontaining the value of the column.nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getObject
Description copied from interface:ResultSetGets the value of a column specified by column index as a JavaObject.The type of the Java object will be determined by the supplied Map to perform the mapping of SQL
Structor Distinct types into Java objects.- Specified by:
getObjectin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.map- ajava.util.Mapcontaining a mapping from SQL Type names to Java classes.- Returns:
- an
Objectcontaining the value of the column.nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getObject
Description copied from interface:ResultSetGets the value of a column specified by column name as a JavaObject.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.
- Specified by:
getObjectin interfaceResultSet- Parameters:
columnName- the name of the column to read.map- ajava.util.Mapcontaining a mapping from SQL Type names to Java classes.- Returns:
- an
Objectcontaining the value of the column.nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getRef
Description copied from interface:ResultSetGets the value of a column specified by column index as a Javajava.sql.Ref.- Specified by:
getRefin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a Ref representing the value of the SQL REF in the column
- Throws:
SQLException- if a database error happens.
-
getRef
Description copied from interface:ResultSetGets the value of a column specified by column name as a Javajava.sql.Ref.- Specified by:
getRefin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a Ref representing the value of the SQL
REFin the column - Throws:
SQLException- if a database error happens.
-
getBlob
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.sql.Blobobject.- Specified by:
getBlobin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
java.sql.Blobwith the value of the column. - Throws:
SQLException- if a database error happens.
-
getBlob
Description copied from interface:ResultSetGets the value of a column specified by column name, as ajava.sql.Blobobject.- Specified by:
getBlobin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
java.sql.Blobwith the value of the column. - Throws:
SQLException- if a database error happens.
-
getClob
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.sql.Clob.- Specified by:
getClobin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
Clobobject representing the value in the column.nullif the value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getClob
Description copied from interface:ResultSetGets the value of a column specified by column name as ajava.sql.Clob.- Specified by:
getClobin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
Clobobject representing the value in the column.nullif the value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getArray
Description copied from interface:ResultSetGets the content of a column specified by column index in the current row of thisResultSetas ajava.sql.Array.- Specified by:
getArrayin interfaceResultSet- Parameters:
columnIndex- the index of the column to read- Returns:
- a
java.sql.Arraywith the data from the column. - Throws:
SQLException- if a database error happens.
-
getArray
Description copied from interface:ResultSetGets the value of a column specified by column name as ajava.sql.Array.- Specified by:
getArrayin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
java.sql.Arraywith the data from the specified column. - Throws:
SQLException- if a database error happens.
-
getCharacterStream
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.io.Readerobject.- Specified by:
getCharacterStreamin interfaceResultSet- Parameters:
columnIndex- the index of the column to read.- Returns:
- a
Readerholding the value of the column.nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.- See Also:
Reader
-
getCharacterStream
Description copied from interface:ResultSetGets the value of a column specified by column name as ajava.io.Readerobject.- Specified by:
getCharacterStreamin interfaceResultSet- Parameters:
columnName- the name of the column to read.- Returns:
- a
Readerholding the value of the column.nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getWarnings
Description copied from interface:ResultSetGets the first warning generated by calls on thisResultSet. Subsequent warnings on thisResultSetare 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 byResultSetmethod calls - warnings generated by Statement methods are held by the Statement.An
SQLExceptionis generated if this method is called on a closedResultSet.- Specified by:
getWarningsin interfaceResultSet- Returns:
- an SQLWarning which is the first warning for this
ResultSet.nullif there are no warnings. - Throws:
SQLException- if a database error happens.
-
wasNull
Description copied from interface:ResultSetDetermines whether the last column read from thisResultSetcontained SQLNULL.- Specified by:
wasNullin interfaceResultSet- Returns:
- {@code {@code true} if the last column contained SQL {@code NULL}, {@code false} otherwise @throws SQLException if a database error happens.
- Throws:
SQLException
-
clearWarnings
Description copied from interface:ResultSetClears all warnings related to thisResultSet.- Specified by:
clearWarningsin interfaceResultSet- Throws:
SQLException- if a database error happens.
-
isFirst
Description copied from interface:ResultSetGets if the cursor is on the first row of theResultSet.- Specified by:
isFirstin interfaceResultSet- Returns:
trueif the cursor is on the first row in theResultSet,falseif the cursor is at any other position in theResultSet.- Throws:
SQLException- if a database error happens.
-
isBeforeFirst
Description copied from interface:ResultSetGets if the cursor is before the first row of theResultSet.- Specified by:
isBeforeFirstin interfaceResultSet- Returns:
trueif the cursor is before the first row in theResultSet,falseif the cursor is at any other position in theResultSet.- Throws:
SQLException- if a database error happens.
-
beforeFirst
Description copied from interface:ResultSetMoves the cursor to the start of theResultSet, before the first row.- Specified by:
beforeFirstin interfaceResultSet- Throws:
SQLException- if a database error happens.
-
first
Description copied from interface:ResultSetShifts the cursor position to the first row in theResultSet.- Specified by:
firstin interfaceResultSet- Returns:
trueif the position is in a legitimate row,falseif theResultSetcontains no rows.- Throws:
SQLException- if a database error happens.
-
isAfterLast
Description copied from interface:ResultSetGets if the cursor is after the last row of theResultSet.- Specified by:
isAfterLastin interfaceResultSet- Returns:
trueif the cursor is after the last row in theResultSet,falseif the cursor is at any other position in theResultSet.- Throws:
SQLException- if a database error happens.
-
afterLast
Description copied from interface:ResultSetMoves the cursor to the end of theResultSet, after the last row.- Specified by:
afterLastin interfaceResultSet- Throws:
SQLException- if a database error happens.
-
isLast
Description copied from interface:ResultSetGets if the cursor is on the last row of theResultSet- Specified by:
isLastin interfaceResultSet- Returns:
trueif the cursor is on the last row in theResultSet,falseif the cursor is at any other position in theResultSet.- Throws:
SQLException- if a database error happens.
-
last
Description copied from interface:ResultSetShifts the cursor position to the last row of theResultSet.- Specified by:
lastin interfaceResultSet- Returns:
trueif the new position is in a legitimate row,falseif theResultSetcontains no rows.- Throws:
SQLException- if there is a database error.
-
getType
Description copied from interface:ResultSetGets the type of theResultSet.- Specified by:
getTypein interfaceResultSet- Returns:
- The
ResultSettype, one of:ResultSet.TYPE_FORWARD_ONLYResultSet.TYPE_SCROLL_INSENSITIVEResultSet.TYPE_SCROLL_SENSITIVE
- Throws:
SQLException- if there is a database error.
-
getConcurrency
Description copied from interface:ResultSetGets the concurrency mode of thisResultSet.- Specified by:
getConcurrencyin interfaceResultSet- Returns:
- the concurrency mode - one of:
ResultSet.CONCUR_READ_ONLY,ResultSet.CONCUR_UPDATABLE. - Throws:
SQLException- if a database error happens.
-
rowUpdated
Description copied from interface:ResultSetIndicates whether the current row has been updated. This method depends on whether the JDBC driver and database can detect updates.- Specified by:
rowUpdatedin interfaceResultSet- Returns:
trueif the current row has been updated and if updates can be detected,falseotherwise.- Throws:
SQLException- if a database error happens.
-
rowInserted
Description copied from interface:ResultSetIndicates whether the current row has had an insertion operation. This method depends on whether the JDBC driver and database can detect insertions.- Specified by:
rowInsertedin interfaceResultSet- Returns:
trueif a row has been inserted and if insertions are detected,falseotherwise.- Throws:
SQLException- if a database error happens.
-
rowDeleted
Description copied from interface:ResultSetIndicates whether a row has been deleted. This method depends on whether the JDBC driver and database can detect deletions.- Specified by:
rowDeletedin interfaceResultSet- Returns:
trueif a row has been deleted and if deletions are detected,falseotherwise.- Throws:
SQLException- if a database error happens.
-
insertRow
Description copied from interface:ResultSetInsert the insert row into theResultSetand into the underlying database. The cursor must be set to the Insert Row before this method is invoked.- Specified by:
insertRowin interfaceResultSet- Throws:
SQLException- 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.
-
updateRow
Description copied from interface:ResultSetUpdates the database with the new contents of the current row of thisResultSetobject.- Specified by:
updateRowin interfaceResultSet- Throws:
SQLException- if a database error happens.
-
deleteRow
Description copied from interface:ResultSetDeletes the current row from theResultSetand from the underlying database.- Specified by:
deleteRowin interfaceResultSet- Throws:
SQLException- if a database error happens.
-
refreshRow
Description copied from interface:ResultSetRefreshes 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
updateRowhas not been called, then the updates are lost when this method is called.- Specified by:
refreshRowin interfaceResultSet- Throws:
SQLException- if a database error happens., including if the current row is the Insert row.
-
cancelRowUpdates
Description copied from interface:ResultSetCancels any updates made to the current row in theResultSet.- Specified by:
cancelRowUpdatesin interfaceResultSet- Throws:
SQLException- if a database error happens.
-
moveToInsertRow
Description copied from interface:ResultSetMoves 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 callinginsertRowto insert the new row into the database.- Specified by:
moveToInsertRowin interfaceResultSet- Throws:
SQLException- if a database error happens.
-
moveToCurrentRow
Description copied from interface:ResultSetMoves the cursor to the remembered position, namely the row that was the current row before a call tomoveToInsertRow. This only applies if the cursor is on the Insert Row.- Specified by:
moveToCurrentRowin interfaceResultSet- Throws:
SQLException- if a database error happens.
-
updateNull
Description copied from interface:ResultSetUpdates a column specified by a column index with anullvalue.- Specified by:
updateNullin interfaceResultSet- Parameters:
colIndex- the index of the column to update.- Throws:
SQLException- if a database error happens.
-
updateBoolean
Description copied from interface:ResultSetUpdates a column specified by a column index with abooleanvalue.- Specified by:
updateBooleanin interfaceResultSet- Parameters:
colIndex- the index of the column to update.b- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateByte
Description copied from interface:ResultSetUpdates a column specified by a column index with abytevalue.- Specified by:
updateBytein interfaceResultSet- Parameters:
colIndex- the index of the column to update.b- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateShort
Description copied from interface:ResultSetUpdates a column specified by a column index with ashortvalue.- Specified by:
updateShortin interfaceResultSet- Parameters:
colIndex- the index of the column to update.b- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateInt
Description copied from interface:ResultSetUpdates a column specified by a column index with anintvalue.- Specified by:
updateIntin interfaceResultSet- Parameters:
colIndex- the index of the column to update.b- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateLong
Description copied from interface:ResultSetUpdates a column specified by a column index with alongvalue.- Specified by:
updateLongin interfaceResultSet- Parameters:
colIndex- the index of the column to update.b- the new value for the specified column..- Throws:
SQLException- if a database error happens.
-
updateFloat
Description copied from interface:ResultSetUpdates a column specified by a column index with afloatvalue.- Specified by:
updateFloatin interfaceResultSet- Parameters:
colIndex- the index of the column to update.f- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateDouble
Description copied from interface:ResultSetUpdates a column specified by a column index with adoublevalue.- Specified by:
updateDoublein interfaceResultSet- Parameters:
colIndex- the index of the column to update.f- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateBigDecimal
Description copied from interface:ResultSetUpdates a column specified by a column index with ajava.sql.BigDecimalvalue.- Specified by:
updateBigDecimalin interfaceResultSet- Parameters:
colIndex- the index of the column to update.f- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateString
Description copied from interface:ResultSetUpdates a column specified by a column index with aStringvalue.- Specified by:
updateStringin interfaceResultSet- Parameters:
colIndex- the index of the column to update.s- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateBytes
Description copied from interface:ResultSetUpdates a column specified by a column index with abytearray value.- Specified by:
updateBytesin interfaceResultSet- Parameters:
colIndex- the index of the column to update.s- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateDate
Description copied from interface:ResultSetUpdates a column specified by a column index with ajava.sql.Datevalue.- Specified by:
updateDatein interfaceResultSet- Parameters:
colIndex- the index of the column to update.d- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateTime
Description copied from interface:ResultSetUpdates a column specified by a column index with aTimevalue.- Specified by:
updateTimein interfaceResultSet- Parameters:
colIndex- the index of the column to update.t- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateTimestamp
Description copied from interface:ResultSetUpdates a column specified by a column index with aTimestampvalue.- Specified by:
updateTimestampin interfaceResultSet- Parameters:
colIndex- the index of the column to update.t- the new timestamp value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateAsciiStream
Description copied from interface:ResultSetUpdates a column specified by a column index with an ASCII stream value.- Specified by:
updateAsciiStreamin interfaceResultSet- Parameters:
colIndex- 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 stream- Throws:
SQLException- if a database error happens.
-
updateBinaryStream
Description copied from interface:ResultSetUpdates a column specified by a column index with a binary stream value.- Specified by:
updateBinaryStreamin interfaceResultSet- Parameters:
colIndex- 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.- Throws:
SQLException- if a database error happens.
-
updateCharacterStream
Description copied from interface:ResultSetUpdates a column specified by a column index with a character stream value.- Specified by:
updateCharacterStreamin interfaceResultSet- Parameters:
colIndex- the index of the column to update.in- the new value for the specified column.s- the length of data to write from the stream- Throws:
SQLException- if a database error happens.
-
updateObject
Description copied from interface:ResultSetUpdates a column specified by a column index with anObjectvalue.- Specified by:
updateObjectin interfaceResultSet- Parameters:
colIndex- the index of the column to update.obj- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateObject
Description copied from interface:ResultSetUpdates a column specified by a column index with anObjectvalue.- Specified by:
updateObjectin interfaceResultSet- Parameters:
colIndex- the index of the column to update.obj- the new value for the specified column.s- for the typesjava.sql.Types.DECIMALorjava.sql.Types.NUMERIC, this specifies the number of digits after the decimal point.- Throws:
SQLException- if a database error happens.
-
updateNull
Description copied from interface:ResultSetUpdates a column specified by a column name with anullvalue.- Specified by:
updateNullin interfaceResultSet- Parameters:
colName- the name of the column to update.- Throws:
SQLException- if a database error happens.
-
updateBoolean
Description copied from interface:ResultSetUpdates a column specified by a column name with abooleanvalue.- Specified by:
updateBooleanin interfaceResultSet- Parameters:
colName- the name of the column to update.b- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateByte
Description copied from interface:ResultSetUpdates a column specified by a column name with abytevalue.- Specified by:
updateBytein interfaceResultSet- Parameters:
colName- the name of the column to update.b- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateShort
Description copied from interface:ResultSetUpdates a column specified by a column name with ashortvalue.- Specified by:
updateShortin interfaceResultSet- Parameters:
colName- the name of the column to update.b- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateInt
Description copied from interface:ResultSetUpdates a column specified by a column name with anintvalue.- Specified by:
updateIntin interfaceResultSet- Parameters:
colName- the name of the column to update.b- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateLong
Description copied from interface:ResultSetUpdates a column specified by a column name with alongvalue.- Specified by:
updateLongin interfaceResultSet- Parameters:
colName- the name of the column to update.b- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateFloat
Description copied from interface:ResultSetUpdates a column specified by a column name with afloatvalue.- Specified by:
updateFloatin interfaceResultSet- Parameters:
colName- the name of the column to update.f- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateDouble
Description copied from interface:ResultSetUpdates a column specified by a column name with adoublevalue.- Specified by:
updateDoublein interfaceResultSet- Parameters:
colName- the name of the column to update.f- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateBigDecimal
Description copied from interface:ResultSetUpdates a column specified by a column name with ajava.sql.BigDecimalvalue.- Specified by:
updateBigDecimalin interfaceResultSet- Parameters:
colName- the name of the column to update.f- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateString
Description copied from interface:ResultSetUpdates a column specified by a column name with aStringvalue.- Specified by:
updateStringin interfaceResultSet- Parameters:
colName- the name of the column to update.s- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateBytes
Description copied from interface:ResultSetUpdates a column specified by a column name with a byte array value.- Specified by:
updateBytesin interfaceResultSet- Parameters:
colName- the name of the column to update.s- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateDate
Description copied from interface:ResultSetUpdates a column specified by a column name with ajava.sql.Datevalue.- Specified by:
updateDatein interfaceResultSet- Parameters:
colName- the name of the column to update.d- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateTime
Description copied from interface:ResultSetUpdates a column specified by a column name with aTimevalue.- Specified by:
updateTimein interfaceResultSet- Parameters:
colName- the name of the column to update.t- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateTimestamp
Description copied from interface:ResultSetUpdates a column specified by column name with aTimestampvalue.- Specified by:
updateTimestampin interfaceResultSet- Parameters:
colName- the name of the column to update.t- the new timestamp value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateAsciiStream
Description copied from interface:ResultSetUpdates a column specified by a column name with an Ascii stream value.- Specified by:
updateAsciiStreamin interfaceResultSet- Parameters:
colName- 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 stream- Throws:
SQLException- if a database error happens.
-
updateBinaryStream
Description copied from interface:ResultSetUpdates a column specified by a column name with a binary stream value.- Specified by:
updateBinaryStreamin interfaceResultSet- Parameters:
colName- 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.- Throws:
SQLException- if a database error happens.
-
updateCharacterStream
Description copied from interface:ResultSetUpdates a column specified by a column name with a character stream value.- Specified by:
updateCharacterStreamin interfaceResultSet- Parameters:
colName- the name of the column to update.in- the new value for the specified column.s- the length of data to write from the Reader- Throws:
SQLException- if a database error happens.
-
updateObject
Description copied from interface:ResultSetUpdates a column specified by a column name with anObjectvalue.- Specified by:
updateObjectin interfaceResultSet- Parameters:
colName- the name of the column to update.obj- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateObject
Description copied from interface:ResultSetUpdates a column specified by a column name with anObjectvalue.- Specified by:
updateObjectin interfaceResultSet- Parameters:
colName- the name of the column to update.obj- the new value for the specified column.s- for the typesjava.sql.Types.DECIMALorjava.sql.Types.NUMERIC, this specifies the number of digits after the decimal point.- Throws:
SQLException- if a database error happens.
-
getStatement
Description copied from interface:ResultSetGets the statement that produced thisResultSet. If theResultSetwas not created by a statement (i.e. because it was returned from one of theDatabaseMetaDatamethods),nullis returned.- Specified by:
getStatementin interfaceResultSet- Returns:
- the Statement which produced this
ResultSet, ornullif theResultSetwas not created by a Statement. - Throws:
SQLException- if a database error happens.
-
close
Description copied from interface:ResultSetReleases thisResultSet's database and JDBC resources. You are strongly advised to use this method rather than relying on the release being done when theResultSet's finalize method is called during garbage collection process. Note that theclose()method might take some time to complete since it is dependent on the behavior of the connection to the database and the database itself.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceResultSet- Throws:
SQLException- if a database error happens.
-
getURL
Description copied from interface:ResultSetGets the value of a column specified by column index as ajava.net.URL.- Specified by:
getURLin interfaceResultSet- Parameters:
colIndex- the index of the column to read.- Returns:
- a URL.
nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
getURL
Description copied from interface:ResultSetGets the value of a column specified by column name as ajava.net.URLobject.- Specified by:
getURLin interfaceResultSet- Parameters:
colName- the name of the column to read.- Returns:
- the column vaule as a URL.
nullif the column value is SQLNULL. - Throws:
SQLException- if a database error happens.
-
updateRef
Description copied from interface:ResultSetUpdates a column specified by a column index with ajava.sql.Refvalue.- Specified by:
updateRefin interfaceResultSet- Parameters:
colIndex- the index of the column to update.x- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateRef
Description copied from interface:ResultSetUpdates a column specified by a column name with ajava.sql.Refvalue.- Specified by:
updateRefin interfaceResultSet- Parameters:
colName- the name of the column to update.x- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateBlob
Description copied from interface:ResultSetUpdates a column specified by a column index with ajava.sql.Blobvalue.- Specified by:
updateBlobin interfaceResultSet- Parameters:
colIndex- the index of the column to update.x- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateBlob
Description copied from interface:ResultSetUpdates a column specified by a column name with ajava.sql.Blobvalue.- Specified by:
updateBlobin interfaceResultSet- Parameters:
colName- the name of the column to update.x- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateClob
Description copied from interface:ResultSetUpdates a column specified by a column index with ajava.sql.Clobvalue.- Specified by:
updateClobin interfaceResultSet- Parameters:
colIndex- the index of the column to update.x- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateClob
Description copied from interface:ResultSetUpdates a column specified by a column name with ajava.sql.Clobvalue.- Specified by:
updateClobin interfaceResultSet- Parameters:
colName- the name of the column to update.x- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateArray
Description copied from interface:ResultSetUpdates a column specified by a column index with ajava.sql.Arrayvalue.- Specified by:
updateArrayin interfaceResultSet- Parameters:
colIndex- the index of the column to update.x- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
updateArray
Description copied from interface:ResultSetUpdates a column specified by a column name with ajava.sql.Arrayvalue.- Specified by:
updateArrayin interfaceResultSet- Parameters:
colName- the name of the column to update.x- the new value for the specified column.- Throws:
SQLException- if a database error happens.
-
getRowId
Description copied from interface:ResultSetReturns aRowIdcorresponding to the SQL ROWID at the 1-basedcolumnIndex.- Specified by:
getRowIdin interfaceResultSet- Throws:
SQLException
-
getRowId
Description copied from interface:ResultSetReturns aRowIdcorresponding to the SQL ROWID at the named column.- Specified by:
getRowIdin interfaceResultSet- Throws:
SQLException
-
updateRowId
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateRowIdin interfaceResultSet- Throws:
SQLException
-
updateRowId
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateRowIdin interfaceResultSet- Throws:
SQLException
-
getHoldability
Description copied from interface:ResultSetReturns the holdability of this result set:ResultSet.HOLD_CURSORS_OVER_COMMITorResultSet.CLOSE_CURSORS_AT_COMMIT.- Specified by:
getHoldabilityin interfaceResultSet- Throws:
SQLException
-
isClosed
Description copied from interface:ResultSetReturns true if this result set has been closed, false otherwise.- Specified by:
isClosedin interfaceResultSet- Throws:
SQLException
-
updateNString
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNStringin interfaceResultSet- Throws:
SQLException
-
updateNString
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNStringin interfaceResultSet- Throws:
SQLException
-
updateNClob
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
getNClob
Description copied from interface:ResultSetReturns anNClobcorresponding to the value at the 1-basedcolumnIndex.- Specified by:
getNClobin interfaceResultSet- Throws:
SQLException
-
getNClob
Description copied from interface:ResultSetReturns anNClobcorresponding to the value in the named column.- Specified by:
getNClobin interfaceResultSet- Throws:
SQLException
-
getSQLXML
Description copied from interface:ResultSetReturns anSQLXMLcorresponding to the value at the 1-basedcolumnIndex.- Specified by:
getSQLXMLin interfaceResultSet- Throws:
SQLException
-
getSQLXML
Description copied from interface:ResultSetReturns anSQLXMLcorresponding to the value in the named column.- Specified by:
getSQLXMLin interfaceResultSet- Throws:
SQLException
-
updateSQLXML
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateSQLXMLin interfaceResultSet- Throws:
SQLException
-
updateSQLXML
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateSQLXMLin interfaceResultSet- Throws:
SQLException
-
getNString
Description copied from interface:ResultSetReturns aStringcorresponding to the value at the 1-basedcolumnIndex.- Specified by:
getNStringin interfaceResultSet- Throws:
SQLException
-
getNString
Description copied from interface:ResultSetReturns aStringcorresponding to the value in the named column.- Specified by:
getNStringin interfaceResultSet- Throws:
SQLException
-
getNCharacterStream
Description copied from interface:ResultSetReturns aReadercorresponding to the value at the 1-basedcolumnIndex.- Specified by:
getNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
getNCharacterStream
Description copied from interface:ResultSetReturns aReadercorresponding to the value in the named column.- Specified by:
getNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateBlob
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateClob
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateBlob
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateClob
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
Description copied from interface:ResultSetUpdates the value at the 1-basedcolumnIndex. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
Description copied from interface:ResultSetUpdates the value in the named column. The underlying database isn't changed until the next row update or insert operation.- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
unwrap
Description copied from interface:WrapperReturns an object that implements the given interface. If the caller is not a wrapper, a SQLException will be thrown.- Specified by:
unwrapin interfaceWrapper- Parameters:
iface- - the class that defines the interface- Returns:
- - an object that implements the interface
- Throws:
SQLException- - if there is no object implementing the specific interface
-
isWrapperFor
Description copied from interface:WrapperIf the caller is a wrapper of the class or implements the given interface, the methods return false and vice versa.- Specified by:
isWrapperForin interfaceWrapper- Parameters:
iface- - the class that defines the interface- Returns:
- - true if the instance implements the interface
- Throws:
SQLException- - when an error occurs when judges the object
-