SolarMetric Kodo JDO 3.0.3 generated on February 20 2004

kodo.jdbc.sql
Interface Result

All Superinterfaces:
com.solarmetric.util.Closeable
All Known Implementing Classes:
AbstractResult

public interface Result
extends com.solarmetric.util.Closeable

A result from the execution of a query or stored procedure. This interface is aligned closely with the ResultSet, so you can expect like-named methods to have similar semantics. However, the interface has been distilled and simplified, so a result object could easily mask information sources other than a result set.

For more flexible customization of data loading, see the PCResultObjectProvider.

See Also:
ResultSetResult

Method Summary
 boolean absolute(int row)
          Move to the given 0-based row in the result, or return false if the row does not exist.
 void addProcessedData(Object key, Object data)
          Set the data resulting from processing a batched result.
 void close()
          Free the resources used by this result; do not close the SQL connection.
 boolean contains(Object obj)
          Return true if the given column or id is available in the result.
 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.
 Result getBatchedResult(Object key)
          Return the batched result for the given key, or null if none.
 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.
 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.
 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.
 Object getProcessedData(Object key)
          Return the processed data under the given key, or null if none.
 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.
 short getShort(Object obj)
          Return the value stored in the given column or id.
 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.
 Result removeBatchedResult(Object key)
          Remove the batched result under the given key.
 Object removeProcessedData(Object key)
          Remove the processed data under the given key.
 int size()
          Return the number of rows in this result.
 boolean supportsRandomAccess()
          Return true if the result supports random access.
 boolean wasNull()
          Return true if the last value fetched was null.
 

Method Detail

getBatchedResult

public Result getBatchedResult(Object key)
Return the batched result for the given key, or null if none.

removeBatchedResult

public Result removeBatchedResult(Object key)
Remove the batched result under the given key.

addProcessedData

public void addProcessedData(Object key,
                             Object data)
Set the data resulting from processing a batched result.

getProcessedData

public Object getProcessedData(Object key)
Return the processed data under the given key, or null if none.

removeProcessedData

public Object removeProcessedData(Object key)
Remove the processed data under the given key.

close

public void close()
Free the resources used by this result; do not close the SQL connection.
Specified by:
close in interface com.solarmetric.util.Closeable

supportsRandomAccess

public boolean supportsRandomAccess()
                             throws SQLException
Return true if the result supports random access.

absolute

public boolean absolute(int row)
                 throws SQLException
Move to the given 0-based row in the result, or return false if the row does not exist. This method will only be called if the result supports random access.

next

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

size

public int size()
         throws SQLException
Return the number of rows in this result.

contains

public boolean contains(Object obj)
                 throws SQLException
Return true if the given column or id is available in the result.

getArray

public Array getArray(Object obj)
               throws SQLException
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.

getAsciiStream

public InputStream getAsciiStream(Object obj)
                           throws SQLException
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.

getBigDecimal

public BigDecimal getBigDecimal(Object obj)
                         throws SQLException
Return the value stored in the given column or id.

getBigInteger

public BigInteger getBigInteger(Object obj)
                         throws SQLException
Return the value stored in the given column or id.

getBinaryStream

public InputStream getBinaryStream(Object obj)
                            throws SQLException
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.

getBlob

public Blob getBlob(Object obj)
             throws SQLException
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.

getBoolean

public boolean getBoolean(Object obj)
                   throws SQLException
Return the value stored in the given column or id.

getByte

public byte getByte(Object obj)
             throws SQLException
Return the value stored in the given column or id.

getBytes

public byte[] getBytes(Object obj)
                throws SQLException
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.

getChar

public char getChar(Object obj)
             throws SQLException
Return the value stored in the given column or id.

getCharacterStream

public Reader getCharacterStream(Object obj)
                          throws SQLException
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.

getClob

public Clob getClob(Object obj)
             throws SQLException
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
Return the value stored in the given column or id.

getDate

public Date getDate(Object obj,
                    Calendar cal)
             throws SQLException
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.

getDouble

public double getDouble(Object obj)
                 throws SQLException
Return the value stored in the given column or id.

getFloat

public float getFloat(Object obj)
               throws SQLException
Return the value stored in the given column or id.

getInt

public int getInt(Object obj)
           throws SQLException
Return the value stored in the given column or id.

getLocale

public Locale getLocale(Object obj)
                 throws SQLException
Return the value stored in the given column or id.

getLong

public long getLong(Object obj)
             throws SQLException
Return the value stored in the given column or id.

getObject

public Object getObject(Object obj,
                        int metaTypeCode,
                        Object arg)
                 throws SQLException
Return the value stored in the given column or id.
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
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.

getRef

public Ref getRef(Object obj,
                  Map map)
           throws SQLException
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.

getShort

public short getShort(Object obj)
               throws SQLException
Return the value stored in the given column or id.

getString

public String getString(Object obj)
                 throws SQLException
Return the value stored in the given column or id.

getTime

public Time getTime(Object obj,
                    Calendar cal)
             throws SQLException
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.

getTimestamp

public Timestamp getTimestamp(Object obj,
                              Calendar cal)
                       throws SQLException
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.

wasNull

public boolean wasNull()
                throws SQLException
Return true if the last value fetched was null.

SolarMetric Kodo JDO 3.0.3 generated on February 20 2004

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