Package com.landawn.abacus.jdbc
Interface Jdbc.BiRowMapper<T>
- Type Parameters:
T
-
- All Superinterfaces:
com.landawn.abacus.util.Throwables.BiFunction<ResultSet,
List<String>, T, SQLException>
- Enclosing class:
- Jdbc
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface Jdbc.BiRowMapper<T>
extends com.landawn.abacus.util.Throwables.BiFunction<ResultSet,List<String>,T,SQLException>
The Interface BiRowMapper.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Jdbc.BiRowMapper<Object[]>
The Constant TO_ARRAY.static final Jdbc.BiRowMapper<com.landawn.abacus.util.EntityId>
static final Jdbc.BiRowMapper<Map<String,
Object>> The Constant TO_LINKED_HASH_MAP.static final Jdbc.BiRowMapper<List<Object>>
The Constant TO_LIST.static final Jdbc.BiRowMapper<Map<String,
Object>> The Constant TO_MAP. -
Method Summary
Modifier and TypeMethodDescriptiondefault <R> Jdbc.BiRowMapper<R>
andThen
(com.landawn.abacus.util.Throwables.Function<? super T, ? extends R, SQLException> after) builder()
builder
(Jdbc.ColumnGetter<?> defaultColumnGetter) static <A,
B, C> Jdbc.BiRowMapper<com.landawn.abacus.util.Tuple.Tuple3<A, B, C>> combine
(Jdbc.BiRowMapper<? extends A> rowMapper1, Jdbc.BiRowMapper<? extends B> rowMapper2, Jdbc.BiRowMapper<? extends C> rowMapper3) static <T,
U> Jdbc.BiRowMapper<com.landawn.abacus.util.Tuple.Tuple2<T, U>> combine
(Jdbc.BiRowMapper<? extends T> rowMapper1, Jdbc.BiRowMapper<? extends U> rowMapper2) static <T> Jdbc.BiRowMapper<T>
from
(Jdbc.RowMapper<? extends T> rowMapper) static <T> Jdbc.BiRowMapper<T>
It's stateful.static <T> Jdbc.BiRowMapper<T>
Don't cache or reuse the returnedBiRowMapper
instance.static <T> Jdbc.BiRowMapper<T>
to
(Class<? extends T> targetClass, Predicate<? super String> columnNameFilter, Function<? super String, String> columnNameConverter) It's stateful.static <T> Jdbc.BiRowMapper<T>
to
(Class<? extends T> targetClass, Predicate<? super String> columnNameFilter, Function<? super String, String> columnNameConverter, boolean ignoreNonMatchedColumns) It's stateful.static <T> Jdbc.BiRowMapper<T>
It's stateful.static <T> Jdbc.BiRowMapper<T>
to
(Class<? extends T> entityClass, Map<String, String> prefixAndFieldNameMap, boolean ignoreNonMatchedColumns) It's stateful.static Jdbc.BiRowMapper<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray>
It's stateful.static Jdbc.BiRowMapper<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray>
toDisposableObjArray
(Class<?> entityClass) It's stateful.static Jdbc.BiRowMapper<Map<String,
Object>> toMap
(Jdbc.RowExtractor rowExtractor) static Jdbc.BiRowMapper<Map<String,
Object>> toMap
(Jdbc.RowExtractor rowExtractor, BiPredicate<String, Object> valueFilter, IntFunction<Map<String, Object>> mapSupplier) static Jdbc.BiRowMapper<Map<String,
Object>> toMap
(Jdbc.RowExtractor rowExtractor, Function<? super String, String> columnNameConverter, IntFunction<Map<String, Object>> mapSupplier) It's stateful.static Jdbc.BiRowMapper<Map<String,
Object>> toMap
(BiPredicate<String, Object> valueFilter, IntFunction<Map<String, Object>> mapSupplier) static Jdbc.BiRowMapper<Map<String,
Object>> It's stateful.static Jdbc.BiRowMapper<Map<String,
Object>> toMap
(Function<? super String, String> columnNameConverter, IntFunction<Map<String, Object>> mapSupplier) static Jdbc.BiRowMapper<Map<String,
Object>> default Jdbc.RowMapper<T>
Deprecated.because it's stateful and may be misused easily&frequentlyMethods inherited from interface com.landawn.abacus.util.Throwables.BiFunction
unchecked
-
Field Details
-
TO_ARRAY
The Constant TO_ARRAY. -
TO_LIST
The Constant TO_LIST. -
TO_MAP
The Constant TO_MAP. -
TO_LINKED_HASH_MAP
The Constant TO_LINKED_HASH_MAP. -
TO_ENTITY_ID
-
-
Method Details
-
apply
- Specified by:
apply
in interfacecom.landawn.abacus.util.Throwables.BiFunction<ResultSet,
List<String>, T, SQLException> - Parameters:
rs
-columnLabels
-- Returns:
- Throws:
SQLException
-
andThen
default <R> Jdbc.BiRowMapper<R> andThen(com.landawn.abacus.util.Throwables.Function<? super T, ? extends R, SQLException> after) - Type Parameters:
R
-- Parameters:
after
-- Returns:
-
toRowMapper
Deprecated.because it's stateful and may be misused easily&frequentlyIt's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Returns:
-
from
- Type Parameters:
T
-- Parameters:
rowMapper
-- Returns:
-
combine
static <T,U> Jdbc.BiRowMapper<com.landawn.abacus.util.Tuple.Tuple2<T,U>> combine(Jdbc.BiRowMapper<? extends T> rowMapper1, Jdbc.BiRowMapper<? extends U> rowMapper2) - Type Parameters:
T
-U
-- Parameters:
rowMapper1
-rowMapper2
-- Returns:
-
combine
static <A,B, Jdbc.BiRowMapper<com.landawn.abacus.util.Tuple.Tuple3<A,C> B, combineC>> (Jdbc.BiRowMapper<? extends A> rowMapper1, Jdbc.BiRowMapper<? extends B> rowMapper2, Jdbc.BiRowMapper<? extends C> rowMapper3) - Type Parameters:
A
-B
-C
-- Parameters:
rowMapper1
-rowMapper2
-rowMapper3
-- Returns:
-
to
It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Type Parameters:
T
-- Parameters:
targetClass
-- Returns:
-
to
@SequentialOnly @Stateful static <T> Jdbc.BiRowMapper<T> to(Class<? extends T> targetClass, boolean ignoreNonMatchedColumns) Don't cache or reuse the returnedBiRowMapper
instance. It's stateful.- Type Parameters:
T
-- Parameters:
targetClass
-ignoreNonMatchedColumns
-- Returns:
-
to
@SequentialOnly @Stateful static <T> Jdbc.BiRowMapper<T> to(Class<? extends T> targetClass, Predicate<? super String> columnNameFilter, Function<? super String, String> columnNameConverter) It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Type Parameters:
T
-- Parameters:
targetClass
-columnNameFilter
-columnNameConverter
-- Returns:
-
to
@SequentialOnly @Stateful static <T> Jdbc.BiRowMapper<T> to(Class<? extends T> targetClass, Predicate<? super String> columnNameFilter, Function<? super String, String> columnNameConverter, boolean ignoreNonMatchedColumns) It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Type Parameters:
T
-- Parameters:
targetClass
-columnNameFilter
-columnNameConverter
-ignoreNonMatchedColumns
-- Returns:
-
to
@SequentialOnly @Stateful static <T> Jdbc.BiRowMapper<T> to(Class<? extends T> entityClass, Map<String, String> prefixAndFieldNameMap) It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Type Parameters:
T
-- Parameters:
entityClass
-prefixAndFieldNameMap
-- Returns:
-
to
@SequentialOnly @Stateful static <T> Jdbc.BiRowMapper<T> to(Class<? extends T> entityClass, Map<String, String> prefixAndFieldNameMap, boolean ignoreNonMatchedColumns) It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Type Parameters:
T
-- Parameters:
entityClass
-prefixAndFieldNameMap
-ignoreNonMatchedColumns
-- Returns:
-
toMap
- Parameters:
valueFilter
-- Returns:
-
toMap
static Jdbc.BiRowMapper<Map<String,Object>> toMap(BiPredicate<String, Object> valueFilter, IntFunction<Map<String, Object>> mapSupplier) - Parameters:
valueFilter
-mapSupplier
-- Returns:
-
toMap
@SequentialOnly @Stateful static Jdbc.BiRowMapper<Map<String,Object>> toMap(Jdbc.RowExtractor rowExtractor, BiPredicate<String, Object> valueFilter, IntFunction<Map<String, Object>> mapSupplier) - Parameters:
rowExtractor
-valueFilter
-mapSupplier
-- Returns:
-
toMap
@SequentialOnly @Stateful static Jdbc.BiRowMapper<Map<String,Object>> toMap(Function<? super String, String> columnNameConverter) It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Parameters:
columnNameConverter
-- Returns:
-
toMap
@SequentialOnly @Stateful static Jdbc.BiRowMapper<Map<String,Object>> toMap(Function<? super String, String> columnNameConverter, IntFunction<Map<String, Object>> mapSupplier) - Parameters:
columnNameConverter
-mapSupplier
-- Returns:
-
toMap
@SequentialOnly @Stateful static Jdbc.BiRowMapper<Map<String,Object>> toMap(Jdbc.RowExtractor rowExtractor, Function<? super String, String> columnNameConverter, IntFunction<Map<String, Object>> mapSupplier) It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Parameters:
rowExtractor
-columnNameConverter
-mapSupplier
-- Returns:
-
toMap
@SequentialOnly @Stateful static Jdbc.BiRowMapper<Map<String,Object>> toMap(Jdbc.RowExtractor rowExtractor) - Parameters:
rowExtractor
-- Returns:
-
toDisposableObjArray
@Beta @SequentialOnly @Stateful static Jdbc.BiRowMapper<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray> toDisposableObjArray()It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Returns:
-
toDisposableObjArray
@Beta @SequentialOnly @Stateful static Jdbc.BiRowMapper<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray> toDisposableObjArray(Class<?> entityClass) It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.- Parameters:
entityClass
- used to fetch column/row value fromResultSet
by the type of fields/columns defined in this class.- Returns:
-
builder
- Returns:
-
builder
- Parameters:
defaultColumnGetter
-- Returns:
-