Class BigDecimalScalarHandler

java.lang.Object
org.apache.commons.dbutils.handlers.ScalarHandler<BigDecimal>
org.knowm.yank.handlers.BigDecimalScalarHandler
All Implemented Interfaces:
org.apache.commons.dbutils.ResultSetHandler<BigDecimal>

public class BigDecimalScalarHandler extends org.apache.commons.dbutils.handlers.ScalarHandler<BigDecimal>
  • Constructor Details

    • BigDecimalScalarHandler

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

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

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

    • handle

      public BigDecimal handle(ResultSet rs) throws SQLException
      Returns one ResultSet column as an object via the ResultSet.getObject() method that performs type conversions.
      Specified by:
      handle in interface org.apache.commons.dbutils.ResultSetHandler<BigDecimal>
      Overrides:
      handle in class org.apache.commons.dbutils.handlers.ScalarHandler<BigDecimal>
      Parameters:
      rs - ResultSet to process.
      Returns:
      The column or null if there are no rows in the ResultSet.
      Throws:
      SQLException - if a database access error occurs
      ClassCastException - if the class datatype does not match the column type
      See Also:
      • ResultSetHandler.handle(java.sql.ResultSet)