Interface RowCallbackHandler

All Known Subinterfaces:
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.

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


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.

rs - the ResultSet to process
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.