Package nl.cwi.monetdb.jdbc
Class MonetResultSet
java.lang.Object
nl.cwi.monetdb.jdbc.MonetWrapper
nl.cwi.monetdb.jdbc.MonetResultSet
- All Implemented Interfaces:
AutoCloseable,ResultSet,Wrapper
public class MonetResultSet extends MonetWrapper implements ResultSet, AutoCloseable
A ResultSet suitable for the MonetDB database.
A table of data representing a database result set, which is usually
generated by executing a statement that queries the database.
A ResultSet object maintains a cursor pointing to its current row of data.
Initially the cursor is positioned before the first row. The next method
moves the cursor to the next row, and because it returns false when there
are no more rows in the ResultSet object, it can be used in a while loop to
iterate through the result set.
The current state of this ResultSet is that it supports positioning in the
result set, absolute and relative. A slight performance difference between
FORWARD_ONLY or result sets scrollable in both directions can be noticed as
for FORWARD_ONLY result sets the memory usage will be likely lower for large
result sets.
- Version:
- 0.8
- Author:
- Fabian Groffen, Martin van Dinther, Pedro Ferreira
-
Field Summary
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 -
Method Summary
Modifier and Type Method Description booleanabsolute(int row)Moves the cursor to the given row number in this ResultSet object.voidaddWarning(String reason, String sqlstate)Adds a warning to the pile of warnings this ResultSet object has.voidafterLast()Moves the cursor to the end of this ResultSet object, just after the last row.voidbeforeFirst()Moves the cursor to the front of this ResultSet object, just before the first row.voidcancelRowUpdates()voidclearWarnings()Clears all warnings reported for this ResultSet object.voidclose()Releases this ResultSet object's database (and JDBC) resources immediately instead of waiting for this to happen when it is automatically closed.voiddeleteRow()intfindColumn(String columnLabel)Maps the given ResultSet column name to its ResultSet column index.booleanfirst()Moves the cursor to the first row in this ResultSet object.ArraygetArray(int columnIndex)ArraygetArray(String columnLabel)InputStreamgetAsciiStream(int columnIndex)InputStreamgetAsciiStream(String columnLabel)BigDecimalgetBigDecimal(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.BigDecimalgetBigDecimal(int columnIndex, int scale)Deprecated.BigDecimalgetBigDecimal(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.BigDecimalgetBigDecimal(String columnLabel, int scale)Deprecated.InputStreamgetBinaryStream(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.InputStreamgetBinaryStream(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes.BlobgetBlob(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.BlobgetBlob(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.booleangetBoolean(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.booleangetBoolean(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.bytegetByte(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.bytegetByte(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.byte[]getBytes(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.byte[]getBytes(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language.ReadergetCharacterStream(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.ReadergetCharacterStream(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.ClobgetClob(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.ClobgetClob(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.intgetConcurrency()Retrieves the concurrency mode of this ResultSet object.StringgetCursorName()Retrieves the name of the SQL cursor used by this ResultSet object.DategetDate(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.DategetDate(int columnIndex, Calendar cal)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.DategetDate(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.DategetDate(String columnLabel, Calendar cal)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.doublegetDouble(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.doublegetDouble(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.intgetFetchDirection()Retrieves the fetch direction for this ResultSet object.intgetFetchSize()Retrieves the fetch size for this ResultSet object.floatgetFloat(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.floatgetFloat(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.intgetHoldability()Retrieves the holdability of this ResultSet object.intgetInt(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.intgetInt(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.longgetLong(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.longgetLong(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.ResultSetMetaDatagetMetaData()Retrieves the number, types and properties of this ResultSet object's columns.ReadergetNCharacterStream(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.ReadergetNCharacterStream(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.NClobgetNClob(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a NClob object in the Java programming language.NClobgetNClob(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a NClob object in the Java programming language.StringgetNString(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.StringgetNString(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.ObjectgetObject(int columnIndex)Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.<T> TgetObject(int columnIndex, Class<T> type)Retrieves the value of the designated column in the current row of this ResultSet object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.ObjectgetObject(int columnIndex, Map<String,Class<?>> map)Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.ObjectgetObject(String columnLabel)Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.<T> TgetObject(String columnLabel, Class<T> type)Retrieves the value of the designated column in the current row of this ResultSet object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported.ObjectgetObject(String columnLabel, Map<String,Class<?>> map)Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.RefgetRef(int columnIndex)RefgetRef(String columnLabel)intgetRow()Retrieves the current row number.RowIdgetRowId(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.RowId object in the Java programming language.RowIdgetRowId(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.RowId object in the Java programming language.shortgetShort(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.shortgetShort(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.SQLXMLgetSQLXML(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet as a java.sql.SQLXML object in the Java programming language.SQLXMLgetSQLXML(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet as a java.sql.SQLXML object in the Java programming language.StatementgetStatement()Retrieves the Statement object that produced this ResultSet object.StringgetString(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.StringgetString(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.TimegetTime(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.TimegetTime(int columnIndex, Calendar cal)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.TimegetTime(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.TimegetTime(String columnLabel, Calendar cal)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.TimestampgetTimestamp(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.TimestampgetTimestamp(int columnIndex, Calendar cal)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.TimestampgetTimestamp(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.TimestampgetTimestamp(String columnLabel, Calendar cal)Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.intgetType()Retrieves the type of this ResultSet object.InputStreamgetUnicodeStream(int columnIndex)Deprecated.InputStreamgetUnicodeStream(String columnLabel)Deprecated.URLgetURL(int columnIndex)Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.URLgetURL(String columnLabel)Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.SQLWarninggetWarnings()Retrieves the first warning reported by calls on this ResultSet object.voidinsertRow()booleanisAfterLast()Retrieves whether the cursor is after the last row in this ResultSet object.booleanisBeforeFirst()Retrieves whether the cursor is before the first row in this ResultSet object.booleanisClosed()Retrieves whether this ResultSet object has been closed.booleanisFirst()Retrieves whether the cursor is on the first row of this ResultSet object.booleanisLast()Retrieves whether the cursor is on the last row of this ResultSet object.booleanlast()Moves the cursor to the last row in this ResultSet object.voidmoveToCurrentRow()voidmoveToInsertRow()static SQLDataExceptionnewSQLInvalidColumnIndexException(int colIdx)Small helper method that formats the "Invalid Column Index number ..." message and creates a new SQLDataException object whose SQLState is set to "22010": invalid indicator parameter value.booleannext()Moves the cursor down one row from its current position.booleanprevious()Moves the cursor to the previous row in this ResultSet object.voidrefreshRow()booleanrelative(int rows)Moves the cursor a relative number of rows, either positive or negative.booleanrowDeleted()Retrieves whether a row has been deleted.booleanrowInserted()Retrieves whether the current row has had an insertion.booleanrowUpdated()Retrieves whether the current row has been updated.voidsetFetchDirection(int direction)Gives a hint as to the direction in which the rows in this ResultSet object will be processed.voidsetFetchSize(int rows)Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.voidupdateArray(int columnIndex, Array x)voidupdateArray(String columnLabel, Array x)voidupdateAsciiStream(int columnIndex, InputStream x)voidupdateAsciiStream(int columnIndex, InputStream x, int length)voidupdateAsciiStream(int columnIndex, InputStream x, long length)voidupdateAsciiStream(String columnLabel, InputStream x)voidupdateAsciiStream(String columnLabel, InputStream x, int length)voidupdateAsciiStream(String columnLabel, InputStream x, long length)voidupdateBigDecimal(int columnIndex, BigDecimal x)voidupdateBigDecimal(String columnLabel, BigDecimal x)voidupdateBinaryStream(int columnIndex, InputStream x)voidupdateBinaryStream(int columnIndex, InputStream x, int length)voidupdateBinaryStream(int columnIndex, InputStream x, long length)voidupdateBinaryStream(String columnLabel, InputStream x)voidupdateBinaryStream(String columnLabel, InputStream x, int length)voidupdateBinaryStream(String columnLabel, InputStream x, long length)voidupdateBlob(int columnIndex, InputStream s)voidupdateBlob(int columnIndex, InputStream s, long length)voidupdateBlob(int columnIndex, Blob x)voidupdateBlob(String columnLabel, InputStream s)voidupdateBlob(String columnLabel, InputStream s, long length)voidupdateBlob(String columnLabel, Blob x)voidupdateBoolean(int columnIndex, boolean x)voidupdateBoolean(String columnLabel, boolean x)voidupdateByte(int columnIndex, byte x)voidupdateByte(String columnLabel, byte x)voidupdateBytes(int columnIndex, byte[] x)voidupdateBytes(String columnLabel, byte[] x)voidupdateCharacterStream(int columnIndex, Reader x)voidupdateCharacterStream(int columnIndex, Reader x, int length)voidupdateCharacterStream(int columnIndex, Reader x, long length)voidupdateCharacterStream(String columnLabel, Reader reader)voidupdateCharacterStream(String columnLabel, Reader reader, int length)voidupdateCharacterStream(String columnLabel, Reader reader, long length)voidupdateClob(int columnIndex, Reader r)voidupdateClob(int columnIndex, Reader r, long length)voidupdateClob(int columnIndex, Clob x)voidupdateClob(String columnLabel, Reader r)voidupdateClob(String columnLabel, Reader r, long length)voidupdateClob(String columnLabel, Clob x)voidupdateDate(int columnIndex, Date x)voidupdateDate(String columnLabel, Date x)voidupdateDouble(int columnIndex, double x)voidupdateDouble(String columnLabel, double x)voidupdateFloat(int columnIndex, float x)voidupdateFloat(String columnLabel, float x)voidupdateInt(int columnIndex, int x)voidupdateInt(String columnLabel, int x)voidupdateLong(int columnIndex, long x)voidupdateLong(String columnLabel, long x)voidupdateNCharacterStream(int columnIndex, Reader x)voidupdateNCharacterStream(int columnIndex, Reader x, long length)voidupdateNCharacterStream(String columnLabel, Reader reader)voidupdateNCharacterStream(String columnLabel, Reader reader, long length)voidupdateNClob(int columnIndex, Reader r)voidupdateNClob(int columnIndex, Reader r, long length)voidupdateNClob(int columnIndex, NClob x)voidupdateNClob(String columnLabel, Reader r)voidupdateNClob(String columnLabel, Reader r, long length)voidupdateNClob(String columnLabel, NClob x)voidupdateNString(int columnIndex, String x)voidupdateNString(String columnLabel, String x)voidupdateNull(int columnIndex)voidupdateNull(String columnLabel)voidupdateObject(int columnIndex, Object x)voidupdateObject(int columnIndex, Object x, int scale)voidupdateObject(String columnLabel, Object x)voidupdateObject(String columnLabel, Object x, int scale)voidupdateRef(int columnIndex, Ref x)voidupdateRef(String columnLabel, Ref x)voidupdateRow()voidupdateRowId(int columnIndex, RowId x)voidupdateRowId(String columnLabel, RowId x)voidupdateShort(int columnIndex, short x)voidupdateShort(String columnLabel, short x)voidupdateSQLXML(int columnIndex, SQLXML x)voidupdateSQLXML(String columnLabel, SQLXML x)voidupdateString(int columnIndex, String x)voidupdateString(String columnLabel, String x)voidupdateTime(int columnIndex, Time x)voidupdateTime(String columnLabel, Time x)voidupdateTimestamp(int columnIndex, Timestamp x)voidupdateTimestamp(String columnLabel, Timestamp x)booleanwasNull()Reports whether the last column read had a value of SQL NULL.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.ResultSet
updateObject, updateObject, updateObject, updateObject
-
Method Details
-
absolute
Moves the cursor to the given row number in this ResultSet object. If the row number is positive, the cursor moves to the given row number with respect to the beginning of the result set. The first row is row 1, the second is row 2, and so on. If the given row number is negative, the cursor moves to an absolute row position with respect to the end of the result set. For example, calling the method absolute(-1) positions the cursor on the last row; calling the method absolute(-2) moves the cursor to the next-to-last row, and so on. An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before the first row or after the last row. Note: calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().- Specified by:
absolutein interfaceResultSet- Parameters:
row- the number of the row to which the cursor should move. A positive number indicates the row number counting from the beginning of the result set; a negative number indicates the row number counting from the end of the result set- Returns:
- true if the cursor is on the result set; false otherwise
- Throws:
SQLException- if a database access error occurs, or the result set type is TYPE_FORWARD_ONLY
-
afterLast
Moves the cursor to the end of this ResultSet object, just after the last row. This method has no effect if the result set contains no rows.- Specified by:
afterLastin interfaceResultSet- Throws:
SQLException- if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
-
beforeFirst
Moves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.- Specified by:
beforeFirstin interfaceResultSet- Throws:
SQLException- if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
-
clearWarnings
public void clearWarnings()Clears all warnings reported for this ResultSet object. After a call to this method, the method getWarnings returns null until a new warning is reported for this ResultSet object.- Specified by:
clearWarningsin interfaceResultSet
-
close
public void close()Releases this ResultSet object's database (and JDBC) resources immediately instead of waiting for this to happen when it is automatically closed.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceResultSet
-
findColumn
Maps the given ResultSet column name to its ResultSet column index. Column names supplied to getter methods are case insensitive. If a select list contains the same column more than once, the first instance of the column will be returned.- Specified by:
findColumnin interfaceResultSet- Parameters:
columnLabel- the name of the column- Returns:
- the column index of the given column name
- Throws:
SQLException- if the ResultSet object does not contain a column labeled columnLabel, a database access error occurs or this method is called on a closed result set
-
first
Moves the cursor to the first row in this ResultSet object.- Specified by:
firstin interfaceResultSet- Returns:
- true if the cursor is on a valid row; false if there are no rows in the result set
- Throws:
SQLException- - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
-
getArray
- Specified by:
getArrayin interfaceResultSet- Throws:
SQLException
-
getArray
- Specified by:
getArrayin interfaceResultSet- Throws:
SQLException
-
getAsciiStream
- Specified by:
getAsciiStreamin interfaceResultSet- Throws:
SQLException
-
getAsciiStream
- Specified by:
getAsciiStreamin interfaceResultSet- Throws:
SQLException
-
getUnicodeStream
Deprecated.- Specified by:
getUnicodeStreamin interfaceResultSet- Throws:
SQLException
-
getUnicodeStream
Deprecated.- Specified by:
getUnicodeStreamin interfaceResultSet- Throws:
SQLException
-
getBinaryStream
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values. Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method InputStream.available is called whether there is data available or not.- Specified by:
getBinaryStreamin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
-
getBinaryStream
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of uninterpreted bytes. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARBINARY values. Note: All the data in the returned stream must be read prior to getting the value of any other column. The next call to a getter method implicitly closes the stream. Also, a stream may return 0 when the method available is called whether there is data available or not.- Specified by:
getBinaryStreamin interfaceResultSet- Parameters:
columnLabel- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column- Returns:
- a Java input stream that delivers the database column value as a stream of uninterpreted bytes; if the value is SQL NULL, the result is null
- Throws:
SQLException- if the columnLabel is not valid; if a database access error occurs or this method is called on a closed result set
-
getCharacterStream
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.- Specified by:
getCharacterStreamin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getCharacterStream
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.- Specified by:
getCharacterStreamin interfaceResultSet- Parameters:
columnLabel- the name of the column- Returns:
- a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
- Throws:
SQLException- if a database access error occurs
-
getNCharacterStream
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object. It is intended for use when accessing NCHAR,NVARCHAR and LONGNVARCHAR columns.- Specified by:
getNCharacterStreamin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
- Throws:
SQLException- if a database access error occurs
-
getNCharacterStream
Retrieves the value of the designated column in the current row of this ResultSet object as a java.io.Reader object. It is intended for use when accessing NCHAR,NVARCHAR and LONGNVARCHAR columns.- Specified by:
getNCharacterStreamin interfaceResultSet- Parameters:
columnLabel- the name of the column- Returns:
- a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
- Throws:
SQLException- if a database access error occurs
-
getBlob
Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.- Specified by:
getBlobin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a Blob object representing the SQL BLOB value in the specified column
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getBlob
Retrieves the value of the designated column in the current row of this ResultSet object as a Blob object in the Java programming language.- Specified by:
getBlobin interfaceResultSet- Parameters:
columnLabel- the name of the column from which to retrieve the value- Returns:
- a Blob object representing the SQL BLOB value in the specified column
- Throws:
SQLException- if a database access error occurs
-
getClob
Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.- Specified by:
getClobin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a Clob object representing the SQL CLOB value in the specified column
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getClob
Retrieves the value of the designated column in the current row of this ResultSet object as a Clob object in the Java programming language.- Specified by:
getClobin interfaceResultSet- Parameters:
columnLabel- the name of the column from which to retrieve the value- Returns:
- a Clob object representing the SQL CLOB value in the specified column
- Throws:
SQLException- if a database access error occurs
-
getNClob
Retrieves the value of the designated column in the current row of this ResultSet object as a NClob object in the Java programming language.- Specified by:
getNClobin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a NClob object representing the SQL NCLOB value in the specified column
- Throws:
SQLException- if a database access error occursSQLFeatureNotSupportedException- the JDBC driver does not support this method
-
getNClob
Retrieves the value of the designated column in the current row of this ResultSet object as a NClob object in the Java programming language.- Specified by:
getNClobin interfaceResultSet- Parameters:
columnLabel- the name of the column from which to retrieve the value- Returns:
- a NClob object representing the SQL NCLOB value in the specified column
- Throws:
SQLException- if a database access error occursSQLFeatureNotSupportedException- the JDBC driver does not support this method
-
getBigDecimal
Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getBigDecimal
Deprecated.Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...scale- the number of digits to the right of the decimal point- Returns:
- the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getBigDecimal
Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
- Throws:
SQLException- if a database access error occurs
-
getBigDecimal
Deprecated.Retrieves the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.- Specified by:
getBigDecimalin interfaceResultSet- Parameters:
columnLabel- the SQL name of the columnscale- the number of digits to the right of the decimal point- Returns:
- the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
- Throws:
SQLException- if a database access error occurs
-
getBoolean
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.- Specified by:
getBooleanin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is false
- Throws:
SQLException- if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result set
-
getBoolean
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean in the Java programming language.- Specified by:
getBooleanin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is false
- Throws:
SQLException- if the ResultSet object does not contain columnLabel
-
getByte
Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.- Specified by:
getBytein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getByte
Retrieves the value of the designated column in the current row of this ResultSet object as a byte in the Java programming language.- Specified by:
getBytein interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if a database access error occurs
-
getBytes
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver.- Specified by:
getBytesin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getBytes
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array in the Java programming language. The bytes represent the raw values returned by the driver. NOTE: Since the mapi protocol is ASCII-based, this method only returns Java byte representations of Strings, which is nothing more than an encoding into a sequence of bytes using the platform's default charset.- Specified by:
getBytesin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getConcurrency
public int getConcurrency()Retrieves the concurrency mode of this ResultSet object. The concurrency used is determined by the Statement object that created the result set. NOTE: MonetDB only supports read-only result sets, and will always return ResultSet.CONCUR_READ_ONLY- Specified by:
getConcurrencyin interfaceResultSet- Returns:
- the concurrency type, either ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
-
getCursorName
Retrieves the name of the SQL cursor used by this ResultSet object. In SQL, a result table is retrieved through a cursor that is named. For MonetDB this is the header.id returned in a resultset header. The current row of a result set can be updated or deleted using a positioned update/delete statement that references the cursor name. To insure that the cursor has the proper isolation level to support update, the cursor's SELECT statement should be of the form SELECT FOR UPDATE. If FOR UPDATE is omitted, the positioned updates may fail. The JDBC API supports this SQL feature by providing the name of the SQL cursor used by a ResultSet object. The current row of a ResultSet object is also the current row of this SQL cursor. Note: If positioned update is not supported, a SQLException is thrown. MonetDB currently doesn't support updates, so the SQLException is thrown for now.- Specified by:
getCursorNamein interfaceResultSet- Returns:
- the SQL name for this ResultSet object's cursor
- Throws:
SQLException- if a database access error occurs
-
getDouble
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.- Specified by:
getDoublein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if there is no such column or this method is called on a closed result set
-
getDouble
Retrieves the value of the designated column in the current row of this ResultSet object as a double in the Java programming language.- Specified by:
getDoublein interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if the ResultSet object does not contain columnLabel
-
getHoldability
Retrieves the holdability of this ResultSet object.- Specified by:
getHoldabilityin interfaceResultSet- Returns:
- either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
- Throws:
SQLException- if a database access error occurs
-
getFetchDirection
public int getFetchDirection()Retrieves the fetch direction for this ResultSet object.- Specified by:
getFetchDirectionin interfaceResultSet- Returns:
- the current fetch direction for this ResultSet object
-
setFetchDirection
Gives a hint as to the direction in which the rows in this ResultSet object will be processed. The initial value is determined by the Statement object that produced this ResultSet object. The fetch direction may be changed at any time.- Specified by:
setFetchDirectionin interfaceResultSet- Parameters:
direction- - an int specifying the suggested fetch direction; one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, or ResultSet.FETCH_UNKNOWN- Throws:
SQLException
-
getFetchSize
Retrieves the fetch size for this ResultSet object.- Specified by:
getFetchSizein interfaceResultSet- Returns:
- the current fetch size for this ResultSet object
- Throws:
SQLException- if a database access error occurs
-
setFetchSize
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. In MonetDB, this is actually a no-op, because even before a MonetResultSet object is created, the fetch size is already determined in the MonetConnection.ResultSetResponse passed to its constructor. Since all data blocks for this whole result set are already allocated in MonetConnection.ResultSetResponse, it is too complicated and error-prone to still change the fetchSize here. If one really needs to overwrite the default fetchSize, please use MonetStatement.setFetchSize() instead.- Specified by:
setFetchSizein interfaceResultSet- Parameters:
rows- the number of rows to fetch- Throws:
SQLException- if the condition 0 <= rows is not satisfied
-
getFloat
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.- Specified by:
getFloatin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if there is no such column or this method is called on a closed result set
-
getFloat
Retrieves the value of the designated column in the current row of this ResultSet object as a float in the Java programming language.- Specified by:
getFloatin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if the ResultSet object does not contain columnLabel
-
getInt
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.- Specified by:
getIntin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if there is no such column or this method is called on a closed result set
-
getInt
Retrieves the value of the designated column in the current row of this ResultSet object as an int in the Java programming language.- Specified by:
getIntin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if the ResultSet object does not contain columnLabel
-
getLong
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.- Specified by:
getLongin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if there is no such column or this method is called on a closed result set
-
getLong
Retrieves the value of the designated column in the current row of this ResultSet object as a long in the Java programming language.- Specified by:
getLongin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if the ResultSet object does not contain columnLabel
-
getMetaData
Retrieves the number, types and properties of this ResultSet object's columns.- Specified by:
getMetaDatain interfaceResultSet- Returns:
- the description of this ResultSet object's columns
- Throws:
SQLException
-
getObject
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null. This method may also be used to read database-specific abstract data types. In the JDBC 2.0 API, the behavior of method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).- Specified by:
getObjectin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a java.lang.Object holding the column value or null
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getObject
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null. This method may also be used to read database-specific abstract data types. In the JDBC 2.0 API, the behavior of method getObject is extended to materialize data of SQL user-defined types. If Connection.getTypeMap does not throw a SQLFeatureNotSupportedException, then when a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getInternalConnection().getTypeMap()). If Connection.getTypeMap does throw a SQLFeatureNotSupportedException, then structured values are not supported, and distinct values are mapped to the default Java class as determined by the underlying SQL type of the DISTINCT type.- Specified by:
getObjectin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...map- a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language- Returns:
- an Object in the Java programming language representing the SQL value
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getObject
Retrieves the value of the designated column in the current row of this ResultSet object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported. If the conversion is not supported or null is specified for the type, a SQLException is thrown. At a minimum, an implementation must support the conversions defined in Appendix B, Table B-3 and conversion of appropriate user defined SQL types to a Java type which implements SQLData, or Struct. Additional conversions may be supported and are vendor defined.- Specified by:
getObjectin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...type- Class representing the Java data type to convert the designated column to- Returns:
- an instance of type holding the column value
- Throws:
SQLException- if conversion is not supported, type is null or another error occurs. The getCause() method of the exception may provide a more detailed exception, for example, if a conversion error occursSQLFeatureNotSupportedException- the JDBC driver does not support this method
-
getObject
Retrieves the value of the designated column in the current row of this ResultSet object and will convert from the SQL type of the column to the requested Java data type, if the conversion is supported. If the conversion is not supported or null is specified for the type, a SQLException is thrown.- Specified by:
getObjectin interfaceResultSet- Parameters:
columnLabel- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the columntype- Class representing the Java data type to convert the designated column to- Returns:
- an instance of type holding the column value
- Throws:
SQLException- if conversion is not supported, type is null or another error occurs. The getCause() method of the exception may provide a more detailed exception, for example, if a conversion error occursSQLFeatureNotSupportedException- the JDBC driver does not support this method
-
getObject
Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null. This method may also be used to read database-specific abstract data types.- Specified by:
getObjectin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- a java.lang.Object holding the column value
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getObject
Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null. This method uses the specified Map object for custom mapping if appropriate.- Specified by:
getObjectin interfaceResultSet- Parameters:
columnLabel- the name of the column from which to retrieve the valuemap- a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language- Returns:
- an Object representing the SQL value in the specified column
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
getRef
- Specified by:
getRefin interfaceResultSet- Throws:
SQLException
-
getRef
- Specified by:
getRefin interfaceResultSet- Throws:
SQLException
-
getRow
public int getRow()Retrieves the current row number. The first row is number 1, the second number 2, and so on. -
getRowId
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.RowId object in the Java programming language.- Specified by:
getRowIdin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if there is no such columnSQLFeatureNotSupportedException- the JDBC driver does not support this method
-
getRowId
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.RowId object in the Java programming language.- Specified by:
getRowIdin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if the ResultSet object does not contain columnLabelSQLFeatureNotSupportedException- the JDBC driver does not support this method
-
getShort
Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.- Specified by:
getShortin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if there is no such column or this method is called on a closed result set
-
getShort
Retrieves the value of the designated column in the current row of this ResultSet object as a short in the Java programming language.- Specified by:
getShortin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is 0
- Throws:
SQLException- if the ResultSet object does not contain columnLabel
-
getStatement
Retrieves the Statement object that produced this ResultSet object. If the result set was generated some other way, such as by a DatabaseMetaData method, this method may return null.- Specified by:
getStatementin interfaceResultSet- Returns:
- the Statement object that produced this ResultSet object or null if the result set was produced some other way
-
getString
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.- Specified by:
getStringin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if there is no such column or this method is called on a closed result set
-
getString
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language.- Specified by:
getStringin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if the ResultSet object does not contain columnLabel
-
getNString
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language. It is intended for use when accessing NCHAR,NVARCHAR and LONGNVARCHAR columns.- Specified by:
getNStringin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if there is no such column
-
getNString
Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language. It is intended for use when accessing NCHAR,NVARCHAR and LONGNVARCHAR columns.- Specified by:
getNStringin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if the ResultSet object does not contain columnLabel
-
getSQLXML
Retrieves the value of the designated column in the current row of this ResultSet as a java.sql.SQLXML object in the Java programming language.- Specified by:
getSQLXMLin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- a SQLXML object that maps an SQL XML value
- Throws:
SQLException- if a database access error occursSQLFeatureNotSupportedException- the JDBC driver does not support this method
-
getSQLXML
Retrieves the value of the designated column in the current row of this ResultSet as a java.sql.SQLXML object in the Java programming language.- Specified by:
getSQLXMLin interfaceResultSet- Parameters:
columnLabel- the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column- Returns:
- a SQLXML object that maps an SQL XML value
- Throws:
SQLException- if a database access error occursSQLFeatureNotSupportedException- the JDBC driver does not support this method
-
getDate
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.- Specified by:
getDatein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs- See Also:
getDate(int col, Calendar cal)
-
getDate
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.- Specified by:
getDatein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...cal- the java.util.Calendar object to use in constructing the date- Returns:
- the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getDate
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language.- Specified by:
getDatein interfaceResultSet- Parameters:
columnLabel- the SQL name of the column from which to retrieve the value- Returns:
- the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getDate
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Date object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the date if the underlying database does not store timezone information.- Specified by:
getDatein interfaceResultSet- Parameters:
columnLabel- the SQL name of the column from which to retrieve the valuecal- the java.util.Calendar object to use in constructing the date- Returns:
- the column value as a java.sql.Date object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getTime
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.- Specified by:
getTimein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getTime
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.- Specified by:
getTimein interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...cal- the java.util.Calendar object to use in constructing the timestamp- Returns:
- the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getTime
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language.- Specified by:
getTimein interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getTime
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Time object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone information.- Specified by:
getTimein interfaceResultSet- Parameters:
columnLabel- the SQL name of the columncal- the java.util.Calendar object to use in constructing the timestamp- Returns:
- the column value as a java.sql.Time object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getTimestamp
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...- Returns:
- the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getTimestamp
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnIndex- the first column is 1, the second is 2, ...cal- the java.util.Calendar object to use in constructing the timestamp- Returns:
- the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getTimestamp
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getTimestamp
Retrieves the value of the designated column in the current row of this ResultSet object as a java.sql.Timestamp object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the timestamp if the underlying database does not store timezone information.- Specified by:
getTimestampin interfaceResultSet- Parameters:
columnLabel- the SQL name of the columncal- the java.util.Calendar object to use in constructing the timestamp- Returns:
- the column value as a java.sql.Timestamp object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs
-
getType
public int getType()Retrieves the type of this ResultSet object. The type is determined by the Statement object that created the result set. -
getURL
Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.- Specified by:
getURLin interfaceResultSet- Parameters:
columnIndex- the index of the column 1 is the first, 2 is the second,...- Returns:
- the column value as a java.net.URL object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs, or if a URL is malformed
-
getURL
Retrieves the value of the designated column in the current row of this ResultSet object as a java.net.URL object in the Java programming language.- Specified by:
getURLin interfaceResultSet- Parameters:
columnLabel- the SQL name of the column- Returns:
- the column value as a java.net.URL object; if the value is SQL NULL, the value returned is null
- Throws:
SQLException- if a database access error occurs, or if a URL is malformed
-
getWarnings
Retrieves the first warning reported by calls on this ResultSet object. If there is more than one warning, subsequent warnings will be chained to the first one and can be retrieved by calling the method SQLWarning.getNextWarning on the warning that was retrieved previously. This method may not be called on a closed result set; doing so will cause an SQLException to be thrown. Note: Subsequent warnings will be chained to this SQLWarning.- Specified by:
getWarningsin interfaceResultSet- Returns:
- the first SQLWarning object or null if there are none
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
isAfterLast
Retrieves whether the cursor is after the last row in this ResultSet object.- Specified by:
isAfterLastin interfaceResultSet- Returns:
- true if the cursor is after the last row; false if the cursor is at any other position or the result set contains no rows
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
isBeforeFirst
Retrieves whether the cursor is before the first row in this ResultSet object.- Specified by:
isBeforeFirstin interfaceResultSet- Returns:
- true if the cursor is before the first row; false if the cursor is at any other position or the result set contains no rows
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
isClosed
Retrieves whether this ResultSet object has been closed. A ResultSet is closed if the method close has been called on it, or if it is automatically closed.- Specified by:
isClosedin interfaceResultSet- Returns:
- true if this ResultSet object is closed; false if it is still open
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
isFirst
Retrieves whether the cursor is on the first row of this ResultSet object.- Specified by:
isFirstin interfaceResultSet- Returns:
- true if the cursor is on the first row; false otherwise
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
isLast
Retrieves whether the cursor is on the last row of this ResultSet object.- Specified by:
isLastin interfaceResultSet- Returns:
- true if the cursor is on the last row; false otherwise
- Throws:
SQLException- if a database access error occurs or this method is called on a closed result set
-
last
Moves the cursor to the last row in this ResultSet object.- Specified by:
lastin interfaceResultSet- Returns:
- true if the cursor is on a valid row; false if there are no rows in the result set
- Throws:
SQLException- if a database access error occurs or the result set type is TYPE_FORWARD_ONLYSQLException- if a database access error occurs or this method is called on a closed result set
-
next
Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on. If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read.- Specified by:
nextin interfaceResultSet- Returns:
- true if the new current row is valid; false if there are no more rows
- Throws:
SQLException- if a database access error occurs or ResultSet is closed
-
previous
Moves the cursor to the previous row in this ResultSet object.- Specified by:
previousin interfaceResultSet- Returns:
- true if the cursor is on a valid row; false if it is off the result set
- Throws:
SQLException- if a database access error occurs or ResultSet is closed or the result set type is TYPE_FORWARD_ONLY
-
relative
Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position. Note: Calling the method relative(1) is identical to calling the method next() and calling the method relative(-1) is identical to calling the method previous().- Specified by:
relativein interfaceResultSet- Parameters:
rows- an int specifying the number of rows to move from the current row; a positive number moves the cursor forward; a negative number moves the cursor backward- Returns:
- true if the cursor is on a row; false otherwise
- Throws:
SQLException- if a database access error occurs, there is no current row, or the result set type is TYPE_FORWARD_ONLY
-
rowDeleted
Retrieves whether a row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not this ResultSet object can detect deletions. Note: Support for the rowDeleted method is optional with a result set concurrency of CONCUR_READ_ONLY Returns: true if the current row is detected to have been deleted by the owner or another; false otherwise Throws: SQLException - if a database access error occurs or this method is called on a closed result set Since: 1.2 See Also: DatabaseMetaData.deletesAreDetected(int)- Specified by:
rowDeletedin interfaceResultSet- Throws:
SQLException
-
rowInserted
Retrieves whether the current row has had an insertion. The value returned depends on whether or not this ResultSet object can detect visible inserts. Note: Support for the rowInserted method is optional with a result set concurrency of CONCUR_READ_ONLY Returns: true if the current row is detected to have been inserted; false otherwise Throws: SQLException - if a database access error occurs or this method is called on a closed result set Since: 1.2 See Also: DatabaseMetaData.insertsAreDetected(int)- Specified by:
rowInsertedin interfaceResultSet- Throws:
SQLException
-
rowUpdated
Retrieves whether the current row has been updated. The value returned depends on whether or not the result set can detect updates. Note: Support for the rowUpdated method is optional with a result set concurrency of CONCUR_READ_ONLY Returns: true if the current row is detected to have been visibly updated by the owner or another; false otherwise Throws: SQLException - if a database access error occurs or this method is called on a closed result set Since: 1.2 See Also: DatabaseMetaData.updatesAreDetected(int)- Specified by:
rowUpdatedin interfaceResultSet- Throws:
SQLException
-
cancelRowUpdates
- Specified by:
cancelRowUpdatesin interfaceResultSet- Throws:
SQLException
-
deleteRow
- Specified by:
deleteRowin interfaceResultSet- Throws:
SQLException
-
insertRow
- Specified by:
insertRowin interfaceResultSet- Throws:
SQLException
-
moveToCurrentRow
- Specified by:
moveToCurrentRowin interfaceResultSet- Throws:
SQLException
-
moveToInsertRow
- Specified by:
moveToInsertRowin interfaceResultSet- Throws:
SQLException
-
refreshRow
- Specified by:
refreshRowin interfaceResultSet- Throws:
SQLException
-
updateArray
- Specified by:
updateArrayin interfaceResultSet- Throws:
SQLException
-
updateArray
- Specified by:
updateArrayin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateAsciiStream
- Specified by:
updateAsciiStreamin interfaceResultSet- Throws:
SQLException
-
updateBigDecimal
- Specified by:
updateBigDecimalin interfaceResultSet- Throws:
SQLException
-
updateBigDecimal
- Specified by:
updateBigDecimalin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBinaryStream
- Specified by:
updateBinaryStreamin interfaceResultSet- Throws:
SQLException
-
updateBlob
- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBlob
- Specified by:
updateBlobin interfaceResultSet- Throws:
SQLException
-
updateBoolean
- Specified by:
updateBooleanin interfaceResultSet- Throws:
SQLException
-
updateBoolean
- Specified by:
updateBooleanin interfaceResultSet- Throws:
SQLException
-
updateByte
- Specified by:
updateBytein interfaceResultSet- Throws:
SQLException
-
updateByte
- Specified by:
updateBytein interfaceResultSet- Throws:
SQLException
-
updateBytes
- Specified by:
updateBytesin interfaceResultSet- Throws:
SQLException
-
updateBytes
- Specified by:
updateBytesin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
public void updateCharacterStream(String columnLabel, Reader reader, int length) throws SQLException- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateCharacterStream
public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException- Specified by:
updateCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateNCharacterStream
public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException- Specified by:
updateNCharacterStreamin interfaceResultSet- Throws:
SQLException
-
updateClob
- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateClob
- Specified by:
updateClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateNClob
- Specified by:
updateNClobin interfaceResultSet- Throws:
SQLException
-
updateDate
- Specified by:
updateDatein interfaceResultSet- Throws:
SQLException
-
updateDate
- Specified by:
updateDatein interfaceResultSet- Throws:
SQLException
-
updateDouble
- Specified by:
updateDoublein interfaceResultSet- Throws:
SQLException
-
updateDouble
- Specified by:
updateDoublein interfaceResultSet- Throws:
SQLException
-
updateFloat
- Specified by:
updateFloatin interfaceResultSet- Throws:
SQLException
-
updateFloat
- Specified by:
updateFloatin interfaceResultSet- Throws:
SQLException
-
updateInt
- Specified by:
updateIntin interfaceResultSet- Throws:
SQLException
-
updateInt
- Specified by:
updateIntin interfaceResultSet- Throws:
SQLException
-
updateLong
- Specified by:
updateLongin interfaceResultSet- Throws:
SQLException
-
updateLong
- Specified by:
updateLongin interfaceResultSet- Throws:
SQLException
-
updateNull
- Specified by:
updateNullin interfaceResultSet- Throws:
SQLException
-
updateNull
- Specified by:
updateNullin interfaceResultSet- Throws:
SQLException
-
updateObject
- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateObject
- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateObject
- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateObject
- Specified by:
updateObjectin interfaceResultSet- Throws:
SQLException
-
updateRef
- Specified by:
updateRefin interfaceResultSet- Throws:
SQLException
-
updateRef
- Specified by:
updateRefin interfaceResultSet- Throws:
SQLException
-
updateRow
- Specified by:
updateRowin interfaceResultSet- Throws:
SQLException
-
updateRowId
- Specified by:
updateRowIdin interfaceResultSet- Throws:
SQLException
-
updateRowId
- Specified by:
updateRowIdin interfaceResultSet- Throws:
SQLException
-
updateShort
- Specified by:
updateShortin interfaceResultSet- Throws:
SQLException
-
updateShort
- Specified by:
updateShortin interfaceResultSet- Throws:
SQLException
-
updateString
- Specified by:
updateStringin interfaceResultSet- Throws:
SQLException
-
updateString
- Specified by:
updateStringin interfaceResultSet- Throws:
SQLException
-
updateNString
- Specified by:
updateNStringin interfaceResultSet- Throws:
SQLException
-
updateNString
- Specified by:
updateNStringin interfaceResultSet- Throws:
SQLException
-
updateSQLXML
- Specified by:
updateSQLXMLin interfaceResultSet- Throws:
SQLException
-
updateSQLXML
- Specified by:
updateSQLXMLin interfaceResultSet- Throws:
SQLException
-
updateTime
- Specified by:
updateTimein interfaceResultSet- Throws:
SQLException
-
updateTime
- Specified by:
updateTimein interfaceResultSet- Throws:
SQLException
-
updateTimestamp
- Specified by:
updateTimestampin interfaceResultSet- Throws:
SQLException
-
updateTimestamp
- Specified by:
updateTimestampin interfaceResultSet- Throws:
SQLException
-
wasNull
public boolean wasNull()Reports whether the last column read had a value of SQL NULL. Note that you must first call one of the getter methods on a column to try to read its value and then call the method wasNull to see if the value read was SQL NULL. -
addWarning
Adds a warning to the pile of warnings this ResultSet object has. If there were no warnings (or clearWarnings was called) this warning will be the first, otherwise this warning will get appended to the current warning.- Parameters:
reason- the warning message
-
newSQLInvalidColumnIndexException
Small helper method that formats the "Invalid Column Index number ..." message and creates a new SQLDataException object whose SQLState is set to "22010": invalid indicator parameter value.- Parameters:
colIdx- the column index number- Returns:
- a new created SQLDataException object with SQLState 22010
-