All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jooq.Result Maven / Gradle / Ivy

There is a newer version: 3.19.18
Show newest version
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Other licenses:
 * -----------------------------------------------------------------------------
 * Commercial licenses for this work are available. These replace the above
 * ASL 2.0 and offer limited warranties, support, maintenance, and commercial
 * database integrations.
 *
 * For more information, please visit: http://www.jooq.org/licenses
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package org.jooq;

import java.sql.ResultSet;
import java.sql.Statement;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collector;
import java.util.stream.Stream;

import org.jooq.exception.DataAccessException;
import org.jooq.exception.DataTypeException;
import org.jooq.exception.InvalidResultException;
import org.jooq.exception.MappingException;
import org.jooq.impl.DefaultRecordMapper;

import org.jetbrains.annotations.Blocking;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * A wrapper for database results returned by {@link SelectQuery}.
 *
 * @param  The record type contained in this result
 * @author Lukas Eder
 * @see SelectQuery#getResult()
 */
public interface Result extends Fields, List, Attachable, Formattable {

    /**
     * Get this result's record type.
     */
    @NotNull
    RecordType recordType();

    /**
     * Convenience method to fetch a value at a given position in the result,
     * using {@link #field(Field)} for lookup.
     *
     * @param  The value's field's generic type parameter
     * @param index The record's 0-based index in the record list
     * @param field The value's field
     * @return The value
     * @throws IndexOutOfBoundsException if the index is out of range (
     *             index < 0 || index >= size())
     * @throws IllegalArgumentException If the argument field is not contained
     *             in {@link #fieldsRow()}
     */
     T getValue(int index, Field field) throws IndexOutOfBoundsException, IllegalArgumentException;

    /**
     * Convenience method to fetch a value at a given position in the result.
     *
     * @param index The record's 0-based index in the record list
     * @param fieldIndex The value's field index
     * @return The value
     * @throws IndexOutOfBoundsException if the index is out of range (
     *             index < 0 || index >= size())
     * @throws IllegalArgumentException If the argument fieldIndex is not
     *             contained in {@link #fieldsRow()}
     */
    @Nullable
    Object getValue(int index, int fieldIndex) throws IndexOutOfBoundsException, IllegalArgumentException;

    /**
     * Convenience method to fetch a value at a given position in the result,
     * using {@link #field(String)} for lookup.
     *
     * @param index The record's 0-based index in the record list
     * @param fieldName The value's field name
     * @return The value
     * @throws IndexOutOfBoundsException if the index is out of range (
     *             index < 0 || index >= size())
     * @throws IllegalArgumentException If the argument fieldName is not
     *             contained in {@link #fieldsRow()}
     */
    @Nullable
    Object getValue(int index, String fieldName) throws IndexOutOfBoundsException, IllegalArgumentException;

    /**
     * Convenience method to fetch all values for a given field. This is
     * especially useful, when selecting only a single field, using
     * {@link #field(Field)} for lookup.
     *
     * @param  The values' field's generic type parameter
     * @param field The values' field
     * @return The values
     * @throws IllegalArgumentException If the argument field is not contained
     *             in {@link #fieldsRow()}
     */
    @NotNull
     List getValues(Field field) throws IllegalArgumentException;

    /**
     * Convenience method to fetch all values for a given field. This is
     * especially useful, when selecting only a single field, using
     * {@link #field(Field)} for lookup.
     * 

* The {@link Converter} that is provided by * {@link Configuration#converterProvider()} will be used to convert the * value to U * * @param field The values' field * @param type The type used for type conversion * @return The values * @see Record#get(Field, Class) * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull List getValues(Field field, Class type) throws IllegalArgumentException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field, using * {@link #field(Field)} for lookup. * * @param field The values' field * @param converter The data type converter used for type conversion * @return The values * @see Record#get(Field, Converter) * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull List getValues(Field field, Converter converter) throws IllegalArgumentException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field. * * @param index The values' 0-based field index * @return The values * @throws IllegalArgumentException If the argument fieldIndex is not * contained in {@link #fieldsRow()} */ @NotNull List getValues(int index) throws IllegalArgumentException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field. *

* The {@link Converter} that is provided by * {@link Configuration#converterProvider()} will be used to convert the * value to U * * @param index The values' 0-based field index * @param type The type used for type conversion * @return The values * @see Record#get(int, Class) * @throws IllegalArgumentException If the argument fieldIndex is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull List getValues(int index, Class type) throws IllegalArgumentException, DataTypeException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field. * * @param index The values' 0-based field index * @param converter The data type converter used for type conversion * @return The values * @see Record#get(int, Converter) * @throws IllegalArgumentException If the argument fieldIndex is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull List getValues(int index, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field, using * {@link #field(String)} for lookup. * * @param fieldName The values' field name * @return The values * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} */ @NotNull List getValues(String fieldName) throws IllegalArgumentException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field, using * {@link #field(String)} for lookup. *

* The {@link Converter} that is provided by * {@link Configuration#converterProvider()} will be used to convert the * value to U * * @param fieldName The values' field name * @param type The type used for type conversion * @return The values * @see Record#get(String, Class) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull List getValues(String fieldName, Class type) throws IllegalArgumentException, DataTypeException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field, using * {@link #field(String)} for lookup. * * @param fieldName The values' field name * @param converter The data type converter used for type conversion * @return The values * @see Record#get(String, Converter) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull List getValues(String fieldName, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field, using * {@link #field(Name)} for lookup. * * @param fieldName The values' field name * @return The values * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} */ @NotNull List getValues(Name fieldName) throws IllegalArgumentException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field, using * {@link #field(Name)} for lookup. *

* The {@link Converter} that is provided by * {@link Configuration#converterProvider()} will be used to convert the * value to U * * @param fieldName The values' field name * @param type The type used for type conversion * @return The values * @see Record#get(Name, Class) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull List getValues(Name fieldName, Class type) throws IllegalArgumentException, DataTypeException; /** * Convenience method to fetch all values for a given field. This is * especially useful, when selecting only a single field, using * {@link #field(Name)} for lookup. * * @param fieldName The values' field name * @param converter The data type converter used for type conversion * @return The values * @see Record#get(Name, Converter) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull List getValues(Name fieldName, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Whether there are any records contained in this Result. */ @Override boolean isEmpty(); /** * Whether there are any records contained in this Result. */ boolean isNotEmpty(); /** * Collect all records of this result. *

* This is the same as calling {@link Stream#collect(Collector)} on * {@link #stream()}. */ X collect(Collector collector); /** * Return the generated result as a list of name/value maps. * * @return The result. * @see Record#intoMap() */ @NotNull List> intoMaps(); /** * Return a {@link Map} with one of the result's columns as key and the * corresponding records as value, using {@link #field(Field)} for lookup. *

* An {@link InvalidResultException} is thrown, if the key turns out to be * non-unique in the result set. Use {@link #intoGroups(Field)} instead, if * your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param The key's generic field type. * @param key The key field. Client code must assure that this field is * unique in the result set. * @return A Map containing the results. * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} * @throws InvalidResultException if the key field returned two or more * equal values from the result set. */ @NotNull Map intoMap(Field key) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with one of the result's columns as key and the * corresponding records as value. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldIndex The 0-based 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. */ @NotNull Map 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, using {@link #field(String)} for lookup. *

* 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. *

* The resulting map is iteration order preserving. * * @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. */ @NotNull Map intoMap(String keyFieldName) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with one of the result's columns as key and the * corresponding records as value, using {@link #field(Name)} for lookup. *

* An {@link InvalidResultException} is thrown, if the key turns out to be * non-unique in the result set. Use {@link #intoGroups(Name)} instead, if * your keys are non-unique. *

* The resulting map is iteration order preserving. * * @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. */ @NotNull Map intoMap(Name 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, using {@link #field(Field)} for * lookup. *

* An {@link InvalidResultException} is thrown, if the key turns out to be * non-unique in the result set. Use {@link #intoGroups(Field, Field)} * instead, if your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param The key's generic field type * @param The value's generic field type * @param key The key field. Client code must assure that this field is * unique in the result set. * @param value The value field * @return A Map containing the results * @throws IllegalArgumentException If any of the argument fields is not * contained in {@link #fieldsRow()} * @throws InvalidResultException if the key field returned two or more * equal values from the result set. */ @NotNull Map intoMap(Field key, Field 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 *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldIndex The 0-based key field index. Client code must assure * that this field is unique in the result set. * @param valueFieldIndex The 0-based 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. */ @NotNull 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, using {@link #field(String)} for * lookup. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldName The key field name. Client code must assure that this * field is unique in the result set. * @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()} * @throws InvalidResultException if the key field returned two or more * equal values from the result set. */ @NotNull Map intoMap(String keyFieldName, String valueFieldName) 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, using {@link #field(Name)} for * lookup. *

* An {@link InvalidResultException} is thrown, if the key turns out to be * non-unique in the result set. Use {@link #intoGroups(Name, Name)} * instead, if your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyFieldName The key field name. Client code must assure that this * field is unique in the result set. * @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()} * @throws InvalidResultException if the key field returned two or more * equal values from the result set. */ @NotNull Map intoMap(Name keyFieldName, Name valueFieldName) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with results grouped by the given key and mapped * into the given entity type, using {@link #field(Field)} for lookup. *

* An {@link InvalidResultException} is thrown, if the key is non-unique in * the result set. Use {@link #intoGroups(Field, Class)} instead, if your * key is non-unique. *

* The resulting map is iteration order preserving. * * @param key 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 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 */ @NotNull Map intoMap(Field key, Class type) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped * into the given entity type. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldIndex The 0-based key field index. 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 */ @NotNull Map intoMap(int keyFieldIndex, Class type) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped * into the given entity type, using {@link #field(String)} for lookup. *

* 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. *

* The resulting map is iteration order preserving. * * @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 */ @NotNull Map intoMap(String keyFieldName, Class type) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped * into the given entity type, using {@link #field(Name)} for lookup. *

* An {@link InvalidResultException} is thrown, if the key is non-unique in * the result set. Use {@link #intoGroups(Name, Class)} instead, if your key * is non-unique. *

* The resulting map is iteration order preserving. * * @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 */ @NotNull Map intoMap(Name keyFieldName, Class type) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped by * the given mapper, using {@link #field(Field)} for lookup. *

* An {@link InvalidResultException} is thrown, if the key is non-unique in * the result set. Use {@link #intoGroups(Field, Class)} instead, if your * key is non-unique. *

* The resulting map is iteration order preserving. * * @param key 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 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 */ @NotNull Map intoMap(Field key, RecordMapper mapper) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped by * the given mapper. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldIndex The 0-based key field index. 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 */ @NotNull Map intoMap(int keyFieldIndex, RecordMapper mapper) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped by * the given mapper, using {@link #field(String)} for lookup. *

* 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. *

* The resulting map is iteration order preserving. * * @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 */ @NotNull Map intoMap(String keyFieldName, RecordMapper mapper) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped by * the given mapper, using {@link #field(Name)} for lookup. *

* An {@link InvalidResultException} is thrown, if the key is non-unique in * the result set. Use {@link #intoGroups(Name, Class)} instead, if your key * is non-unique. *

* The resulting map is iteration order preserving. * * @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 */ @NotNull Map intoMap(Name keyFieldName, RecordMapper mapper) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with the given keys as a map key and the * corresponding record as value, using {@link #field(Field)} for lookup. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Field[])} instead, if your keys * are non-unique. *

* The resulting map is iteration order preserving. * * @param keys The keys. Client code must assure that keys are unique in the * result set. If this is null 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 fields is not * contained in {@link #fieldsRow()} * @throws InvalidResultException if the keys are non-unique in the result * set. */ @NotNull Map intoMap(Field[] keys) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with the given keys as a map key and the * corresponding record as value. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldIndexes The 0-based key field indexes. Client code must * assure that keys are unique in the result set. If this is * null 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. */ @NotNull Map intoMap(int[] keyFieldIndexes) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with the given keys as a map key and the * corresponding record as value, using {@link #field(String)} for lookup. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. Client code must assure that keys are * unique in the result set. If this is null 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. */ @NotNull Map intoMap(String[] keyFieldNames) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with the given keys as a map key and the * corresponding record as value, using {@link #field(Name)} for lookup. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Name[])} instead, if your keys * are non-unique. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. Client code must assure that keys are * unique in the result set. If this is null 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. */ @NotNull Map intoMap(Name[] keyFieldNames) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with the given keys as a map key and the * corresponding record as value, using {@link #field(Field)} for lookup. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Field[], Field[])} instead, if * your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keys The keys. Client code must assure that keys are unique in the * result set. If this is null or an empty array, * the resulting map will contain at most one entry. * @param values The values. * @return A Map containing the results. * @throws IllegalArgumentException If any of the argument fields is not * contained in {@link #fieldsRow()} * @throws InvalidResultException if the keys are non-unique in the result * set. */ @NotNull Map intoMap(Field[] keys, Field[] values) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with the given keys as a map key and the * corresponding record as value. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(int[], int[])} instead, if your * keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyFieldIndexes The 0-based key field indexes. Client code must * assure that keys are unique in the result set. If this is * null or an empty array, the resulting map will * contain at most one entry. * @param valueFieldIndexes The values. * @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. */ @NotNull Map intoMap(int[] keyFieldIndexes, int[] valueFieldIndexes) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with the given keys as a map key and the * corresponding record as value, using {@link #field(String)} for lookup. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(String[], String[])} instead, * if your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. Client code must assure that keys are * unique in the result set. If this is null or an * empty array, the resulting map will contain at most one entry. * @param valueFieldNames The values. * @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. */ @NotNull Map intoMap(String[] keyFieldNames, String[] valueFieldNames) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with the given keys as a map key and the * corresponding record as value, using {@link #field(Name)} for lookup. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Name[], Name[])} instead, if * your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. Client code must assure that keys are * unique in the result set. If this is null or an * empty array, the resulting map will contain at most one entry. * @param valueFieldNames The values. * @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. */ @NotNull Map intoMap(Name[] keyFieldNames, Name[] valueFieldNames) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type, using {@link #field(Field)} for lookup. *

* 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. *

* The resulting map is iteration order preserving. * * @param keys The keys. Client code must assure that keys are unique in the * result set. If this is null 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 fields 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 */ @NotNull Map, E> intoMap(Field[] keys, Class type) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldIndexes The 0-based key field indexes. Client code must * assure that keys are unique in the result set. If this is * null 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 */ @NotNull Map, E> intoMap(int[] keyFieldIndexes, Class type) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type, using {@link #field(String)} for lookup. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. Client code must assure that keys are * unique in the result set. If this is null 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 */ @NotNull Map, E> intoMap(String[] keyFieldNames, Class type) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type, using {@link #field(Name)} for lookup. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Name[], Class)} instead, if * your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. Client code must assure that keys are * unique in the result set. If this is null 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 */ @NotNull Map, E> intoMap(Name[] keyFieldNames, Class type) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped by * the given mapper, using {@link #field(Field)} for lookup. *

* 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. *

* The resulting map is iteration order preserving. * * @param keys The keys. Client code must assure that keys are unique in the * result set. If this is null 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 fields 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 */ @NotNull Map, E> intoMap(Field[] keys, RecordMapper mapper) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped by * the given mapper. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldIndexes The 0-based key field indexes. Client code must * assure that keys are unique in the result set. If this is * null 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 */ @NotNull Map, E> intoMap(int[] keyFieldIndexes, RecordMapper mapper) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped by * the given mapper, using {@link #field(String)} for lookup. *

* 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. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. Client code must assure that keys are * unique in the result set. If this is null 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 */ @NotNull Map, E> intoMap(String[] keyFieldNames, RecordMapper mapper) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped by * the given mapper, using {@link #field(Name)} for lookup. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Name[], Class)} instead, if * your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. Client code must assure that keys are * unique in the result set. If this is null 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 */ @NotNull Map, E> intoMap(Name[] keyFieldNames, RecordMapper mapper) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key entity. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Class)} instead, if your keys * are non-unique. *

* The resulting map is iteration order preserving. * * @param keyType The key type. If this is null, the resulting * map will contain at most one entry. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @throws InvalidResultException if the keys are non-unique in the result * set. * @see DefaultRecordMapper */ @NotNull Map intoMap(Class keyType) throws MappingException, InvalidResultException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Class, Class)} instead, if your * keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyType The key type. If this is null, the resulting * map will contain at most one entry. * @param valueType The value type. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @throws InvalidResultException if the keys are non-unique in the result * set. * @see DefaultRecordMapper */ @NotNull Map intoMap(Class keyType, Class valueType) throws MappingException, InvalidResultException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Class, RecordMapper)} instead, * if your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyType The key type. If this is null, the resulting * map will contain at most one entry. * @param valueMapper The value mapper. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @throws InvalidResultException if the keys are non-unique in the result * set. * @see DefaultRecordMapper */ @NotNull Map intoMap(Class keyType, RecordMapper valueMapper) throws InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(RecordMapper)} instead, if your * keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyMapper The key mapper. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @throws InvalidResultException if the keys are non-unique in the result * set. * @see DefaultRecordMapper */ @NotNull Map intoMap(RecordMapper keyMapper) throws InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(RecordMapper, Class)} instead, * if your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyMapper The key mapper. * @param valueType The value type. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @throws InvalidResultException if the keys are non-unique in the result * set. * @see DefaultRecordMapper */ @NotNull Map intoMap(RecordMapper keyMapper, Class valueType) throws InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(RecordMapper, RecordMapper)} * instead, if your keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyMapper The key mapper. * @param valueMapper The value mapper. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @throws InvalidResultException if the keys are non-unique in the result * set. * @see DefaultRecordMapper */ @NotNull Map intoMap(RecordMapper keyMapper, RecordMapper valueMapper) throws InvalidResultException, MappingException; /** * Return a {@link Map} with the given key table as a map key and the * corresponding record as value. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Table)} instead, if your keys * are non-unique. *

* The resulting map is iteration order preserving. * * @param table The key table. Client code must assure that keys are unique * in the result set. May not be null. * @return A Map containing the results. * @throws IllegalArgumentException If any of the argument fields is not * contained in {@link #fieldsRow()} * @throws InvalidResultException if the keys are non-unique in the result * set. */ @NotNull Map intoMap(Table table) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with the given key table as a map key and the * corresponding record as value. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Table, Table)} instead, if your * keys are non-unique. *

* The resulting map is iteration order preserving. * * @param keyTable The key table. Client code must assure that keys are * unique in the result set. May not be null. * @param valueTable The value table. May not be null. * @return A Map containing the results. * @throws IllegalArgumentException If any of the argument fields is not * contained in {@link #fieldsRow()} * @throws InvalidResultException if the keys are non-unique in the result * set. */ @NotNull Map intoMap(Table keyTable, Table valueTable) throws IllegalArgumentException, InvalidResultException; /** * Return a {@link Map} with results grouped by the given key table and * mapped into the given entity type. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Table, Class)} instead, if your * keys are non-unique. *

* The resulting map is iteration order preserving. * * @param table The key table. Client code must assure that keys are unique * in the result set. May not be null. * @param type The entity type. * @return A Map containing the results. * @throws IllegalArgumentException If any of the argument fields 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 */ @NotNull Map intoMap(Table table, Class type) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with results grouped by the given key table and * mapped by the given mapper. *

* An {@link InvalidResultException} is thrown, if the keys are non-unique * in the result set. Use {@link #intoGroups(Table, Class)} instead, if your * keys are non-unique. *

* The resulting map is iteration order preserving. * * @param table The key table. Client code must assure that keys are unique * in the result set. May not be null. * @param mapper The mapper callback. * @return A Map containing the results. * @throws IllegalArgumentException If any of the argument fields 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 */ @NotNull Map intoMap(Table table, RecordMapper mapper) throws IllegalArgumentException, InvalidResultException, MappingException; /** * Return a {@link Map} with one of the result's columns as key and a list * of corresponding records as value, using {@link #field(Field)} for * lookup. *

* Unlike {@link #intoMap(Field)}, this method allows for non-unique keys in * the result set. *

* The resulting map is iteration order preserving. * * @param The key's generic field type * @param key The key field. * @return A Map containing the results * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Map> intoGroups(Field key) throws IllegalArgumentException; /** * Return a {@link Map} with one of the result's columns as key and a list * of corresponding records as value. *

* Unlike {@link #intoMap(int)}, this method allows for non-unique keys in * the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldIndex The 0-based key field index. * @return A Map containing the results * @throws IllegalArgumentException If the argument field index is not * contained in {@link #fieldsRow()} */ @NotNull Map> 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, using {@link #field(String)} for * lookup. *

* Unlike {@link #intoMap(String)}, this method allows for non-unique keys * in the result set. *

* The resulting map is iteration order preserving. * * @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()} */ @NotNull Map> intoGroups(String keyFieldName) throws IllegalArgumentException; /** * Return a {@link Map} with one of the result's columns as key and a list * of corresponding records as value, using {@link #field(Name)} for lookup. *

* Unlike {@link #intoMap(Name)}, this method allows for non-unique keys in * the result set. *

* The resulting map is iteration order preserving. * * @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()} */ @NotNull Map> intoGroups(Name 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, using {@link #field(Field)} for * lookup. *

* Unlike {@link #intoMap(Field, Field)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @param The key's generic field type * @param The value's generic field type * @param key The key field. * @param value The value field * @return A Map containing the results * @throws IllegalArgumentException If any of the argument fields is not * contained in {@link #fieldsRow()} */ @NotNull Map> intoGroups(Field key, Field 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. *

* Unlike {@link #intoMap(int, int)}, this method allows for non-unique keys * in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldIndex The 0-based key field index. * @param valueFieldIndex The 0-based value field index. * @return A Map containing the results * @throws IllegalArgumentException If any of the argument field indexes is * not contained in {@link #fieldsRow()} */ @NotNull Map> 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, using {@link #field(String)} for * lookup. *

* Unlike {@link #intoMap(String, String)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @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()} */ @NotNull Map> intoGroups(String keyFieldName, String valueFieldName) 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, using {@link #field(Name)} for * lookup. *

* Unlike {@link #intoMap(Name, Name)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @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()} */ @NotNull Map> intoGroups(Name keyFieldName, Name valueFieldName) throws IllegalArgumentException; /** * Return a {@link Map} with results grouped by the given key and mapped * into the given entity type, using {@link #field(Field)} for lookup. *

* Unlike {@link #intoMap(Field, Class)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @param The key's generic field type * @param The generic entity type. * @param key The key field. * @param type The entity type. * @throws IllegalArgumentException If the argument field 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 */ @NotNull Map> intoGroups(Field key, Class type) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped * into the given entity type. *

* Unlike {@link #intoMap(int, Class)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldIndex The 0-based 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 */ @NotNull Map> intoGroups(int keyFieldIndex, Class type) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped * into the given entity type, using {@link #field(String)} for lookup. *

* Unlike {@link #intoMap(String, Class)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @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 */ @NotNull Map> intoGroups(String keyFieldName, Class type) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped * into the given entity type, using {@link #field(Name)} for lookup. *

* Unlike {@link #intoMap(Name, Class)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @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 */ @NotNull Map> intoGroups(Name keyFieldName, Class type) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped by * the given mapper, using {@link #field(Field)} for lookup. *

* Unlike {@link #intoMap(Field, RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param The key's generic field type * @param The generic entity type. * @param key The key field. * @param mapper The mapper callback. * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records */ @NotNull Map> intoGroups(Field key, RecordMapper mapper) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped by * the given mapper. *

* Unlike {@link #intoMap(int, RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldIndex The 0-based 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 */ @NotNull Map> intoGroups(int keyFieldIndex, RecordMapper mapper) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped by * the given mapper, using {@link #field(String)} for lookup. *

* Unlike {@link #intoMap(String, RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @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 */ @NotNull Map> intoGroups(String keyFieldName, RecordMapper mapper) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given key and mapped by * the given mapper, using {@link #field(Name)} for lookup. *

* Unlike {@link #intoMap(Name, RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @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 */ @NotNull Map> intoGroups(Name keyFieldName, RecordMapper mapper) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with the result grouped by the given keys, using * {@link #field(Field)} for lookup. *

* Unlike {@link #intoMap(Field[])}, this method allows for non-unique keys * in the result set. *

* The resulting map is iteration order preserving. * * @param keys The keys. If this is null 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 fields is not * contained in {@link #fieldsRow()} */ @NotNull Map> intoGroups(Field[] keys) throws IllegalArgumentException; /** * Return a {@link Map} with the result grouped by the given keys. *

* Unlike {@link #intoMap(int[])}, this method allows for non-unique keys in * the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldIndexes The 0-based key field indexes. If this is * null 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()} */ @NotNull Map> intoGroups(int[] keyFieldIndexes) throws IllegalArgumentException; /** * Return a {@link Map} with the result grouped by the given keys, using * {@link #field(String)} for lookup. *

* Unlike {@link #intoMap(String[])}, this method allows for non-unique keys * in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. If this is null 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()} */ @NotNull Map> intoGroups(String[] keyFieldNames) throws IllegalArgumentException; /** * Return a {@link Map} with the result grouped by the given keys, using * {@link #field(Name)} for lookup. *

* Unlike {@link #intoMap(Name[])}, this method allows for non-unique keys * in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. If this is null 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()} */ @NotNull Map> intoGroups(Name[] keyFieldNames) throws IllegalArgumentException; /** * Return a {@link Map} with the result grouped by the given keys, using * {@link #field(Field)} for lookup. *

* Unlike {@link #intoMap(Field[], Field[])}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keys The keys. If this is null or an empty array, the * resulting map will contain at most one entry. * @param values The values. * @return A Map containing grouped results * @throws IllegalArgumentException If any of the argument fields is not * contained in {@link #fieldsRow()} */ @NotNull Map> intoGroups(Field[] keys, Field[] values) throws IllegalArgumentException; /** * Return a {@link Map} with the result grouped by the given keys. *

* Unlike {@link #intoMap(int[], int[])}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldIndexes The 0-based key field indexes. If this is * null or an empty array, the resulting map will * contain at most one entry. * @param valueFieldIndexes The 0-based value field indexes. * @return A Map containing grouped results * @throws IllegalArgumentException If any of the argument field indexes is * not contained in {@link #fieldsRow()} */ @NotNull Map> intoGroups(int[] keyFieldIndexes, int[] valueFieldIndexes) throws IllegalArgumentException; /** * Return a {@link Map} with the result grouped by the given keys, using * {@link #field(String)} for lookup. *

* Unlike {@link #intoMap(String[], String[])}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. If this is null or an empty * array, the resulting map will contain at most one entry. * @param valueFieldNames The values. * @return A Map containing grouped results * @throws IllegalArgumentException If any of the argument field names is * not contained in {@link #fieldsRow()} */ @NotNull Map> intoGroups(String[] keyFieldNames, String[] valueFieldNames) throws IllegalArgumentException; /** * Return a {@link Map} with the result grouped by the given keys, using * {@link #field(Name)} for lookup. *

* Unlike {@link #intoMap(Name[], Name[])}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. If this is null or an empty * array, the resulting map will contain at most one entry. * @param valueFieldNames The values. * @return A Map containing grouped results * @throws IllegalArgumentException If any of the argument field names is * not contained in {@link #fieldsRow()} */ @NotNull Map> intoGroups(Name[] keyFieldNames, Name[] valueFieldNames) throws IllegalArgumentException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type, using {@link #field(Field)} for lookup. *

* Unlike {@link #intoMap(Field[], Class)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keys The keys. If this is null 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 fields 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 */ @NotNull Map> intoGroups(Field[] keys, Class type) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type. *

* Unlike {@link #intoMap(int[], Class)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldIndexes The 0-based key field indexes. If this is * null 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 */ @NotNull Map> intoGroups(int[] keyFieldIndexes, Class type) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type, using {@link #field(String)} for lookup. *

* Unlike {@link #intoMap(String[], Class)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. If this is null 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 */ @NotNull Map> intoGroups(String[] keyFieldNames, Class type) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type, using {@link #field(Name)} for lookup. *

* Unlike {@link #intoMap(Name[], Class)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. If this is null 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 */ @NotNull Map> intoGroups(Name[] keyFieldNames, Class type) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type, using {@link #field(Field)} for lookup. *

* Unlike {@link #intoMap(Field[], RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keys The keys. If this is null 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 fields 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 */ @NotNull Map> intoGroups(Field[] keys, RecordMapper mapper) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type. *

* Unlike {@link #intoMap(int[], RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldIndexes The 0-based key field indexes. If this is * null 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 */ @NotNull Map> intoGroups(int[] keyFieldIndexes, RecordMapper mapper) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type, using {@link #field(String)} for lookup. *

* Unlike {@link #intoMap(String[], RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. If this is null 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 */ @NotNull Map> intoGroups(String[] keyFieldNames, RecordMapper mapper) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given keys and mapped * into the given entity type, using {@link #field(Name)} for lookup. *

* Unlike {@link #intoMap(Name[], RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyFieldNames The keys. If this is null 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 */ @NotNull Map> intoGroups(Name[] keyFieldNames, RecordMapper mapper) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given key entity. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* Unlike {@link #intoMap(Class)}, this method allows for non-unique keys in * the result set. *

* The resulting map is iteration order preserving. * * @param keyType The key type. If this is null, the resulting * map will contain at most one entry. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @see DefaultRecordMapper */ @NotNull Map> intoGroups(Class keyType) throws MappingException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* Unlike {@link #intoMap(Class, Class)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyType The key type. If this is null, the resulting * map will contain at most one entry. * @param valueType The value type. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @see DefaultRecordMapper */ @NotNull Map> intoGroups(Class keyType, Class valueType) throws MappingException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* Unlike {@link #intoMap(Class, RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyType The key type. If this is null, the resulting * map will contain at most one entry. * @param valueMapper The value mapper. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @see DefaultRecordMapper */ @NotNull Map> intoGroups(Class keyType, RecordMapper valueMapper) throws MappingException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* Unlike {@link #intoMap(RecordMapper, RecordMapper)}, this method allows * for non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyMapper The key mapper. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @see DefaultRecordMapper */ @NotNull Map> intoGroups(RecordMapper keyMapper) throws MappingException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* Unlike {@link #intoMap(RecordMapper, Class)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyMapper The key mapper. * @param valueType The value type. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @see DefaultRecordMapper */ @NotNull Map> intoGroups(RecordMapper keyMapper, Class valueType) throws MappingException; /** * Return a {@link Map} with results grouped by the given key entity and * mapped into the given entity type. *

* The grouping semantics is governed by the key type's * {@link Object#equals(Object)} and {@link Object#hashCode()} * implementation, not necessarily the values as fetched from the database. *

* Unlike {@link #intoMap(RecordMapper, RecordMapper)}, this method allows * for non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyMapper The key mapper. * @param valueMapper The value mapper. * @return A Map containing grouped results * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @see DefaultRecordMapper */ @NotNull Map> intoGroups(RecordMapper keyMapper, RecordMapper valueMapper) throws MappingException; /** * Return a {@link Map} with the result grouped by the given key table. *

* Unlike {@link #intoMap(Table)}, this method allows for non-unique keys in * the result set. *

* The resulting map is iteration order preserving. * * @param table The key table. May not be null. * @return A Map containing grouped results * @throws IllegalArgumentException If any of the argument fields is not * contained in {@link #fieldsRow()} */ @NotNull Map> intoGroups(Table table) throws IllegalArgumentException; /** * Return a {@link Map} with the result grouped by the given key table. *

* Unlike {@link #intoMap(Table, Table)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @param keyTable The key table. May not be null. * @param valueTable The value table. May not be null. * @return A Map containing grouped results * @throws IllegalArgumentException If any of the argument fields is not * contained in {@link #fieldsRow()} */ @NotNull Map> intoGroups(Table keyTable, Table valueTable) throws IllegalArgumentException; /** * Return a {@link Map} with results grouped by the given key table and * mapped into the given entity type. *

* Unlike {@link #intoMap(Table, Class)}, this method allows for non-unique * keys in the result set. *

* The resulting map is iteration order preserving. * * @param table The key table. May not be null. * @param type The entity type. * @return A Map containing grouped results * @throws IllegalArgumentException If the any of the argument fields 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 */ @NotNull Map> intoGroups(Table table, Class type) throws IllegalArgumentException, MappingException; /** * Return a {@link Map} with results grouped by the given key table and * mapped into the given entity type. *

* Unlike {@link #intoMap(Table, RecordMapper)}, this method allows for * non-unique keys in the result set. *

* The resulting map is iteration order preserving. * * @param table The key table. May not be null. * @param mapper The mapper callback. * @return A Map containing grouped results * @throws IllegalArgumentException If the any of the argument fields 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 */ @NotNull Map> intoGroups(Table table, RecordMapper mapper) throws IllegalArgumentException, MappingException; /** * Convert this result into an array of arrays. *

* The resulting array has the same number of first-dimension elements as * this result has records. It has the same number of second-dimension * elements as this result's records have fields. The resulting array * contains data as such: *

* *

     * 
     * // For arbitrary values of i, j
     * result.getValue(i, j) == result.intoArray()[i][j]
     * 
     * 
* * @return This result as an array of arrays * @see Record#intoArray() */ @Nullable Object @NotNull [] @NotNull [] intoArrays(); /** * Return all values for a field index from the result. *

* You can access data like this * *

     * result.intoArray(fieldIndex)[recordIndex]
     * 
* * @param fieldIndex The 0-based field index * @return The resulting values. This may be an array type more concrete * than Object[], depending on whether jOOQ has any * knowledge about fieldIndex's actual type. * @see #getValues(int) * @throws IllegalArgumentException If the argument fieldIndex is not * contained in {@link #fieldsRow()} */ @Nullable Object @NotNull [] intoArray(int fieldIndex) throws IllegalArgumentException; /** * Return all values for a field index from the result. *

* You can access data like this * *

     * result.intoArray(fieldIndex)[recordIndex]
     * 
* * @param fieldIndex The 0-based field index * @return The resulting values. * @see #getValues(int, Class) * @throws IllegalArgumentException If the argument fieldIndex is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ U @NotNull [] intoArray(int fieldIndex, Class type) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field index from the result. *

* You can access data like this * *

     * result.intoArray(fieldIndex)[recordIndex]
     * 
* * @param fieldIndex The 0-based field index * @return The resulting values. * @see #getValues(int, Converter) * @throws IllegalArgumentException If the argument fieldIndex is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ U @NotNull [] intoArray(int fieldIndex, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field name from the result, using * {@link #field(String)} for lookup. *

* You can access data like this * *

     * result.intoArray(fieldName)[recordIndex]
     * 
* * @return The resulting values. This may be an array type more concrete * than Object[], depending on whether jOOQ has any * knowledge about fieldName's actual type. * @see #getValues(String) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} */ @Nullable Object @NotNull [] intoArray(String fieldName) throws IllegalArgumentException; /** * Return all values for a field name from the result, using * {@link #field(String)} for lookup. *

* You can access data like this * *

     * result.intoArray(fieldName)[recordIndex]
     * 
* * @return The resulting values. * @see #getValues(String, Class) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ U @NotNull [] intoArray(String fieldName, Class type) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field name from the result, using * {@link #field(String)} for lookup. *

* You can access data like this * *

     * result.intoArray(fieldName)[recordIndex]
     * 
* * @return The resulting values. * @see #getValues(String, Converter) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ U @NotNull [] intoArray(String fieldName, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field name from the result, using * {@link #field(Name)} for lookup. *

* You can access data like this * *

     * result.intoArray(fieldName)[recordIndex]
     * 
* * @return The resulting values. This may be an array type more concrete * than Object[], depending on whether jOOQ has any * knowledge about fieldName's actual type. * @see #getValues(Name) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} */ @Nullable Object @NotNull [] intoArray(Name fieldName) throws IllegalArgumentException; /** * Return all values for a field name from the result, using * {@link #field(Name)} for lookup. *

* You can access data like this * *

     * result.intoArray(fieldName)[recordIndex]
     * 
* * @return The resulting values. * @see #getValues(Name, Class) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ U @NotNull [] intoArray(Name fieldName, Class type) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field name from the result, using * {@link #field(Name)} for lookup. *

* You can access data like this * *

     * result.intoArray(fieldName)[recordIndex]
     * 
* * @return The resulting values. * @see #getValues(Name, Converter) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ U @NotNull [] intoArray(Name fieldName, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field from the result, using * {@link #field(Field)} for lookup. *

* You can access data like this * *

     * result.intoArray(field)[recordIndex]
     * 
* * @return The resulting values. * @see #getValues(Field) * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ T @NotNull [] intoArray(Field field) throws IllegalArgumentException; /** * Return all values for a field from the result, using * {@link #field(Field)} for lookup. *

* You can access data like this * *

     * result.intoArray(field)[recordIndex]
     * 
* * @return The resulting values. * @see #getValues(Field, Class) * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ U @NotNull [] intoArray(Field field, Class type) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field from the result, using * {@link #field(Field)} for lookup. *

* You can access data like this * *

     * result.intoArray(field)[recordIndex]
     * 
* * @return The resulting values. * @see #getValues(Field, Converter) * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ U @NotNull [] intoArray(Field field, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Map results into a custom mapper callback. * * @param mapper The mapper callback * @return The custom mapped records */ @NotNull Set intoSet(RecordMapper mapper); /** * Return all values for a field index from the result. * * @param fieldIndex The 0-based field index * @return The resulting values. This may be an array type more concrete * than Object[], depending on whether jOOQ has any * knowledge about fieldIndex's actual type. * @see #getValues(int) * @throws IllegalArgumentException If the argument fieldIndex is not * contained in {@link #fieldsRow()} */ @NotNull Set intoSet(int fieldIndex) throws IllegalArgumentException; /** * Return all values for a field index from the result. * * @param fieldIndex The 0-based field index * @return The resulting values. * @see #getValues(int, Class) * @throws IllegalArgumentException If the argument fieldIndex is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull Set intoSet(int fieldIndex, Class type) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field index from the result. * * @param fieldIndex The 0-based field index * @return The resulting values. * @see #getValues(int, Converter) * @throws IllegalArgumentException If the argument fieldIndex is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull Set intoSet(int fieldIndex, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field name from the result, using * {@link #field(String)} for lookup. * * @return The resulting values. This may be an array type more concrete * than Object[], depending on whether jOOQ has any * knowledge about fieldName's actual type. * @see #getValues(String) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} */ @NotNull Set intoSet(String fieldName) throws IllegalArgumentException; /** * Return all values for a field name from the result, using * {@link #field(String)} for lookup. * * @return The resulting values. * @see #getValues(String, Class) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull Set intoSet(String fieldName, Class type) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field name from the result, using * {@link #field(String)} for lookup. * * @return The resulting values. * @see #getValues(String, Converter) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull Set intoSet(String fieldName, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field name from the result, using * {@link #field(Name)} for lookup. * * @return The resulting values. This may be an array type more concrete * than Object[], depending on whether jOOQ has any * knowledge about fieldName's actual type. * @see #getValues(Name) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} */ @NotNull Set intoSet(Name fieldName) throws IllegalArgumentException; /** * Return all values for a field name from the result, using * {@link #field(Name)} for lookup. * * @return The resulting values. * @see #getValues(Name, Class) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull Set intoSet(Name fieldName, Class type) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field name from the result, using * {@link #field(Name)} for lookup. * * @return The resulting values. * @see #getValues(Name, Converter) * @throws IllegalArgumentException If the argument fieldName is not * contained in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull Set intoSet(Name fieldName, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field from the result, using * {@link #field(Field)} for lookup. * * @return The resulting values. * @see #getValues(Field) * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Set intoSet(Field field) throws IllegalArgumentException; /** * Return all values for a field from the result, using * {@link #field(Field)} for lookup. * * @return The resulting values. * @see #getValues(Field, Class) * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull Set intoSet(Field field, Class type) throws IllegalArgumentException, DataTypeException; /** * Return all values for a field from the result, using * {@link #field(Field)} for lookup. * * @return The resulting values. * @see #getValues(Field, Converter) * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} * @throws DataTypeException wrapping any data type conversion exception * that might have occurred */ @NotNull Set intoSet(Field field, Converter converter) throws IllegalArgumentException, DataTypeException; /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @param fields The fields of the new records * @return The new result */ @NotNull Result into(Field... fields); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21); /** * Copy all records from this result into a new result with new records * holding only a subset of the previous fields, using {@link #field(Field)} * for lookup. * * @return The new result */ @NotNull Result> into(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21, Field field22); /** * Map resulting records onto a custom type. *

* This is the same as calling record.into(type) on every * record contained in this Result. See * {@link Record#into(Class)} for more details * * @param The generic entity type. * @param type The entity type. * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @see Record#into(Class) * @see DefaultRecordMapper */ @NotNull List into(Class type) throws MappingException; /** * Map resulting records onto a custom record. *

* This is the same as calling record.into(table) on every * record contained in this Result. See * {@link Record#into(Table)} for more details * * @param The generic table record type. * @param table The table type. * @throws MappingException wrapping any reflection or data type conversion * exception that might have occurred while mapping records * @see Record#into(Table) */ @NotNull Result into(Table table) throws MappingException; /** * Map results into a custom handler callback. * * @param handler The handler callback * @return Convenience result, returning the parameter handler itself * @deprecated - 3.15.0 - [#11902] - Use {@link Iterable#forEach(Consumer)} * based methods, instead. */ @Deprecated(forRemoval = true, since = "3.15") @NotNull > H into(H handler); /** * Generate an in-memory JDBC {@link ResultSet} containing the data of this * Result. *

* Use this as an adapter for JDBC-compliant code that expects a * {@link ResultSet} to operate on, rather than a jOOQ {@link Result}. The * returned ResultSet allows for the following behaviour * according to the JDBC specification: *

    *
  • {@link ResultSet#CLOSE_CURSORS_AT_COMMIT}: The cursors (i.e. * {@link Statement} object) are no longer available
  • *
  • {@link ResultSet#CONCUR_READ_ONLY}: You cannot update the database * through this ResultSet, as the underlying {@link Result} * object does not hold any open database refences anymore
  • *
  • {@link ResultSet#FETCH_FORWARD}: The fetch direction is forward only, * and cannot be changed
  • *
  • {@link ResultSet#TYPE_SCROLL_INSENSITIVE}: You can use any of the * ResultSet's scrolling methods, e.g. {@link ResultSet#next()} * or {@link ResultSet#previous()}, etc.
  • *
*

* You may use {@link DSLContext#fetch(ResultSet)} to unwind this wrapper * again. * * @return A wrapper JDBC ResultSet */ @NotNull ResultSet intoResultSet(); /** * Map results into a custom mapper callback. * * @param mapper The mapper callback * @return The custom mapped records */ @NotNull List map(RecordMapper mapper); /** * Sort this result by one of its contained fields, using * {@link #field(Field)} for lookup. *

* nulls are sorted last by this method. * * @param field The sort field * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull > Result sortAsc(Field field) throws IllegalArgumentException; /** * Reverse-sort this result by one of its contained fields, using * {@link #field(Field)} for lookup. *

* nulls are sorted last by this method. * * @param field The sort field * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull > Result sortDesc(Field field) throws IllegalArgumentException; /** * Sort this result by one of its contained fields. *

* nulls are sorted last by this method. * * @param fieldIndex The 0-based sort field index * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortAsc(int fieldIndex) throws IllegalArgumentException; /** * Reverse-sort this result by one of its contained fields. *

* nulls are sorted last by this method. * * @param fieldIndex The 0-based sort field index * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortDesc(int fieldIndex) throws IllegalArgumentException; /** * Sort this result by one of its contained fields, using * {@link #field(String)} for lookup. *

* nulls are sorted last by this method. * * @param fieldName The sort field name * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortAsc(String fieldName) throws IllegalArgumentException; /** * Reverse-sort this result by one of its contained fields, using * {@link #field(String)} for lookup. *

* nulls are sorted last by this method. * * @param fieldName The sort field name * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortDesc(String fieldName) throws IllegalArgumentException; /** * Sort this result by one of its contained fields, using * {@link #field(Name)} for lookup. *

* nulls are sorted last by this method. * * @param fieldName The sort field name * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortAsc(Name fieldName) throws IllegalArgumentException; /** * Reverse-sort this result by one of its contained fields, using * {@link #field(Name)} for lookup. *

* nulls are sorted last by this method. * * @param fieldName The sort field name * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortDesc(Name fieldName) throws IllegalArgumentException; /** * Sort this result by one of its contained fields using a comparator, using * {@link #field(Field)} for lookup. *

* null sorting must be handled by the supplied * comparator. * * @param field The sort field * @param comparator The comparator used to sort this result. * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortAsc(Field field, java.util.Comparator comparator) throws IllegalArgumentException; /** * Reverse-sort this result by one of its contained fields using a * comparator, using {@link #field(Field)} for lookup. *

* null sorting must be handled by the supplied * comparator. * * @param field The sort field * @param comparator The comparator used to sort this result. * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortDesc(Field field, java.util.Comparator comparator) throws IllegalArgumentException; /** * Sort this result by one of its contained fields using a comparator. *

* null sorting must be handled by the supplied * comparator. * * @param fieldIndex The 0-based sort field index * @param comparator The comparator used to sort this result. * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortAsc(int fieldIndex, java.util.Comparator comparator) throws IllegalArgumentException; /** * Reverse-sort this result by one of its contained fields using a * comparator. *

* null sorting must be handled by the supplied * comparator. * * @param fieldIndex The 0-based sort field index * @param comparator The comparator used to sort this result. * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortDesc(int fieldIndex, java.util.Comparator comparator) throws IllegalArgumentException; /** * Sort this result by one of its contained fields using a comparator, using * {@link #field(String)} for lookup. *

* null sorting must be handled by the supplied * comparator. * * @param fieldName The sort field name * @param comparator The comparator used to sort this result. * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortAsc(String fieldName, java.util.Comparator comparator) throws IllegalArgumentException; /** * Reverse-sort this result by one of its contained fields using a * comparator, using {@link #field(String)} for lookup. *

* null sorting must be handled by the supplied * comparator. * * @param fieldName The sort field name * @param comparator The comparator used to sort this result. * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortDesc(String fieldName, java.util.Comparator comparator) throws IllegalArgumentException; /** * Sort this result by one of its contained fields using a comparator, using * {@link #field(Name)} for lookup. *

* null sorting must be handled by the supplied * comparator. * * @param fieldName The sort field name * @param comparator The comparator used to sort this result. * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortAsc(Name fieldName, java.util.Comparator comparator) throws IllegalArgumentException; /** * Reverse-sort this result by one of its contained fields using a * comparator, using {@link #field(Name)} for lookup. *

* null sorting must be handled by the supplied * comparator. * * @param fieldName The sort field name * @param comparator The comparator used to sort this result. * @return The result itself * @throws IllegalArgumentException If the argument field is not contained * in {@link #fieldsRow()} */ @NotNull Result sortDesc(Name fieldName, java.util.Comparator comparator) throws IllegalArgumentException; /** * Sort this result using a comparator that can compare records. * * @param comparator The comparator used to sort this result. * @return The result itself */ @NotNull Result sortAsc(java.util.Comparator comparator); /** * Reverse-sort this result using a comparator that can compare records. * * @param comparator The comparator used to sort this result. * @return The result itself */ @NotNull Result sortDesc(java.util.Comparator comparator); /** * Specify a set of fields whose values should be interned. *

* See {@link Result#intern(int...)} for more details. * * @param fields The fields whose values should be interned * @return The same result * @see Result#intern(Field...) * @see String#intern() * @deprecated - 3.10 - [#6254] - This functionality is no longer supported * and will be removed in 4.0 */ @NotNull @Deprecated(forRemoval = true, since = "3.10") Result intern(Field... fields); /** * Specify a set of field indexes whose values should be interned. *

* This traverses all records and interns String values for a * given set of field indexes. Use this method to save memory when a large * result set contains many identical string literals. *

* Please refer to {@link String#intern()} and to publicly available * literature to learn more about potential side-effects of string * interning. *

* Future versions of jOOQ may also "intern" other data types, such as * {@link Integer}, {@link Long}, within a Result object. * * @param fieldIndexes The 0-based field indexes whose values should be * interned * @return The same result * @see Result#intern(Field...) * @see String#intern() * @deprecated - 3.10 - [#6254] - This functionality is no longer supported * and will be removed in 4.0 */ @NotNull @Deprecated(forRemoval = true, since = "3.10") Result intern(int... fieldIndexes); /** * Specify a set of field names whose values should be interned. *

* See {@link Result#intern(int...)} for more details. * * @param fieldNames The field names whose values should be interned * @return The same result * @see Result#intern(Field...) * @see String#intern() * @deprecated - 3.10 - [#6254] - This functionality is no longer supported * and will be removed in 4.0 */ @NotNull @Deprecated(forRemoval = true, since = "3.10") Result intern(String... fieldNames); /** * Specify a set of field names whose values should be interned. *

* See {@link Result#intern(int...)} for more details. * * @param fieldNames The field names whose values should be interned * @return The same result * @see Result#intern(Field...) * @see String#intern() * @deprecated - 3.10 - [#6254] - This functionality is no longer supported * and will be removed in 4.0 */ @NotNull @Deprecated(forRemoval = true, since = "3.10") Result intern(Name... fieldNames); // ------------------------------------------------------------------------ // Fetching of new results based on records in this result // ------------------------------------------------------------------------ /** * Fetch parent records of this record, given a foreign key, as if fetching * from {@link #parents(ForeignKey)}. * * @throws DataAccessException if something went wrong executing the query. * @see ForeignKey#fetchParent(Record) * @see ForeignKey#fetchParents(java.util.Collection) * @see ForeignKey#fetchParents(Record...) */ @NotNull @Blocking > Result fetchParents(ForeignKey key) throws DataAccessException; /** * Fetch child records of this record, given a foreign key, as if fetching * from {@link #children(ForeignKey)}. * * @throws DataAccessException if something went wrong executing the query. * @see ForeignKey#fetchChildren(java.util.Collection) * @see ForeignKey#fetchChildren(Record) * @see ForeignKey#fetchChildren(Record...) */ @NotNull @Blocking > Result fetchChildren(ForeignKey key) throws DataAccessException; /** * Get a table expression representing the parents of all of this result's * records, given a foreign key. */ @NotNull > Table parents(ForeignKey key); /** * Get a table expression representing the children of all of this result's * records, given a foreign key. */ @NotNull > Table children(ForeignKey key); // ------------------------------------------------------------------------ // Specialisations of Attachable methods // ------------------------------------------------------------------------ /** * Attach this result and all of its contained records to a new * {@link Configuration}. * * @param configuration A configuration or null, if you wish to * detach this Attachable from its previous * configuration. */ @Override void attach(Configuration configuration); /** * Detach this result and all of its contained records from their current * {@link Configuration}. *

* This is the same as calling attach(null). */ @Override void detach(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy