public class IntegerColumnHandler extends Object implements ColumnHandler<Integer>
Constructor and Description |
---|
IntegerColumnHandler() |
Modifier and Type | Method and Description |
---|---|
Integer |
apply(ResultSet resultSet,
int columnIndex)
Retrieves the current row's column value from a
ResultSet and stores it into an instance of propType . |
boolean |
match(Class<?> propType)
Tests whether to handle a column targeted for a value type matching
propType . |
public IntegerColumnHandler()
public Integer apply(ResultSet resultSet, int columnIndex) throws SQLException
ColumnHandler
ResultSet
and stores it into an instance of propType
. This method is only called if
ColumnHandler.match(Class)
returns true.apply
in interface ColumnHandler<Integer>
resultSet
- The source result set. This must be on the correct row.columnIndex
- The position of the column to retrieve, a 1-based index.SQLException
- if the columnIndex is not valid; if a database access error occurs or this method is called on a closed result setpublic boolean match(Class<?> propType)
ColumnHandler
propType
.match
in interface ColumnHandler<Integer>
propType
- The type of the target parameter.propType
; false otherwise.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.