Class ColumnListHandler<T>

java.lang.Object
org.apache.commons.dbutils.handlers.AbstractListHandler<T>
org.apache.commons.dbutils.handlers.ColumnListHandler<T>
Type Parameters:
T - The type of the column.
All Implemented Interfaces:
ResultSetHandler<List<T>>

public class ColumnListHandler<T> extends AbstractListHandler<T>
ResultSetHandler implementation that converts one ResultSet column into a List of Objects. This class is thread safe.
Since:
DbUtils 1.1
See Also:
  • Field Details

    • columnIndex

      private final int columnIndex
      The column number to retrieve.
    • columnName

      private final String columnName
      The column name to retrieve. Either columnName or columnIndex will be used but never both.
  • Constructor Details

    • ColumnListHandler

      public ColumnListHandler()
      Creates a new instance of ColumnListHandler. The first column of each row will be returned from handle().
    • ColumnListHandler

      public ColumnListHandler(int columnIndex)
      Creates a new instance of ColumnListHandler.
      Parameters:
      columnIndex - The index of the column to retrieve from the ResultSet.
    • ColumnListHandler

      public ColumnListHandler(String columnName)
      Creates a new instance of ColumnListHandler.
      Parameters:
      columnName - The name of the column to retrieve from the ResultSet.
    • ColumnListHandler

      private ColumnListHandler(int columnIndex, String columnName)
      Private Helper
      Parameters:
      columnIndex - The index of the column to retrieve from the ResultSet.
      columnName - The name of the column to retrieve from the ResultSet.
  • Method Details