    All Packages    This Package  Previous  Next

# Class sqlj.runtime.profile.ref.RTResultSetJDBC

    java.lang.Object
       |
       +----sqlj.runtime.profile.ref.RTResultSetJDBC

public class RTResultSetJDBC
extends Object
implements RTResultSet

This class implements the RTResultSet interface using a JDBC ResultSet.

##

rs
  The underlying JDBC result set with which this class is implemented

##

RTResultSetJDBC(ResultSet)
  Creates a new RTResultSet that uses the passed ResultSet to implement its methods.

##

close()
  Calls the `close` method on the underlying result set.
finalize()
  finalizes the super object and calls close if this iterator has not already been closed.
findColumn(String)
  Returns the result of calling the `findColumn` method on the underlying result set.
getAsciiStreamWrapper(int)
  Fetches an InputStream using the `getAsciiStream` method of the underlying result set.
getBigDecimal(int)
  Fetches a BigDecimal from the underlying result set using `getObject`.
getBinaryStreamWrapper(int)
  Fetches an InputStream using the `getBinaryStream` method of the underlying result set.
getBooleanNoNull(int)
  Fetches the result using the `getBoolean` method of the underlying result set.
getBooleanWrapper(int)
  Fetches a primitive type using the `getBoolean` method of the underlying result set.
getByteNoNull(int)
  Fetches the result using the `getByte` method of the underlying result set.
getBytes(int)
  Returns the result of calling the `getBytes` method on the underlying result set.
getByteWrapper(int)
  Fetches a primitive type using the `getByte` method of the underlying result set.
getColumnCount()
  Returns the column count using the result set meta data `getColumnCount` method.
getCursorName()
  Returns the result of calling the `getCursorName` method on the underlying result set.
getDate(int)
  Returns the result of calling the `getDate` method on the underlying result set.
getDoubleNoNull(int)
  Fetches the result using the `getDouble` method of the underlying result set.
getDoubleWrapper(int)
  Fetches a primitive type using the `getDouble` method of the underlying result set.
getFloatNoNull(int)
  Fetches the result using the `getFloat` method of the underlying result set.
getFloatWrapper(int)
  Fetches a primitive type using the `getFloat` method of the underlying result set.
getIntNoNull(int)
  Fetches the result using the `getInt` method of the underlying result set.
getIntWrapper(int)
  Fetches a primitive type using the `getInt` method of the underlying result set.
getJDBCResultSet()
  Returns the underlying result set to which all method implementations are deferred.
getLongNoNull(int)
  Fetches the result using the `getLong` method of the underlying result set.
getLongWrapper(int)
  Fetches a primitive type using the `getLong` method of the underlying result set.
getObject(int, Class)
  Fetches the object from the underlying result set using `getObject`.
getShortNoNull(int)
  Fetches the result using the `getShort` method of the underlying result set.
getShortWrapper(int)
  Fetches a primitive type using the `getShort` method of the underlying result set.
getString(int)
  Returns the result of calling the `getString` method on the underlying result set.
getTime(int)
  Returns the result of calling the `getTime` method on the underlying result set.
getTimestamp(int)
  Returns the result of calling the `getTimestamp` method on the underlying result set.
getUnicodeStreamWrapper(int)
  Fetches an InputStream using the `getUnicodeStream` method of the underlying result set.
isClosed()
  Returns true is `close` has been called, false otherwise.
isValidRow()
  Returns true iff the result set if currently positioned on a row.
next()
  Returns the result of calling the `next` method on the underlying result set.

##

rs

     protected ResultSet rs

  The underlying JDBC result set with which this class is implemented

##

RTResultSetJDBC

     public RTResultSetJDBC(ResultSet rs)

  Creates a new RTResultSet that uses the passed ResultSet to implement its methods.

  Parameters:
    rs - the underlying JDBC result set

##

getJDBCResultSet

     public ResultSet getJDBCResultSet()

  Returns the underlying result set to which all method implementations are deferred.

next

     public boolean next() throws SQLException

  Returns the result of calling the `next` method on the underlying result set.

  Throws: SQLException
    if an error occurs in the wrapped result set

getCursorName

     public String getCursorName() throws SQLException

  Returns the result of calling the `getCursorName` method on the underlying result set.

  Throws: SQLException
    if an error occurs in the wrapped result set

findColumn

     public int findColumn(String columnName) throws SQLException

  Returns the result of calling the `findColumn` method on the underlying result set.

  Throws: SQLException
    if an error occurs in the wrapped result set

getString

     public String getString(int columnIndex) throws SQLException

  Returns the result of calling the `getString` method on the underlying result set.

  Throws: SQLException
    if an error occurs in the wrapped result set

getBytes

     public byte[] getBytes(int columnIndex) throws SQLException

  Returns the result of calling the `getBytes` method on the underlying result set.

  Throws: SQLException
    if an error occurs in the wrapped result set

getDate

     public Date getDate(int columnIndex) throws SQLException

  Returns the result of calling the `getDate` method on the underlying result set.

  Throws: SQLException
    if an error occurs in the wrapped result set

getTime

     public Time getTime(int columnIndex) throws SQLException

  Returns the result of calling the `getTime` method on the underlying result set.

  Throws: SQLException
    if an error occurs in the wrapped result set

getTimestamp

     public Timestamp getTimestamp(int columnIndex) throws SQLException

  Returns the result of calling the `getTimestamp` method on the underlying result set.

  Throws: SQLException
    if an error occurs in the wrapped result set

getBooleanNoNull

     public boolean getBooleanNoNull(int columnIndex) throws SQLException

  Fetches the result using the `getBoolean` method of the underlying result set. If a subsequent call to `wasNull` returns true, a SQLNullException is raised. Otherwise the result is returned.

  Throws: SQLNullException
    if the column is null
  Throws: SQLException
    if an error occurs in the underlying result set

getByteNoNull

     public byte getByteNoNull(int columnIndex) throws SQLException

  Fetches the result using the `getByte` method of the underlying result set. If a subsequent call to `wasNull` returns true, a SQLNullException is raised. Otherwise the result is returned.

  Throws: SQLNullException
    if the column is null
  Throws: SQLException
    if an error occurs in the underlying result set

getShortNoNull

     public short getShortNoNull(int columnIndex) throws SQLException

  Fetches the result using the `getShort` method of the underlying result set. If a subsequent call to `wasNull` returns true, a SQLNullException is raised. Otherwise the result is returned.

  Throws: SQLNullException
    if the column is null
  Throws: SQLException
    if an error occurs in the underlying result set

getIntNoNull

     public int getIntNoNull(int columnIndex) throws SQLException

  Fetches the result using the `getInt` method of the underlying result set. If a subsequent call to `wasNull` returns true, a SQLNullException is raised. Otherwise the result is returned.

  Throws: SQLNullException
    if the column is null
  Throws: SQLException
    if an error occurs in the underlying result set

getLongNoNull

     public long getLongNoNull(int columnIndex) throws SQLException

  Fetches the result using the `getLong` method of the underlying result set. If a subsequent call to `wasNull` returns true, a SQLNullException is raised. Otherwise the result is returned.

  Throws: SQLNullException
    if the column is null
  Throws: SQLException
    if an error occurs in the underlying result set

getFloatNoNull

     public float getFloatNoNull(int columnIndex) throws SQLException

  Fetches the result using the `getFloat` method of the underlying result set. If a subsequent call to `wasNull` returns true, a SQLNullException is raised. Otherwise the result is returned.

  Throws: SQLNullException
    if the column is null
  Throws: SQLException
    if an error occurs in the underlying result set

getDoubleNoNull

     public double getDoubleNoNull(int columnIndex) throws SQLException

  Fetches the result using the `getDouble` method of the underlying result set. If a subsequent call to `wasNull` returns true, a SQLNullException is raised. Otherwise the result is returned.

  Throws: SQLNullException
    if the column is null
  Throws: SQLException
    if an error occurs in the underlying result set

getBooleanWrapper

     public Boolean getBooleanWrapper(int columnIndex) throws SQLException

  Fetches a primitive type using the `getBoolean` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

  Throws: SQLException
    if an error occurs in the underlying result set

getByteWrapper

     public Byte getByteWrapper(int columnIndex) throws SQLException

  Fetches a primitive type using the `getByte` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

  Throws: SQLException
    if an error occurs in the underlying result set

getShortWrapper

     public Short getShortWrapper(int columnIndex) throws SQLException

  Fetches a primitive type using the `getShort` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

  Throws: SQLException
    if an error occurs in the underlying result set

getIntWrapper

     public Integer getIntWrapper(int columnIndex) throws SQLException

  Fetches a primitive type using the `getInt` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

  Throws: SQLException
    if an error occurs in the underlying result set

getLongWrapper

     public Long getLongWrapper(int columnIndex) throws SQLException

  Fetches a primitive type using the `getLong` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

  Throws: SQLException
    if an error occurs in the underlying result set

getFloatWrapper

     public Float getFloatWrapper(int columnIndex) throws SQLException

  Fetches a primitive type using the `getFloat` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

  Throws: SQLException
    if an error occurs in the underlying result set

getDoubleWrapper

     public Double getDoubleWrapper(int columnIndex) throws SQLException

  Fetches a primitive type using the `getDouble` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise the appropriate wrapper object is created and returned using the value of the fetched primitive type.

  Throws: SQLException
    if an error occurs in the underlying result set

getAsciiStreamWrapper

     public AsciiStream getAsciiStreamWrapper(int columnIndex) throws SQLException

  Fetches an InputStream using the `getAsciiStream` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise an AsciiStream is created and returned that wraps the fetched stream.

  Throws: SQLException
    if an error occurs in the underlying result set

getBinaryStreamWrapper

     public BinaryStream getBinaryStreamWrapper(int columnIndex) throws SQLException

  Fetches an InputStream using the `getBinaryStream` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise a BinaryStream is created and returned that wraps the fetched stream.

  Throws: SQLException
    if an error occurs in the underlying result set

getUnicodeStreamWrapper

     public UnicodeStream getUnicodeStreamWrapper(int columnIndex) throws SQLException

  Fetches an InputStream using the `getUnicodeStream` method of the underlying result set. If a subsequent call to `wasNull` returns true, null is returned. Otherwise a UnicodeStream is created and returned that wraps the fetched stream.

  Throws: SQLException
    if an error occurs in the underlying result set

getObject

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

  Fetches the object from the underlying result set using `getObject`. Verifies that the object fetched can be assigned to an argument having the passed class object type.

  Throws: SQLException
    if an error occurs in the underlying result set, or the object has an incompatible type

getBigDecimal

     public BigDecimal getBigDecimal(int columnIndex) throws SQLException

  Fetches a BigDecimal from the underlying result set using `getObject`.

  Throws: SQLException
    if an error occurs in the underlying result set, or the object has an incompatible type

getColumnCount

     public int getColumnCount() throws SQLException

  Returns the column count using the result set meta data `getColumnCount` method.

  Throws: SQLException
    if an error occurs in the underlying result set

isValidRow

     public boolean isValidRow() throws SQLException

  Returns true iff the result set if currently positioned on a row.

  Throws: SQLException
    if an error occurs in the underlying result set

isClosed

     public boolean isClosed() throws SQLException

  Returns true is `close` has been called, false otherwise.

  Throws: SQLException
    if an error occurs

close

     public void close() throws SQLException

  Calls the `close` method on the underlying result set.

  Throws: SQLException
    if an error occurs in the wrapped result set

finalize

     protected void finalize() throws Throwable

  finalizes the super object and calls close if this iterator has not already been closed.

  Throws: Throwable
    if an error occurs during finalization
  Overrides:
    finalize in class Object
  See Also:
    close

    All Packages    This Package  Previous  Next