Interface DbMapperProvider

All Known Implementing Classes:
JsonProcessingMapperProvider

public interface DbMapperProvider
Java ServiceLoader interface for database mappers.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> Optional<DbMapper<T>>
    Returns mapper for specific type supporting generic types as well.
    mapper(Class<T> type)
    Returns mapper for specific type.
  • Method Details

    • 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