Package org.jdbi.v3.core.mapper
Class Mappers
java.lang.Object
org.jdbi.v3.core.mapper.Mappers
- All Implemented Interfaces:
- JdbiConfig<Mappers>
Configuration class for obtaining row or column 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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns a copy of this configuration object.Obtain a mapper for the given type.Obtain a mapper for the given type.findFor(GenericType<T> type) Obtain a mapper for the given type.findFor(QualifiedType<T> type) Obtain a mapper for the given qualified type.voidsetRegistry(ConfigRegistry registry) The registry will inject itself into the configuration object.
- 
Constructor Details- 
Mapperspublic Mappers()
 
- 
- 
Method Details- 
setRegistryDescription copied from interface:JdbiConfigThe registry will inject itself into the configuration object. This can be useful if you need to look up dependencies. You will get a new registry after being copied.- Specified by:
- setRegistryin interface- JdbiConfig<Mappers>
- Parameters:
- registry- the registry that owns this configuration object
 
- 
findForObtain a mapper for the given type. If a row mapper is registered for the given type, it is returned. If a column mapper is registered for the given type, it is adapted into a row mapper, mapping the first column of the result set. If neither a row or column mapper is registered, empty is returned.- Type Parameters:
- T- the type of the mapper to find
- Parameters:
- type- the target type to map to
- Returns:
- a mapper for the given type, or empty if no row or column mapper is registered for the given type.
 
- 
findForObtain a mapper for the given type. If a row mapper is registered for the given type, it is returned. If a column mapper is registered for the given type, it is adapted into a row mapper, mapping the first column of the result set. If neither a row or column mapper is registered, empty is returned.- Type Parameters:
- T- the type of the mapper to find
- Parameters:
- type- the target type to map to
- Returns:
- a mapper for the given type, or empty if no row or column mapper is registered for the given type.
 
- 
findForObtain a mapper for the given type. If a row mapper is registered for the given type, it is returned. If a column mapper is registered for the given type, it is adapted into a row mapper, mapping the first column of the result set. If neither a row or column mapper is registered, empty is returned.- Parameters:
- type- the target type to map to
- Returns:
- a mapper for the given type, or empty if no row or column mapper is registered for the given type.
 
- 
findForObtain a mapper for the given qualified type. If the type is unqualified, and a row mapper is registered for the given type, it is returned. If a column mapper is registered for the given qualified type, it is adapted into a row mapper, mapping the first column of the result set. If neither a row or column mapper is registered, empty is returned.- Parameters:
- type- the target qualified type to map to
- Returns:
- a mapper for the given type, or empty if no row or column mapper is registered for the given type.
 
- 
createCopyDescription copied from interface:JdbiConfigReturns a copy of this configuration object. Changes to the copy should not modify the original, and vice-versa.- Specified by:
- createCopyin interface- JdbiConfig<Mappers>
- Returns:
- a copy of this configuration object.
 
 
-