Class MapListHandler
- java.lang.Object
-
- org.apache.commons.dbutils.handlers.AbstractListHandler<Map<String,Object>>
-
- 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 aResultSet
into aList
ofMap
s. This class is thread safe.- See Also:
ResultSetHandler
-
-
Constructor Summary
Constructors Constructor Description MapListHandler()
Creates a new instance of MapListHandler using aBasicRowProcessor
for conversion.MapListHandler(RowProcessor convert)
Creates a new instance of MapListHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Object>
handleRow(ResultSet resultSet)
Converts theResultSet
row into aMap
object.-
Methods inherited from class org.apache.commons.dbutils.handlers.AbstractListHandler
handle
-
-
-
-
Constructor Detail
-
MapListHandler
public MapListHandler()
Creates a new instance of MapListHandler using aBasicRowProcessor
for conversion.
-
MapListHandler
public MapListHandler(RowProcessor convert)
Creates a new instance of MapListHandler.- Parameters:
convert
- TheRowProcessor
implementation to use when converting rows into Maps.
-
-
Method Detail
-
handleRow
protected Map<String,Object> handleRow(ResultSet resultSet) throws SQLException
Converts theResultSet
row into aMap
object.- Specified by:
handleRow
in classAbstractListHandler<Map<String,Object>>
- Parameters:
resultSet
-ResultSet
to process.- Returns:
- A
Map
, never null. - Throws:
SQLException
- if a database access error occurs- See Also:
AbstractListHandler.handle(ResultSet)
-
-