All Packages    This Package  Previous  Next  

Interface sqlj.runtime.profile.RTResultSet

public 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)
getWarnings()
clearWarnings()
findColumn()

Methods not included from java.sql.ResultSet
Method Removed Replacement Method
getMetaData()
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:


Method Index

 o clearWarnings()
After this call getWarnings returns null until a new warning is reported for this result set.
 o 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.
 o findColumn(String)
Map a Resultset column name to a ResultSet column index.
 o getAsciiStreamWrapper(int)
Get the value of a column in the current row as a sqlj.runtime.AsciiStream object.
 o getBigDecimal(int)
Get the value of a column in the current row as a java.math.BigDecimal object.
 o getBinaryStreamWrapper(int)
Get the value of a column in the current row as a sqlj.runtime.BinaryStream object.
 o getBooleanNoNull(int)
Get the value of a column in the current row as a Java boolean.
 o getBooleanWrapper(int)
Get the value of a column in the current row as a java.lang.Boolean object.
 o getByteNoNull(int)
Get the value of a column in the current row as a Java byte.
 o getBytes(int)
Get the value of a column in the current row as a Java byte[].
 o getByteWrapper(int)
Get the value of a column in the current row as a java.lang.Byte object.
 o getColumnCount()
Determine the number of columns in this result set.
 o getCursorName()
Get the name of the SQL cursor used by this ResultSet.
 o getDate(int)
Get the value of a column in the current row as a java.sql.Date object.
 o getDoubleNoNull(int)
Get the value of a column in the current row as a Java double.
 o getDoubleWrapper(int)
Get the value of a column in the current row as a java.lang.Double object.
 o getFloatNoNull(int)
Get the value of a column in the current row as a Java float.
 o getFloatWrapper(int)
Get the value of a column in the current row as a java.lang.Float object.
 o getIntNoNull(int)
Get the value of a column in the current row as a Java int.
 o getIntWrapper(int)
Get the value of a column in the current row as a java.lang.Integer object.
 o getJDBCResultSet()
Returns the JDBC result set associated with this iterator.
 o getLongNoNull(int)
Get the value of a column in the current row as a Java long.
 o getLongWrapper(int)
Get the value of a column in the current row as a java.lang.Long object.
 o getObject(int, Class)
Get the value of a column in the current row as a java.lang.Object.
 o getShortNoNull(int)
Get the value of a column in the current row as a Java short.
 o getShortWrapper(int)
Get the value of a column in the current row as a java.lang.Short object.
 o getString(int)
Get the value of a column in the current row as a Java String.
 o getTime(int)
Get the value of a column in the current row as a java.sql.Time object.
 o getTimestamp(int)
Get the value of a column in the current row as a java.sql.Timestamp object.
 o getUnicodeStreamWrapper(int)
Get the value of a column in the current row as a sqlj.runtime.UnicodeStream object.
 o getWarnings()
The first warning reported by calls on this result set is returned.
 o isClosed()
Tests to see if this result set is closed.
 o isValidRow()
Returns true if the result set is currently positioned on a row, false otherwise.
 o 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.

Methods

 o 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:

Returns:
a JDBC result set representing this object.
Throws: SQLException
if this object cannot be represented as a JDBC result set.
 o 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.
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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
 o 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.
 o 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.
 o 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.
 o getWarnings
 public abstract SQLWarning getWarnings() throws SQLException
The first warning reported by calls on this result set is returned. Subsequent iterator warings will be chained to this SQLWarning.

The warning chain is automatically cleared each time a new role is read.

Note: This warning cheain only covers warnings caused by result set methods. Any warning caused by statement execution (such as fetching OUT parameters) will be chained on the statement object, and made available to the client on the ExecutionContext object.

Returns:
the first SQLWarning or null if there are no errors
Throws: SQLException
if a database-access error occurs.
 o clearWarnings
 public abstract void clearWarnings() throws SQLException
After this call getWarnings returns null until a new warning is reported for this result set.

Throws: SQLException
if a database-access error occurs.
 o 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