public class ParameterizedSingleColumnRowMapper<T> extends SingleColumnRowMapper<T> implements ParameterizedRowMapper<T>
ParameterizedRowMapper
implementation that converts a single column
into a single result value per row. Expects to operate on a
java.sql.ResultSet
that just contains a single column.
The type of the result value for each row can be specified. The value
for the single column will be extracted from the ResultSet
and converted into the specified target type.
Uses Java 5 covariant return types to override the return type of the
SingleColumnRowMapper.mapRow(java.sql.ResultSet, int)
method to be the type parameter T
.
Constructor and Description |
---|
ParameterizedSingleColumnRowMapper() |
Modifier and Type | Method and Description |
---|---|
static <T> ParameterizedSingleColumnRowMapper<T> |
newInstance(java.lang.Class<T> requiredType)
Static factory method to create a new ParameterizedSingleColumnRowMapper
(with the required type specified only once).
|
convertValueToRequiredType, getColumnValue, getColumnValue, mapRow, setRequiredType
public static <T> ParameterizedSingleColumnRowMapper<T> newInstance(java.lang.Class<T> requiredType)
requiredType
- the type that each result object is expected to match