Package org.dalesbred.internal.result
Class MapResultSetProcessor<K,V>
java.lang.Object
org.dalesbred.internal.result.MapResultSetProcessor<K,V>
- All Implemented Interfaces:
ResultSetProcessor<Map<K,
V>>
public final class MapResultSetProcessor<K,V>
extends Object
implements ResultSetProcessor<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.
-
Constructor Summary
ConstructorDescriptionMapResultSetProcessor
(@NotNull Class<K> keyType, @NotNull Class<V> valueType, @NotNull InstantiatorProvider instantiatorRegistry) -
Method Summary
-
Constructor Details
-
MapResultSetProcessor
public MapResultSetProcessor(@NotNull @NotNull Class<K> keyType, @NotNull @NotNull Class<V> valueType, @NotNull @NotNull InstantiatorProvider instantiatorRegistry)
-
-
Method Details
-
process
@NotNull public @NotNull Map<K,V> process(@NotNull @NotNull ResultSet resultSet) throws SQLException - Specified by:
process
in interfaceResultSetProcessor<K>
- Throws:
SQLException
-