[#3801] Add Result#intoMap and Result#intoGroups variants that take field index or field name

This commit is contained in:
Lukas Eder 2015-03-03 15:44:48 +01:00
parent 731661ddfb
commit 9ea2499c29
5 changed files with 1586 additions and 71 deletions

View File

@ -653,6 +653,42 @@ public interface Result<R extends Record> extends List<R>, Attachable {
*/
<K> Map<K, R> intoMap(Field<K> key) throws IllegalArgumentException, InvalidResultException;
/**
* Return a {@link Map} with one of the result's columns as key and the
* corresponding records as value.
* <p>
* An {@link InvalidResultException} is thrown, if the key turns out to be
* non-unique in the result set. Use {@link #intoGroups(int)} instead, if
* your keys are non-unique
*
* @param keyFieldIndex The key field index. Client code must assure that
* this field is unique in the result set.
* @return A Map containing the results
* @throws IllegalArgumentException If the argument keyFieldIndex is not
* contained in {@link #fieldsRow()}
* @throws InvalidResultException if the key field returned two or more
* equal values from the result set.
*/
Map<?, R> intoMap(int keyFieldIndex) throws IllegalArgumentException, InvalidResultException;
/**
* Return a {@link Map} with one of the result's columns as key and the
* corresponding records as value.
* <p>
* An {@link InvalidResultException} is thrown, if the key turns out to be
* non-unique in the result set. Use {@link #intoGroups(String)} instead, if
* your keys are non-unique
*
* @param keyFieldName The key field name. Client code must assure that this
* field is unique in the result set.
* @return A Map containing the results
* @throws IllegalArgumentException If the argument keyFieldName is not
* contained in {@link #fieldsRow()}
* @throws InvalidResultException if the key field returned two or more
* equal values from the result set.
*/
Map<?, R> intoMap(String keyFieldName) throws IllegalArgumentException, InvalidResultException;
/**
* Return a {@link Map} with one of the result's columns as key and another
* one of the result's columns as value
@ -674,6 +710,46 @@ public interface Result<R extends Record> extends List<R>, Attachable {
*/
<K, V> Map<K, V> intoMap(Field<K> key, Field<V> value) throws IllegalArgumentException, InvalidResultException;
/**
* Return a {@link Map} with one of the result's columns as key and another
* one of the result's columns as value
* <p>
* An {@link InvalidResultException} is thrown, if the key turns out to be
* non-unique in the result set. Use {@link #intoGroups(int, int)} instead,
* if your keys are non-unique
*
* @param keyFieldIndex The key field index. Client code must assure that
* this field is unique in the result set.
* @param valueFieldIndex The value field index
* @return A Map containing the results
* @throws IllegalArgumentException If any of the argument field indexes is
* not contained in {@link #fieldsRow()}
* @throws InvalidResultException if the key field returned two or more
* equal values from the result set.
*/
Map<?, ?> intoMap(int keyFieldIndex, int valueFieldIndex) throws IllegalArgumentException,
InvalidResultException;
/**
* Return a {@link Map} with one of the result's columns as key and another
* one of the result's columns as value
* <p>
* An {@link InvalidResultException} is thrown, if the key turns out to be
* non-unique in the result set. Use {@link #intoGroups(String, String)}
* instead, if your keys are non-unique
*
* @param key The key field name. Client code must assure that this field is
* unique in the result set.
* @param value The value field name
* @return A Map containing the results
* @throws IllegalArgumentException If any of the argument field names is
* not contained in {@link #fieldsRow()}
* @throws InvalidResultException if the key field returned two or more
* equal values from the result set.
*/
Map<?, ?> intoMap(String keyFieldName, String valueFieldName) throws IllegalArgumentException,
InvalidResultException;
/**
* Return a {@link Map} with results grouped by the given key and mapped
* into the given entity type.
@ -697,6 +773,52 @@ public interface Result<R extends Record> extends List<R>, Attachable {
<K, E> Map<K, E> intoMap(Field<K> key, Class<? extends E> type) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped
* into the given entity type.
* <p>
* An {@link InvalidResultException} is thrown, if the key is non-unique in
* the result set. Use {@link #intoGroups(int, Class)} instead, if your
* key is non-unique.
*
* @param keyFieldIndex The key. Client code must assure that key is unique
* in the result set.
* @param type The entity type.
* @return A Map containing the result.
* @throws IllegalArgumentException If the argument field index is not
* contained in {@link #fieldsRow()}
* @throws InvalidResultException if the key is non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<?, E> intoMap(int keyFieldIndex, Class<? extends E> type) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped
* into the given entity type.
* <p>
* An {@link InvalidResultException} is thrown, if the key is non-unique in
* the result set. Use {@link #intoGroups(String, Class)} instead, if your
* key is non-unique.
*
* @param keyFieldName The key. Client code must assure that key is unique
* in the result set.
* @param type The entity type.
* @return A Map containing the result.
* @throws IllegalArgumentException If the argument field name is not
* contained in {@link #fieldsRow()}
* @throws InvalidResultException if the key is non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<?, E> intoMap(String keyFieldName, Class<? extends E> type) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped by
* the given mapper.
@ -720,6 +842,52 @@ public interface Result<R extends Record> extends List<R>, Attachable {
<K, E> Map<K, E> intoMap(Field<K> key, RecordMapper<? super R, E> mapper) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped by
* the given mapper.
* <p>
* An {@link InvalidResultException} is thrown, if the key is non-unique in
* the result set. Use {@link #intoGroups(int, Class)} instead, if your key
* is non-unique.
*
* @param keyFieldIndex The key. Client code must assure that key is unique
* in the result set.
* @param mapper The mapper callback.
* @return A Map containing the result.
* @throws IllegalArgumentException If the argument field index is not
* contained in {@link #fieldsRow()}
* @throws InvalidResultException if the key is non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<?, E> intoMap(int keyFieldIndex, RecordMapper<? super R, E> mapper) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped by
* the given mapper.
* <p>
* An {@link InvalidResultException} is thrown, if the key is non-unique in
* the result set. Use {@link #intoGroups(String, Class)} instead, if your key
* is non-unique.
*
* @param keyFieldName The key. Client code must assure that key is unique
* in the result set.
* @param mapper The mapper callback.
* @return A Map containing the result.
* @throws IllegalArgumentException If the argument field name is not
* contained in {@link #fieldsRow()}
* @throws InvalidResultException if the key is non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<?, E> intoMap(String keyFieldName, RecordMapper<? super R, E> mapper) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with the given keys as a map key and the
* corresponding record as value.
@ -739,6 +907,44 @@ public interface Result<R extends Record> extends List<R>, Attachable {
*/
Map<Record, R> intoMap(Field<?>[] keys) throws IllegalArgumentException, InvalidResultException;
/**
* Return a {@link Map} with the given keys as a map key and the
* corresponding record as value.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #intoGroups(int[])} instead, if your keys
* are non-unique.
*
* @param keyFieldIndexes The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @return A Map containing the results.
* @throws IllegalArgumentException If any of the argument field indexes is
* not contained in {@link #fieldsRow()}
* @throws InvalidResultException if the keys are non-unique in the result
* set.
*/
Map<Record, R> intoMap(int[] keyFieldIndexes) throws IllegalArgumentException, InvalidResultException;
/**
* Return a {@link Map} with the given keys as a map key and the
* corresponding record as value.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #intoGroups(String[])} instead, if your
* keys are non-unique.
*
* @param keyFieldNames The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @return A Map containing the results.
* @throws IllegalArgumentException If any of the argument field names is
* not contained in {@link #fieldsRow()}
* @throws InvalidResultException if the keys are non-unique in the result
* set.
*/
Map<Record, R> intoMap(String[] keyFieldNames) throws IllegalArgumentException, InvalidResultException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped
* into the given entity type.
@ -763,9 +969,58 @@ public interface Result<R extends Record> extends List<R>, Attachable {
<E> Map<List<?>, E> intoMap(Field<?>[] keys, Class<? extends E> type) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped
* into the given entity type.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #intoGroups(int[], Class)} instead, if your
* keys are non-unique.
*
* @param keyFieldIndexes The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @param type The entity type.
* @return A Map containing the results.
* @throws IllegalArgumentException If any of the argument field indexes is
* not contained in {@link #fieldsRow()}
* @throws InvalidResultException if the keys are non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<List<?>, E> intoMap(int[] keyFieldIndexes, Class<? extends E> type) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped
* into the given entity type.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #intoGroups(String[], Class)} instead, if your
* keys are non-unique.
*
* @param keyFieldNames The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @param type The entity type.
* @return A Map containing the results.
* @throws IllegalArgumentException If any of the argument field names is
* not contained in {@link #fieldsRow()}
* @throws InvalidResultException if the keys are non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<List<?>, E> intoMap(String[] keyFieldNames, Class<? extends E> type) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped by
* the given mapper. * <p>
* the given mapper.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #intoGroups(Field[], Class)} instead, if
* your keys are non-unique.
@ -786,6 +1041,54 @@ public interface Result<R extends Record> extends List<R>, Attachable {
<E> Map<List<?>, E> intoMap(Field<?>[] keys, RecordMapper<? super R, E> mapper) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped by
* the given mapper.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #intoGroups(int[], Class)} instead, if your
* keys are non-unique.
*
* @param keyFieldIndexes The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @param mapper The mapper callback.
* @return A Map containing the results.
* @throws IllegalArgumentException If any of the argument field indexes is
* not contained in {@link #fieldsRow()}
* @throws InvalidResultException if the keys are non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<List<?>, E> intoMap(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped by
* the given mapper.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #intoGroups(String[], Class)} instead, if
* your keys are non-unique.
*
* @param keyFieldNames The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @param mapper The mapper callback.
* @return A Map containing the results.
* @throws IllegalArgumentException If any of the argument field names is
* not contained in {@link #fieldsRow()}
* @throws InvalidResultException if the keys are non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<List<?>, E> intoMap(String[] keyFieldNames, RecordMapper<? super R, E> mapper) throws IllegalArgumentException,
InvalidResultException, MappingException;
/**
* Return a {@link Map} with the given key table as a map key and the
* corresponding record as value.
@ -865,6 +1168,34 @@ public interface Result<R extends Record> extends List<R>, Attachable {
*/
<K> Map<K, Result<R>> intoGroups(Field<K> key) throws IllegalArgumentException;
/**
* Return a {@link Map} with one of the result's columns as key and a list
* of corresponding records as value.
* <p>
* Unlike {@link #intoMap(int)}, this method allows for non-unique keys in
* the result set.
*
* @param keyFieldIndex The key field index.
* @return A Map containing the results
* @throws IllegalArgumentException If the argument field index is not
* contained in {@link #fieldsRow()}
*/
Map<?, Result<R>> intoGroups(int keyFieldIndex) throws IllegalArgumentException;
/**
* Return a {@link Map} with one of the result's columns as key and a list
* of corresponding records as value.
* <p>
* Unlike {@link #intoMap(String)}, this method allows for non-unique keys in
* the result set.
*
* @param keyFieldName The key field name.
* @return A Map containing the results
* @throws IllegalArgumentException If the argument field name is not
* contained in {@link #fieldsRow()}
*/
Map<?, Result<R>> intoGroups(String keyFieldName) throws IllegalArgumentException;
/**
* Return a {@link Map} with one of the result's columns as key and another
* one of the result's columns as value.
@ -882,6 +1213,36 @@ public interface Result<R extends Record> extends List<R>, Attachable {
*/
<K, V> Map<K, List<V>> intoGroups(Field<K> key, Field<V> value) throws IllegalArgumentException;
/**
* Return a {@link Map} with one of the result's columns as key and another
* one of the result's columns as value.
* <p>
* Unlike {@link #intoMap(int, int)}, this method allows for non-unique keys
* in the result set.
*
* @param keyFieldIndex The key field index.
* @param valueFieldIndex The value field index.
* @return A Map containing the results
* @throws IllegalArgumentException If any of the argument field indexes is
* not contained in {@link #fieldsRow()}
*/
Map<?, List<?>> intoGroups(int keyFieldIndex, int valueFieldIndex) throws IllegalArgumentException;
/**
* Return a {@link Map} with one of the result's columns as key and another
* one of the result's columns as value.
* <p>
* Unlike {@link #intoMap(String, String)}, this method allows for
* non-unique keys in the result set.
*
* @param keyFieldName The key field name.
* @param valueFieldName The value field name.
* @return A Map containing the results
* @throws IllegalArgumentException If any of the argument field names is
* not contained in {@link #fieldsRow()}
*/
Map<?, List<?>> intoGroups(String keyFieldName, String valueFieldName) throws IllegalArgumentException;
/**
* Return a {@link Map} with results grouped by the given key and mapped
* into the given entity type.
@ -900,6 +1261,38 @@ public interface Result<R extends Record> extends List<R>, Attachable {
<K, E> Map<K, List<E>> intoGroups(Field<K> key, Class<? extends E> type) throws IllegalArgumentException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped
* into the given entity type.
* <p>
*
* @param keyFieldIndex The key field index.
* @param type The entity type.
* @throws IllegalArgumentException If the argument field index is not
* contained in {@link #fieldsRow()}
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<?, List<E>> intoGroups(int keyFieldIndex, Class<? extends E> type) throws IllegalArgumentException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped
* into the given entity type.
* <p>
*
* @param keyFieldName The key field name.
* @param type The entity type.
* @throws IllegalArgumentException If the argument field name is not
* contained in {@link #fieldsRow()}
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<?, List<E>> intoGroups(String keyFieldName, Class<? extends E> type) throws IllegalArgumentException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped by
* the given mapper.
@ -916,6 +1309,34 @@ public interface Result<R extends Record> extends List<R>, Attachable {
<K, E> Map<K, List<E>> intoGroups(Field<K> key, RecordMapper<? super R, E> mapper) throws IllegalArgumentException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped by
* the given mapper.
*
* @param keyFieldIndex The key field index.
* @param mapper The mapper callback.
* @throws IllegalArgumentException If the argument field index is not
* contained in {@link #fieldsRow()}
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
*/
<E> Map<?, List<E>> intoGroups(int keyFieldIndex, RecordMapper<? super R, E> mapper) throws IllegalArgumentException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped by
* the given mapper.
*
* @param keyFieldName The key field name.
* @param mapper The mapper callback.
* @throws IllegalArgumentException If the argument field name is not
* contained in {@link #fieldsRow()}
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
*/
<E> Map<?, List<E>> intoGroups(String keyFieldName, RecordMapper<? super R, E> mapper) throws IllegalArgumentException,
MappingException;
/**
* Return a {@link Map} with the result grouped by the given keys.
* <p>
@ -930,6 +1351,34 @@ public interface Result<R extends Record> extends List<R>, Attachable {
*/
Map<Record, Result<R>> intoGroups(Field<?>[] keys) throws IllegalArgumentException;
/**
* Return a {@link Map} with the result grouped by the given keys.
* <p>
* Unlike {@link #intoMap(int[])}, this method allows for non-unique keys
* in the result set.
*
* @param keyFieldIndexes The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @return A Map containing grouped results
* @throws IllegalArgumentException If any of the argument field indexes is
* not contained in {@link #fieldsRow()}
*/
Map<Record, Result<R>> intoGroups(int[] keyFieldIndexes) throws IllegalArgumentException;
/**
* Return a {@link Map} with the result grouped by the given keys.
* <p>
* Unlike {@link #intoMap(String[])}, this method allows for non-unique keys
* in the result set.
*
* @param keyFieldNames The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @return A Map containing grouped results
* @throws IllegalArgumentException If any of the argument field names is
* not contained in {@link #fieldsRow()}
*/
Map<Record, Result<R>> intoGroups(String[] keyFieldNames) throws IllegalArgumentException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped
* into the given entity type.
@ -950,6 +1399,46 @@ public interface Result<R extends Record> extends List<R>, Attachable {
<E> Map<Record, List<E>> intoGroups(Field<?>[] keys, Class<? extends E> type) throws IllegalArgumentException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped
* into the given entity type.
* <p>
* Unlike {@link #intoMap(int[], Class)}, this method allows for non-unique
* keys in the result set.
*
* @param keyFieldIndexes The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @param type The entity type.
* @return A Map containing grouped results
* @throws IllegalArgumentException If the any of the argument field indexes
* is not contained in {@link #fieldsRow()}
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<Record, List<E>> intoGroups(int[] keyFieldIndexes, Class<? extends E> type) throws IllegalArgumentException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped
* into the given entity type.
* <p>
* Unlike {@link #intoMap(String[], Class)}, this method allows for
* non-unique keys in the result set.
*
* @param keyFieldNames The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @param type The entity type.
* @return A Map containing grouped results
* @throws IllegalArgumentException If the any of the argument field names
* is not contained in {@link #fieldsRow()}
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<Record, List<E>> intoGroups(String[] keyFieldNames, Class<? extends E> type) throws IllegalArgumentException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped
* into the given entity type.
@ -970,6 +1459,46 @@ public interface Result<R extends Record> extends List<R>, Attachable {
<E> Map<Record, List<E>> intoGroups(Field<?>[] keys, RecordMapper<? super R, E> mapper)
throws IllegalArgumentException, MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped
* into the given entity type.
* <p>
* Unlike {@link #intoMap(int[], RecordMapper)}, this method allows for
* non-unique keys in the result set.
*
* @param keyFieldIndexes The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @param mapper The mapper callback.
* @return A Map containing grouped results
* @throws IllegalArgumentException If the any of the argument field indexes
* is not contained in {@link #fieldsRow()}
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<Record, List<E>> intoGroups(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper)
throws IllegalArgumentException, MappingException;
/**
* Return a {@link Map} with results grouped by the given keys and mapped
* into the given entity type.
* <p>
* Unlike {@link #intoMap(String[], RecordMapper)}, this method allows for
* non-unique keys in the result set.
*
* @param keyFieldNames The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @param mapper The mapper callback.
* @return A Map containing grouped results
* @throws IllegalArgumentException If the any of the argument field indexes
* is not contained in {@link #fieldsRow()}
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see DefaultRecordMapper
*/
<E> Map<Record, List<E>> intoGroups(String[] keyFieldNames, RecordMapper<? super R, E> mapper)
throws IllegalArgumentException, MappingException;
/**
* Return a {@link Map} with the result grouped by the given key table.
* <p>

View File

@ -784,6 +784,50 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<K> Map<K, R> fetchMap(Field<K> key) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and the corresponding records as value.
* <p>
* An exception is thrown, if the key turns out to be non-unique in the
* result set. Use {@link #fetchGroups(int)} instead, if your keys are
* non-unique
* <p>
* The resulting records are attached to the original {@link Configuration}
* by default. Use {@link Settings#isAttachRecords()} to override this
* behaviour.
*
* @param keyFieldIndex The key field. Client code must assure that this
* field is unique in the result set.
* @return A Map containing the results
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key field returned two or more
* equal values from the result set.
* @see Result#intoMap(int)
*/
Map<?, R> fetchMap(int keyFieldIndex) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and the corresponding records as value.
* <p>
* An exception is thrown, if the key turns out to be non-unique in the
* result set. Use {@link #fetchGroups(String)} instead, if your keys are
* non-unique
* <p>
* The resulting records are attached to the original {@link Configuration}
* by default. Use {@link Settings#isAttachRecords()} to override this
* behaviour.
*
* @param keyFieldName The key field. Client code must assure that this
* field is unique in the result set.
* @return A Map containing the results
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key field returned two or more
* equal values from the result set.
* @see Result#intoMap(String)
*/
Map<?, R> fetchMap(String keyFieldName) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and another one of the result's columns as value
@ -805,6 +849,44 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<K, V> Map<K, V> fetchMap(Field<K> key, Field<V> value) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and another one of the result's columns as value
* <p>
* An exception is thrown, if the key turns out to be non-unique in the
* result set. Use {@link #fetchGroups(int, int)} instead, if your keys are
* non-unique
*
* @param keyFieldIndex The key field. Client code must assure that this
* field is unique in the result set.
* @param valueFieldIndex The value field
* @return A Map containing the results
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key field returned two or more
* equal values from the result set.
* @see Result#intoMap(int, int)
*/
Map<?, ?> fetchMap(int keyFieldIndex, int valueFieldIndex) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and another one of the result's columns as value
* <p>
* An exception is thrown, if the key turns out to be non-unique in the
* result set. Use {@link #fetchGroups(String, String)} instead, if your keys
* are non-unique
*
* @param keyFieldName The key field. Client code must assure that this
* field is unique in the result set.
* @param valueFieldName The value field
* @return A Map containing the results
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key field returned two or more
* equal values from the result set.
* @see Result#intoMap(String, String)
*/
Map<?, ?> fetchMap(String keyFieldName, String valueFieldName) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with keys as a map key and the
* corresponding record as value.
@ -823,6 +905,42 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
Map<Record, R> fetchMap(Field<?>[] keys) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with keys as a map key and the
* corresponding record as value.
* <p>
* An exception is thrown, if the keys turn out to be non-unique in the
* result set. Use {@link #fetchGroups(int[])} instead, if your keys are
* non-unique.
*
* @param keyFieldIndexes The keys. Client code must assure that keys are
* unique in the result set.
* @return A Map containing the results.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key list is non-unique in the
* result set.
* @see Result#intoMap(int[])
*/
Map<Record, R> fetchMap(int[] keyFieldIndexes) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with keys as a map key and the
* corresponding record as value.
* <p>
* An exception is thrown, if the keys turn out to be non-unique in the
* result set. Use {@link #fetchGroups(String[])} instead, if your keys are
* non-unique.
*
* @param keyFieldNames The keys. Client code must assure that keys are
* unique in the result set.
* @return A Map containing the results.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key list is non-unique in the
* result set.
* @see Result#intoMap(String[])
*/
Map<Record, R> fetchMap(String[] keyFieldNames) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped into the given entity type.
@ -846,6 +964,54 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<E> Map<List<?>, E> fetchMap(Field<?>[] keys, Class<? extends E> type) throws DataAccessException, MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped into the given entity type.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #fetchGroups(int[], Class)} instead, if
* your keys are non-unique.
*
* @param keyFieldIndexes The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @param type The entity type.
* @return A Map containing the results.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the keys are non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoMap(int[], Class)
* @see DefaultRecordMapper
*/
<E> Map<List<?>, E> fetchMap(int[] keyFieldIndexes, Class<? extends E> type) throws DataAccessException,
MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped into the given entity type.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #fetchGroups(String[], Class)} instead, if
* your keys are non-unique.
*
* @param keyFieldNames The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @param type The entity type.
* @return A Map containing the results.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the keys are non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoMap(String[], Class)
* @see DefaultRecordMapper
*/
<E> Map<List<?>, E> fetchMap(String[] keyFieldNames, Class<? extends E> type) throws DataAccessException,
MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped by the given mapper.
@ -870,6 +1036,54 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
<E> Map<List<?>, E> fetchMap(Field<?>[] keys, RecordMapper<? super R, E> mapper) throws DataAccessException,
MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped by the given mapper.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #fetchGroups(int[], RecordMapper)} instead,
* if your keys are non-unique.
*
* @param keyFieldIndexes The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @param mapper The mapper callback.
* @return A Map containing the results.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the keys are non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoMap(int[], Class)
* @see DefaultRecordMapper
*/
<E> Map<List<?>, E> fetchMap(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper) throws DataAccessException,
MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped by the given mapper.
* <p>
* An {@link InvalidResultException} is thrown, if the keys are non-unique
* in the result set. Use {@link #fetchGroups(String[], RecordMapper)}
* instead, if your keys are non-unique.
*
* @param keyFieldNames The keys. Client code must assure that keys are
* unique in the result set. If this is <code>null</code> or an
* empty array, the resulting map will contain at most one entry.
* @param mapper The mapper callback.
* @return A Map containing the results.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the keys are non-unique in the result
* set.
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoMap(String[], Class)
* @see DefaultRecordMapper
*/
<E> Map<List<?>, E> fetchMap(String[] keyFieldNames, RecordMapper<? super R, E> mapper) throws DataAccessException,
MappingException;
/**
* Execute the query and return a {@link Map} with table as a map key and the
* corresponding record as value.
@ -953,6 +1167,44 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<K, E> Map<K, E> fetchMap(Field<K> key, Class<? extends E> type) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given key and mapped into the given entity type.
* <p>
* An exception is thrown, if the key turn out to be non-unique in the
* result set. Use {@link #fetchGroups(int, Class)} instead, if your key
* is non-unique.
*
* @param keyFieldIndex The key. Client code must assure that key is unique
* in the result set.
* @param type The entity type.
* @return A Map containing the result.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key is non-unique in the result
* set.
* @see Result#intoMap(int, Class)
*/
<E> Map<?, E> fetchMap(int keyFieldIndex, Class<? extends E> type) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given key and mapped into the given entity type.
* <p>
* An exception is thrown, if the key turn out to be non-unique in the
* result set. Use {@link #fetchGroups(String, Class)} instead, if your key
* is non-unique.
*
* @param keyFieldName The key. Client code must assure that key is unique
* in the result set.
* @param type The entity type.
* @return A Map containing the result.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key is non-unique in the result
* set.
* @see Result#intoMap(String, Class)
*/
<E> Map<?, E> fetchMap(String keyFieldName, Class<? extends E> type) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given key and mapped by the given mapper.
@ -972,6 +1224,44 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<K, E> Map<K, E> fetchMap(Field<K> key, RecordMapper<? super R, E> mapper) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given key and mapped by the given mapper.
* <p>
* An exception is thrown, if the key turn out to be non-unique in the
* result set. Use {@link #fetchGroups(int, Class)} instead, if your key is
* non-unique.
*
* @param keyFieldIndex The key. Client code must assure that key is unique
* in the result set.
* @param mapper The mapper callback.
* @return A Map containing the result.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key is non-unique in the result
* set.
* @see Result#intoMap(int, Class)
*/
<E> Map<?, E> fetchMap(int keyFieldIndex, RecordMapper<? super R, E> mapper) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given key and mapped by the given mapper.
* <p>
* An exception is thrown, if the key turn out to be non-unique in the
* result set. Use {@link #fetchGroups(String, Class)} instead, if your key
* is non-unique.
*
* @param keyFieldName The key. Client code must assure that key is unique
* in the result set.
* @param mapper The mapper callback.
* @return A Map containing the result.
* @throws DataAccessException if something went wrong executing the query
* @throws InvalidResultException if the key is non-unique in the result
* set.
* @see Result#intoMap(String, Class)
*/
<E> Map<?, E> fetchMap(String keyFieldName, RecordMapper<? super R, E> mapper) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and a list of corresponding records as value.
@ -991,6 +1281,42 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<K> Map<K, Result<R>> fetchGroups(Field<K> key) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and a list of corresponding records as value.
* <p>
* Unlike {@link #fetchMap(int)}, this method allows for non-unique keys in
* the result set.
* <p>
* The resulting records are attached to the original {@link Configuration}
* by default. Use {@link Settings#isAttachRecords()} to override this
* behaviour.
*
* @param keyFieldIndex The key field index.
* @return A Map containing the results
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoGroups(int)
*/
Map<?, Result<R>> fetchGroups(int keyFieldIndex) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and a list of corresponding records as value.
* <p>
* Unlike {@link #fetchMap(String)}, this method allows for non-unique keys
* in the result set.
* <p>
* The resulting records are attached to the original {@link Configuration}
* by default. Use {@link Settings#isAttachRecords()} to override this
* behaviour.
*
* @param keyFieldName The key field name.
* @return A Map containing the results
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoGroups(String)
*/
Map<?, Result<R>> fetchGroups(String keyFieldName) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and another one of the result's columns as value
@ -1008,6 +1334,36 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<K, V> Map<K, List<V>> fetchGroups(Field<K> key, Field<V> value) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and another one of the result's columns as value
* <p>
* Unlike {@link #fetchMap(int, int)}, this method allows for non-unique
* keys in the result set.
*
* @param keyFieldIndex The key field index.
* @param valueFieldIndex The value field index.
* @return A Map containing the results
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoGroups(int, int)
*/
Map<?, List<?>> fetchGroups(int keyFieldIndex, int valueFieldIndex) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with one of the result's
* columns as key and another one of the result's columns as value
* <p>
* Unlike {@link #fetchMap(String, String)}, this method allows for
* non-unique keys in the result set.
*
* @param keyFieldName The key field name.
* @param valueFieldName The value field name.
* @return A Map containing the results
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoGroups(String, String)
*/
Map<?, List<?>> fetchGroups(String keyFieldName, String valueFieldName) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with the result grouped by the
* given keys.
@ -1024,6 +1380,38 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
Map<Record, Result<R>> fetchGroups(Field<?>[] keys) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with the result grouped by the
* given keys.
* <p>
* Unlike {@link #fetchMap(int[])}, this method allows for non-unique keys
* in the result set.
*
* @param keyFieldIndexes The keys used for result grouping. If this is
* <code>null</code> or an empty array, the resulting map will
* contain at most one entry.
* @return A Map containing grouped results
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoGroups(int[])
*/
Map<Record, Result<R>> fetchGroups(int[] keyFieldIndexes) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with the result grouped by the
* given keys.
* <p>
* Unlike {@link #fetchMap(String[])}, this method allows for non-unique
* keys in the result set.
*
* @param keyFieldNames The keys used for result grouping. If this is
* <code>null</code> or an empty array, the resulting map will
* contain at most one entry.
* @return A Map containing grouped results
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoGroups(String[])
*/
Map<Record, Result<R>> fetchGroups(String[] keyFieldNames) throws DataAccessException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped into the given entity type.
@ -1043,6 +1431,44 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<E> Map<Record, List<E>> fetchGroups(Field<?>[] keys, Class<? extends E> type) throws MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped into the given entity type.
* <p>
* Unlike {@link #fetchMap(int[], Class)}, this method allows for
* non-unique keys in the result set.
*
* @param keyFieldIndexes The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @param type The entity type.
* @return A Map containing grouped results
* @throws DataAccessException if something went wrong executing the query
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoGroups(int[], Class)
* @see DefaultRecordMapper
*/
<E> Map<Record, List<E>> fetchGroups(int[] keyFieldIndexes, Class<? extends E> type) throws MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped into the given entity type.
* <p>
* Unlike {@link #fetchMap(String[], Class)}, this method allows for
* non-unique keys in the result set.
*
* @param keyFieldNames The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @param type The entity type.
* @return A Map containing grouped results
* @throws DataAccessException if something went wrong executing the query
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoGroups(String[], Class)
* @see DefaultRecordMapper
*/
<E> Map<Record, List<E>> fetchGroups(String[] keyFieldNames, Class<? extends E> type) throws MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped by the given mapper.
@ -1062,6 +1488,46 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
*/
<E> Map<Record, List<E>> fetchGroups(Field<?>[] keys, RecordMapper<? super R, E> mapper) throws MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped by the given mapper.
* <p>
* Unlike {@link #fetchMap(int[], RecordMapper)}, this method allows for
* non-unique keys in the result set.
*
* @param keyFieldIndexes The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @param mapper The mapper callback.
* @return A Map containing grouped results
* @throws DataAccessException if something went wrong executing the query
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoGroups(int[], Class)
* @see DefaultRecordMapper
*/
<E> Map<Record, List<E>> fetchGroups(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper)
throws MappingException;
/**
* Execute the query and return a {@link Map} with results grouped by the
* given keys and mapped by the given mapper.
* <p>
* Unlike {@link #fetchMap(String[], RecordMapper)}, this method allows for
* non-unique keys in the result set.
*
* @param keyFieldNames The keys. If this is <code>null</code> or an empty
* array, the resulting map will contain at most one entry.
* @param mapper The mapper callback.
* @return A Map containing grouped results
* @throws DataAccessException if something went wrong executing the query
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoGroups(String[], Class)
* @see DefaultRecordMapper
*/
<E> Map<Record, List<E>> fetchGroups(String[] keyFieldNames, RecordMapper<? super R, E> mapper)
throws MappingException;
/**
* Execute the query and return a {@link Map} with the result grouped by the
* given table.
@ -1131,6 +1597,36 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
<K, E> Map<K, List<E>> fetchGroups(Field<K> key, Class<? extends E> type) throws DataAccessException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped
* into the given entity type.
*
* @param keyFieldIndex The key field index.
* @param type The entity type.
* @throws DataAccessException if something went wrong executing the query
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoGroups(int, Class)
* @see DefaultRecordMapper
*/
<E> Map<?, List<E>> fetchGroups(int keyFieldIndex, Class<? extends E> type) throws DataAccessException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped
* into the given entity type.
*
* @param keyFieldName The key field name.
* @param type The entity type.
* @throws DataAccessException if something went wrong executing the query
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoGroups(String, Class)
* @see DefaultRecordMapper
*/
<E> Map<?, List<E>> fetchGroups(String keyFieldName, Class<? extends E> type) throws DataAccessException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped by
* the given mapper.
@ -1148,6 +1644,36 @@ public interface ResultQuery<R extends Record> extends Query, Iterable<R> {
<K, E> Map<K, List<E>> fetchGroups(Field<K> key, RecordMapper<? super R, E> mapper) throws DataAccessException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped by
* the given mapper.
*
* @param keyFieldIndex The key field index.
* @param mapper The mapper callback.
* @throws DataAccessException if something went wrong executing the query
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoGroups(int, Class)
* @see DefaultRecordMapper
*/
<E> Map<?, List<E>> fetchGroups(int keyFieldIndex, RecordMapper<? super R, E> mapper) throws DataAccessException,
MappingException;
/**
* Return a {@link Map} with results grouped by the given key and mapped by
* the given mapper.
*
* @param keyFieldName The key field name.
* @param mapper The mapper callback.
* @throws DataAccessException if something went wrong executing the query
* @throws MappingException wrapping any reflection or data type conversion
* exception that might have occurred while mapping records
* @see Result#intoGroups(String, Class)
* @see DefaultRecordMapper
*/
<E> Map<?, List<E>> fetchGroups(String keyFieldName, RecordMapper<? super R, E> mapper) throws DataAccessException,
MappingException;
/**
* Execute the query and return the generated result as an Object matrix.
* <p>

View File

@ -75,8 +75,6 @@ import org.jooq.RecordMapper;
import org.jooq.Result;
import org.jooq.ResultQuery;
import org.jooq.Table;
import org.jooq.exception.DataAccessException;
import org.jooq.exception.DataTypeException;
import org.jooq.tools.Convert;
import org.jooq.tools.JooqLogger;
@ -118,13 +116,13 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
@SuppressWarnings("unchecked")
@Override
public final ResultQuery<R> bind(String param, Object value) throws IllegalArgumentException, DataTypeException {
public final ResultQuery<R> bind(String param, Object value) {
return (ResultQuery<R>) super.bind(param, value);
}
@SuppressWarnings("unchecked")
@Override
public final ResultQuery<R> bind(int index, Object value) throws IllegalArgumentException, DataTypeException {
public final ResultQuery<R> bind(int index, Object value) {
return (ResultQuery<R>) super.bind(index, value);
}
@ -561,26 +559,106 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
return fetch().intoMap(key);
}
@Override
public final Map<?, R> fetchMap(int keyFieldIndex) {
return fetch().intoMap(keyFieldIndex);
}
@Override
public final Map<?, R> fetchMap(String keyFieldName) {
return fetch().intoMap(keyFieldName);
}
@Override
public final <K, V> Map<K, V> fetchMap(Field<K> key, Field<V> value) {
return fetch().intoMap(key, value);
}
@Override
public final Map<?, ?> fetchMap(int keyFieldIndex, int valueFieldIndex) {
return fetch().intoMap(keyFieldIndex, valueFieldIndex);
}
@Override
public final Map<?, ?> fetchMap(String keyFieldName, String valueFieldName) {
return fetch().intoMap(keyFieldName, valueFieldName);
}
@Override
public final <K, E> Map<K, E> fetchMap(Field<K> key, Class<? extends E> type) {
return fetch().intoMap(key, type);
}
@Override
public final <E> Map<?, E> fetchMap(int keyFieldIndex, Class<? extends E> type) {
return fetch().intoMap(keyFieldIndex, type);
}
@Override
public final <E> Map<?, E> fetchMap(String keyFieldName, Class<? extends E> type) {
return fetch().intoMap(keyFieldName, type);
}
@Override
public final <K, E> Map<K, E> fetchMap(Field<K> key, RecordMapper<? super R, E> mapper) {
return fetch().intoMap(key, mapper);
}
@Override
public final <E> Map<?, E> fetchMap(int keyFieldIndex, RecordMapper<? super R, E> mapper) {
return fetch().intoMap(keyFieldIndex, mapper);
}
@Override
public final <E> Map<?, E> fetchMap(String keyFieldName, RecordMapper<? super R, E> mapper) {
return fetch().intoMap(keyFieldName, mapper);
}
@Override
public final Map<Record, R> fetchMap(Field<?>[] keys) {
return fetch().intoMap(keys);
}
@Override
public final Map<Record, R> fetchMap(int[] keyFieldIndexes) {
return fetch().intoMap(keyFieldIndexes);
}
@Override
public final Map<Record, R> fetchMap(String[] keyFieldNames) {
return fetch().intoMap(keyFieldNames);
}
@Override
public final <E> Map<List<?>, E> fetchMap(Field<?>[] keys, Class<? extends E> type) {
return fetch().intoMap(keys, type);
}
@Override
public final <E> Map<List<?>, E> fetchMap(int[] keyFieldIndexes, Class<? extends E> type) {
return fetch().intoMap(keyFieldIndexes, type);
}
@Override
public final <E> Map<List<?>, E> fetchMap(String[] keyFieldNames, Class<? extends E> type) {
return fetch().intoMap(keyFieldNames, type);
}
@Override
public final <E> Map<List<?>, E> fetchMap(Field<?>[] keys, RecordMapper<? super R, E> mapper) {
return fetch().intoMap(keys, mapper);
}
@Override
public final <E> Map<List<?>, E> fetchMap(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper) {
return fetch().intoMap(keyFieldIndexes, mapper);
}
@Override
public final <E> Map<List<?>, E> fetchMap(String[] keyFieldNames, RecordMapper<? super R, E> mapper) {
return fetch().intoMap(keyFieldNames, mapper);
}
@Override
public final <S extends Record> Map<S, R> fetchMap(Table<S> table) {
return fetch().intoMap(table);
@ -596,16 +674,6 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
return fetch().intoMap(table, mapper);
}
@Override
public final <K, E> Map<K, E> fetchMap(Field<K> key, Class<? extends E> type) {
return fetch().intoMap(key, type);
}
@Override
public final <K, E> Map<K, E> fetchMap(Field<K> key, RecordMapper<? super R, E> mapper) {
return fetch().intoMap(key, mapper);
}
@Override
public final List<Map<String, Object>> fetchMaps() {
return fetch().intoMaps();
@ -616,21 +684,101 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
return fetch().intoGroups(key);
}
@Override
public final Map<?, Result<R>> fetchGroups(int keyFieldIndex) {
return fetch().intoGroups(keyFieldIndex);
}
@Override
public final Map<?, Result<R>> fetchGroups(String keyFieldName) {
return fetch().intoGroups(keyFieldName);
}
@Override
public final <K, V> Map<K, List<V>> fetchGroups(Field<K> key, Field<V> value) {
return fetch().intoGroups(key, value);
}
@Override
public final Map<?, List<?>> fetchGroups(int keyFieldIndex, int valueFieldIndex) {
return fetch().intoGroups(keyFieldIndex, valueFieldIndex);
}
@Override
public final Map<?, List<?>> fetchGroups(String keyFieldName, String valueFieldName) {
return fetch().intoGroups(keyFieldName, valueFieldName);
}
@Override
public final <K, E> Map<K, List<E>> fetchGroups(Field<K> key, Class<? extends E> type) {
return fetch().intoGroups(key, type);
}
@Override
public final <E> Map<?, List<E>> fetchGroups(int keyFieldIndex, Class<? extends E> type) {
return fetch().intoGroups(keyFieldIndex, type);
}
@Override
public final <E> Map<?, List<E>> fetchGroups(String keyFieldName, Class<? extends E> type) {
return fetch().intoGroups(keyFieldName, type);
}
@Override
public final <K, E> Map<K, List<E>> fetchGroups(Field<K> key, RecordMapper<? super R, E> mapper) {
return fetch().intoGroups(key, mapper);
}
@Override
public final <E> Map<?, List<E>> fetchGroups(int keyFieldIndex, RecordMapper<? super R, E> mapper) {
return fetch().intoGroups(keyFieldIndex, mapper);
}
@Override
public final <E> Map<?, List<E>> fetchGroups(String keyFieldName, RecordMapper<? super R, E> mapper) {
return fetch().intoGroups(keyFieldName, mapper);
}
@Override
public final Map<Record, Result<R>> fetchGroups(Field<?>[] keys) {
return fetch().intoGroups(keys);
}
@Override
public final Map<Record, Result<R>> fetchGroups(int[] keyFieldIndexes) {
return fetch().intoGroups(keyFieldIndexes);
}
@Override
public final Map<Record, Result<R>> fetchGroups(String[] keyFieldNames) {
return fetch().intoGroups(keyFieldNames);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(Field<?>[] keys, Class<? extends E> type) {
return fetch().intoGroups(keys, type);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(int[] keyFieldIndexes, Class<? extends E> type) {
return fetch().intoGroups(keyFieldIndexes, type);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(String[] keyFieldNames, Class<? extends E> type) {
return fetch().intoGroups(keyFieldNames, type);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper) {
return fetch().intoGroups(keyFieldIndexes, mapper);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(String[] keyFieldNames, RecordMapper<? super R, E> mapper) {
return fetch().intoGroups(keyFieldNames, mapper);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(Field<?>[] keys, RecordMapper<? super R, E> mapper) {
return fetch().intoGroups(keys, mapper);
@ -651,16 +799,6 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
return fetch().intoGroups(table, mapper);
}
@Override
public final <K, E> Map<K, List<E>> fetchGroups(Field<K> key, Class<? extends E> type) {
return fetch().intoGroups(key, type);
}
@Override
public final <K, E> Map<K, List<E>> fetchGroups(Field<K> key, RecordMapper<? super R, E> mapper) {
return fetch().intoGroups(key, mapper);
}
@Override
public final Object[][] fetchArrays() {
return fetch().intoArrays();
@ -668,7 +806,7 @@ abstract class AbstractResultQuery<R extends Record> extends AbstractQuery imple
@SuppressWarnings("unchecked")
@Override
public final R[] fetchArray() throws DataAccessException {
public final R[] fetchArray() {
Result<R> r = fetch();
return r.toArray((R[]) Array.newInstance(getRecordType(), r.size()));
}

View File

@ -216,6 +216,36 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
return fields.fields().clone();
}
// @Override [#4113] TODO: Make this public
final Field<?>[] fields(Field<?>... f) {
Field<?>[] result = new Field[f.length];
for (int i = 0; i < f.length; i++)
result[i] = field(f[i]);
return result;
}
// @Override [#4113] TODO: Make this public
final Field<?>[] fields(int... indexes) {
Field<?>[] result = new Field[indexes.length];
for (int i = 0; i < indexes.length; i++)
result[i] = field(indexes[i]);
return result;
}
// @Override [#4113] TODO: Make this public
final Field<?>[] fields(String... names) {
Field<?>[] result = new Field[names.length];
for (int i = 0; i < names.length; i++)
result[i] = field(names[i]);
return result;
}
@Override
public final boolean isEmpty() {
return records.isEmpty();
@ -978,19 +1008,29 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
}
return list;
}
@Override
public final <K> Map<K, R> intoMap(Field<K> key) {
int index = indexOrFail(fieldsRow(), key);
return intoMap0(indexOrFail(fieldsRow(), key));
}
@Override
public final Map<?, R> intoMap(int keyFieldIndex) {
return intoMap0(keyFieldIndex);
}
@Override
public final Map<?, R> intoMap(String keyFieldName) {
return intoMap(field(keyFieldName));
}
private final <K> Map<K, R> intoMap0(int keyFieldIndex) {
Map<K, R> map = new LinkedHashMap<K, R>();
for (R record : this) {
if (map.put((K) record.getValue(index), record) != null) {
throw new InvalidResultException("Key " + key + " is not unique in Result for " + this);
}
}
for (R record : this)
if (map.put((K) record.getValue(keyFieldIndex), record) != null)
throw new InvalidResultException("Key " + keyFieldIndex + " is not unique in Result for " + this);
return map;
}
@ -1000,17 +1040,39 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
int kIndex = indexOrFail(fieldsRow(), key);
int vIndex = indexOrFail(fieldsRow(), value);
return intoMap0(kIndex, vIndex);
}
@Override
public final Map<?, ?> intoMap(int keyFieldIndex, int valueFieldIndex) {
return intoMap0(keyFieldIndex, valueFieldIndex);
}
@Override
public final Map<?, ?> intoMap(String keyFieldName, String valueFieldName) {
return intoMap(field(keyFieldName), field(valueFieldName));
}
private final <K, V> Map<K, V> intoMap0(int kIndex, int vIndex) {
Map<K, V> map = new LinkedHashMap<K, V>();
for (R record : this) {
if (map.put((K) record.getValue(kIndex), (V) record.getValue(vIndex)) != null) {
throw new InvalidResultException("Key " + key + " is not unique in Result for " + this);
}
}
for (R record : this)
if (map.put((K) record.getValue(kIndex), (V) record.getValue(vIndex)) != null)
throw new InvalidResultException("Key " + kIndex + " is not unique in Result for " + this);
return map;
}
@Override
public final Map<Record, R> intoMap(int[] keyFieldIndexes) {
return intoMap(fields(keyFieldIndexes));
}
@Override
public final Map<Record, R> intoMap(String[] keyFieldNames) {
return intoMap(fields(keyFieldNames));
}
@Override
public final Map<Record, R> intoMap(Field<?>[] keys) {
if (keys == null) {
@ -1033,11 +1095,31 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
return map;
}
@Override
public final <E> Map<List<?>, E> intoMap(int[] keyFieldIndexes, Class<? extends E> type) {
return intoMap(fields(keyFieldIndexes), type);
}
@Override
public final <E> Map<List<?>, E> intoMap(String[] keyFieldNames, Class<? extends E> type) {
return intoMap(fields(keyFieldNames), type);
}
@Override
public final <E> Map<List<?>, E> intoMap(Field<?>[] keys, Class<? extends E> type) {
return intoMap(keys, Utils.configuration(this).recordMapperProvider().provide(fields, type));
}
@Override
public final <E> Map<List<?>, E> intoMap(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper) {
return intoMap(fields(keyFieldIndexes), mapper);
}
@Override
public final <E> Map<List<?>, E> intoMap(String[] keyFieldNames, RecordMapper<? super R, E> mapper) {
return intoMap(fields(keyFieldNames), mapper);
}
@Override
public final <E> Map<List<?>, E> intoMap(Field<?>[] keys, RecordMapper<? super R, E> mapper) {
if (keys == null) {
@ -1095,32 +1177,66 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
return map;
}
@Override
public final <E> Map<?, E> intoMap(int keyFieldIndex, Class<? extends E> type) {
return intoMap(keyFieldIndex, Utils.configuration(this).recordMapperProvider().provide(fields, type));
}
@Override
public final <E> Map<?, E> intoMap(String keyFieldName, Class<? extends E> type) {
return intoMap(keyFieldName, Utils.configuration(this).recordMapperProvider().provide(fields, type));
}
@Override
public final <K, E> Map<K, E> intoMap(Field<K> key, Class<? extends E> type) {
return intoMap(key, Utils.configuration(this).recordMapperProvider().provide(fields, type));
}
@Override
public final <E> Map<?, E> intoMap(int keyFieldIndex, RecordMapper<? super R, E> mapper) {
return intoMap0(keyFieldIndex, mapper);
}
@Override
public final <E> Map<?, E> intoMap(String keyFieldName, RecordMapper<? super R, E> mapper) {
return intoMap(field(keyFieldName), mapper);
}
@Override
public final <K, E> Map<K, E> intoMap(Field<K> key, RecordMapper<? super R, E> mapper) {
int index = indexOrFail(fieldsRow(), key);
return intoMap0(indexOrFail(fieldsRow(), key), mapper);
}
private final <K, E> Map<K, E> intoMap0(int keyFieldIndex, RecordMapper<? super R, E> mapper) {
Map<K, E> map = new LinkedHashMap<K, E>();
for (R record : this) {
if (map.put((K) record.getValue(index), mapper.map(record)) != null) {
throw new InvalidResultException("Key " + key + " is not unique in Result for " + this);
}
}
for (R record : this)
if (map.put((K) record.getValue(keyFieldIndex), mapper.map(record)) != null)
throw new InvalidResultException("Key " + keyFieldIndex + " is not unique in Result for " + this);
return map;
}
@Override
public final <K> Map<K, Result<R>> intoGroups(Field<K> key) {
int index = indexOrFail(fieldsRow(), key);
return intoGroups0(indexOrFail(fieldsRow(), key));
}
@Override
public final Map<?, Result<R>> intoGroups(int keyFieldIndex) {
return intoGroups0(keyFieldIndex);
}
@Override
public final Map<?, Result<R>> intoGroups(String keyFieldName) {
return intoGroups(field(keyFieldName));
}
private final <K> Map<K, Result<R>> intoGroups0(int keyFieldIndex) {
Map<K, Result<R>> map = new LinkedHashMap<K, Result<R>>();
for (R record : this) {
K val = (K) record.getValue(index);
K val = (K) record.getValue(keyFieldIndex);
Result<R> result = map.get(val);
if (result == null) {
@ -1139,6 +1255,20 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
int kIndex = indexOrFail(fieldsRow(), key);
int vIndex = indexOrFail(fieldsRow(), value);
return intoGroups0(kIndex, vIndex);
}
@Override
public final Map<?, List<?>> intoGroups(int keyFieldIndex, int valueFieldIndex) {
return (Map) intoGroups0(keyFieldIndex, valueFieldIndex);
}
@Override
public final Map<?, List<?>> intoGroups(String keyFieldName, String valueFieldName) {
return (Map) intoGroups(field(keyFieldName), field(valueFieldName));
}
private final <K, V> Map<K, List<V>> intoGroups0(int kIndex, int vIndex) {
Map<K, List<V>> map = new LinkedHashMap<K, List<V>>();
for (R record : this) {
@ -1157,6 +1287,16 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
return map;
}
@Override
public final <E> Map<?, List<E>> intoGroups(int keyFieldIndex, Class<? extends E> type) {
return intoGroups(keyFieldIndex, Utils.configuration(this).recordMapperProvider().provide(fields, type));
}
@Override
public final <E> Map<?, List<E>> intoGroups(String keyFieldName, Class<? extends E> type) {
return intoGroups(keyFieldName, Utils.configuration(this).recordMapperProvider().provide(fields, type));
}
@Override
public final <K, E> Map<K, List<E>> intoGroups(Field<K> key, Class<? extends E> type) {
return intoGroups(key, Utils.configuration(this).recordMapperProvider().provide(fields, type));
@ -1164,11 +1304,24 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
@Override
public final <K, E> Map<K, List<E>> intoGroups(Field<K> key, RecordMapper<? super R, E> mapper) {
int index = indexOrFail(fieldsRow(), key);
return intoGroups0(indexOrFail(fieldsRow(), key), mapper);
}
@Override
public final <E> Map<?, List<E>> intoGroups(int keyFieldIndex, RecordMapper<? super R, E> mapper) {
return intoGroups0(keyFieldIndex, mapper);
}
@Override
public final <E> Map<?, List<E>> intoGroups(String keyFieldName, RecordMapper<? super R, E> mapper) {
return intoGroups(field(keyFieldName), mapper);
}
private final <K, E> Map<K, List<E>> intoGroups0(int keyFieldIndex, RecordMapper<? super R, E> mapper) {
Map<K, List<E>> map = new LinkedHashMap<K, List<E>>();
for (R record : this) {
K keyVal = (K) record.getValue(index);
K keyVal = (K) record.getValue(keyFieldIndex);
List<E> list = map.get(keyVal);
if (list == null) {
@ -1182,6 +1335,16 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
return map;
}
@Override
public final Map<Record, Result<R>> intoGroups(int[] keyFieldIndexes) {
return intoGroups(fields(keyFieldIndexes));
}
@Override
public final Map<Record, Result<R>> intoGroups(String[] keyFieldNames) {
return intoGroups(fields(keyFieldNames));
}
@Override
public final Map<Record, Result<R>> intoGroups(Field<?>[] keys) {
if (keys == null) {
@ -1208,11 +1371,31 @@ class ResultImpl<R extends Record> implements Result<R>, AttachableInternal {
return map;
}
@Override
public <E> Map<Record, List<E>> intoGroups(int[] keyFieldIndexes, Class<? extends E> type) {
return intoGroups(keyFieldIndexes, Utils.configuration(this).recordMapperProvider().provide(fields, type));
}
@Override
public <E> Map<Record, List<E>> intoGroups(String[] keyFieldNames, Class<? extends E> type) {
return intoGroups(keyFieldNames, Utils.configuration(this).recordMapperProvider().provide(fields, type));
}
@Override
public final <E> Map<Record, List<E>> intoGroups(Field<?>[] keys, Class<? extends E> type) {
return intoGroups(keys, Utils.configuration(this).recordMapperProvider().provide(fields, type));
}
@Override
public final <E> Map<Record, List<E>> intoGroups(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper) {
return intoGroups(fields(keyFieldIndexes), mapper);
}
@Override
public final <E> Map<Record, List<E>> intoGroups(String[] keyFieldNames, RecordMapper<? super R, E> mapper) {
return intoGroups(fields(keyFieldNames), mapper);
}
@Override
public final <E> Map<Record, List<E>> intoGroups(Field<?>[] keys, RecordMapper<? super R, E> mapper) {
if (keys == null) {

View File

@ -117,7 +117,6 @@ import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableLike;
import org.jooq.WindowDefinition;
import org.jooq.exception.DataAccessException;
/**
* A wrapper for a {@link SelectQuery}
@ -1965,7 +1964,7 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
}
@Override
public final SelectImpl onKey() throws DataAccessException {
public final SelectImpl onKey() {
conditionStep = ConditionStep.ON;
getQuery().addJoinOnKey(joinTable, joinType);
joinTable = null;
@ -1975,7 +1974,7 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
}
@Override
public final SelectImpl onKey(TableField<?, ?>... keyFields) throws DataAccessException {
public final SelectImpl onKey(TableField<?, ?>... keyFields) {
conditionStep = ConditionStep.ON;
getQuery().addJoinOnKey(joinTable, joinType, keyFields);
joinTable = null;
@ -2537,26 +2536,106 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
return getDelegate().fetchMap(key);
}
@Override
public final Map<?, R> fetchMap(int keyFieldIndex) {
return getDelegate().fetchMap(keyFieldIndex);
}
@Override
public final Map<?, R> fetchMap(String keyFieldName) {
return getDelegate().fetchMap(keyFieldName);
}
@Override
public final <K, V> Map<K, V> fetchMap(Field<K> key, Field<V> value) {
return getDelegate().fetchMap(key, value);
}
@Override
public final Map<?, ?> fetchMap(int keyFieldIndex, int valueFieldIndex) {
return getDelegate().fetchMap(keyFieldIndex, valueFieldIndex);
}
@Override
public final Map<?, ?> fetchMap(String keyFieldName, String valueFieldName) {
return getDelegate().fetchMap(keyFieldName, valueFieldName);
}
@Override
public final <K, E> Map<K, E> fetchMap(Field<K> key, Class<? extends E> type) {
return getDelegate().fetchMap(key, type);
}
@Override
public final <E> Map<?, E> fetchMap(int keyFieldIndex, Class<? extends E> type) {
return getDelegate().fetchMap(keyFieldIndex, type);
}
@Override
public final <E> Map<?, E> fetchMap(String keyFieldName, Class<? extends E> type) {
return getDelegate().fetchMap(keyFieldName, type);
}
@Override
public final <K, E> Map<K, E> fetchMap(Field<K> key, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchMap(key, mapper);
}
@Override
public final <E> Map<?, E> fetchMap(int keyFieldIndex, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchMap(keyFieldIndex, mapper);
}
@Override
public final <E> Map<?, E> fetchMap(String keyFieldName, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchMap(keyFieldName, mapper);
}
@Override
public final Map<Record, R> fetchMap(Field<?>[] keys) {
return getDelegate().fetchMap(keys);
}
@Override
public final Map<Record, R> fetchMap(int[] keyFieldIndexes) {
return getDelegate().fetchMap(keyFieldIndexes);
}
@Override
public final Map<Record, R> fetchMap(String[] keyFieldNames) {
return getDelegate().fetchMap(keyFieldNames);
}
@Override
public final <E> Map<List<?>, E> fetchMap(Field<?>[] keys, Class<? extends E> type) {
return getDelegate().fetchMap(keys, type);
}
@Override
public final <E> Map<List<?>, E> fetchMap(int[] keyFieldIndexes, Class<? extends E> type) {
return getDelegate().fetchMap(keyFieldIndexes, type);
}
@Override
public final <E> Map<List<?>, E> fetchMap(String[] keyFieldNames, Class<? extends E> type) {
return getDelegate().fetchMap(keyFieldNames, type);
}
@Override
public final <E> Map<List<?>, E> fetchMap(Field<?>[] keys, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchMap(keys, mapper);
}
@Override
public final <E> Map<List<?>, E> fetchMap(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchMap(keyFieldIndexes, mapper);
}
@Override
public final <E> Map<List<?>, E> fetchMap(String[] keyFieldNames, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchMap(keyFieldNames, mapper);
}
@Override
public final <S extends Record> Map<S, R> fetchMap(Table<S> table) {
return getDelegate().fetchMap(table);
@ -2572,16 +2651,6 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
return getDelegate().fetchMap(table, mapper);
}
@Override
public final <K, E> Map<K, E> fetchMap(Field<K> key, Class<? extends E> type) {
return getDelegate().fetchMap(key, type);
}
@Override
public final <K, E> Map<K, E> fetchMap(Field<K> key, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchMap(key, mapper);
}
@Override
public final List<Map<String, Object>> fetchMaps() {
return getDelegate().fetchMaps();
@ -2592,26 +2661,106 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
return getDelegate().fetchGroups(key);
}
@Override
public final Map<?, Result<R>> fetchGroups(int keyFieldIndex) {
return getDelegate().fetchGroups(keyFieldIndex);
}
@Override
public final Map<?, Result<R>> fetchGroups(String keyFieldName) {
return getDelegate().fetchGroups(keyFieldName);
}
@Override
public final <K, V> Map<K, List<V>> fetchGroups(Field<K> key, Field<V> value) {
return getDelegate().fetchGroups(key, value);
}
@Override
public final Map<?, List<?>> fetchGroups(int keyFieldIndex, int valueFieldIndex) {
return getDelegate().fetchGroups(keyFieldIndex, valueFieldIndex);
}
@Override
public final Map<?, List<?>> fetchGroups(String keyFieldName, String valueFieldName) {
return getDelegate().fetchGroups(keyFieldName, valueFieldName);
}
@Override
public final <K, E> Map<K, List<E>> fetchGroups(Field<K> key, Class<? extends E> type) {
return getDelegate().fetchGroups(key, type);
}
@Override
public final <E> Map<?, List<E>> fetchGroups(int keyFieldIndex, Class<? extends E> type) {
return getDelegate().fetchGroups(keyFieldIndex, type);
}
@Override
public final <E> Map<?, List<E>> fetchGroups(String keyFieldName, Class<? extends E> type) {
return getDelegate().fetchGroups(keyFieldName, type);
}
@Override
public final <K, E> Map<K, List<E>> fetchGroups(Field<K> key, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchGroups(key, mapper);
}
@Override
public final <E> Map<?, List<E>> fetchGroups(int keyFieldIndex, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchGroups(keyFieldIndex, mapper);
}
@Override
public final <E> Map<?, List<E>> fetchGroups(String keyFieldName, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchGroups(keyFieldName, mapper);
}
@Override
public final Map<Record, Result<R>> fetchGroups(Field<?>[] keys) {
return getDelegate().fetchGroups(keys);
}
@Override
public final Map<Record, Result<R>> fetchGroups(int[] keyFieldIndexes) {
return getDelegate().fetchGroups(keyFieldIndexes);
}
@Override
public final Map<Record, Result<R>> fetchGroups(String[] keyFieldNames) {
return getDelegate().fetchGroups(keyFieldNames);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(Field<?>[] keys, Class<? extends E> type) {
return getDelegate().fetchGroups(keys, type);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(int[] keyFieldIndexes, Class<? extends E> type) {
return getDelegate().fetchGroups(keyFieldIndexes, type);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(String[] keyFieldNames, Class<? extends E> type) {
return getDelegate().fetchGroups(keyFieldNames, type);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(Field<?>[] keys, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchGroups(keys, mapper);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(int[] keyFieldIndexes, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchGroups(keyFieldIndexes, mapper);
}
@Override
public final <E> Map<Record, List<E>> fetchGroups(String[] keyFieldNames, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchGroups(keyFieldNames, mapper);
}
@Override
public final <S extends Record> Map<S, Result<R>> fetchGroups(Table<S> table) {
return getDelegate().fetchGroups(table);
@ -2627,16 +2776,6 @@ class SelectImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11,
return getDelegate().fetchGroups(table, mapper);
}
@Override
public final <K, E> Map<K, List<E>> fetchGroups(Field<K> key, Class<? extends E> type) {
return getDelegate().fetchGroups(key, type);
}
@Override
public final <K, E> Map<K, List<E>> fetchGroups(Field<K> key, RecordMapper<? super R, E> mapper) {
return getDelegate().fetchGroups(key, mapper);
}
@Override
public final Object[][] fetchArrays() {
return getDelegate().fetchArrays();