Interface ResultSetExtractor

All Known Implementing Classes:
JdbcTemplate.ListResultSetExtractor, JdbcTemplate.ObjectResultSetExtractor, JdbcTemplate.RowCallbackHandlerResultSetExtractor

public interface ResultSetExtractor

Callback interface used by the JdbcTemplate class's doWithResultSetXXXX() methods. Implementations of this interface perform the actual work of extracting results, but don't need to worry about exception handling. SQLExceptions will be caught and handled correctly by the JdbcTemplate class.

This interface is mainly used internally by JdbcTemplate. The RowCallbackHandler is usually a simpler choice for passing to callback methods.

April 24, 2003
$Id:,v 1.3 2004/03/18 02:46:08 trisberg Exp $
Rod Johnson
See Also:
JdbcTemplate, RowCallbackHandler

Method Summary
 java.lang.Object extractData(java.sql.ResultSet rs)
          Implementations must implement this method to process all rows in the ResultSet.

Method Detail


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

rs - ResultSet to extract data from. Implementations should not close this: it will be closed by the JdbcTemplate.
an arbitrary result object
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.