diff --git a/jOOQ/src/main/java/org/jooq/Configuration.java b/jOOQ/src/main/java/org/jooq/Configuration.java
index cc85bd0cfb..9cde366d1d 100644
--- a/jOOQ/src/main/java/org/jooq/Configuration.java
+++ b/jOOQ/src/main/java/org/jooq/Configuration.java
@@ -486,10 +486,7 @@ public interface Configuration extends Serializable {
/**
* Get the configured ConverterProvider from this
* configuration.
- *
- * @deprecated - This API is still EXPERIMENTAL. Do not use yet
*/
- @Deprecated
ConverterProvider converterProvider();
/**
@@ -883,9 +880,7 @@ public interface Configuration extends Serializable {
* @param newConverterProvider The new converter provider to be contained in
* the changed configuration.
* @return The changed configuration.
- * @deprecated - This API is still EXPERIMENTAL. Do not use yet
*/
- @Deprecated
Configuration set(ConverterProvider newConverterProvider);
/**
@@ -1216,9 +1211,7 @@ public interface Configuration extends Serializable {
* @param newConverterProvider The new converter provider to be contained in
* the derived configuration.
* @return The derived configuration.
- * @deprecated - This API is still EXPERIMENTAL. Do not use yet
*/
- @Deprecated
Configuration derive(ConverterProvider newConverterProvider);
/**
diff --git a/jOOQ/src/main/java/org/jooq/ConverterProvider.java b/jOOQ/src/main/java/org/jooq/ConverterProvider.java
index b044dd10e2..6552047500 100644
--- a/jOOQ/src/main/java/org/jooq/ConverterProvider.java
+++ b/jOOQ/src/main/java/org/jooq/ConverterProvider.java
@@ -38,13 +38,17 @@
package org.jooq;
/**
- * A ConverterProvider providers {@link Converter} implementations
- * for any combination of types <T> and <U>.
+ * A ConverterProvider provides {@link Converter} implementations
+ * for any combination of types <T> and
+ * <U>.
+ *
+ * ConverterProvider can be used together with
+ * {@link RecordMapper}, e.g. when mapping {@link JSON} or {@link XML} data
+ * types onto POJO types using third party libraries like Jackson, Gson, JAXB,
+ * or others.
*
* @author Lukas Eder
- * @deprecated - This API is still EXPERIMENTAL. Do not use yet
*/
-@Deprecated
@FunctionalInterface
public interface ConverterProvider {
diff --git a/jOOQ/src/main/java/org/jooq/Param.java b/jOOQ/src/main/java/org/jooq/Param.java
index 37b6ec70aa..31fa855460 100644
--- a/jOOQ/src/main/java/org/jooq/Param.java
+++ b/jOOQ/src/main/java/org/jooq/Param.java
@@ -41,7 +41,6 @@ import org.jooq.conf.ParamType;
import org.jooq.conf.Settings;
import org.jooq.exception.DataTypeException;
import org.jooq.impl.DSL;
-import org.jooq.tools.Convert;
/**
* A named parameter and/or bind value.
@@ -134,8 +133,6 @@ public interface Param extends Field {
* Sets a converted value, using this {@link Param}'s underlying
* {@link DataType}, obtained from {@link #getDataType()}
*
- * @see DataType#convert(Object)
- * @see Convert#convert(Object, Class)
* @throws DataTypeException If value cannot be converted into
* this parameter's data type.
* @deprecated - 3.8.0 - [#4991] In jOOQ 4.0, {@link Param} will be made
diff --git a/jOOQ/src/main/java/org/jooq/Record.java b/jOOQ/src/main/java/org/jooq/Record.java
index 742326942b..866a80712d 100644
--- a/jOOQ/src/main/java/org/jooq/Record.java
+++ b/jOOQ/src/main/java/org/jooq/Record.java
@@ -53,7 +53,6 @@ import org.jooq.exception.DataTypeException;
import org.jooq.exception.MappingException;
import org.jooq.impl.DefaultRecordMapper;
import org.jooq.impl.DefaultRecordMapperProvider;
-import org.jooq.tools.Convert;
/**
* A database result record.
@@ -238,10 +237,14 @@ public interface Record extends Attachable, Comparable, Formattable {
/**
* Get a converted value from this Record, providing a field.
*
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
+ *
* If this record contains a field with the same {@link Field#getName()} as
* the argument field, that value is retrieved.
*
- * @param The conversion type parameter
+ * @param The conversion type parameter
* @param field The field
* @param type The conversion type
* @return The value of a field contained in this record
@@ -249,11 +252,8 @@ public interface Record extends Attachable, Comparable, Formattable {
* in {@link #fieldsRow()}
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @throws DataTypeException wrapping any data type conversion exception
- * that might have occurred
- * @see Convert#convert(Object, Class)
*/
- T get(Field> field, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ U get(Field> field, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Get a converted value from this Record, providing a field.
@@ -270,10 +270,8 @@ public interface Record extends Attachable, Comparable, Formattable {
* in {@link #fieldsRow()}
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @see Convert#convert(Object, Converter)
*/
- U get(Field field, Converter super T, ? extends U> converter) throws IllegalArgumentException,
- DataTypeException;
+ U get(Field field, Converter super T, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
/**
* Get a value from this Record, providing a field name.
@@ -287,8 +285,12 @@ public interface Record extends Attachable, Comparable, Formattable {
/**
* Get a converted value from this Record, providing a field name.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
- * @param The conversion type parameter
+ * @param The conversion type parameter
* @param fieldName The field's name
* @param type The conversion type
* @return The value of a field's name contained in this record
@@ -296,9 +298,8 @@ public interface Record extends Attachable, Comparable, Formattable {
* contained in the record
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @see Convert#convert(Object, Class)
*/
- T get(String fieldName, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ U get(String fieldName, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Get a converted value from this Record, providing a field name.
@@ -311,7 +312,6 @@ public interface Record extends Attachable, Comparable, Formattable {
* contained in the record
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @see Convert#convert(Object, Converter)
*/
U get(String fieldName, Converter, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
@@ -327,8 +327,12 @@ public interface Record extends Attachable, Comparable, Formattable {
/**
* Get a converted value from this Record, providing a field name.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
- * @param The conversion type parameter
+ * @param The conversion type parameter
* @param fieldName The field's name
* @param type The conversion type
* @return The value of a field's name contained in this record
@@ -336,9 +340,8 @@ public interface Record extends Attachable, Comparable, Formattable {
* contained in the record
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @see Convert#convert(Object, Class)
*/
- T get(Name fieldName, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ U get(Name fieldName, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Get a converted value from this Record, providing a field name.
@@ -351,7 +354,6 @@ public interface Record extends Attachable, Comparable, Formattable {
* contained in the record
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @see Convert#convert(Object, Converter)
*/
U get(Name fieldName, Converter, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
@@ -367,8 +369,12 @@ public interface Record extends Attachable, Comparable, Formattable {
/**
* Get a converted value from this record, providing a field index.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
- * @param The conversion type parameter
+ * @param The conversion type parameter
* @param index The field's index
* @param type The conversion type
* @return The value of a field's index contained in this record
@@ -376,9 +382,8 @@ public interface Record extends Attachable, Comparable, Formattable {
* in the record
* @throws DataTypeException wrapping data type conversion exception that
* might have occurred
- * @see Convert#convert(Object, Class)
*/
- T get(int index, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ U get(int index, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Get a converted value from this record, providing a field index.
@@ -391,7 +396,6 @@ public interface Record extends Attachable, Comparable, Formattable {
* in the record
* @throws DataTypeException wrapping data type conversion exception that
* might have occurred
- * @see Convert#convert(Object, Converter)
*/
U get(int index, Converter, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
@@ -1502,8 +1506,12 @@ public interface Record extends Attachable, Comparable, Formattable {
/**
* Get a converted value from this record, providing a field.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
- * @param The conversion type parameter
+ * @param The conversion type parameter
* @param field The field
* @param type The conversion type
* @param defaultValue The default value instead of null
@@ -1513,12 +1521,10 @@ public interface Record extends Attachable, Comparable, Formattable {
* in {@link #fieldsRow()}
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @see Convert#convert(Object, Class)
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
*/
@Deprecated
- T getValue(Field> field, Class extends T> type, T defaultValue) throws IllegalArgumentException,
- DataTypeException;
+ U getValue(Field> field, Class extends U> type, U defaultValue) throws IllegalArgumentException, DataTypeException;
/**
* Get a converted value from this Record, providing a field.
@@ -1528,8 +1534,7 @@ public interface Record extends Attachable, Comparable, Formattable {
*
* @see #get(Field, Converter)
*/
- U getValue(Field field, Converter super T, ? extends U> converter) throws IllegalArgumentException,
- DataTypeException;
+ U getValue(Field field, Converter super T, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
/**
* Get a converted value from this record, providing a field.
@@ -1545,12 +1550,10 @@ public interface Record extends Attachable, Comparable, Formattable {
* in {@link #fieldsRow()}
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @see Convert#convert(Object, Converter)
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
*/
@Deprecated
- U getValue(Field field, Converter super T, ? extends U> converter, U defaultValue)
- throws IllegalArgumentException, DataTypeException;
+ U getValue(Field field, Converter super T, ? extends U> converter, U defaultValue) throws IllegalArgumentException, DataTypeException;
/**
* Get a value from this Record, providing a field name.
@@ -1588,8 +1591,12 @@ public interface Record extends Attachable, Comparable, Formattable {
/**
* Get a converted value from this record, providing a field name.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
- * @param The conversion type parameter
+ * @param The conversion type parameter
* @param fieldName The field's name
* @param type The conversion type
* @param defaultValue The default value instead of null
@@ -1599,12 +1606,10 @@ public interface Record extends Attachable, Comparable, Formattable {
* contained in the record
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @see Convert#convert(Object, Class)
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
*/
@Deprecated
- T getValue(String fieldName, Class extends T> type, T defaultValue) throws IllegalArgumentException,
- DataTypeException;
+ U getValue(String fieldName, Class extends U> type, U defaultValue) throws IllegalArgumentException, DataTypeException;
/**
* Get a converted value from this Record, providing a field name.
@@ -1629,12 +1634,10 @@ public interface Record extends Attachable, Comparable, Formattable {
* contained in the record
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
- * @see Convert#convert(Object, Converter)
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
*/
@Deprecated
- U getValue(String fieldName, Converter, ? extends U> converter, U defaultValue) throws IllegalArgumentException,
- DataTypeException;
+ U getValue(String fieldName, Converter, ? extends U> converter, U defaultValue) throws IllegalArgumentException, DataTypeException;
/**
* Get a value from this Record, providing a field name.
@@ -1702,8 +1705,12 @@ public interface Record extends Attachable, Comparable, Formattable {
/**
* Get a converted value from this record, providing a field index.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
- * @param The conversion type parameter
+ * @param The conversion type parameter
* @param index The field's index
* @param type The conversion type
* @param defaultValue The default value instead of null
@@ -1713,12 +1720,10 @@ public interface Record extends Attachable, Comparable, Formattable {
* in the record
* @throws DataTypeException wrapping data type conversion exception that
* might have occurred
- * @see Convert#convert(Object, Class)
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
*/
@Deprecated
- T getValue(int index, Class extends T> type, T defaultValue) throws IllegalArgumentException,
- DataTypeException;
+ U getValue(int index, Class extends U> type, U defaultValue) throws IllegalArgumentException, DataTypeException;
/**
* Get a converted value from this record, providing a field index.
@@ -1743,12 +1748,10 @@ public interface Record extends Attachable, Comparable, Formattable {
* in the record
* @throws DataTypeException wrapping data type conversion exception that
* might have occurred
- * @see Convert#convert(Object, Converter)
* @deprecated - 3.3.0 - [#2878] - This method will be removed in jOOQ 4.0
*/
@Deprecated
- U getValue(int index, Converter, ? extends U> converter, U defaultValue) throws IllegalArgumentException,
- DataTypeException;
+ U getValue(int index, Converter, ? extends U> converter, U defaultValue) throws IllegalArgumentException, DataTypeException;
/**
* Set a value into this record.
diff --git a/jOOQ/src/main/java/org/jooq/Result.java b/jOOQ/src/main/java/org/jooq/Result.java
index c35931aab4..380a41293e 100644
--- a/jOOQ/src/main/java/org/jooq/Result.java
+++ b/jOOQ/src/main/java/org/jooq/Result.java
@@ -49,7 +49,6 @@ import org.jooq.exception.DataTypeException;
import org.jooq.exception.InvalidResultException;
import org.jooq.exception.MappingException;
import org.jooq.impl.DefaultRecordMapper;
-import org.jooq.tools.Convert;
/**
* A wrapper for database results returned by {@link SelectQuery}
@@ -327,16 +326,19 @@ public interface Result extends List, Attachable, Formattab
/**
* 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 field The values' field
* @param type The type used for type conversion
* @return The values
* @see Record#get(Field, Class)
- * @see Convert#convert(Object, Class)
* @throws IllegalArgumentException If the argument field is not contained
* in {@link #fieldsRow()}
*/
- List getValues(Field> field, Class extends T> type) throws IllegalArgumentException;
+ List getValues(Field> field, Class extends U> type) throws IllegalArgumentException;
/**
* Convenience method to fetch all values for a given field. This is
@@ -346,7 +348,6 @@ public interface Result extends List, Attachable, Formattab
* @param converter The data type converter used for type conversion
* @return The values
* @see Record#get(Field, Converter)
- * @see Convert#convert(Object, Converter)
* @throws IllegalArgumentException If the argument field is not contained
* in {@link #fieldsRow()}
*/
@@ -366,18 +367,21 @@ public interface Result extends List, Attachable, Formattab
/**
* 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 fieldIndex The values' field index
* @param type The type used for type conversion
* @return The values
* @see Record#get(int, Class)
- * @see Convert#convert(Object, 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
*/
- List getValues(int fieldIndex, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ List getValues(int fieldIndex, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Convenience method to fetch all values for a given field. This is
@@ -387,7 +391,6 @@ public interface Result extends List, Attachable, Formattab
* @param converter The data type converter used for type conversion
* @return The values
* @see Record#get(int, Converter)
- * @see Convert#convert(Object, Converter)
* @throws IllegalArgumentException If the argument fieldIndex is not
* contained in {@link #fieldsRow()}
* @throws DataTypeException wrapping any data type conversion exception
@@ -409,18 +412,21 @@ public interface Result extends List, Attachable, Formattab
/**
* 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 fieldName The values' field name
* @param type The type used for type conversion
* @return The values
* @see Record#get(String, Class)
- * @see Convert#convert(Object, 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
*/
- List getValues(String fieldName, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ List getValues(String fieldName, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Convenience method to fetch all values for a given field. This is
@@ -430,14 +436,12 @@ public interface Result extends List, Attachable, Formattab
* @param converter The data type converter used for type conversion
* @return The values
* @see Record#get(String, Converter)
- * @see Convert#convert(Object, 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
*/
- List getValues(String fieldName, Converter, ? extends U> converter) throws IllegalArgumentException,
- DataTypeException;
+ List getValues(String fieldName, Converter, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
/**
* Convenience method to fetch all values for a given field. This is
@@ -453,18 +457,21 @@ public interface Result extends List, Attachable, Formattab
/**
* 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 fieldName The values' field name
* @param type The type used for type conversion
* @return The values
* @see Record#get(Name, Class)
- * @see Convert#convert(Object, 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
*/
- List getValues(Name fieldName, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ List getValues(Name fieldName, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Convenience method to fetch all values for a given field. This is
@@ -474,14 +481,12 @@ public interface Result extends List, Attachable, Formattab
* @param converter The data type converter used for type conversion
* @return The values
* @see Record#get(Name, Converter)
- * @see Convert#convert(Object, 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
*/
- List getValues(Name fieldName, Converter, ? extends U> converter) throws IllegalArgumentException,
- DataTypeException;
+ List getValues(Name fieldName, Converter, ? extends U> converter) throws IllegalArgumentException, DataTypeException;
/**
* Whether there are any records contained in this Result.
@@ -2171,7 +2176,7 @@ public interface Result extends List, Attachable, Formattab
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
*/
- T[] intoArray(int fieldIndex, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ U[] intoArray(int fieldIndex, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Return all values for a field index from the result.
@@ -2216,7 +2221,7 @@ public interface Result extends List, Attachable, Formattab
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
*/
- T[] intoArray(String fieldName, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ U[] intoArray(String fieldName, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Return all values for a field name from the result.
@@ -2261,7 +2266,7 @@ public interface Result extends List, Attachable, Formattab
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
*/
- T[] intoArray(Name fieldName, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ U[] intoArray(Name fieldName, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Return all values for a field name from the result.
@@ -2304,7 +2309,7 @@ public interface Result extends List, Attachable, Formattab
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
*/
- T[] intoArray(Field> field, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ U[] intoArray(Field> field, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Return all values for a field from the result.
@@ -2352,7 +2357,7 @@ public interface Result extends List, Attachable, Formattab
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
*/
- Set intoSet(int fieldIndex, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ Set intoSet(int fieldIndex, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Return all values for a field index from the result.
@@ -2388,7 +2393,7 @@ public interface Result extends List, Attachable, Formattab
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
*/
- Set intoSet(String fieldName, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ Set intoSet(String fieldName, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Return all values for a field name from the result.
@@ -2424,7 +2429,7 @@ public interface Result extends List, Attachable, Formattab
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
*/
- Set intoSet(Name fieldName, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ Set intoSet(Name fieldName, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Return all values for a field name from the result.
@@ -2458,7 +2463,7 @@ public interface Result extends List, Attachable, Formattab
* @throws DataTypeException wrapping any data type conversion exception
* that might have occurred
*/
- Set intoSet(Field> field, Class extends T> type) throws IllegalArgumentException, DataTypeException;
+ Set intoSet(Field> field, Class extends U> type) throws IllegalArgumentException, DataTypeException;
/**
* Return all values for a field from the result.
diff --git a/jOOQ/src/main/java/org/jooq/ResultQuery.java b/jOOQ/src/main/java/org/jooq/ResultQuery.java
index 8389583307..cdc6ed6a49 100644
--- a/jOOQ/src/main/java/org/jooq/ResultQuery.java
+++ b/jOOQ/src/main/java/org/jooq/ResultQuery.java
@@ -465,12 +465,16 @@ extends
*
* This is the same as calling {@link #fetch()} and then
* {@link Result#getValues(Field, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The result. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Record#get(Field, Class)
*/
- List fetch(Field> field, Class extends T> type) throws DataAccessException;
+ List fetch(Field> field, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field from the generated
@@ -503,12 +507,16 @@ extends
*
* This is the same as calling {@link #fetch()} and then
* {@link Result#getValues(int, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The result. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Record#get(int, Class)
*/
- List fetch(int fieldIndex, Class extends T> type) throws DataAccessException;
+ List fetch(int fieldIndex, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field index from the
@@ -541,12 +549,16 @@ extends
*
* This is the same as calling {@link #fetch()} and then
* {@link Result#getValues(String, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The result. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Record#get(String, Class)
*/
- List fetch(String fieldName, Class extends T> type) throws DataAccessException;
+ List fetch(String fieldName, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field name from the
@@ -579,12 +591,16 @@ extends
*
* This is the same as calling {@link #fetch()} and then
* {@link Result#getValues(Name, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The result. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Record#get(Name, Class)
*/
- List fetch(Name fieldName, Class extends T> type) throws DataAccessException;
+ List fetch(Name fieldName, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field name from the
@@ -619,13 +635,17 @@ extends
*
* This is the same as calling {@link #fetchOne()} and then
* {@link Record#get(Field, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value or null if the query returned no
* records.
* @throws DataAccessException if something went wrong executing the query
* @throws TooManyRowsException if the query returned more than one record
*/
- T fetchOne(Field> field, Class extends T> type) throws DataAccessException, TooManyRowsException;
+ U fetchOne(Field> field, Class extends U> type) throws DataAccessException, TooManyRowsException;
/**
* Execute the query and return at most one resulting value for a
@@ -661,13 +681,17 @@ extends
*
* This is the same as calling {@link #fetchOne()} and then
* {@link Record#get(int, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value or null if the query returned no
* records.
* @throws DataAccessException if something went wrong executing the query
* @throws TooManyRowsException if the query returned more than one record
*/
- T fetchOne(int fieldIndex, Class extends T> type) throws DataAccessException, TooManyRowsException;
+ U fetchOne(int fieldIndex, Class extends U> type) throws DataAccessException, TooManyRowsException;
/**
* Execute the query and return at most one resulting value for a
@@ -703,13 +727,17 @@ extends
*
* This is the same as calling {@link #fetchOne()} and then
* {@link Record#get(String, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value or null if the query returned no
* records.
* @throws DataAccessException if something went wrong executing the query
* @throws TooManyRowsException if the query returned more than one record
*/
- T fetchOne(String fieldName, Class extends T> type) throws DataAccessException, TooManyRowsException;
+ U fetchOne(String fieldName, Class extends U> type) throws DataAccessException, TooManyRowsException;
/**
* Execute the query and return at most one resulting value for a
@@ -740,18 +768,22 @@ extends
Object fetchOne(Name fieldName) throws DataAccessException, TooManyRowsException;
/**
- * Execute the query and return at most one resulting value for a
- * field name from the generated result.
+ * Execute the query and return at most one resulting value for a field name
+ * from the generated result.
*
* This is the same as calling {@link #fetchOne()} and then
* {@link Record#get(Name, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value or null if the query returned no
* records.
* @throws DataAccessException if something went wrong executing the query
* @throws TooManyRowsException if the query returned more than one record
*/
- T fetchOne(Name fieldName, Class extends T> type) throws DataAccessException, TooManyRowsException;
+ U fetchOne(Name fieldName, Class extends U> type) throws DataAccessException, TooManyRowsException;
/**
* Execute the query and return at most one resulting value for a
@@ -889,13 +921,17 @@ extends
*
* This is the same as calling {@link #fetchSingle()} and then
* {@link Record#get(Field, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value. This is never null.
* @throws DataAccessException if something went wrong executing the query
* @throws NoDataFoundException if the query returned no records
* @throws TooManyRowsException if the query returned more than one record
*/
- T fetchSingle(Field> field, Class extends T> type) throws DataAccessException, NoDataFoundException, TooManyRowsException;
+ U fetchSingle(Field> field, Class extends U> type) throws DataAccessException, NoDataFoundException, TooManyRowsException;
/**
* Execute the query and return exactly one resulting value for a
@@ -931,13 +967,17 @@ extends
*
* This is the same as calling {@link #fetchSingle()} and then
* {@link Record#get(int, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value. This is never null.
* @throws DataAccessException if something went wrong executing the query
* @throws NoDataFoundException if the query returned no records
* @throws TooManyRowsException if the query returned more than one record
*/
- T fetchSingle(int fieldIndex, Class extends T> type) throws DataAccessException, NoDataFoundException, TooManyRowsException;
+ U fetchSingle(int fieldIndex, Class extends U> type) throws DataAccessException, NoDataFoundException, TooManyRowsException;
/**
* Execute the query and return exactly one resulting value for a
@@ -973,13 +1013,17 @@ extends
*
* This is the same as calling {@link #fetchSingle()} and then
* {@link Record#get(String, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value. This is never null.
* @throws DataAccessException if something went wrong executing the query
* @throws NoDataFoundException if the query returned no records
* @throws TooManyRowsException if the query returned more than one record
*/
- T fetchSingle(String fieldName, Class extends T> type) throws DataAccessException, NoDataFoundException, TooManyRowsException;
+ U fetchSingle(String fieldName, Class extends U> type) throws DataAccessException, NoDataFoundException, TooManyRowsException;
/**
* Execute the query and return exactly one resulting value for a
@@ -1015,13 +1059,17 @@ extends
*
* This is the same as calling {@link #fetchSingle()} and then
* {@link Record#get(Name, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value. This is never null.
* @throws DataAccessException if something went wrong executing the query
* @throws NoDataFoundException if the query returned no records
* @throws TooManyRowsException if the query returned more than one record
*/
- T fetchSingle(Name fieldName, Class extends T> type) throws DataAccessException, NoDataFoundException, TooManyRowsException;
+ U fetchSingle(Name fieldName, Class extends U> type) throws DataAccessException, NoDataFoundException, TooManyRowsException;
/**
* Execute the query and return exactly one resulting value for a
@@ -1159,12 +1207,16 @@ extends
*
* This is the same as calling {@link #fetchOptional()} and then
* {@link Record#get(Field, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value
* @throws DataAccessException if something went wrong executing the query
* @throws TooManyRowsException if the query returned more than one record
*/
- Optional fetchOptional(Field> field, Class extends T> type) throws DataAccessException, TooManyRowsException;
+ Optional fetchOptional(Field> field, Class extends U> type) throws DataAccessException, TooManyRowsException;
/**
* Execute the query and return at most one resulting value for a
@@ -1198,12 +1250,16 @@ extends
*
* This is the same as calling {@link #fetchOptional()} and then
* {@link Record#get(int, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value
* @throws DataAccessException if something went wrong executing the query
* @throws TooManyRowsException if the query returned more than one record
*/
- Optional fetchOptional(int fieldIndex, Class extends T> type) throws DataAccessException, TooManyRowsException;
+ Optional fetchOptional(int fieldIndex, Class extends U> type) throws DataAccessException, TooManyRowsException;
/**
* Execute the query and return at most one resulting value for a
@@ -1237,12 +1293,16 @@ extends
*
* This is the same as calling {@link #fetchOptional()} and then
* {@link Record#get(String, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value
* @throws DataAccessException if something went wrong executing the query
* @throws TooManyRowsException if the query returned more than one record
*/
- Optional fetchOptional(String fieldName, Class extends T> type) throws DataAccessException, TooManyRowsException;
+ Optional fetchOptional(String fieldName, Class extends U> type) throws DataAccessException, TooManyRowsException;
/**
* Execute the query and return at most one resulting value for a
@@ -1276,12 +1336,16 @@ extends
*
* This is the same as calling {@link #fetchOptional()} and then
* {@link Record#get(Name, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value
* @throws DataAccessException if something went wrong executing the query
* @throws TooManyRowsException if the query returned more than one record
*/
- Optional fetchOptional(Name fieldName, Class extends T> type) throws DataAccessException, TooManyRowsException;
+ Optional fetchOptional(Name fieldName, Class extends U> type) throws DataAccessException, TooManyRowsException;
/**
* Execute the query and return at most one resulting value for a
@@ -1396,17 +1460,21 @@ extends
T fetchAny(Field field) throws DataAccessException;
/**
- * Execute the query and return at most one resulting value for a
- * field from the generated result.
+ * Execute the query and return at most one resulting value for a field from
+ * the generated result.
*
* This is the same as calling {@link #fetchOne()} and then
* {@link Record#get(Field, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value or null if the query returned no
* records.
* @throws DataAccessException if something went wrong executing the query
*/
- T fetchAny(Field> field, Class extends T> type) throws DataAccessException;
+ U fetchAny(Field> field, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return at most one resulting value for a
@@ -1435,17 +1503,21 @@ extends
Object fetchAny(int fieldIndex) throws DataAccessException;
/**
- * Execute the query and return at most one resulting value for a
- * field index from the generated result.
+ * Execute the query and return at most one resulting value for a field
+ * index from the generated result.
*
* This is the same as calling {@link #fetchOne()} and then
* {@link Record#get(int, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value or null if the query returned no
* records.
* @throws DataAccessException if something went wrong executing the query
*/
- T fetchAny(int fieldIndex, Class extends T> type) throws DataAccessException;
+ U fetchAny(int fieldIndex, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return at most one resulting value for a
@@ -1479,12 +1551,16 @@ extends
*
* This is the same as calling {@link #fetchOne()} and then
* {@link Record#get(String, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value or null if the query returned no
* records.
* @throws DataAccessException if something went wrong executing the query
*/
- T fetchAny(String fieldName, Class extends T> type) throws DataAccessException;
+ U fetchAny(String fieldName, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return at most one resulting value for a
@@ -1518,12 +1594,16 @@ extends
*
* This is the same as calling {@link #fetchOne()} and then
* {@link Record#get(Name, Class)}
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting value or null if the query returned no
* records.
* @throws DataAccessException if something went wrong executing the query
*/
- T fetchAny(Name fieldName, Class extends T> type) throws DataAccessException;
+ U fetchAny(Name fieldName, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return at most one resulting value for a
@@ -3416,12 +3496,16 @@ extends
*
* You can access data like this
* query.fetchArray(fieldIndex)[recordIndex]
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting values. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoArray(int, Class)
*/
- T[] fetchArray(int fieldIndex, Class extends T> type) throws DataAccessException;
+ U[] fetchArray(int fieldIndex, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field index from the
@@ -3458,12 +3542,16 @@ extends
*
* You can access data like this
* query.fetchArray(fieldName)[recordIndex]
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting values. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoArray(String, Converter)
*/
- T[] fetchArray(String fieldName, Class extends T> type) throws DataAccessException;
+ U[] fetchArray(String fieldName, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field name from the
@@ -3500,12 +3588,16 @@ extends
*
* You can access data like this
* query.fetchArray(fieldName)[recordIndex]
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting values. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoArray(Name, Converter)
*/
- T[] fetchArray(Name fieldName, Class extends T> type) throws DataAccessException;
+ U[] fetchArray(Name fieldName, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field name from the
@@ -3539,12 +3631,16 @@ extends
*
* You can access data like this
* query.fetchArray(field)[recordIndex]
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The result. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoArray(Field, Class)
*/
- T[] fetchArray(Field> field, Class extends T> type) throws DataAccessException;
+ U[] fetchArray(Field> field, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field from the generated
@@ -3581,12 +3677,16 @@ extends
/**
* Execute the query and return all values for a field index from the
* generated result.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting values. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoArray(int, Class)
*/
- Set fetchSet(int fieldIndex, Class extends T> type) throws DataAccessException;
+ Set fetchSet(int fieldIndex, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field index from the
@@ -3611,12 +3711,16 @@ extends
/**
* Execute the query and return all values for a field name from the
* generated result.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting values. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoArray(String, Converter)
*/
- Set fetchSet(String fieldName, Class extends T> type) throws DataAccessException;
+ Set fetchSet(String fieldName, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field name from the
@@ -3641,12 +3745,16 @@ extends
/**
* Execute the query and return all values for a field name from the
* generated result.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting values. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoArray(Name, Converter)
*/
- Set fetchSet(Name fieldName, Class extends T> type) throws DataAccessException;
+ Set fetchSet(Name fieldName, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field name from the
@@ -3671,12 +3779,16 @@ extends
/**
* Execute the query and return all values for a field from the generated
* result.
+ *
+ * The {@link Converter} that is provided by
+ * {@link Configuration#converterProvider()} will be used to convert the
+ * value to U
*
* @return The resulting values. This will never be null.
* @throws DataAccessException if something went wrong executing the query
* @see Result#intoArray(Field, Class)
*/
- Set fetchSet(Field> field, Class extends T> type) throws DataAccessException;
+ Set fetchSet(Field> field, Class extends U> type) throws DataAccessException;
/**
* Execute the query and return all values for a field from the generated
diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractRecord.java b/jOOQ/src/main/java/org/jooq/impl/AbstractRecord.java
index 81d5390904..68dd1cb121 100644
--- a/jOOQ/src/main/java/org/jooq/impl/AbstractRecord.java
+++ b/jOOQ/src/main/java/org/jooq/impl/AbstractRecord.java
@@ -244,21 +244,17 @@ abstract class AbstractRecord extends AbstractStore implements Record {
@Override
public final T get(Field field) {
- if (field instanceof EmbeddableTableField) {
- Field>[] f = embeddedFields(field);
-
+ if (field instanceof EmbeddableTableField)
return (T) Tools
.newRecord(fetched, ((EmbeddableTableField, ?>) field).recordType)
- .operate(new TransferRecordState(f));
- }
- else {
+ .operate(new TransferRecordState(embeddedFields(field)));
+ else
return (T) get(indexOrFail(fieldsRow(), field));
- }
}
@Override
public final T get(Field> field, Class extends T> type) {
- return Convert.convert(get(field), type);
+ return (T) Tools.configuration(this).converterProvider().provide(field.getType(), (Class) type).from(get(field));
}
@Override
@@ -273,7 +269,7 @@ abstract class AbstractRecord extends AbstractStore implements Record {
@Override
public final T get(int index, Class extends T> type) {
- return Convert.convert(get(index), type);
+ return (T) Tools.configuration(this).converterProvider().provide(field(safeIndex(index)).getType(), (Class) type).from(get(index));
}
@Override
@@ -288,7 +284,7 @@ abstract class AbstractRecord extends AbstractStore implements Record {
@Override
public final T get(String fieldName, Class extends T> type) {
- return Convert.convert(get(fieldName), type);
+ return get(indexOrFail(fieldsRow(), fieldName), type);
}
@Override
@@ -303,7 +299,7 @@ abstract class AbstractRecord extends AbstractStore implements Record {
@Override
public final T get(Name fieldName, Class extends T> type) {
- return Convert.convert(get(fieldName), type);
+ return get(indexOrFail(fieldsRow(), fieldName), type);
}
@Override
diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractResultQuery.java b/jOOQ/src/main/java/org/jooq/impl/AbstractResultQuery.java
index 81ce5f0bee..7513f076bb 100644
--- a/jOOQ/src/main/java/org/jooq/impl/AbstractResultQuery.java
+++ b/jOOQ/src/main/java/org/jooq/impl/AbstractResultQuery.java
@@ -40,10 +40,7 @@ package org.jooq.impl;
import static java.util.concurrent.Executors.newSingleThreadExecutor;
// ...
// ...
-import static org.jooq.SQLDialect.CUBRID;
import static org.jooq.SQLDialect.POSTGRES;
-// ...
-// ...
import static org.jooq.impl.DSL.field;
import static org.jooq.impl.DSL.name;
import static org.jooq.impl.Tools.blocking;
@@ -111,7 +108,6 @@ import org.jooq.Results;
import org.jooq.SQLDialect;
import org.jooq.Table;
import org.jooq.conf.SettingsTools;
-import org.jooq.tools.Convert;
import org.jooq.tools.JooqLogger;
import org.jooq.tools.jdbc.MockResultSet;
@@ -128,7 +124,6 @@ abstract class AbstractResultQuery extends AbstractQuery imple
private static final long serialVersionUID = -5588344253566055707L;
private static final JooqLogger log = JooqLogger.getLogger(AbstractResultQuery.class);
- private static final Set NO_SUPPORT_FOR_UPDATE = SQLDialect.supportedBy(CUBRID);
private static final Set REPORT_FETCH_SIZE_WITH_AUTOCOMMIT = SQLDialect.supportedBy(POSTGRES);
private int maxRows;
@@ -516,7 +511,7 @@ abstract class AbstractResultQuery extends AbstractQuery imple
}
@Override
- public final List fetch(Field> field, Class extends T> type) {
+ public final List fetch(Field> field, Class extends U> type) {
return fetch().getValues(field, type);
}
@@ -531,7 +526,7 @@ abstract class AbstractResultQuery extends AbstractQuery imple
}
@Override
- public final List