org.jooq
Interface Result<R extends Record>

Type Parameters:
R - The record type contained in this result
All Superinterfaces:
Adapter, Attachable, Collection<R>, FieldProvider, Iterable<R>, List<R>, Serializable

public interface Result<R extends Record>
extends FieldProvider, List<R>, Attachable

A wrapper for database results returned by SelectQuery

Author:
Lukas Eder
See Also:
ResultQuery.getResult()

Method Summary
 Document exportXML()
          Deprecated. - 2.0.5 - Use intoXML() instead
 String format()
          Get a simple formatted representation of this result.
 String format(int maxRecords)
          Get a simple formatted representation of this result.
 String formatCSV()
          Get a simple formatted representation of this result as CSV.
 String formatCSV(char delimiter)
          Get a simple formatted representation of this result as CSV.
 String formatCSV(char delimiter, String nullString)
          Get a simple formatted representation of this result as CSV.
 String formatHTML()
          Get a simple formatted representation of this result as HTML.
 String formatJSON()
          Get a simple formatted representation of this result as a JSON array of array.
 String formatXML()
          Get this result formatted as XML
<T> T
getValue(int index, Field<T> field)
          Convenience method to fetch a value at a given position in the result.
<T> T
getValue(int index, Field<T> field, T defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Object getValue(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Object getValue(int index, int fieldIndex, Object defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Object getValue(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Object getValue(int index, String fieldName, Object defaultValue)
          Convenience method to fetch a value at a given position in the result.
<A extends ArrayRecord<T>,T>
T[]
getValueAsArray(int index, Field<A> field)
          Convenience method to fetch a value at a given position in the result.
<A extends ArrayRecord<T>,T>
T[]
getValueAsArray(int index, Field<A> field, T[] defaultValue)
          Convenience method to fetch a value at a given position in the result.
 BigDecimal getValueAsBigDecimal(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 BigDecimal getValueAsBigDecimal(int index, Field<?> field, BigDecimal defaultValue)
          Convenience method to fetch a value at a given position in the result.
 BigDecimal getValueAsBigDecimal(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 BigDecimal getValueAsBigDecimal(int index, int fieldIndex, BigDecimal defaultValue)
          Convenience method to fetch a value at a given position in the result.
 BigDecimal getValueAsBigDecimal(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 BigDecimal getValueAsBigDecimal(int index, String fieldName, BigDecimal defaultValue)
          Convenience method to fetch a value at a given position in the result.
 BigInteger getValueAsBigInteger(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 BigInteger getValueAsBigInteger(int index, Field<?> field, BigInteger defaultValue)
          Convenience method to fetch a value at a given position in the result.
 BigInteger getValueAsBigInteger(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 BigInteger getValueAsBigInteger(int index, int fieldIndex, BigInteger defaultValue)
          Convenience method to fetch a value at a given position in the result.
 BigInteger getValueAsBigInteger(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 BigInteger getValueAsBigInteger(int index, String fieldName, BigInteger defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Boolean getValueAsBoolean(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Boolean getValueAsBoolean(int index, Field<?> field, Boolean defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Boolean getValueAsBoolean(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Boolean getValueAsBoolean(int index, int fieldIndex, Boolean defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Boolean getValueAsBoolean(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Boolean getValueAsBoolean(int index, String fieldName, Boolean defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Byte getValueAsByte(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Byte getValueAsByte(int index, Field<?> field, Byte defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Byte getValueAsByte(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Byte getValueAsByte(int index, int fieldIndex, Byte defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Byte getValueAsByte(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Byte getValueAsByte(int index, String fieldName, Byte defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Date getValueAsDate(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Date getValueAsDate(int index, Field<?> field, Date defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Date getValueAsDate(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Date getValueAsDate(int index, int fieldIndex, Date defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Date getValueAsDate(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Date getValueAsDate(int index, String fieldName, Date defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Double getValueAsDouble(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Double getValueAsDouble(int index, Field<?> field, Double defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Double getValueAsDouble(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Double getValueAsDouble(int index, int fieldIndex, Double defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Double getValueAsDouble(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Double getValueAsDouble(int index, String fieldName, Double defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Float getValueAsFloat(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Float getValueAsFloat(int index, Field<?> field, Float defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Float getValueAsFloat(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Float getValueAsFloat(int index, int fieldIndex, Float defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Float getValueAsFloat(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Float getValueAsFloat(int index, String fieldName, Float defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Integer getValueAsInteger(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Integer getValueAsInteger(int index, Field<?> field, Integer defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Integer getValueAsInteger(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Integer getValueAsInteger(int index, int fieldIndex, Integer defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Integer getValueAsInteger(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Integer getValueAsInteger(int index, String fieldName, Integer defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Long getValueAsLong(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Long getValueAsLong(int index, Field<?> field, Long defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Long getValueAsLong(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Long getValueAsLong(int index, int fieldIndex, Long defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Long getValueAsLong(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Long getValueAsLong(int index, String fieldName, Long defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Short getValueAsShort(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Short getValueAsShort(int index, Field<?> field, Short defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Short getValueAsShort(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Short getValueAsShort(int index, int fieldIndex, Short defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Short getValueAsShort(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Short getValueAsShort(int index, String fieldName, Short defaultValue)
          Convenience method to fetch a value at a given position in the result.
 String getValueAsString(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 String getValueAsString(int index, Field<?> field, String defaultValue)
          Convenience method to fetch a value at a given position in the result.
 String getValueAsString(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 String getValueAsString(int index, int fieldIndex, String defaultValue)
          Convenience method to fetch a value at a given position in the result.
 String getValueAsString(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 String getValueAsString(int index, String fieldName, String defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Time getValueAsTime(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Time getValueAsTime(int index, Field<?> field, Time defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Time getValueAsTime(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Time getValueAsTime(int index, int fieldIndex, Time defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Time getValueAsTime(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Time getValueAsTime(int index, String fieldName, Time defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Timestamp getValueAsTimestamp(int index, Field<?> field)
          Convenience method to fetch a value at a given position in the result.
 Timestamp getValueAsTimestamp(int index, Field<?> field, Timestamp defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Timestamp getValueAsTimestamp(int index, int fieldIndex)
          Convenience method to fetch a value at a given position in the result.
 Timestamp getValueAsTimestamp(int index, int fieldIndex, Timestamp defaultValue)
          Convenience method to fetch a value at a given position in the result.
 Timestamp getValueAsTimestamp(int index, String fieldName)
          Convenience method to fetch a value at a given position in the result.
 Timestamp getValueAsTimestamp(int index, String fieldName, Timestamp defaultValue)
          Convenience method to fetch a value at a given position in the result.
<T> List<T>
getValues(Field<?> field, Class<? extends T> type)
          Convenience method to fetch all values for a given field.
<T> List<T>
getValues(Field<T> field)
          Convenience method to fetch all values for a given field.
<T,U> List<U>
getValues(Field<T> field, Converter<? super T,U> converter)
          Convenience method to fetch all values for a given field.
 List<?> getValues(int fieldIndex)
          Convenience method to fetch all values for a given field.
<T> List<T>
getValues(int fieldIndex, Class<? extends T> type)
          Convenience method to fetch all values for a given field.
<U> List<U>
getValues(int fieldIndex, Converter<?,U> converter)
          Convenience method to fetch all values for a given field.
 List<?> getValues(String fieldName)
          Convenience method to fetch all values for a given field.
<T> List<T>
getValues(String fieldName, Class<? extends T> type)
          Convenience method to fetch all values for a given field.
<U> List<U>
getValues(String fieldName, Converter<?,U> converter)
          Convenience method to fetch all values for a given field.
 List<BigDecimal> getValuesAsBigDecimal(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<BigDecimal> getValuesAsBigDecimal(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<BigDecimal> getValuesAsBigDecimal(String fieldName)
          Convenience method to fetch all values for a given field.
 List<BigInteger> getValuesAsBigInteger(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<BigInteger> getValuesAsBigInteger(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<BigInteger> getValuesAsBigInteger(String fieldName)
          Convenience method to fetch all values for a given field.
 List<Byte> getValuesAsByte(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<Byte> getValuesAsByte(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<Byte> getValuesAsByte(String fieldName)
          Convenience method to fetch all values for a given field.
 List<Date> getValuesAsDate(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<Date> getValuesAsDate(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<Date> getValuesAsDate(String fieldName)
          Convenience method to fetch all values for a given field.
 List<Double> getValuesAsDouble(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<Double> getValuesAsDouble(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<Double> getValuesAsDouble(String fieldName)
          Convenience method to fetch all values for a given field.
 List<Float> getValuesAsFloat(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<Float> getValuesAsFloat(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<Float> getValuesAsFloat(String fieldName)
          Convenience method to fetch all values for a given field.
 List<Integer> getValuesAsInteger(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<Integer> getValuesAsInteger(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<Integer> getValuesAsInteger(String fieldName)
          Convenience method to fetch all values for a given field.
 List<Long> getValuesAsLong(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<Long> getValuesAsLong(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<Long> getValuesAsLong(String fieldName)
          Convenience method to fetch all values for a given field.
 List<Short> getValuesAsShort(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<Short> getValuesAsShort(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<Short> getValuesAsShort(String fieldName)
          Convenience method to fetch all values for a given field.
 List<String> getValuesAsString(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<String> getValuesAsString(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<String> getValuesAsString(String fieldName)
          Convenience method to fetch all values for a given field.
 List<Time> getValuesAsTime(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<Time> getValuesAsTime(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<Time> getValuesAsTime(String fieldName)
          Convenience method to fetch all values for a given field.
 List<Timestamp> getValuesAsTimestamp(Field<?> field)
          Convenience method to fetch all values for a given field.
 List<Timestamp> getValuesAsTimestamp(int fieldIndex)
          Convenience method to fetch all values for a given field.
 List<Timestamp> getValuesAsTimestamp(String fieldName)
          Convenience method to fetch all values for a given field.
<E> List<E>
into(Class<? extends E> type)
          Map resulting records onto a custom type.
<H extends RecordHandler<R>>
H
into(H handler)
          Map results into a custom handler callback
<Z extends Record>
Result<Z>
into(Table<Z> table)
          Map resulting records onto a custom record.
 Object[][] intoArray()
          Convert this result into an array of arrays The resulting array has the same number of first-dimension elements as this result has records.
<K> Map<K,Result<R>>
intoGroups(Field<K> key)
          Return a Map with one of the result's columns as key and a list of corresponding records as value.
<K,V> Map<K,List<V>>
intoGroups(Field<K> key, Field<V> value)
          Return a Map with one of the result's columns as key and another one of the result's columns as value Unlike intoMap(Field, Field), this method allows for non-unique keys in the result set.
<K> Map<K,R>
intoMap(Field<K> key)
          Return a Map with one of the result's columns as key and the corresponding records as value.
<K,V> Map<K,V>
intoMap(Field<K> key, Field<V> value)
          Return a Map with one of the result's columns as key and another one of the result's columns as value An InvalidResultException is thrown, if the key turns out to be non-unique in the result set.
 List<Map<String,Object>> intoMaps()
          Return the generated result as a list of name/value maps.
 ResultSet intoResultSet()
          Generate an in-memory JDBC ResultSet containing the data of this Result.
 Document intoXML()
          Get this result as XML
 boolean isEmpty()
          Whether there are any records contained in this Result
 boolean isNotEmpty()
          Whether there are any records contained in this Result
 Result<R> sortAsc(Comparator<? super R> comparator)
          Sort this result using a comparator that can compare records.
<T extends Comparable<? super T>>
Result<R>
sortAsc(Field<T> field)
          Sort this result by one of its contained fields.
<T> Result<R>
sortAsc(Field<T> field, Comparator<? super T> comparator)
          Sort this result by one of its contained fields using a comparator.
 Result<R> sortDesc(Comparator<? super R> comparator)
          Reverse-sort this result using a comparator that can compare records.
<T extends Comparable<? super T>>
Result<R>
sortDesc(Field<T> field)
          Reverse-sort this result by one of its contained fields.
<T> Result<R>
sortDesc(Field<T> field, Comparator<? super T> comparator)
          Reverse-sort this result by one of its contained fields using a comparator.
 
Methods inherited from interface org.jooq.FieldProvider
getField, getField, getField, getFields, getIndex
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from interface org.jooq.Attachable
attach
 
Methods inherited from interface org.jooq.Adapter
internalAPI
 

Method Detail

getValue

<T> T getValue(int index,
               Field<T> field)
           throws IndexOutOfBoundsException
Convenience method to fetch a value at a given position in the result.

Type Parameters:
T - The value's field's generic type parameter
Parameters:
index - The record's index
field - The value's field
Returns:
The value
Throws:
IndexOutOfBoundsException

getValue

<T> T getValue(int index,
               Field<T> field,
               T defaultValue)
           throws IndexOutOfBoundsException
Convenience method to fetch a value at a given position in the result.

Type Parameters:
T - The value's field's generic type parameter
Parameters:
index - The record's index
field - The value's field
defaultValue - The default value if the value was null
Returns:
The value
Throws:
IndexOutOfBoundsException

getValue

Object getValue(int index,
                int fieldIndex)
                throws IndexOutOfBoundsException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The value's field index
Returns:
The value
Throws:
IndexOutOfBoundsException

getValue

Object getValue(int index,
                int fieldIndex,
                Object defaultValue)
                throws IndexOutOfBoundsException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The value's field index
defaultValue - The default value if the value was null
Returns:
The value
Throws:
IndexOutOfBoundsException

getValue

Object getValue(int index,
                String fieldName)
                throws IndexOutOfBoundsException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The value's field name
Returns:
The value
Throws:
IndexOutOfBoundsException

getValue

Object getValue(int index,
                String fieldName,
                Object defaultValue)
                throws IndexOutOfBoundsException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The value's field name
defaultValue - The default value if the value was null
Returns:
The value
Throws:
IndexOutOfBoundsException

getValueAsArray

<A extends ArrayRecord<T>,T> T[] getValueAsArray(int index,
                                                 Field<A> field)
                    throws IndexOutOfBoundsException
Convenience method to fetch a value at a given position in the result.

Type Parameters:
A - The value's field's generic type parameter
T - The ArrayRecord type parameter
Parameters:
index - The record's index
field - The value's field
Returns:
The value
Throws:
IndexOutOfBoundsException

getValueAsArray

<A extends ArrayRecord<T>,T> T[] getValueAsArray(int index,
                                                 Field<A> field,
                                                 T[] defaultValue)
                    throws IndexOutOfBoundsException
Convenience method to fetch a value at a given position in the result.

Type Parameters:
A - The value's field's generic type parameter
T - The ArrayRecord type parameter
Parameters:
index - The record's index
field - The value's field
defaultValue - The default value if the value was null
Returns:
The value
Throws:
IndexOutOfBoundsException

getValueAsString

String getValueAsString(int index,
                        Field<?> field)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsString

String getValueAsString(int index,
                        Field<?> field,
                        String defaultValue)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsString

String getValueAsString(int index,
                        int fieldIndex)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsString

String getValueAsString(int index,
                        int fieldIndex,
                        String defaultValue)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsString

String getValueAsString(int index,
                        String fieldName)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsString

String getValueAsString(int index,
                        String fieldName,
                        String defaultValue)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsByte

Byte getValueAsByte(int index,
                    Field<?> field)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsByte

Byte getValueAsByte(int index,
                    Field<?> field,
                    Byte defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsByte

Byte getValueAsByte(int index,
                    int fieldIndex)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsByte

Byte getValueAsByte(int index,
                    int fieldIndex,
                    Byte defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsByte

Byte getValueAsByte(int index,
                    String fieldName)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsByte

Byte getValueAsByte(int index,
                    String fieldName,
                    Byte defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsShort

Short getValueAsShort(int index,
                      Field<?> field)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsShort

Short getValueAsShort(int index,
                      Field<?> field,
                      Short defaultValue)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsShort

Short getValueAsShort(int index,
                      int fieldIndex)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsShort

Short getValueAsShort(int index,
                      int fieldIndex,
                      Short defaultValue)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsShort

Short getValueAsShort(int index,
                      String fieldName)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsShort

Short getValueAsShort(int index,
                      String fieldName,
                      Short defaultValue)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsInteger

Integer getValueAsInteger(int index,
                          Field<?> field)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsInteger

Integer getValueAsInteger(int index,
                          Field<?> field,
                          Integer defaultValue)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsInteger

Integer getValueAsInteger(int index,
                          int fieldIndex)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsInteger

Integer getValueAsInteger(int index,
                          int fieldIndex,
                          Integer defaultValue)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsInteger

Integer getValueAsInteger(int index,
                          String fieldName)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsInteger

Integer getValueAsInteger(int index,
                          String fieldName,
                          Integer defaultValue)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsLong

Long getValueAsLong(int index,
                    Field<?> field)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsLong

Long getValueAsLong(int index,
                    Field<?> field,
                    Long defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsLong

Long getValueAsLong(int index,
                    int fieldIndex)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsLong

Long getValueAsLong(int index,
                    int fieldIndex,
                    Long defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsLong

Long getValueAsLong(int index,
                    String fieldName)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsLong

Long getValueAsLong(int index,
                    String fieldName,
                    Long defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsBigInteger

BigInteger getValueAsBigInteger(int index,
                                Field<?> field)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsBigInteger

BigInteger getValueAsBigInteger(int index,
                                Field<?> field,
                                BigInteger defaultValue)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsBigInteger

BigInteger getValueAsBigInteger(int index,
                                int fieldIndex)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsBigInteger

BigInteger getValueAsBigInteger(int index,
                                int fieldIndex,
                                BigInteger defaultValue)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsBigInteger

BigInteger getValueAsBigInteger(int index,
                                String fieldName)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsBigInteger

BigInteger getValueAsBigInteger(int index,
                                String fieldName,
                                BigInteger defaultValue)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsFloat

Float getValueAsFloat(int index,
                      Field<?> field)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsFloat

Float getValueAsFloat(int index,
                      Field<?> field,
                      Float defaultValue)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsFloat

Float getValueAsFloat(int index,
                      int fieldIndex)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsFloat

Float getValueAsFloat(int index,
                      int fieldIndex,
                      Float defaultValue)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsFloat

Float getValueAsFloat(int index,
                      String fieldName)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsFloat

Float getValueAsFloat(int index,
                      String fieldName,
                      Float defaultValue)
                      throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsDouble

Double getValueAsDouble(int index,
                        Field<?> field)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsDouble

Double getValueAsDouble(int index,
                        Field<?> field,
                        Double defaultValue)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsDouble

Double getValueAsDouble(int index,
                        int fieldIndex)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsDouble

Double getValueAsDouble(int index,
                        int fieldIndex,
                        Double defaultValue)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsDouble

Double getValueAsDouble(int index,
                        String fieldName)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsDouble

Double getValueAsDouble(int index,
                        String fieldName,
                        Double defaultValue)
                        throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsBigDecimal

BigDecimal getValueAsBigDecimal(int index,
                                Field<?> field)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsBigDecimal

BigDecimal getValueAsBigDecimal(int index,
                                Field<?> field,
                                BigDecimal defaultValue)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsBigDecimal

BigDecimal getValueAsBigDecimal(int index,
                                int fieldIndex)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsBigDecimal

BigDecimal getValueAsBigDecimal(int index,
                                int fieldIndex,
                                BigDecimal defaultValue)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsBigDecimal

BigDecimal getValueAsBigDecimal(int index,
                                String fieldName)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsBigDecimal

BigDecimal getValueAsBigDecimal(int index,
                                String fieldName,
                                BigDecimal defaultValue)
                                throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsBoolean

Boolean getValueAsBoolean(int index,
                          Field<?> field)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsBoolean

Boolean getValueAsBoolean(int index,
                          Field<?> field,
                          Boolean defaultValue)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsBoolean

Boolean getValueAsBoolean(int index,
                          int fieldIndex)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsBoolean

Boolean getValueAsBoolean(int index,
                          int fieldIndex,
                          Boolean defaultValue)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsBoolean

Boolean getValueAsBoolean(int index,
                          String fieldName)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsBoolean

Boolean getValueAsBoolean(int index,
                          String fieldName,
                          Boolean defaultValue)
                          throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

boolean values for true are any of these case-insensitive strings:

boolean values for false are any of these case-insensitive strings:

All other values evaluate to null

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsTimestamp

Timestamp getValueAsTimestamp(int index,
                              Field<?> field)
                              throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsTimestamp

Timestamp getValueAsTimestamp(int index,
                              Field<?> field,
                              Timestamp defaultValue)
                              throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsTimestamp

Timestamp getValueAsTimestamp(int index,
                              int fieldIndex)
                              throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsTimestamp

Timestamp getValueAsTimestamp(int index,
                              int fieldIndex,
                              Timestamp defaultValue)
                              throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsTimestamp

Timestamp getValueAsTimestamp(int index,
                              String fieldName)
                              throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsTimestamp

Timestamp getValueAsTimestamp(int index,
                              String fieldName,
                              Timestamp defaultValue)
                              throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsDate

Date getValueAsDate(int index,
                    Field<?> field)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsDate

Date getValueAsDate(int index,
                    Field<?> field,
                    Date defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsDate

Date getValueAsDate(int index,
                    int fieldIndex)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsDate

Date getValueAsDate(int index,
                    int fieldIndex,
                    Date defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsDate

Date getValueAsDate(int index,
                    String fieldName)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsDate

Date getValueAsDate(int index,
                    String fieldName,
                    Date defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsTime

Time getValueAsTime(int index,
                    Field<?> field)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
Returns:
The converted value of a field contained in this record
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsTime

Time getValueAsTime(int index,
                    Field<?> field,
                    Time defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
field - The field
defaultValue - The default value instead of null
Returns:
The converted value of a field contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument field is not contained in FieldProvider.getFields()

getValueAsTime

Time getValueAsTime(int index,
                    int fieldIndex)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
Returns:
The converted value of a field's index contained in this record
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsTime

Time getValueAsTime(int index,
                    int fieldIndex,
                    Time defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldIndex - The field's index
defaultValue - The default value instead of null
Returns:
The converted value of a field's index contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument index is not contained in the record

getValueAsTime

Time getValueAsTime(int index,
                    String fieldName)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
Returns:
The converted value of a field's name contained in this record
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValueAsTime

Time getValueAsTime(int index,
                    String fieldName,
                    Time defaultValue)
                    throws IllegalArgumentException
Convenience method to fetch a value at a given position in the result.

Parameters:
index - The record's index
fieldName - The field's name
defaultValue - The default value instead of null
Returns:
The converted value of a field's name contained in this record, or defaultValue, if null
Throws:
IllegalArgumentException - If the argument name is not contained in the record

getValues

<T> List<T> getValues(Field<T> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Type Parameters:
T - The values' field's generic type parameter
Parameters:
field - The values' field
Returns:
The values

getValues

<T> List<T> getValues(Field<?> field,
                      Class<? extends T> type)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
type - The type used for type conversion
Returns:
The values
See Also:
Record.getValue(Field, Class), Convert.convert(Object, Class)

getValues

<T,U> List<U> getValues(Field<T> field,
                        Converter<? super T,U> converter)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
converter - The data type converter used for type conversion
Returns:
The values
See Also:
Record.getValue(Field, Converter), Convert.convert(Object, Converter)

getValues

List<?> getValues(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The values

getValues

<T> List<T> getValues(int fieldIndex,
                      Class<? extends T> type)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
type - The type used for type conversion
Returns:
The values
See Also:
Store.getValue(int, Class), Convert.convert(Object, Class)

getValues

<U> List<U> getValues(int fieldIndex,
                      Converter<?,U> converter)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
converter - The data type converter used for type conversion
Returns:
The values
See Also:
Record.getValue(int, Converter), Convert.convert(Object, Converter)

getValues

List<?> getValues(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The values

getValues

<T> List<T> getValues(String fieldName,
                      Class<? extends T> type)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
type - The type used for type conversion
Returns:
The values
See Also:
Record.getValue(String, Class), Convert.convert(Object, Class)

getValues

<U> List<U> getValues(String fieldName,
                      Converter<?,U> converter)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
converter - The data type converter used for type conversion
Returns:
The values
See Also:
Record.getValue(String, Converter), Convert.convert(Object, Converter)

getValuesAsBigDecimal

List<BigDecimal> getValuesAsBigDecimal(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsBigDecimal

List<BigDecimal> getValuesAsBigDecimal(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsBigDecimal

List<BigDecimal> getValuesAsBigDecimal(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsBigInteger

List<BigInteger> getValuesAsBigInteger(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsBigInteger

List<BigInteger> getValuesAsBigInteger(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsBigInteger

List<BigInteger> getValuesAsBigInteger(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsByte

List<Byte> getValuesAsByte(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsByte

List<Byte> getValuesAsByte(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsByte

List<Byte> getValuesAsByte(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsDate

List<Date> getValuesAsDate(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsDate

List<Date> getValuesAsDate(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsDate

List<Date> getValuesAsDate(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsDouble

List<Double> getValuesAsDouble(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsDouble

List<Double> getValuesAsDouble(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsDouble

List<Double> getValuesAsDouble(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsFloat

List<Float> getValuesAsFloat(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsFloat

List<Float> getValuesAsFloat(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsFloat

List<Float> getValuesAsFloat(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsInteger

List<Integer> getValuesAsInteger(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsInteger

List<Integer> getValuesAsInteger(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsInteger

List<Integer> getValuesAsInteger(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsLong

List<Long> getValuesAsLong(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsLong

List<Long> getValuesAsLong(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsLong

List<Long> getValuesAsLong(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsShort

List<Short> getValuesAsShort(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsShort

List<Short> getValuesAsShort(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsShort

List<Short> getValuesAsShort(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsString

List<String> getValuesAsString(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsString

List<String> getValuesAsString(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsString

List<String> getValuesAsString(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsTime

List<Time> getValuesAsTime(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsTime

List<Time> getValuesAsTime(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsTime

List<Time> getValuesAsTime(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

getValuesAsTimestamp

List<Timestamp> getValuesAsTimestamp(Field<?> field)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
field - The values' field
Returns:
The converted values

getValuesAsTimestamp

List<Timestamp> getValuesAsTimestamp(int fieldIndex)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldIndex - The values' field index
Returns:
The converted values

getValuesAsTimestamp

List<Timestamp> getValuesAsTimestamp(String fieldName)
Convenience method to fetch all values for a given field. This is especially useful, when selecting only a single field.

Parameters:
fieldName - The values' field name
Returns:
The converted values

isEmpty

boolean isEmpty()
Whether there are any records contained in this Result

Specified by:
isEmpty in interface Collection<R extends Record>
Specified by:
isEmpty in interface List<R extends Record>

isNotEmpty

boolean isNotEmpty()
Whether there are any records contained in this Result


format

String format()
Get a simple formatted representation of this result.

This is the same as calling format(int) with maxRows = 50

Returns:
The formatted result

format

String format(int maxRecords)
Get a simple formatted representation of this result.

Parameters:
maxRecords - The maximum number of records to include in the formatted result
Returns:
The formatted result

formatHTML

String formatHTML()
Get a simple formatted representation of this result as HTML.

The HTML code is formatted as follows:

 <table>
   <thead>
     <tr>
       <th>field-1</th>
       <th>field-2</th>
       ...
       <th>field-n</th>
     </tr>
   </thead>
   <tbody>
     <tr>
       <th>value-1-1</th>
       <th>value-1-2</th>
       ...
       <th>value-1-n</th>
     </tr>
     <tr>
       <th>value-2-1</th>
       <th>value-2-2</th>
       ...
       <th>value-2-n</th>
     </tr>
     ...
   </tbody>
 </table>
 

Returns:
The formatted result

formatCSV

String formatCSV()
Get a simple formatted representation of this result as CSV.

This is the same as calling formatCSV(',', "")

Returns:
The formatted result

formatCSV

String formatCSV(char delimiter)
Get a simple formatted representation of this result as CSV.

This is the same as calling formatCSV(delimiter, "")

Parameters:
delimiter - The delimiter to use between records
Returns:
The formatted result

formatCSV

String formatCSV(char delimiter,
                 String nullString)
Get a simple formatted representation of this result as CSV.

Parameters:
delimiter - The delimiter to use between records
nullString - A special string for encoding NULL values.
Returns:
The formatted result

formatJSON

String formatJSON()
Get a simple formatted representation of this result as a JSON array of array. The format is the following:
 {"fields":["field-1","field-2",...,"field-n"],
  "records":[[value-1-1,value-1-2,...,value-1-n],
             [value-2-1,value-2-2,...,value-2-n]]}
 

Returns:
The formatted result

formatXML

String formatXML()
Get this result formatted as XML

See Also:
exportXML(), http://www.jooq.org/xsd/jooq-export-1.6.2.xsd

exportXML

@Deprecated
Document exportXML()
Deprecated. - 2.0.5 - Use intoXML() instead

Get this result as XML


intoXML

Document intoXML()
Get this result as XML

See Also:
formatXML(), http://www.jooq.org/xsd/jooq-export-1.6.2.xsd

intoMaps

List<Map<String,Object>> intoMaps()
Return the generated result as a list of name/value maps.

Returns:
The result.
See Also:
Record.intoMap()

intoMap

<K> Map<K,R> intoMap(Field<K> key)
Return a Map with one of the result's columns as key and the corresponding records as value.

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

Type Parameters:
K - The key's generic field type
Parameters:
key - The key field. Client code must assure that this field is unique in the result set.
Returns:
A Map containing the results
Throws:
InvalidResultException - if the key field returned two or more equal values from the result set.

intoMap

<K,V> Map<K,V> intoMap(Field<K> key,
                       Field<V> value)
Return a Map with one of the result's columns as key and another one of the result's columns as value

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

Type Parameters:
K - The key's generic field type
V - The value's generic field type
Parameters:
key - The key field. Client code must assure that this field is unique in the result set.
value - The value field
Returns:
A Map containing the results
Throws:
InvalidResultException - if the key field returned two or more equal values from the result set.

intoGroups

<K> Map<K,Result<R>> intoGroups(Field<K> key)
Return a Map with one of the result's columns as key and a list of corresponding records as value.

Unlike intoMap(Field), this method allows for non-unique keys in the result set.

Type Parameters:
K - The key's generic field type
Parameters:
key - The key field.
Returns:
A Map containing the results

intoGroups

<K,V> Map<K,List<V>> intoGroups(Field<K> key,
                                Field<V> value)
Return a Map with one of the result's columns as key and another one of the result's columns as value

Unlike intoMap(Field, Field), this method allows for non-unique keys in the result set.

Type Parameters:
K - The key's generic field type
V - The value's generic field type
Parameters:
key - The key field.
value - The value field
Returns:
A Map containing the results

intoArray

Object[][] intoArray()
                     throws 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]
 

This is the same as calling into(Object[].class)

Returns:
This result as an array of arrays
Throws:
MappingException - wrapping any conversion exception that might have occurred while mapping records
See Also:
Record.intoArray()

into

<E> List<E> into(Class<? extends E> type)
             throws MappingException
Map resulting records onto a custom type.

This is the same as calling record.into(type) on every record contained in this Result. See Record.into(Class) for more details

Type Parameters:
E - The generic entity type.
Parameters:
type - The entity type.
Throws:
MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
See Also:
Record.into(Class)

into

<Z extends Record> Result<Z> into(Table<Z> table)
                              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 Record.into(Table) for more details

Type Parameters:
Z - The generic table record type.
Parameters:
table - The table type.
Throws:
MappingException - wrapping any reflection or data type conversion exception that might have occurred while mapping records
See Also:
Record.into(Table)

into

<H extends RecordHandler<R>> H into(H handler)
Map results into a custom handler callback

Parameters:
handler - The handler callback
Returns:
Convenience result, returning the parameter handler itself

intoResultSet

ResultSet intoResultSet()
Generate an in-memory JDBC ResultSet containing the data of this Result.

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

You may use FactoryOperations.fetch(ResultSet) to unwind this wrapper again.

Returns:
A wrapper JDBC ResultSet

sortAsc

<T extends Comparable<? super T>> Result<R> sortAsc(Field<T> field)
Sort this result by one of its contained fields.

nulls are sorted last by this method.

Parameters:
field - The sort field
Returns:
The result itself

sortDesc

<T extends Comparable<? super T>> Result<R> sortDesc(Field<T> field)
Reverse-sort this result by one of its contained fields.

nulls are sorted last by this method.

Parameters:
field - The sort field
Returns:
The result itself

sortAsc

<T> Result<R> sortAsc(Field<T> field,
                      Comparator<? super T> comparator)
Sort this result by one of its contained fields using a comparator.

null sorting must be handled by the supplied comparator.

Parameters:
field - The sort field
comparator - The comparator used to sort this result.
Returns:
The result itself

sortDesc

<T> Result<R> sortDesc(Field<T> field,
                       Comparator<? super T> comparator)
Reverse-sort this result by one of its contained fields using a comparator.

null sorting must be handled by the supplied comparator.

Parameters:
field - The sort field
comparator - The comparator used to sort this result.
Returns:
The result itself

sortAsc

Result<R> sortAsc(Comparator<? super R> comparator)
Sort this result using a comparator that can compare records.

Parameters:
comparator - The comparator used to sort this result.
Returns:
The result itself

sortDesc

Result<R> sortDesc(Comparator<? super R> comparator)
Reverse-sort this result using a comparator that can compare records.

Parameters:
comparator - The comparator used to sort this result.
Returns:
The result itself


Copyright © 2012. All Rights Reserved.