Interface TupleMapper<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TupleMapper<T>
Map an arbitrary T object to a Tuple.
  • Method Details

    • mapper

      static <T> TupleMapper<T> mapper(Function<T, Map<String,Object>> fn)
      Create a mapper that associates a parameters object to a map of named parameters to their respective value.
      Parameters:
      fn - the function turning a parameters object into a map
      Returns:
      the mapper
    • jsonObject

      static TupleMapper<JsonObject> jsonObject()
      Map a JsonObject to a Tuple.
    • map

      Tuple map(Function<Integer,String> mapping, int size, T params)
      The internal mapper contract that builds a tuple.
      Parameters:
      mapping - associates an index to template parameter name
      size - the tuple size
      params - the parameters object
      Returns:
      the tuple