com.interface21.jdbc.object
Class ReflectionRowExtractor

java.lang.Object
  |
  +--com.interface21.jdbc.core.RowCountCallbackHandler
        |
        +--com.interface21.jdbc.object.ReflectionRowExtractor
All Implemented Interfaces:
ResultReader, RowCallbackHandler

public class ReflectionRowExtractor
extends RowCountCallbackHandler
implements ResultReader

DEMONSTRATION OF THIS APPROACH ONLY: NOT FULLY IMPLEMENTED, DOCUMENTED OR TESTED.


Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
ReflectionRowExtractor(java.lang.Class resultClass, int rowsExpected)
          Column extractor to use
 
Method Summary
 java.util.List getResults()
          Return all results, disconnected from the JDBC ResultSet.
protected  void processRow(java.sql.ResultSet rs, int rowNum)
          Subclasses may override this to perform custom extraction or processing.
 
Methods inherited from class com.interface21.jdbc.core.RowCountCallbackHandler
getColumnCount, getColumnNames, getColumnTypes, getRowCount, processRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.interface21.jdbc.core.RowCallbackHandler
processRow
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

ReflectionRowExtractor

public ReflectionRowExtractor(java.lang.Class resultClass,
                              int rowsExpected)
                       throws InvalidDataAccessApiUsageException
Column extractor to use
Method Detail

processRow

protected void processRow(java.sql.ResultSet rs,
                          int rowNum)
                   throws java.sql.SQLException,
                          InvalidDataAccessApiUsageException
Description copied from class: RowCountCallbackHandler
Subclasses may override this to perform custom extraction or processing. This class's implementation does nothing.
Overrides:
processRow in class RowCountCallbackHandler
Following copied from class: com.interface21.jdbc.core.RowCountCallbackHandler
Parameters:
rs - ResultSet to extract data from. This method is invoked for each row
rowNum - number of the current row (starting from 0)

getResults

public java.util.List getResults()
Description copied from interface: ResultReader
Return all results, disconnected from the JDBC ResultSet.
Specified by:
getResults in interface ResultReader
Following copied from interface: com.interface21.jdbc.core.ResultReader
Returns:
all results, disconnected from the JDBC ResultSet. Never returns null; returns the empty collection if there were no results.


Rod Johnson and Spring contributors 2001-2003.