org.springframework.jdbc.core
Interface ResultReader

All Superinterfaces:
RowCallbackHandler
All Known Implementing Classes:
MappingSqlQueryWithParameters.ResultReaderImpl, RowMapperResultReader, UpdatableSqlQuery.ResultReaderImpl

public interface ResultReader
extends RowCallbackHandler

Extension of RowCallbackHandler interface that saves the accumulated results as a List.

Allows to make a results list available in a uniform manner. JdbcTemplate's query methods will return the results list in that case, else returning null (-> result state is solely available from RowCallbackHandler object).

A convenient out-of-the-box implementation of ResultReader is the RowMapperResultReader adapter which delegates row mapping to a RowMapper. Note that a RowMapper object is typically stateless and thus reusable; just the RowMapperResultReader adapter is stateful.

Author:
Rod Johnson
See Also:
RowMapperResultReader

Method Summary
 List getResults()
          Return all results, disconnected from the JDBC ResultSet.
 
Methods inherited from interface org.springframework.jdbc.core.RowCallbackHandler
processRow
 

Method Detail

getResults

List getResults()
Return all results, disconnected from the JDBC ResultSet. Never returns null; returns the empty collection if there were no results.



Copyright (c) 2002-2005 The Spring Framework Project.