Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.rd.kodo.impl.jdbc.runtime
Class AbstractResult

    java.lang.Object
      |
      +--com.solarmetric.rd.kodo.impl.jdbc.runtime.AbstractResult

All Implemented Interfaces:
  Result

public abstract class AbstractResult
extends java.lang.Object
implements Result

A `Result` implementation designed to be subclassed easily by implementations that are not backed by a `ResultSet`. All `get<type>` calls are delegated to the `Result.getObject(Column,int,Object)` method, which should be implemented by subclasses along with `Result.next()`, `Result.size()`, and `Result.contains(com.solarmetric.rd.kodo.impl.jdbc.schema.Column)`.

Most of the methods of this class will accept return values from `Result#getObject(Column,int)` 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(java.sql.Connection conn)` Constructor.

Method Summary
`boolean` | `absolute(int row)` Throws an exception by default.
`protected java.lang.Object` | `checkNull(java.lang.Object val)`
`void` | `close()` Free the resources used by this result; do not close the SQL connection.
`java.sql.Array` | `getArray(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`java.io.InputStream` | `getAsciiStream(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`java.math.BigDecimal` | `getBigDecimal(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`java.math.BigInteger` | `getBigInteger(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`java.io.InputStream` | `getBinaryStream(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`java.sql.Blob` | `getBlob(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`boolean` | `getBoolean(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`byte` | `getByte(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`byte[]` | `getBytes(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`char` | `getChar(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`java.io.Reader` | `getCharacterStream(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`java.sql.Connection` | `getConnection()` Return the connection that was given to the method that returned this result.
`java.util.Date` | `getDate(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`java.sql.Date` | `getDate(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col, java.util.Calendar cal)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`double` | `getDouble(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`float` | `getFloat(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`java.util.Map` | `getImplData(boolean create)` Return a mutable view of arbitrary implementation data associated with this result, optionally creating a new map if none exists.
`int` | `getInt(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`java.util.Locale` | `getLocale(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`long` | `getLong(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`java.lang.Object` | `getObject(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col, java.util.Map map)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`java.sql.Ref` | `getRef(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col, java.util.Map map)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`short` | `getShort(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`java.lang.String` | `getString(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)` Return the value stored in the given column.
`java.sql.Time` | `getTime(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col, java.util.Calendar cal)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`java.sql.Timestamp` | `getTimestamp(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col, java.util.Calendar cal)` Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.
`void` | `setFetchBatchSize(int size)` Passes on size to each impl data result.
`boolean` | `supportsRandomAccess()` Returns false by default.
`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 com.solarmetric.rd.kodo.impl.jdbc.runtime.Result
`contains, getClob, getObject, next, size`

Constructor Detail

### AbstractResult

    public AbstractResult(java.sql.Connection conn)

  Constructor. Supply connection.

Method Detail

### getImplData

    public java.util.Map getImplData(boolean create)

  Description copied from interface: `Result`
  Return a mutable view of arbitrary implementation data associated with this result, optionally creating a new map if none exists. All results found as values in the impl data will automatically be closed by this result when it is closed.

  Specified by:
    `getImplData` in interface `Result`

### getConnection

    public java.sql.Connection getConnection()

  Description copied from interface: `Result`
  Return the connection that was given to the method that returned this result.

  Specified by:
    `getConnection` in interface `Result`

### close

    public void close()

  Description copied from interface: `Result`
  Free the resources used by this result; do not close the SQL connection.

  Specified by:
    `close` in interface `Result`

### supportsRandomAccess

    public boolean supportsRandomAccess()
                                 throws java.sql.SQLException

  Returns false by default.

  Specified by:
    `supportsRandomAccess` in interface `Result`
    `java.sql.SQLException`

### setFetchBatchSize

    public void setFetchBatchSize(int size)
                           throws java.sql.SQLException

  Passes on size to each impl data result.

  Specified by:
    `setFetchBatchSize` in interface `Result`
    `java.sql.SQLException`

### absolute

    public boolean absolute(int row)
                     throws java.sql.SQLException

  Throws an exception by default.

  Specified by:
    `absolute` in interface `Result`
    `java.sql.SQLException`

### getArray

    public java.sql.Array getArray(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                            throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getArray` in interface `Result`
    `java.sql.SQLException`

### getAsciiStream

    public java.io.InputStream getAsciiStream(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                                       throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getAsciiStream` in interface `Result`
    `java.sql.SQLException`

### getBigDecimal

    public java.math.BigDecimal getBigDecimal(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                                       throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getBigDecimal` in interface `Result`
    `java.sql.SQLException`

### getBigInteger

    public java.math.BigInteger getBigInteger(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                                       throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getBigInteger` in interface `Result`
    `java.sql.SQLException`

### getBinaryStream

    public java.io.InputStream getBinaryStream(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                                        throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getBinaryStream` in interface `Result`
    `java.sql.SQLException`

### getBlob

    public java.sql.Blob getBlob(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                          throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getBlob` in interface `Result`
    `java.sql.SQLException`

### getBoolean

    public boolean getBoolean(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                       throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getBoolean` in interface `Result`
    `java.sql.SQLException`

### getByte

    public byte getByte(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                 throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getByte` in interface `Result`
    `java.sql.SQLException`

### getBytes

    public byte[] getBytes(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                    throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getBytes` in interface `Result`
    `java.sql.SQLException`

### getChar

    public char getChar(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                 throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getChar` in interface `Result`
    `java.sql.SQLException`

### getCharacterStream

    public java.io.Reader getCharacterStream(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                                      throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getCharacterStream` in interface `Result`
    `java.sql.SQLException`

### getDate

    public java.util.Date getDate(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                           throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getDate` in interface `Result`
    `java.sql.SQLException`

### getDate

    public java.sql.Date getDate(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col,
                                 java.util.Calendar cal)
                          throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getDate` in interface `Result`
    `java.sql.SQLException`

### getDouble

    public double getDouble(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                     throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getDouble` in interface `Result`
    `java.sql.SQLException`

### getFloat

    public float getFloat(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                   throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getFloat` in interface `Result`
    `java.sql.SQLException`

### getInt

    public int getInt(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
               throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getInt` in interface `Result`
    `java.sql.SQLException`

### getLocale

    public java.util.Locale getLocale(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                               throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getLocale` in interface `Result`
    `java.sql.SQLException`

### getLong

    public long getLong(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                 throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getLong` in interface `Result`
    `java.sql.SQLException`

### getObject

    public java.lang.Object getObject(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col,
                                      java.util.Map map)
                               throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getObject` in interface `Result`
    `java.sql.SQLException`

### getRef

    public java.sql.Ref getRef(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col,
                               java.util.Map map)
                        throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getRef` in interface `Result`
    `java.sql.SQLException`

### getShort

    public short getShort(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                   throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getShort` in interface `Result`
    `java.sql.SQLException`

### getString

    public java.lang.String getString(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
                               throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column.

  Specified by:
    `getString` in interface `Result`
    `java.sql.SQLException`

### getTime

    public java.sql.Time getTime(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col,
                                 java.util.Calendar cal)
                          throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getTime` in interface `Result`
    `java.sql.SQLException`

### getTimestamp

    public java.sql.Timestamp getTimestamp(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col,
                                           java.util.Calendar cal)
                                    throws java.sql.SQLException

  Description copied from interface: `Result`
  Return the value stored in the given column; may not be supported by results that are not backed by a SQL result set.

  Specified by:
    `getTimestamp` in interface `Result`
    `java.sql.SQLException`

### wasNull

    public boolean wasNull()

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

  Specified by:
    `wasNull` in interface `Result`

### checkNull

    protected java.lang.Object checkNull(java.lang.Object val)

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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