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 Detail

      • mapper

        static <T> TupleMapper<T> mapper​(java.util.function.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
      • map

        Tuple map​(java.util.function.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