public class TimestampColumnHandler extends Object implements ColumnHandler<Timestamp>
Constructor and Description |
---|
TimestampColumnHandler() |
Modifier and Type | Method and Description |
---|---|
Timestamp |
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 TimestampColumnHandler()
public Timestamp 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<Timestamp>
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<Timestamp>
propType
- The type of the target parameter.propType
; false otherwise.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.