    All Packages    This Package  Previous  Next

# Interface sqlj.runtime.profile.RTResultSet

public interface interface RTResultSet

This interface defines the operations used for accessing result set data produced by the execution of a SQL query described by a profile entry. It is based strongly on the JDBC ResultSet interface, and can be implemented using a JDBC result set. In general, any method with the same name as one of those in the JDBC ResultSet interface is intended to have the same semantic behavior. Methods with new names are intended to have new behavior. Note, however, that all new methods can be implemented in terms of calls to other methods in the JDBC ResultSet interface. The primary difference between this interface and the JDBC ResultSet interfaces is the addition of getter methods that throw exceptions on fetch of null primitives, and the omission of named getters and result set meta data.

By partitioning new methods into a different namespace, it is possible for a JDBC driver to implement both the JDBC ResultSet interface and this interface, allowing more efficient runtime performance in both the dynamic and static case.

The following tables describe the differences between the methods of the JDBC ResultSet interface and the methods of this interface.

Methods kept from java.sql.ResultSet
next() |
close() |
getBytes(int) |
getCursorName() |
getDate(int) |
getTime(int) |
getTimestamp(int) |
getString(int) |
findColumn() |

Methods not included from java.sql.ResultSet
Method Removed | Replacement Method
--- | ---
getMetaData() |
getWarnings() |
clearWarnings() |
getBoolean(int) getBoolean(String) | getBooleanNoNull(int)
getByte(int) getByte(String) | getByteNoNull(int)
getShort(int) getShort(String) | getShortNoNull(int)
getInt(int) getInt(String) | getIntNoNull(int)
getLong(int) getLong(String) | getLongNoNull(int)
getFloat(int) getFloat(String) | getFloatNoNull(int)
getDouble(int) getDouble(String) | getDoubleNoNull(int)
getObject(int) getObject(String) | getObject(int, Class)
wasNull(int) | getBooleanWrapper(int) getByteWrapper(int) getShortWrapper(int) getIntWrapper(int) getLongWrapper(int) getFloatWrapper(int) getDoubleWrapper(int)
getBigDecimal(int,int) getBigDecimal(String,int) | getBigDecimal(int)
getAsciiStream(int) getAsciiStream(String) | getAsciiStreamWrapper(int)
getBinaryStream(int) getBinaryStream(String) | getBinaryStreamWrapper(int)
getUnicodeStream(int) getUnicodeStream(String) | getUnicodeStreamWrapper(int)
getString(String) |
getBytes(String) |
getDate(String) |
getTime(String) |
getTimestamp(String) |

Additional methods unique to RTResultSet
| getJDBCResultSet()
| isValidRow()
| getColumnCount()
| isClosed()

Additional notes:

- The getXXX(String) methods were omitted because int-based column lookup is generally more efficient. Moreover, when columns must be looked by name, the `findColumn` method is used to find and cache the appropriate index before any getXXX calls are made.

##

close()
  The close method provides an immediate release of a ResultSet's database and runtime resources instead of waiting for this to happen when it is automatically garbage collected.
findColumn(String)
  Map a Resultset column name to a ResultSet column index.
getAsciiStreamWrapper(int)
  Get the value of a column in the current row as a sqlj.runtime.AsciiStream object.
getBigDecimal(int)
  Get the value of a column in the current row as a java.math.BigDecimal object.
getBinaryStreamWrapper(int)
  Get the value of a column in the current row as a sqlj.runtime.BinaryStream object.
getBooleanNoNull(int)
  Get the value of a column in the current row as a Java boolean.
getBooleanWrapper(int)
  Get the value of a column in the current row as a java.lang.Boolean object.
getByteNoNull(int)
  Get the value of a column in the current row as a Java byte.
getBytes(int)
  Get the value of a column in the current row as a Java byte[].
getByteWrapper(int)
  Get the value of a column in the current row as a java.lang.Byte object.
getColumnCount()
  Determine the number of columns in this result set.
getCursorName()
  Get the name of the SQL cursor used by this ResultSet.
getDate(int)
  Get the value of a column in the current row as a java.sql.Date object.
getDoubleNoNull(int)
  Get the value of a column in the current row as a Java double.
getDoubleWrapper(int)
  Get the value of a column in the current row as a java.lang.Double object.
getFloatNoNull(int)
  Get the value of a column in the current row as a Java float.
getFloatWrapper(int)
  Get the value of a column in the current row as a java.lang.Float object.
getIntNoNull(int)
  Get the value of a column in the current row as a Java int.
getIntWrapper(int)
  Get the value of a column in the current row as a java.lang.Integer object.
getJDBCResultSet()
  Returns the JDBC result set associated with this iterator.
getLongNoNull(int)
  Get the value of a column in the current row as a Java long.
getLongWrapper(int)
  Get the value of a column in the current row as a java.lang.Long object.
getObject(int, Class)
  Get the value of a column in the current row as a java.lang.Object.
getShortNoNull(int)
  Get the value of a column in the current row as a Java short.
getShortWrapper(int)
  Get the value of a column in the current row as a java.lang.Short object.
getString(int)
  Get the value of a column in the current row as a Java String.
getTime(int)
  Get the value of a column in the current row as a java.sql.Time object.
getTimestamp(int)
  Get the value of a column in the current row as a java.sql.Timestamp object.
getUnicodeStreamWrapper(int)
  Get the value of a column in the current row as a sqlj.runtime.UnicodeStream object.
isClosed()
  Tests to see if this result set is closed.
isValidRow()
  Returns true if the result set is currently positioned on a row, false otherwise.
next()
  A ResultSet is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc.

##

getJDBCResultSet

     public abstract ResultSet getJDBCResultSet() throws SQLException

  Returns the JDBC result set associated with this iterator. The result set produced must have normal JDBC functionality, as defined in the JDBC specification (in particular, SQL NULL values fetched with primitive accessor methods will not raise a SQLNullException). This method is provided to facilitate interoperablity with JDBC.

  Notes:

  - Support for this method is implementor defined and not part of Core SQLJ. An SQLException will be thrown if this method is not supported.
  - If an implementor supports this method, then any synchronization between the iterator and the produced result set is implementor defined.
  - For maximum portability this method should be invoked before the first `next` method invocation on the iterator. Once the result set has been produced, all operations to fetch data should be through the result set.

  Returns:
    a JDBC result set representing this object.
  Throws: SQLException
    if this object cannot be represented as a JDBC result set.

next

     public abstract boolean next() throws SQLException

  A ResultSet is initially positioned before its first row; the first call to next makes the first row the current row; the second call makes the second row the current row, etc.

  If an input stream from the previous row is open, it is implicitly closed.

  Returns:
    true if the new current row is valid; false if there are no more rows
  Throws: SQLException
    if a database-access error occurs.

getCursorName

     public abstract String getCursorName() throws SQLException

  Get the name of the SQL cursor used by this ResultSet.

  In SQL, a result table is retrieved through a cursor that is named. The current row of a result can be updated or deleted using a positioned update/delete statement that references the cursor name.

  JDBC drivers support this SQL feature by providing the name of the SQL cursor used by a ResultSet. The current row of a ResultSet is also the current row of this SQL cursor. This method is provided for interoperability with JDBC-based implementations.

  Note: If positioned update is not supported a SQLException is thrown

  Note: This method is called only if the profile entry for the statement which produced this result set has a role with value POSITIONED.

  Returns:
    the ResultSet's SQL cursor name
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getRole, POSITIONED

findColumn

     public abstract int findColumn(String columnName) throws SQLException

  Map a Resultset column name to a ResultSet column index. The index of the first column whose name is a case insensitive match of the passed columnName is returned. If no such column is found, an SQLException is raised.

  Note: This method is called iff the profile entry for the statement which produced this result set has a result set type with value NAMED_RESULT.

  Parameters:
    columnName - the name of the column
  Returns:
    the column index
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, NAMED_RESULT

getString

     public abstract String getString(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java String.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.String. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getBytes

     public abstract byte[] getBytes(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java byte[].

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=[byte. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getDate

     public abstract Date getDate(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.sql.Date object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.sql.Date. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getTime

     public abstract Time getTime(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.sql.Time object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.sql.Time. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getTimestamp

     public abstract Timestamp getTimestamp(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.sql.Timestamp object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.sql.Timestamp. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getBooleanWrapper

     public abstract Boolean getBooleanWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Boolean object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Boolean. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getByteWrapper

     public abstract Byte getByteWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Byte object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Byte. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getShortWrapper

     public abstract Short getShortWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Short object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Short. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getIntWrapper

     public abstract Integer getIntWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Integer object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Integer. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getLongWrapper

     public abstract Long getLongWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Long object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Long. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getFloatWrapper

     public abstract Float getFloatWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Float object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Float. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getDoubleWrapper

     public abstract Double getDoubleWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.lang.Double object.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.lang.Double. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getBooleanNoNull

     public abstract boolean getBooleanNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java boolean.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=boolean. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getByteNoNull

     public abstract byte getByteNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java byte.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=byte. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getShortNoNull

     public abstract short getShortNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java short.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=short. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getIntNoNull

     public abstract int getIntNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java int.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=int. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getLongNoNull

     public abstract long getLongNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java long.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=long. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getFloatNoNull

     public abstract float getFloatNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java float.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=float. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getDoubleNoNull

     public abstract double getDoubleNoNull(int columnIndex) throws SQLException

  Get the value of a column in the current row as a Java double.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=double. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value
  Throws: SQLNullException
    if the parameter to get has value SQL NULL.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getAsciiStreamWrapper

     public abstract AsciiStream getAsciiStreamWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a sqlj.runtime.AsciiStream object. A column value can be retrieved as a stream of ASCII characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The driver will do any necessary conversion from the database format into ASCII.

  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 get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=sqlj.runtime.AsciiStream. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  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 one byte ASCII characters. If the value is SQL NULL then the result is null.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getUnicodeStreamWrapper

     public abstract UnicodeStream getUnicodeStreamWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a sqlj.runtime.UnicodeStream object. A column value can be retrieved as a stream of UNICODE characters and then read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values. The driver will do any necessary conversion from the database format into UNICODE.

  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 get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=sqlj.runtime.UnicodeStream. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  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 two byte UNICODE characters. If the value is SQL NULL then the result is null.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getBinaryStreamWrapper

     public abstract BinaryStream getBinaryStreamWrapper(int columnIndex) throws SQLException

  Get the value of a column in the current row as a sqlj.runtime.BinaryStream object. A column value can be retrieved as a stream of uninterpreted bytes and then 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 get method implicitly closes the stream. Also, a stream may return 0 for available() whether there is data available or not.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=sqlj.runtime.BinaryStream. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  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 byte binary characters. If the value is SQL NULL then the result is null.
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getObject

     public abstract Object getObject(int columnIndex,
                                      Class objectType) throws SQLException

  Get the value of a column in the current row as a java.lang.Object. This method is used to read datatabase-specific, abstract data types with type SQL OTHER.

  The static type of the java lvalue into which this parameter value is assigned is passed as "objectType". An exception is raised if the object returned is not assignable to an object with class "objectType".

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has SQLType=OTHER. In such cases, the javaTypeName indicates the expected Java Class of the object; the class cannot be handled by any other getXXX method defined by this statement. Accordingly, this method is used as the catch-all for any unrecognized types. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
    objectType - the class of the java lvalue into which this value will be assigned
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getBigDecimal

     public abstract BigDecimal getBigDecimal(int columnIndex) throws SQLException

  Get the value of a column in the current row as a java.math.BigDecimal object. Unike the corresponding JDBC method, this method does not take a scale parameter. The value returned uses the default scale for the given column in the database.

  Note: This method is used iff the result type info object for the current column in the profile entry for the statement which produced this result set has javaTypeName=java.math.BigDecimal. Note that if the entry's resultSetType is POSITIONED_RESULT, then the columnIndex can be used directly to find the result type info object. Otherwise, is the entry's resultSetType is NAMED_RESULT, the name of the current column must be used to find the result type info object with the same name.

  Parameters:
    columnIndex - the first column is 1, the second is 2, ...
  Returns:
    the column value; if the value is SQL NULL, the result is null
  Throws: SQLException
    if a database-access error occurs.
  See Also:
    getResultSetType, getResultSetInfo, getSQLType, getJavaTypeName

getColumnCount

     public abstract int getColumnCount() throws SQLException

  Determine the number of columns in this result set. This is used to verify that the number of columns in the result set match the number expected by a strongly typed iterator object.

  Note: This method can be implemented in JDBC using the `getColumnCount` method of a ResultSet's MetaData object.

  Returns:
    the number
  Throws: SQLException
    if a database-access error occurs.

isValidRow

     public abstract boolean isValidRow() throws SQLException

  Returns true if the result set is currently positioned on a row, false otherwise. In particular, false is returned if the result set is currently positioned before the first row, or after the last row.

  Returns:
    true iff the result set is positioned on a row.
  Throws: SQLException
    if a database-access error occurs.

isClosed

     public abstract boolean isClosed() throws SQLException

  Tests to see if this result set is closed.

  Returns:
    true if the result set is closed; false if it's still open
  Throws: SQLException
    if a database-access error occurs.

close

     public abstract void close() throws SQLException

  The close method provides an immediate release of a ResultSet's database and runtime resources instead of waiting for this to happen when it is automatically garbage collected.

  Note: A ResultSet is automatically closed by the Statement that generated it when that Statement is used to retrieve the next result from a sequence of multiple results. The generating statement can only release its underlying resources when its result set has been closed. A ResultSet is also automatically closed when it is garbage collected.

  Throws: SQLException
    if a database-access error occurs.

    All Packages    This Package  Previous  Next