org.springframework.jdbc.core
Class JdbcTemplate.RowCallbackHandlerResultSetExtractor

java.lang.Object
  extended byorg.springframework.jdbc.core.JdbcTemplate.RowCallbackHandlerResultSetExtractor
All Implemented Interfaces:
ResultSetExtractor
Enclosing class:
JdbcTemplate

protected static final class JdbcTemplate.RowCallbackHandlerResultSetExtractor
extends java.lang.Object
implements ResultSetExtractor

Adapter to enable use of a RowCallbackHandler inside a ResultSetExtractor.

Uses a regular ResultSet, so we have to be careful when using it: We don't use it for navigating since this could lead to unpredictable consequences.


Constructor Summary
JdbcTemplate.RowCallbackHandlerResultSetExtractor(RowCallbackHandler rch)
           
 
Method Summary
 java.lang.Object extractData(java.sql.ResultSet rs)
          Implementations must implement this method to process all rows in the ResultSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcTemplate.RowCallbackHandlerResultSetExtractor

public JdbcTemplate.RowCallbackHandlerResultSetExtractor(RowCallbackHandler rch)
Method Detail

extractData

public java.lang.Object extractData(java.sql.ResultSet rs)
                             throws java.sql.SQLException
Description copied from interface: ResultSetExtractor
Implementations must implement this method to process all rows in the ResultSet.

Specified by:
extractData in interface ResultSetExtractor
Parameters:
rs - ResultSet to extract data from. Implementations should not close this: it will be closed by the JdbcTemplate.
Returns:
an arbitrary result object
Throws:
java.sql.SQLException - if a SQLException is encountered getting column values or navigating (that is, there's no need to catch SQLException)


Copyright (C) 2003-2004 The Spring Framework Project.