org.hdpagination.dataaccess.support.jdbc
Class ColumnMapRowMapper

java.lang.Object
  extended by org.hdpagination.dataaccess.support.jdbc.ColumnMapRowMapper
All Implemented Interfaces:
java.io.Serializable, RowMapper

public class ColumnMapRowMapper
extends java.lang.Object
implements RowMapper

RowMapper implementation that converts a row into a new instance of java.util.Map representing all columns as key-value pairs: one entry for each column, with the column name (low case) as key, column value as the value.

Since:
1.3.1
Author:
Liangfeng Ren
See Also:
Serialized Form

Constructor Summary
ColumnMapRowMapper()
           
 
Method Summary
 java.lang.Object processRow(java.sql.ResultSet rs)
          Implementations must implement this method to map each row of data in the ResultSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnMapRowMapper

public ColumnMapRowMapper()
Method Detail

processRow

public java.lang.Object processRow(java.sql.ResultSet rs)
                            throws java.sql.SQLException
Description copied from interface: RowMapper
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.

Specified by:
processRow in interface RowMapper
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.