Class MapResultSetProcessor<K,​V>

  • All Implemented Interfaces:
    ResultSetProcessor<java.util.Map<K,​V>>

    public final class MapResultSetProcessor<K,​V>
    extends java.lang.Object
    implements ResultSetProcessor<java.util.Map<K,​V>>
    ResultSetProcessor that expects results with two columns and creates map from them.

    This processor updates the map in order in which the rows are read. Therefore, if the keys of the result are not distinct, the result contains the last binding of given key.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NotNull java.util.Map<K,​V> process​(@NotNull java.sql.ResultSet resultSet)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MapResultSetProcessor

        public MapResultSetProcessor​(@NotNull
                                     @NotNull java.lang.Class<K> keyType,
                                     @NotNull
                                     @NotNull java.lang.Class<V> valueType,
                                     @NotNull
                                     @NotNull InstantiatorProvider instantiatorRegistry)
    • Method Detail

      • process

        @NotNull
        public @NotNull java.util.Map<K,​V> process​(@NotNull
                                                         @NotNull java.sql.ResultSet resultSet)
                                                  throws java.sql.SQLException
        Specified by:
        process in interface ResultSetProcessor<K>
        Throws:
        java.sql.SQLException