SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.impl.jdbc.runtime
Class JDBCResultObjectProvider

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCResultObjectProvider
All Implemented Interfaces:
ResultObjectProvider

public class JDBCResultObjectProvider
extends java.lang.Object
implements ResultObjectProvider

Object provider implementation wrapped around a JDBC Result.


Constructor Summary
JDBCResultObjectProvider(java.lang.Class pcClass, com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store)
          Constructor.
JDBCResultObjectProvider(com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping mapping, com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store)
          Constructor.
 
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.
 com.solarmetric.rd.rop.ResultList getResultList(java.sql.Connection conn, java.sql.Statement stmnt, java.sql.ResultSet rs)
          Return a result list for the given result set.
 com.solarmetric.rd.rop.ResultList getResultList(java.sql.Connection conn, java.sql.Statement stmnt, java.sql.ResultSet rs, int fetchThreshold, int fetchBatchSize)
          Return a result list for the given result set.
 com.solarmetric.rd.rop.ResultList getResultList(com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res)
          Return a result list for the given result.
 com.solarmetric.rd.rop.ResultList getResultList(com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res, int fetchThreshold, int fetchBatchSize)
          Return a result list for the given result.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCResultObjectProvider

public JDBCResultObjectProvider(java.lang.Class pcClass,
                                com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store)
Constructor.

Parameters:
pcClass - the base class of the result objects
store - the store manager to delegate loading to

JDBCResultObjectProvider

public JDBCResultObjectProvider(com.solarmetric.rd.kodo.impl.jdbc.meta.ClassMapping mapping,
                                com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store)
Constructor.

Parameters:
mapping - the mapping for the base class of the result objects
store - the store manager to delegate loading to
Method Detail

getResultList

public com.solarmetric.rd.rop.ResultList getResultList(java.sql.Connection conn,
                                                       java.sql.Statement stmnt,
                                                       java.sql.ResultSet rs)
Return a result list for the given result set.


getResultList

public com.solarmetric.rd.rop.ResultList getResultList(java.sql.Connection conn,
                                                       java.sql.Statement stmnt,
                                                       java.sql.ResultSet rs,
                                                       int fetchThreshold,
                                                       int fetchBatchSize)
Return a result list for the given result set. If the given fetch threshold or batch size is -1, it will be replaced with the default value for your configuration.


getResultList

public com.solarmetric.rd.rop.ResultList getResultList(com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res)
Return a result list for the given result.


getResultList

public com.solarmetric.rd.rop.ResultList getResultList(com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res,
                                                       int fetchThreshold,
                                                       int fetchBatchSize)
Return a result list for the given result. If the given fetch threshold or batch size is -1, it will be replaced with the default value for your configuration.


supportsRandomAccess

public boolean supportsRandomAccess(java.lang.Object input)
Description copied from interface: ResultObjectProvider
If the input supports random access, return true.

Specified by:
supportsRandomAccess in interface ResultObjectProvider

setFetchBatchSize

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

Specified by:
setFetchBatchSize in interface ResultObjectProvider

getResultObject

public java.lang.Object getResultObject(java.lang.Object input)
Description copied from interface: ResultObjectProvider
Instantiate the desired object from the current data in input.

Specified by:
getResultObject in interface ResultObjectProvider

open

public boolean open(java.lang.Object input)
Description copied from interface: ResultObjectProvider
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.

Specified by:
open in interface ResultObjectProvider

advance

public boolean advance(java.lang.Object input)
Description copied from interface: ResultObjectProvider
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 ResultObjectProvider.getResultObject(java.lang.Object).

Specified by:
advance in interface ResultObjectProvider

absolute

public boolean absolute(java.lang.Object input,
                        int pos)
Description copied from interface: ResultObjectProvider
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 ResultObjectProvider.advance(java.lang.Object).

Specified by:
absolute in interface ResultObjectProvider

size

public int size(java.lang.Object input)
Description copied from interface: ResultObjectProvider
Return the number of items in the input, or Integer.MAX_VALUE if the size is unknown.

Specified by:
size in interface ResultObjectProvider

free

public void free(java.lang.Object input)
Description copied from interface: ResultObjectProvider
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.

Specified by:
free in interface ResultObjectProvider

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

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