com.onewebsql.util.jdbc
Class MapRowHandler<T>

java.lang.Object
  extended by com.onewebsql.util.jdbc.MapRowHandler<T>
Type Parameters:
T - type of values in the array
All Implemented Interfaces:
RowHandler<Map<String,T>>

public class MapRowHandler<T>
extends Object
implements RowHandler<Map<String,T>>

Implementation of the interface RowHandler which converts a row into a map. The keys in the map are column names, the values are values returned by ResultSet


Constructor Summary
MapRowHandler()
          Creates a new MapRowHandler object.
 
Method Summary
 Map<String,T> getObject(ResultSet resultSet)
          Converts the specified ResultSet into an map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapRowHandler

public MapRowHandler()
Creates a new MapRowHandler object.

Method Detail

getObject

public Map<String,T> getObject(ResultSet resultSet)
                        throws SQLException
Converts the specified ResultSet into an map. The keys in the map are column names, the values are values returned by the specified ResultSet object.

Specified by:
getObject in interface RowHandler<Map<String,T>>
Parameters:
resultSet - SQL query result
Returns:
an object created from the firs column of the current row in the specified ResultSet
Throws:
SQLException - if an exception is thrown when the object is created


Copyright © 2011-2013 e-point SA. All Rights Reserved.