Class VavrTupleRowMapperFactory

    • Constructor Detail

      • VavrTupleRowMapperFactory

        VavrTupleRowMapperFactory()
    • Method Detail

      • build

        public java.util.Optional<RowMapper<?>> build​(java.lang.reflect.Type type,
                                                      ConfigRegistry config)
        Description copied from interface: RowMapperFactory
        Supplies a row mapper which will map result set rows to type if the factory supports it; empty otherwise.
        Specified by:
        build in interface RowMapperFactory
        Parameters:
        type - the target type to map to
        config - the config registry, for composition
        Returns:
        a row mapper for the given type if this factory supports it; Optional.empty() otherwise.
        See Also:
        for composition
      • resolveKeyValueColumns

        io.vavr.collection.Array<io.vavr.Tuple3<java.lang.reflect.Type,​java.lang.Integer,​io.vavr.control.Option<java.lang.String>>> resolveKeyValueColumns​(ConfigRegistry config,
                                                                                                                                                                       io.vavr.collection.Array<io.vavr.Tuple2<java.lang.reflect.Type,​java.lang.Integer>> tupleTypes)
      • buildMapper

        private java.util.Optional<RowMapper<?>> buildMapper​(java.lang.Class<? extends io.vavr.Tuple> tupleClass,
                                                             io.vavr.collection.Array<java.util.Optional<RowMapper<?>>> colMappers)
      • getColumnMapper

        java.util.Optional<RowMapper<?>> getColumnMapper​(java.lang.reflect.Type type,
                                                         int tupleIndex,
                                                         ConfigRegistry config)
      • getRowMapper

        private java.util.Optional<RowMapper<?>> getRowMapper​(java.lang.reflect.Type type,
                                                              ConfigRegistry config)
      • getColumnMapperForDefinedColumn

        private java.util.Optional<RowMapper<?>> getColumnMapperForDefinedColumn​(java.lang.reflect.Type type,
                                                                                 java.lang.String col,
                                                                                 ConfigRegistry config)
      • getConfiguredColumnName

        io.vavr.control.Option<java.lang.String> getConfiguredColumnName​(int tupleIndex,
                                                                         ConfigRegistry config)