Package org.jdbi.v3.core.mapper
Class SingleColumnMapper<T>
- java.lang.Object
-
- org.jdbi.v3.core.mapper.SingleColumnMapper<T>
-
- All Implemented Interfaces:
RowMapper<T>
public class SingleColumnMapper<T> extends java.lang.Object implements RowMapper<T>
Adapts aColumnMapperinto aRowMapperby mapping a single column.
-
-
Constructor Summary
Constructors Constructor 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, java.lang.String columnLabel)Constructs a row mapper which maps the column with the given label.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tmap(java.sql.ResultSet r, StatementContext ctx)Map the current row of the result set.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jdbi.v3.core.mapper.RowMapper
init, specialize
-
-
-
-
Constructor Detail
-
SingleColumnMapper
public SingleColumnMapper(ColumnMapper<T> mapper)
Constructs a row mapper which maps the first column.- Parameters:
mapper- the column mapper to delegate to for mapping.
-
SingleColumnMapper
public SingleColumnMapper(ColumnMapper<T> mapper, int columnNumber)
Constructs a row mapper which maps the given column number.- Parameters:
mapper- the column mapper to delegate to for mappingcolumnNumber- the column number (1-based) to map
-
SingleColumnMapper
public SingleColumnMapper(ColumnMapper<T> mapper, java.lang.String columnLabel)
Constructs a row mapper which maps the column with the given label.- Parameters:
mapper- the column mapper to delegate to for mappingcolumnLabel- the label of the column to map
-
-
Method Detail
-
map
public T map(java.sql.ResultSet r, StatementContext ctx) throws java.sql.SQLException
Description copied from interface:RowMapperMap the current row of the result set. This method should not cause the result set to advance; allow Jdbi to do that, please.
-
-