Class BeanListHandler<T>

java.lang.Object
org.apache.commons.dbutils.handlers.BeanListHandler<T>
Type Parameters:
T - the target bean type
All Implemented Interfaces:
ResultSetHandler<List<T>>

public class BeanListHandler<T> extends Object implements ResultSetHandler<List<T>>
ResultSetHandler implementation that converts a ResultSet into a List of beans. This class is thread safe.
See Also:
  • Field Details

    • type

      private final Class<? extends T> type
      The Class of beans produced by this handler.
    • convert

      private final RowProcessor convert
      The RowProcessor implementation to use when converting rows into beans.
  • Constructor Details

    • BeanListHandler

      public BeanListHandler(Class<? extends T> type)
      Creates a new instance of BeanListHandler.
      Parameters:
      type - The Class that objects returned from handle() are created from.
    • BeanListHandler

      public BeanListHandler(Class<? extends T> type, RowProcessor convert)
      Creates a new instance of BeanListHandler.
      Parameters:
      type - The Class that objects returned from handle() are created from.
      convert - The RowProcessor implementation to use when converting rows into beans.
  • Method Details