public class Mappers extends Object implements JdbiConfig<Mappers>
This configuration is merely a convenience class, and does not have any
configuration of its own. All methods delegate to RowMappers
or
ColumnMappers
.
Constructor and Description |
---|
Mappers() |
Modifier and Type | Method and Description |
---|---|
Mappers |
createCopy()
Returns a copy of this configuration object.
|
<T> Optional<RowMapper<T>> |
findFor(Class<T> type)
Obtain a mapper for the given type.
|
<T> Optional<RowMapper<T>> |
findFor(GenericType<T> type)
Obtain a mapper for the given type.
|
<T> Optional<RowMapper<T>> |
findFor(QualifiedType<T> type)
Obtain a mapper for the given qualified type.
|
Optional<RowMapper<?>> |
findFor(Type type)
Obtain a mapper for the given type.
|
void |
setRegistry(ConfigRegistry registry)
The registry will inject itself into the configuration object.
|
public void setRegistry(ConfigRegistry registry)
JdbiConfig
setRegistry
in interface JdbiConfig<Mappers>
registry
- the registry that owns this configuration objectpublic <T> Optional<RowMapper<T>> findFor(Class<T> type)
T
- the type of the mapper to findtype
- the target type to map topublic <T> Optional<RowMapper<T>> findFor(GenericType<T> type)
T
- the type of the mapper to findtype
- the target type to map topublic Optional<RowMapper<?>> findFor(Type type)
type
- the target type to map to@Beta public <T> Optional<RowMapper<T>> findFor(QualifiedType<T> type)
type
- the target qualified type to map topublic Mappers createCopy()
JdbiConfig
createCopy
in interface JdbiConfig<Mappers>
Copyright © 2019. All rights reserved.