SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.rop
Interface ResultObjectProvider

All Known Subinterfaces:
PCResultObjectProvider
All Known Implementing Classes:
AbstractPCResultObjectProvider, JDBCResultObjectProvider

public interface ResultObjectProvider

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(java.lang.Object input, int pos)
          Move to the given 0-based input item.
 boolean advance(java.lang.Object input)
          Advance the input source input to the next position.
 void free(java.lang.Object input)
          Optionally free the resources associated with this provider.
 java.lang.Object getResultObject(java.lang.Object input)
          Instantiate the desired object from the current data in input.
 boolean open(java.lang.Object input)
          Open the input source input.
 void setFetchBatchSize(java.lang.Object input, int fetchBatchSize)
          Set the batch size to fetch at once.
 int size(java.lang.Object input)
          Return the number of items in the input, or Integer.MAX_VALUE if the size is unknown.
 boolean supportsRandomAccess(java.lang.Object input)
          If the input supports random access, return true.
 

Method Detail

supportsRandomAccess

public boolean supportsRandomAccess(java.lang.Object input)
If the input supports random access, return true.


setFetchBatchSize

public void setFetchBatchSize(java.lang.Object input,
                              int fetchBatchSize)
Set the batch size to fetch at once. Implementations may ignore this setting. This method will be called before open(java.lang.Object).


getResultObject

public java.lang.Object getResultObject(java.lang.Object input)
Instantiate the desired object from the current data in input.


open

public boolean open(java.lang.Object input)
Open the input source input. This is invoked before any data is loaded from the input. Return true if there is data in the input; otherwise false.


advance

public boolean advance(java.lang.Object input)
Advance the input source input to the next position. Return true if there is more data; otherwise false. This is invoked between each invocation of getResultObject(java.lang.Object).


absolute

public boolean absolute(java.lang.Object input,
                        int pos)
Move to the given 0-based input item. 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 advance(java.lang.Object).


size

public int size(java.lang.Object input)
Return the number of items in the input, or Integer.MAX_VALUE if the size is unknown.


free

public void free(java.lang.Object input)
Optionally free the resources associated with this provider. For example, the source Connection might be released once the statement has been completed, or an InputStream might be closed.


SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

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