R - The type of object this RowMapper yields from a ResultSet@FunctionalInterface public interface RowMapper<R>
ResultSet to an object.
The given ResultSet is expected to be positioned at the "current" row, i.e. the RowMapper
is not expected to be required to do any cursor placement before doing any value extraction.| Modifier and Type | Interface and Description |
|---|---|
static interface |
RowMapper.Decupled<T,U,V,W,X,Z,A,B,C,D> |
static interface |
RowMapper.Hextupled<T,U,V,W,X,Z> |
static interface |
RowMapper.Nonupled<T,U,V,W,X,Z,A,B,C> |
static interface |
RowMapper.Octupled<T,U,V,W,X,Z,A,B> |
static interface |
RowMapper.Pentupled<T,U,V,W,X> |
static interface |
RowMapper.Quadrupled<T,U,V,W> |
static interface |
RowMapper.Septupled<T,U,V,W,X,Z,A> |
static interface |
RowMapper.Tripled<T,U,V> |
static interface |
RowMapper.Tupled<T,U> |
| Modifier and Type | Method and Description |
|---|---|
default <S> RowMapper<S> |
andThen(Function<? super R,S> resultMapper)
Create a new mapper which takes the result of this mapper and applies
the given
Function to yield another result. |
default <S> RowMapper.Tupled<R,S> |
combinedWith(RowMapper<S> otherMapper)
Create a new row mapper which first runs this mapper and then the given mapper, and
combines the two results into a tuple-type container.
|
R |
map(ResultSet resultSet)
Obtain the result from the current row of a
ResultSet. |
static <R> RowMapper<R> |
of(ThrowingFunction<ResultSet,R,SQLException> mapper) |
static <R> RowMapper<R> of(ThrowingFunction<ResultSet,R,SQLException> mapper)
R map(ResultSet resultSet) throws SQLException
ResultSet.resultSet - the ResultSetSQLException - if any error happens when processing the ResultSet. May be if the name/label is not valid,
if a database access error occurs, or this method is called on a closed result set.default <S> RowMapper<S> andThen(Function<? super R,S> resultMapper)
Function to yield another result.S - the output type of the given resultMapper function,
which also become the type of the result produced by the new
row mapper.resultMapper - the function to apply to the resultdefault <S> RowMapper.Tupled<R,S> combinedWith(RowMapper<S> otherMapper)
otherMapper - the mapper to run in addition to this.Copyright © 2018 Digipost. All rights reserved.