org.jminor.common.db
Interface ResultPacker<T>


public interface ResultPacker<T>

A ResultPacker packs the contents of a ResultSet into a List.


Method Summary
 List<T> pack(ResultSet resultSet, int fetchCount)
          Iterates through the given ResultSet, packing its contents into a List
 

Method Detail

pack

List<T> pack(ResultSet resultSet,
             int fetchCount)
             throws SQLException
Iterates through the given ResultSet, packing its contents into a List

Parameters:
resultSet - the object containing the query result to process
fetchCount - the number of records to fetch from the result set, a negative value means all should be fetched.
Returns:
a List containing the data from the query result
Throws:
SQLException - thrown if anything goes wrong during the packing