| Package | Description |
|---|---|
| org.jdbi.v3.core.config |
The
config classes define a configuration registry starting from
each Jdbi instance. |
| org.jdbi.v3.core.mapper |
mappers take the JDBC ResultSet and produce Java results. |
| org.jdbi.v3.core.mapper.reflect |
mapper.reflect provides RowMappers that reflectively
construct result types using techniques like constructor injection
or JavaBeans setters. |
| org.jdbi.v3.core.result |
result provides the streaming interface that reads rows from JDBC
and drives the mapper and collector processes to
produce results. |
| org.jdbi.v3.core.statement |
The
statement package provides most of the Fluent API
to drive statement execution. |
| Modifier and Type | Method and Description |
|---|---|
default This |
Configurable.registerRowMapper(RowMapper<?> mapper)
Convenience method for
getConfig(RowMappers.class).register(mapper) |
default This |
Configurable.registerRowMapper(Type type,
RowMapper<?> mapper)
Convenience method for
getConfig(RowMappers.class).register(type, mapper) |
| Modifier and Type | Class and Description |
|---|---|
class |
JoinRowMapper
A
RowMapper implementation to easily compose existing
RowMappers. |
class |
MapEntryMapper<K,V>
Maps rows to
Map.Entry<K, V>, provided there are mappers registered for types K and V. |
class |
MapMapper
Yo dawg, I heard you like maps, so I made you a mapper that maps rows into
Map<String,Object>. |
class |
SingleColumnMapper<T>
Adapts a
ColumnMapper into a RowMapper by mapping a single column. |
| Modifier and Type | Method and Description |
|---|---|
RowMapper<JoinRow> |
JoinRowMapper.specialize(ResultSet r,
StatementContext ctx) |
default RowMapper<T> |
RowMapper.specialize(ResultSet rs,
StatementContext ctx)
Returns a specialized row mapper, optimized for the given result set.
|
RowMapper<Map.Entry<K,V>> |
MapEntryMapper.specialize(ResultSet rs,
StatementContext ctx) |
RowMapper<Map<String,Object>> |
MapMapper.specialize(ResultSet rs,
StatementContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
Optional<RowMapper<?>> |
RowMapperFactory.build(Type type,
ConfigRegistry config)
Supplies a row mapper which will map result set rows to type if the factory supports it; empty otherwise.
|
<T> Optional<RowMapper<T>> |
RowMappers.findFor(Class<T> type)
Obtain a row mapper for the given type in the given context.
|
<T> Optional<RowMapper<T>> |
RowMappers.findFor(GenericType<T> type)
Obtain a row mapper for the given type in the given context.
|
Optional<RowMapper<?>> |
RowMappers.findFor(Type type)
Obtain a row mapper for the given type in the given context.
|
| Modifier and Type | Method and Description |
|---|---|
static RowMapperFactory |
RowMapperFactory.of(Type type,
RowMapper<?> mapper)
|
RowMappers |
RowMappers.register(RowMapper<?> mapper)
Register a row mapper which will have its parameterized type inspected to determine what it maps to.
|
RowMappers |
RowMappers.register(Type type,
RowMapper<?> mapper)
Register a row mapper for a given type.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BeanMapper<T>
A row mapper which maps the columns in a statement into a JavaBean.
|
class |
ConstructorMapper<T>
A row mapper which maps the fields in a result set into a constructor.
|
class |
FieldMapper<T>
A row mapper which maps the columns in a statement into an object, using reflection
to set fields on the object.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> RowMapper<T> |
FieldMapper.of(Class<T> type)
Returns a mapper for the given bean class
|
static <T> RowMapper<T> |
ConstructorMapper.of(Class<T> type)
Return a ConstructorMapper for the given type.
|
static <T> RowMapper<T> |
BeanMapper.of(Class<T> type)
Returns a mapper for the given bean class
|
static <T> RowMapper<T> |
FieldMapper.of(Class<T> type,
String prefix)
Returns a mapper for the given bean class
|
static <T> RowMapper<T> |
ConstructorMapper.of(Class<T> type,
String prefix)
Return a ConstructorMapper for the given type and prefix.
|
static <T> RowMapper<T> |
BeanMapper.of(Class<T> type,
String prefix)
Returns a mapper for the given bean class
|
static <T> RowMapper<T> |
ConstructorMapper.of(Constructor<T> constructor)
Return a ConstructorMapper using the given constructor
|
static <T> RowMapper<T> |
ConstructorMapper.of(Constructor<T> constructor,
String prefix)
Instantiate a ConstructorMapper using the given constructor and prefix
|
RowMapper<T> |
FieldMapper.specialize(ResultSet rs,
StatementContext ctx) |
RowMapper<T> |
ConstructorMapper.specialize(ResultSet rs,
StatementContext ctx) |
RowMapper<T> |
BeanMapper.specialize(ResultSet rs,
StatementContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
default <T> ResultIterable<T> |
ResultBearing.map(RowMapper<T> mapper)
Maps this result set to a
ResultIterable, using the given row mapper. |
static <T> ResultIterable<T> |
ResultIterable.of(Supplier<ResultSet> supplier,
RowMapper<T> mapper,
StatementContext ctx)
Returns a ResultIterable backed by the given result set supplier, mapper, and context.
|
| Modifier and Type | Method and Description |
|---|---|
<T> Optional<RowMapper<T>> |
StatementContext.findRowMapperFor(Class<T> type)
Obtain a row mapper for the given type in this context.
|
<T> Optional<RowMapper<T>> |
StatementContext.findRowMapperFor(GenericType<T> type)
Obtain a row mapper for the given type in this context.
|
Optional<RowMapper<?>> |
StatementContext.findRowMapperFor(Type type)
Obtain a row mapper for the given type in this context.
|
Copyright © 2017. All rights reserved.