org.hdpagination.dataaccess.support.jdbc
Interface RowMapper

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
BeanPropertyRowMapper, ColumnMapRowMapper

public interface RowMapper
extends java.io.Serializable

An interface used by JdbcQueryCallbackWrapper for mapping rows of a ResultSet on a per-row basis. Typically used for JdbcQueryCallbackWrapper's factory method org.hdpagination.dataaccess.support.jdbc.JdbcQueryCallbackWrapper#newInstance(). RowMapper objects are typically stateless and thus reusable; they are an ideal choice for implementing row-mapping logic in a single place.

Since:
1.3.1
Author:
Liangfeng Ren

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

Method Detail

processRow

java.lang.Object processRow(java.sql.ResultSet rs)
                            throws java.sql.SQLException
Implementations must implement this method to map each row of data in the ResultSet. This method should not call next() on the ResultSet; it is only supposed to map values of the current row.

Parameters:
rs - the ResultSet to map (pre-initialized for the current row)
Returns:
the result object for the current row
Throws:
java.sql.SQLException - - if a SQLException is encountered getting column values (that is, there's no need to catch SQLException)


Copyright © 2008 HDPagination All Rights Reserved.