Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.1.6 generated on August 25 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.jdbc.sql
Class AbstractResult

    java.lang.Object
      |
      +--kodo.jdbc.sql.AbstractResult

All Implemented Interfaces:
  com.solarmetric.util.Closeable, Result

Direct Known Subclasses:
  ResultSetResult

public abstract class AbstractResult
extends Object
implements Result

A `Result` implementation designed to be subclassed easily by implementations. All `get<type>` calls are delegated to the `Result.getObject(Object,int,Object)` method, which should be implemented by subclasses along with `Result.next()`, `Result.absolute(int)`, `Result.size()`, and `Result.contains(java.lang.Object)`.

Most of the methods of this class will accept return values from `Result.getObject(Object,int,Object)` that are not exactly the right type. For example, any numeric type can be returned as any `Number` type, and dates, locales, characters, and booleans can be returned as strings.

See Also:
  `ResultSetResult`

Constructor Summary
`AbstractResult()`

Method Summary
`boolean` | `absolute(int row)` Throws an exception by default.
`void` | `addBatchedResult(Object key, Result res)`
`void` | `addProcessedData(Object key, Object data)` Set the data resulting from processing a batched result.
`protected Object` | `checkNull(Object val)`
`void` | `close()` Closes all batched results.
`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.
`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, 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` | `isLocking()` If true, then any results loaded from this Result will be locked in the database.
`Result` | `removeBatchedResult(Object key)` Remove the batched result under the given key.
`Object` | `removeProcessedData(Object key)` Remove the processed data under the given key.
`void` | `setLocking(boolean locking)`
`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 java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface kodo.jdbc.sql.Result
`contains, getClob, getObject, next, size`

Constructor Detail

### AbstractResult

    public AbstractResult()

Method Detail

### getBatchedResult

    public Result getBatchedResult(Object key)

  Description copied from interface: `Result`
  Return the batched result for the given key, or null if none.
  Specified by:
    `getBatchedResult` in interface `Result`

### removeBatchedResult

    public Result removeBatchedResult(Object key)

  Description copied from interface: `Result`
  Remove the batched result under the given key.
  Specified by:
    `removeBatchedResult` in interface `Result`

### addBatchedResult

    public void addBatchedResult(Object key,
                                 Result res)

### getProcessedData

    public Object getProcessedData(Object key)

  Description copied from interface: `Result`
  Return the processed data under the given key, or null if none.
  Specified by:
    `getProcessedData` in interface `Result`

### removeProcessedData

    public Object removeProcessedData(Object key)

  Description copied from interface: `Result`
  Remove the processed data under the given key.
  Specified by:
    `removeProcessedData` in interface `Result`

### addProcessedData

    public void addProcessedData(Object key,
                                 Object data)

  Description copied from interface: `Result`
  Set the data resulting from processing a batched result.
  Specified by:
    `addProcessedData` in interface `Result`

### close

    public void close()

  Closes all batched results.
  Specified by:
    `close` in interface `Result`

### supportsRandomAccess

    public boolean supportsRandomAccess()
                                 throws SQLException

  Returns true by default, unless it has batched results.
  Specified by:
    `supportsRandomAccess` in interface `Result`

### absolute

    public boolean absolute(int row)
                     throws SQLException

  Throws an exception by default.
  Specified by:
    `absolute` in interface `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.
  Specified by:
    `getArray` in interface `Result`

### 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.
  Specified by:
    `getAsciiStream` in interface `Result`

### getBigDecimal

    public BigDecimal getBigDecimal(Object obj)
                             throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getBigDecimal` in interface `Result`

### getBigInteger

    public BigInteger getBigInteger(Object obj)
                             throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getBigInteger` in interface `Result`

### 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.
  Specified by:
    `getBinaryStream` in interface `Result`

### 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.
  Specified by:
    `getBlob` in interface `Result`

### getBoolean

    public boolean getBoolean(Object obj)
                       throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getBoolean` in interface `Result`

### getByte

    public byte getByte(Object obj)
                 throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getByte` in interface `Result`

### 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.
  Specified by:
    `getBytes` in interface `Result`

### getChar

    public char getChar(Object obj)
                 throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getChar` in interface `Result`

### 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.
  Specified by:
    `getCharacterStream` in interface `Result`

### getDate

    public Date getDate(Object obj)
                 throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getDate` in interface `Result`

### 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.
  Specified by:
    `getDate` in interface `Result`

### getDouble

    public double getDouble(Object obj)
                     throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getDouble` in interface `Result`

### getFloat

    public float getFloat(Object obj)
                   throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getFloat` in interface `Result`

### getInt

    public int getInt(Object obj)
               throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getInt` in interface `Result`

### getLocale

    public Locale getLocale(Object obj)
                     throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getLocale` in interface `Result`

### getLong

    public long getLong(Object obj)
                 throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getLong` in interface `Result`

### 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.
  Specified by:
    `getObject` in interface `Result`

### 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.
  Specified by:
    `getRef` in interface `Result`

### getShort

    public short getShort(Object obj)
                   throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getShort` in interface `Result`

### getString

    public String getString(Object obj)
                     throws SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column or id.
  Specified by:
    `getString` in interface `Result`

### 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.
  Specified by:
    `getTime` in interface `Result`

### 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.
  Specified by:
    `getTimestamp` in interface `Result`

### wasNull

    public boolean wasNull()
                    throws SQLException

  Description copied from interface: `Result`
  Return true if the last value fetched was null.
  Specified by:
    `wasNull` in interface `Result`

### checkNull

    protected Object checkNull(Object val)

### setLocking

    public void setLocking(boolean locking)

### isLocking

    public boolean isLocking()

  Description copied from interface: `Result`
  If true, then any results loaded from this Result will be locked in the database.
  Specified by:
    `isLocking` in interface `Result`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.1.6 generated on August 25 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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