R - The type of the Optional result.@FunctionalInterface public interface NullableColumnMapper<R> extends ColumnMapper<Optional<R>>
ColumnMapper which is apropriate for retrieving nullable columns
from a ResultSet. If the result from a mapping (or any Function in the mapping chain)
is null, the result is always Optional.empty(), and the chain of any remaining
mapping functions are "short-circuited" and not invoked.| Modifier and Type | Method and Description |
|---|---|
default <S> NullableColumnMapper<S> |
andThen(Function<? super R,S> mapper)
Create a new
NullableColumnMapper which will map the result of this one
using the given function. |
static <R> NullableColumnMapper<R> |
of(ThrowingBiFunction<String,ResultSet,R,? extends SQLException> function) |
forColumn, mapstatic <R> NullableColumnMapper<R> of(ThrowingBiFunction<String,ResultSet,R,? extends SQLException> function)
default <S> NullableColumnMapper<S> andThen(Function<? super R,S> mapper)
NullableColumnMapper which will map the result of this one
using the given function.S - The type of Optional<S> the new mapper yields from a ResultSetmapper - the mapping function. This will not be called if the result of the mapping chain is already
Optional.empty().Copyright © 2019 Digipost. All rights reserved.