Package org.knowm.yank.handlers
Class DoubleScalarHandler
java.lang.Object
org.apache.commons.dbutils.handlers.ScalarHandler<Double>
org.knowm.yank.handlers.DoubleScalarHandler
- All Implemented Interfaces:
org.apache.commons.dbutils.ResultSetHandler<Double>
-
Constructor Summary
ConstructorDescriptionCreates a new instance of ColumnListHandler.DoubleScalarHandler
(int columnIndex) Creates a new instance of ColumnListHandler.DoubleScalarHandler
(String columnName) Creates a new instance of ColumnListHandler. -
Method Summary
-
Constructor Details
-
DoubleScalarHandler
public DoubleScalarHandler()Creates a new instance of ColumnListHandler. The first column of each row will be returned fromhandle()
. -
DoubleScalarHandler
public DoubleScalarHandler(int columnIndex) Creates a new instance of ColumnListHandler.- Parameters:
columnIndex
- The index of the column to retrieve from theResultSet
.
-
DoubleScalarHandler
Creates a new instance of ColumnListHandler.- Parameters:
columnName
- The name of the column to retrieve from theResultSet
.
-
-
Method Details
-
handle
Returns oneResultSet
column as an object via theResultSet.getObject()
method that performs type conversions.- Specified by:
handle
in interfaceorg.apache.commons.dbutils.ResultSetHandler<Double>
- Overrides:
handle
in classorg.apache.commons.dbutils.handlers.ScalarHandler<Double>
- Parameters:
rs
-ResultSet
to process.- Returns:
- The column or
null
if there are no rows in theResultSet
. - Throws:
SQLException
- if a database access error occursClassCastException
- if the class datatype does not match the column type- See Also:
-
ResultSetHandler.handle(java.sql.ResultSet)
-