org.springframework.jdbc.core
Interface RowCallbackHandler

All Known Subinterfaces:
ResultReader
All Known Implementing Classes:
MappingSqlQueryWithParameters.ResultReaderImpl, RowCountCallbackHandler, SqlParameter.ResultReaderStoredProcImpl, UpdatableSqlQuery.ResultReaderImpl

public interface RowCallbackHandler

One of the two central callback interfaces used by the JdbcTemplate class. 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.

Author:
Rod Johnson

Method Summary
 void processRow(java.sql.ResultSet rs)
          Implementations must implement this method to process each row of data in the ResultSet.
 

Method Detail

processRow

public void processRow(java.sql.ResultSet rs)
                throws java.sql.SQLException
Implementations must implement this method to process each row of data in the ResultSet. This method should not call next() on the ResultSet, but extract the current values. Exactly what the implementation chooses to do is up to it; a trivial implementation might simply count rows, while another implementation might build an XML document.

Parameters:
rs - the ResultSet to process
Throws:
java.sql.SQLException - if a SQLException is encountered getting column values (that is, there's no need to catch SQLException)


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