Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.2.4 generated on January 7 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.rop
Interface ResultObjectProvider

All Superinterfaces:
  com.solarmetric.util.Closeable

All Known Subinterfaces:
  PCResultObjectProvider

All Known Implementing Classes:
  ListResultObjectProvider, MergedResultObjectProvider, SQLResultObjectProvider

public interface ResultObjectProvider
extends com.solarmetric.util.Closeable

Interface that allows lazy/custom instantiation of input objects.

`ResultList` objects do not necessarily load in data all at once. Instead, they may lazily load objects as necessary. So, the lifespan of a `ResultObjectProvider` instance is related to how the application deals with processing the `ResultList` created with a given `ResultObjectProvider` instance.

Method Summary
`boolean` | `absolute(int pos)` Move to the given 0-based position.
`void` | `close()` Free the resources associated with this provider.
`Object` | `getResultObject()` Instantiate the current result object.
`void` | `handleCheckedException(Exception e)` Any checked exceptions that are thrown will be passed to this method.
`boolean` | `next()` Advance the input to the next position.
`void` | `open()` Open the result.
`void` | `reset()` Reset this provider.
`int` | `size()` Return the number of items in the input, or `Integer.MAX_VALUE` if the size in unknown.
`boolean` | `supportsRandomAccess()` Return true if this provider supports random access.

Method Detail

### supportsRandomAccess

    public boolean supportsRandomAccess()

  Return true if this provider supports random access.

### open

    public void open()
              throws Exception

  Open the result. This will be called before `next()`, `absolute(int)`, or `size()`.

### getResultObject

    public Object getResultObject()
                           throws Exception

  Instantiate the current result object. This method will only be called after `next()` or `absolute(int)`.

### next

    public boolean next()
                 throws Exception

  Advance the input to the next position. Return `true` if there is more data; otherwise `false`.

### absolute

    public boolean absolute(int pos)
                     throws Exception

  Move to the given 0-based position. This method is only called for providers that support random access. Return `true` if there is data at this position; otherwise `false`. This may be invoked in place of `next()`.

### size

    public int size()
             throws Exception

  Return the number of items in the input, or `Integer.MAX_VALUE` if the size in unknown.

### reset

    public void reset()
               throws Exception

  Reset this provider. This is an optional operation. If supported, it should move the position of the provider to before the first element. Non-random-access providers may be able to support this method by re-acquiring all resources as if the result were just opened.

### close

    public void close()
               throws Exception

  Free the resources associated with this provider.
  Specified by:
    `close` in interface `com.solarmetric.util.Closeable`

### handleCheckedException

    public void handleCheckedException(Exception e)

  Any checked exceptions that are thrown will be passed to this method. The provider should re-throw the exception as an appropriate unchecked exception.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.2.4 generated on January 7 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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