org.apache.commons.dbutils.handlers
Class MapListHandler

java.lang.Object
  extended by org.apache.commons.dbutils.handlers.AbstractListHandler<Map<String,Object>>
      extended by org.apache.commons.dbutils.handlers.MapListHandler
All Implemented Interfaces:
ResultSetHandler<List<Map<String,Object>>>

public class MapListHandler
extends AbstractListHandler<Map<String,Object>>

ResultSetHandler implementation that converts a ResultSet into a List of Maps. This class is thread safe.

See Also:
ResultSetHandler

Constructor Summary
MapListHandler()
          Creates a new instance of MapListHandler using a BasicRowProcessor for conversion.
MapListHandler(RowProcessor convert)
          Creates a new instance of MapListHandler.
 
Method Summary
protected  Map<String,Object> handleRow(ResultSet rs)
          Converts the ResultSet row into a Map object.
 
Methods inherited from class org.apache.commons.dbutils.handlers.AbstractListHandler
handle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapListHandler

public MapListHandler()
Creates a new instance of MapListHandler using a BasicRowProcessor for conversion.


MapListHandler

public MapListHandler(RowProcessor convert)
Creates a new instance of MapListHandler.

Parameters:
convert - The RowProcessor implementation to use when converting rows into Maps.
Method Detail

handleRow

protected Map<String,Object> handleRow(ResultSet rs)
                                throws SQLException
Converts the ResultSet row into a Map object.

Specified by:
handleRow in class AbstractListHandler<Map<String,Object>>
Parameters:
rs - ResultSet to process.
Returns:
A Map, never null.
Throws:
SQLException - if a database access error occurs
See Also:
AbstractListHandler.handle(ResultSet)


Copyright © 2002-2011 The Apache Software Foundation. All Rights Reserved.