-
- All Known Implementing Classes:
JsonProcessingMapperProvider
public interface DbMapperProvider
Java Service loader interface for database mappers.- See Also:
DbMapper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> Optional<DbMapper<T>>
mapper(GenericType<T> type)
Returns mapper for specific type supporting generic types as well.<T> Optional<DbMapper<T>>
mapper(Class<T> type)
Returns mapper for specific type.
-
-
-
Method Detail
-
mapper
<T> Optional<DbMapper<T>> mapper(Class<T> type)
Returns mapper for specific type.- Type Parameters:
T
- target mapping type- Parameters:
type
- class of the returned mapper type- Returns:
- a mapper for the specified type or empty
-
mapper
default <T> Optional<DbMapper<T>> mapper(GenericType<T> type)
Returns mapper for specific type supporting generic types as well. To get a list of strings:mapper(new GenericType<List<String>>(){})
- Type Parameters:
T
- type of the response- Parameters:
type
- type to find mapper for- Returns:
- a mapper for the specified type or empty
-
-