public class SingleColumnMapper<T> extends Object implements RowMapper<T>
ColumnMapper into a RowMapper by mapping a single column.| Constructor and Description |
|---|
SingleColumnMapper(ColumnMapper<T> mapper)
Constructs a row mapper which maps the first column.
|
SingleColumnMapper(ColumnMapper<T> mapper,
int columnNumber)
Constructs a row mapper which maps the given column number.
|
SingleColumnMapper(ColumnMapper<T> mapper,
String columnLabel)
Constructs a row mapper which maps the column with the given label.
|
| Modifier and Type | Method and Description |
|---|---|
T |
map(ResultSet r,
StatementContext ctx)
Map the current row of the result set.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitspecializepublic SingleColumnMapper(ColumnMapper<T> mapper)
mapper - the column mapper to delegate to for mapping.public SingleColumnMapper(ColumnMapper<T> mapper, int columnNumber)
mapper - the column mapper to delegate to for mappingcolumnNumber - the column number (1-based) to mappublic SingleColumnMapper(ColumnMapper<T> mapper, String columnLabel)
mapper - the column mapper to delegate to for mappingcolumnLabel - the label of the column to mappublic T map(ResultSet r, StatementContext ctx) throws SQLException
RowMappermap in interface RowMapper<T>r - the result set being iteratedctx - the statement contextSQLException - if anything goes wrong go ahead and let this percolate; Jdbi will handle itCopyright © 2019. All rights reserved.