SolarMetric Kodo JDO 3.1.6 generated on August 25 2004

kodo.jdbc.sql
Class ResultSetResult

java.lang.Object
  |
  +--kodo.jdbc.sql.AbstractResult
        |
        +--kodo.jdbc.sql.ResultSetResult
All Implemented Interfaces:
com.solarmetric.util.Closeable, Result
Direct Known Subclasses:
SelectResult

public class ResultSetResult
extends AbstractResult

Base Result implementation wrapped around a result set.


Constructor Summary
ResultSetResult(Connection conn, Statement stmnt, ResultSet rs, DBDictionary dict)
          Constructor.
ResultSetResult(ResultSet rs, DBDictionary dict)
          JDBC 2 constructor.
 
Method Summary
 boolean absolute(int row)
          Throws an exception by default.
 void close()
          Closes all batched results.
 boolean contains(Object obj)
          Return true if the given column or id is available in the result.
protected  int findObject(Object obj)
          Return the 1-based result set index for the given column or id, or a non-positive number if the column is not contained in this result.
protected  String getAlias(Object obj)
          Return the alias used for the column or id in the SELECT.
 Array getArray(Object obj)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 InputStream getAsciiStream(Object obj)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 BigDecimal getBigDecimal(Object obj)
          Return the value stored in the given column or id.
 BigInteger getBigInteger(Object obj)
          Return the value stored in the given column or id.
 InputStream getBinaryStream(Object obj)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 Blob getBlob(Object obj)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 boolean getBoolean(Object obj)
          Return the value stored in the given column or id.
 byte getByte(Object obj)
          Return the value stored in the given column or id.
 byte[] getBytes(Object obj)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 char getChar(Object obj)
          Return the value stored in the given column or id.
 Reader getCharacterStream(Object obj)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 Clob getClob(Object obj)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 boolean getCloseConnection()
          Whether to close the backing connection when this result is closed.
 Date getDate(Object obj)
          Return the value stored in the given column or id.
 Date getDate(Object obj, Calendar cal)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 DBDictionary getDBDictionary()
          Return the dictionary in use.
 double getDouble(Object obj)
          Return the value stored in the given column or id.
 float getFloat(Object obj)
          Return the value stored in the given column or id.
 int getInt(Object obj)
          Return the value stored in the given column or id.
 Locale getLocale(Object obj)
          Return the value stored in the given column or id.
 long getLong(Object obj)
          Return the value stored in the given column or id.
 Object getObject(Object obj, int metaTypeCode, Object arg)
          Return the value stored in the given column or id.
 Object getObject(Object obj, Map map)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 Ref getRef(Object obj, Map map)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 ResultSet getResultSet()
          Return the backing result set.
 short getShort(Object obj)
          Return the value stored in the given column or id.
 Statement getStatement()
          Return the statement that produced this result.
 String getString(Object obj)
          Return the value stored in the given column or id.
 Time getTime(Object obj, Calendar cal)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 Timestamp getTimestamp(Object obj, Calendar cal)
          Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
 boolean next()
          Advance to the next row, or return false if there are no more rows in the result.
 void setCloseConnection(boolean closeConn)
          Whether to close the backing connection when this result is closed.
 int size()
          Return the number of rows in this result.
 boolean supportsRandomAccess()
          Returns true by default, unless it has batched results.
 boolean wasNull()
          Return true if the last value fetched was null.
 
Methods inherited from class kodo.jdbc.sql.AbstractResult
addBatchedResult, addProcessedData, checkNull, getBatchedResult, getProcessedData, isLocking, removeBatchedResult, removeProcessedData, setLocking
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetResult

public ResultSetResult(Connection conn,
                       Statement stmnt,
                       ResultSet rs,
                       DBDictionary dict)
Constructor.

ResultSetResult

public ResultSetResult(ResultSet rs,
                       DBDictionary dict)
                throws SQLException
JDBC 2 constructor. Relies on being able to retrieve the statement from the result set, and the connection from the statement.
Method Detail

getStatement

public Statement getStatement()
Return the statement that produced this result.

getResultSet

public ResultSet getResultSet()
Return the backing result set.

getDBDictionary

public DBDictionary getDBDictionary()
Return the dictionary in use.

getCloseConnection

public boolean getCloseConnection()
Whether to close the backing connection when this result is closed. Defaults to true.

setCloseConnection

public void setCloseConnection(boolean closeConn)
Whether to close the backing connection when this result is closed. Defaults to true.

close

public void close()
Description copied from class: AbstractResult
Closes all batched results.
Overrides:
close in class AbstractResult

supportsRandomAccess

public boolean supportsRandomAccess()
                             throws SQLException
Description copied from class: AbstractResult
Returns true by default, unless it has batched results.
Overrides:
supportsRandomAccess in class AbstractResult

absolute

public boolean absolute(int row)
                 throws SQLException
Description copied from class: AbstractResult
Throws an exception by default.
Overrides:
absolute in class AbstractResult

next

public boolean next()
             throws SQLException
Description copied from interface: Result
Advance to the next row, or return false if there are no more rows in the result.

size

public int size()
         throws SQLException
Description copied from interface: Result
Return the number of rows in this result.

contains

public boolean contains(Object obj)
                 throws SQLException
Description copied from interface: Result
Return true if the given column or id is available in the result.

getArray

public Array getArray(Object obj)
               throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getArray in class AbstractResult

getAsciiStream

public InputStream getAsciiStream(Object obj)
                           throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getAsciiStream in class AbstractResult

getBigDecimal

public BigDecimal getBigDecimal(Object obj)
                         throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getBigDecimal in class AbstractResult

getBigInteger

public BigInteger getBigInteger(Object obj)
                         throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getBigInteger in class AbstractResult

getBinaryStream

public InputStream getBinaryStream(Object obj)
                            throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getBinaryStream in class AbstractResult

getBlob

public Blob getBlob(Object obj)
             throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getBlob in class AbstractResult

getBoolean

public boolean getBoolean(Object obj)
                   throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getBoolean in class AbstractResult

getByte

public byte getByte(Object obj)
             throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getByte in class AbstractResult

getBytes

public byte[] getBytes(Object obj)
                throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getBytes in class AbstractResult

getChar

public char getChar(Object obj)
             throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getChar in class AbstractResult

getCharacterStream

public Reader getCharacterStream(Object obj)
                          throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getCharacterStream in class AbstractResult

getClob

public Clob getClob(Object obj)
             throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.

getDate

public Date getDate(Object obj)
             throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getDate in class AbstractResult

getDate

public Date getDate(Object obj,
                    Calendar cal)
             throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getDate in class AbstractResult

getDouble

public double getDouble(Object obj)
                 throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getDouble in class AbstractResult

getFloat

public float getFloat(Object obj)
               throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getFloat in class AbstractResult

getInt

public int getInt(Object obj)
           throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getInt in class AbstractResult

getLocale

public Locale getLocale(Object obj)
                 throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getLocale in class AbstractResult

getLong

public long getLong(Object obj)
             throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getLong in class AbstractResult

getObject

public Object getObject(Object obj,
                        int metaTypeCode,
                        Object arg)
                 throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Following copied from interface: kodo.jdbc.sql.Result
Parameters:
col - the column or id whose data to fetch
metaType - the type code from FieldMapping for the type of the data
arg - some JDBC data access methods use an argument, such as a Calendar or Map

getObject

public Object getObject(Object obj,
                        Map map)
                 throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getObject in class AbstractResult

getRef

public Ref getRef(Object obj,
                  Map map)
           throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getRef in class AbstractResult

getShort

public short getShort(Object obj)
               throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getShort in class AbstractResult

getString

public String getString(Object obj)
                 throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id.
Overrides:
getString in class AbstractResult

getTime

public Time getTime(Object obj,
                    Calendar cal)
             throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getTime in class AbstractResult

getTimestamp

public Timestamp getTimestamp(Object obj,
                              Calendar cal)
                       throws SQLException
Description copied from interface: Result
Return the value stored in the given column or id; may not be supported by results that are not backed by a SQL result set.
Overrides:
getTimestamp in class AbstractResult

wasNull

public boolean wasNull()
                throws SQLException
Description copied from interface: Result
Return true if the last value fetched was null.
Overrides:
wasNull in class AbstractResult

findObject

protected int findObject(Object obj)
                  throws SQLException
Return the 1-based result set index for the given column or id, or a non-positive number if the column is not contained in this result.

getAlias

protected String getAlias(Object obj)
Return the alias used for the column or id in the SELECT. This method is used in findObject(java.lang.Object) only.

SolarMetric Kodo JDO 3.1.6 generated on August 25 2004

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.