org.springframework.jdbc.core
Interface RowMapper

public interface RowMapper
An interface used by JdbcTemplate for mapping returned result sets. Implementations of this interface perform the actual work of mapping rows, but don't need to worry about exception handling. SQLExceptions will be caught and handled correctly by the JdbcTemplate class.

Typically used either for JdbcTemplate's query methods (with RowMapperResultReader adapters) or for out parameters of stored procedures. RowMapper objects are typically stateless and thus reusable; they are ideal choices for implementing row-mapping logic in a single place.

Alternatively, consider subclassing MappingSqlQuery from the jdbc.object package: Instead of working with separate JdbcTemplate and RowMapper objects, you can have executable query objects (containing row-mapping logic) there.

SinceNot specified.
VersionNot specified.
AuthorThomas Risberg
Wiki javadoc Use textile entry format.
Add your comments here.
Method Summary
Object mapRow( ResultSet rs, int rowNum )
Implementations must implement this method to map each row of data in the ResultSet.
mapRow
public Object mapRow ( ResultSet rs, int rowNum )
throws
Implementations must implement this method to map each row of data in the ResultSet. This method should not call next() on the ResultSet, but extract the current values.
Parameters
TypeNameDescription
ResultSet rs the ResultSet to map
int rowNum The number of the current row
Exceptions
SQLException if a SQLException is encountered getting column values (that is, there's no need to catch SQLException)
Wiki javadoc Use textile entry format.
Add your comments here.