SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

kodo.jdbc.sql
Class ResultSetResult

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

public class ResultSetResult
extends AbstractResult

Base Result implementation wrapped around a result set. Column objects, column names, or column indexes (as Number instances) can be used to retrieve result set data.


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 eager results.
protected  boolean containsInternal(Object obj, Joins joins)
          Return whether this result contains data for the given id or column.
protected  int findObject(Object obj, Joins joins)
          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, Joins joins)
          Return the alias used for the column or id in the SELECT.
protected  Array getArrayInternal(Object obj, Joins joins)
           
protected  InputStream getAsciiStreamInternal(Object obj, Joins joins)
           
protected  BigDecimal getBigDecimalInternal(Object obj, Joins joins)
           
protected  BigInteger getBigIntegerInternal(Object obj, Joins joins)
           
protected  InputStream getBinaryStreamInternal(Object obj, Joins joins)
           
protected  Blob getBlobInternal(Object obj, Joins joins)
           
protected  boolean getBooleanInternal(Object obj, Joins joins)
           
protected  byte getByteInternal(Object obj, Joins joins)
           
protected  byte[] getBytesInternal(Object obj, Joins joins)
           
protected  Reader getCharacterStreamInternal(Object obj, Joins joins)
           
protected  char getCharInternal(Object obj, Joins joins)
           
protected  Clob getClobInternal(Object obj, Joins joins)
           
 boolean getCloseConnection()
          Whether to close the backing connection when this result is closed.
protected  Date getDateInternal(Object obj, Calendar cal, Joins joins)
           
protected  Date getDateInternal(Object obj, Joins joins)
           
 DBDictionary getDBDictionary()
          Return the dictionary in use.
protected  double getDoubleInternal(Object obj, Joins joins)
           
protected  float getFloatInternal(Object obj, Joins joins)
           
protected  int getIntInternal(Object obj, Joins joins)
           
protected  Locale getLocaleInternal(Object obj, Joins joins)
           
protected  long getLongInternal(Object obj, Joins joins)
           
protected  Number getNumberInternal(Object obj, Joins joins)
           
protected  Object getObjectInternal(Object obj, int metaTypeCode, Object arg, Joins joins)
          Return the value stored in the given id or column.
protected  Object getObjectInternal(Object obj, Map map, Joins joins)
           
protected  Ref getRefInternal(Object obj, Map map, Joins joins)
           
 ResultSet getResultSet()
          Return the backing result set.
protected  short getShortInternal(Object obj, Joins joins)
           
 Statement getStatement()
          Return the statement that produced this result.
protected  String getStringInternal(Object obj, Joins joins)
           
protected  Time getTimeInternal(Object obj, Calendar cal, Joins joins)
           
protected  Timestamp getTimestampInternal(Object obj, Calendar cal, Joins joins)
           
protected  boolean nextInternal()
          Advance this row.
 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 false by default.
 boolean wasNull()
          Return true if the last value fetched was null.
 
Methods inherited from class kodo.jdbc.sql.AbstractResult
checkNull, contains, contains, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getChar, getChar, getCharacterStream, getCharacterStream, getClob, getClob, getDate, getDate, getDate, getDate, getDouble, getDouble, getEager, getFloat, getFloat, getInt, getInt, getLocale, getLocale, getLong, getLong, getObject, getObject, getObject, getObject, getProcessed, getRef, getRef, getShort, getShort, getString, getString, getTime, getTime, getTimestamp, getTimestamp, isLocking, load, load, newJoins, next, pushBack, putEager, putProcessed, 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 eager results.
Overrides:
close in class AbstractResult

supportsRandomAccess

public boolean supportsRandomAccess()
                             throws SQLException
Description copied from class: AbstractResult
Returns false by default.
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

nextInternal

protected boolean nextInternal()
                        throws SQLException
Description copied from class: AbstractResult
Advance this row.
Overrides:
nextInternal in class AbstractResult

size

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

containsInternal

protected boolean containsInternal(Object obj,
                                   Joins joins)
                            throws SQLException
Description copied from class: AbstractResult
Return whether this result contains data for the given id or column.
Overrides:
containsInternal in class AbstractResult

getArrayInternal

protected Array getArrayInternal(Object obj,
                                 Joins joins)
                          throws SQLException
Overrides:
getArrayInternal in class AbstractResult

getAsciiStreamInternal

protected InputStream getAsciiStreamInternal(Object obj,
                                             Joins joins)
                                      throws SQLException
Overrides:
getAsciiStreamInternal in class AbstractResult

getBigDecimalInternal

protected BigDecimal getBigDecimalInternal(Object obj,
                                           Joins joins)
                                    throws SQLException
Overrides:
getBigDecimalInternal in class AbstractResult

getNumberInternal

protected Number getNumberInternal(Object obj,
                                   Joins joins)
                            throws SQLException

getBigIntegerInternal

protected BigInteger getBigIntegerInternal(Object obj,
                                           Joins joins)
                                    throws SQLException
Overrides:
getBigIntegerInternal in class AbstractResult

getBinaryStreamInternal

protected InputStream getBinaryStreamInternal(Object obj,
                                              Joins joins)
                                       throws SQLException
Overrides:
getBinaryStreamInternal in class AbstractResult

getBlobInternal

protected Blob getBlobInternal(Object obj,
                               Joins joins)
                        throws SQLException
Overrides:
getBlobInternal in class AbstractResult

getBooleanInternal

protected boolean getBooleanInternal(Object obj,
                                     Joins joins)
                              throws SQLException
Overrides:
getBooleanInternal in class AbstractResult

getByteInternal

protected byte getByteInternal(Object obj,
                               Joins joins)
                        throws SQLException
Overrides:
getByteInternal in class AbstractResult

getBytesInternal

protected byte[] getBytesInternal(Object obj,
                                  Joins joins)
                           throws SQLException
Overrides:
getBytesInternal in class AbstractResult

getCharInternal

protected char getCharInternal(Object obj,
                               Joins joins)
                        throws SQLException
Overrides:
getCharInternal in class AbstractResult

getCharacterStreamInternal

protected Reader getCharacterStreamInternal(Object obj,
                                            Joins joins)
                                     throws SQLException
Overrides:
getCharacterStreamInternal in class AbstractResult

getClobInternal

protected Clob getClobInternal(Object obj,
                               Joins joins)
                        throws SQLException
Overrides:
getClobInternal in class AbstractResult

getDateInternal

protected Date getDateInternal(Object obj,
                               Joins joins)
                        throws SQLException
Overrides:
getDateInternal in class AbstractResult

getDateInternal

protected Date getDateInternal(Object obj,
                               Calendar cal,
                               Joins joins)
                        throws SQLException
Overrides:
getDateInternal in class AbstractResult

getDoubleInternal

protected double getDoubleInternal(Object obj,
                                   Joins joins)
                            throws SQLException
Overrides:
getDoubleInternal in class AbstractResult

getFloatInternal

protected float getFloatInternal(Object obj,
                                 Joins joins)
                          throws SQLException
Overrides:
getFloatInternal in class AbstractResult

getIntInternal

protected int getIntInternal(Object obj,
                             Joins joins)
                      throws SQLException
Overrides:
getIntInternal in class AbstractResult

getLocaleInternal

protected Locale getLocaleInternal(Object obj,
                                   Joins joins)
                            throws SQLException
Overrides:
getLocaleInternal in class AbstractResult

getLongInternal

protected long getLongInternal(Object obj,
                               Joins joins)
                        throws SQLException
Overrides:
getLongInternal in class AbstractResult

getObjectInternal

protected Object getObjectInternal(Object obj,
                                   int metaTypeCode,
                                   Object arg,
                                   Joins joins)
                            throws SQLException
Description copied from class: AbstractResult
Return the value stored in the given id or column.
Overrides:
getObjectInternal in class AbstractResult

getObjectInternal

protected Object getObjectInternal(Object obj,
                                   Map map,
                                   Joins joins)
                            throws SQLException
Overrides:
getObjectInternal in class AbstractResult

getRefInternal

protected Ref getRefInternal(Object obj,
                             Map map,
                             Joins joins)
                      throws SQLException
Overrides:
getRefInternal in class AbstractResult

getShortInternal

protected short getShortInternal(Object obj,
                                 Joins joins)
                          throws SQLException
Overrides:
getShortInternal in class AbstractResult

getStringInternal

protected String getStringInternal(Object obj,
                                   Joins joins)
                            throws SQLException
Overrides:
getStringInternal in class AbstractResult

getTimeInternal

protected Time getTimeInternal(Object obj,
                               Calendar cal,
                               Joins joins)
                        throws SQLException
Overrides:
getTimeInternal in class AbstractResult

getTimestampInternal

protected Timestamp getTimestampInternal(Object obj,
                                         Calendar cal,
                                         Joins joins)
                                  throws SQLException
Overrides:
getTimestampInternal 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,
                         Joins joins)
                  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,
                          Joins joins)
Return the alias used for the column or id in the SELECT. This method is used in findObject(java.lang.Object, kodo.jdbc.sql.Joins) only.

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

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