diff --git a/jOOQ/src/main/java/org/jooq/ExecuteListener.java b/jOOQ/src/main/java/org/jooq/ExecuteListener.java
index 8bc7f5dea8..70211cb2d8 100644
--- a/jOOQ/src/main/java/org/jooq/ExecuteListener.java
+++ b/jOOQ/src/main/java/org/jooq/ExecuteListener.java
@@ -240,7 +240,9 @@ import org.jooq.tools.StopWatchListener;
*
*
*
- *
+ *
*
- *
* Records originating from a concrete database table (or view) are modelled by * jOOQ as {@link TableRecord} or {@link UpdatableRecord}, if they contain a * primary key. If you're using jOOQ's code generator, you can generate even * more concrete types of table records, i.e. one table record per table. *
- *
* {@link SQLDialect#ORACLE} and {@link SQLDialect#POSTGRES} formally support * user defined types (UDT), which are modelled by jOOQ as {@link UDTRecord}. In @@ -80,7 +80,7 @@ import org.jooq.tools.reflect.Reflect; * implement the JDBC {@link SQLData} API in order to be streamed to a JDBC * {@link PreparedStatement} or from a JDBC {@link ResultSet} *
- *
* When projecting custom record types in SQL, new ad-hoc types of a certain
* degree are formed on the fly. Records with degree <= 22 are reflected by
@@ -91,7 +91,7 @@ import org.jooq.tools.reflect.Reflect;
* Note that generated TableRecords and UDTRecords
* also implement a Record[N] interface, if N <= 22
*
- *
* jOOQ records have a natural ordering implemented in the same way as this is
* defined in the SQL standard. For more details, see the
@@ -634,15 +634,18 @@ public interface Record extends Attachable, Comparable
* The mapping algorithm is this:
- *
- *
+ * The resulting array is of the nature described in {@link #intoArray()}.
+ * Arrays more specific than
+ *
*
+ *
+ * If {@link Field#getName()} is
+ *
*
+ *
*
+ *
* Abstract types are instanciated using Java reflection {@link Proxy}
* mechanisms. The returned proxy will wrap a {@link HashMap} containing
* properties mapped by getters and setters of the supplied type. Methods
* (even JPA-annotated ones) other than standard POJO getters and setters
* are not supported. Details can be seen in {@link Reflect#as(Class)}.
- *
+ *
*
- * The mapping algorithm is this:
- *
+ *
*
+ *
* The mapping algorithm is this:
+ *
- * Loading of data is delegated to {@link #fromArray(Object...)}
- *
+ *
*
- * Loading of data is delegated to {@link #fromMap(Map)}
- *
+ *
*
+ * If {@link Field#getName()} is
*
+ *
*
+ * The resulting record will have its internal
* "changed" flags set to true for all values. This means that
* {@link UpdatableRecord#store()} will perform an
- *
* Two Records are comparable if and only if they have the same
- *
- *
* Assume the following notations:
*
- *
+ * This has been observed to be supported by any of these dialects:
*
+ *
+ * These dialects can simulate the
* Note: This simulation may not be efficient for large result sets!
- *
+ *
+ * These dialects are known not to support the
- *
+ * Note, not all databases support derived column lists for their table
+ * aliases. On the other hand, some databases do support derived column
+ * lists, but only for derived tables. jOOQ will try to turn table
+ * references into derived tables to make this syntax work. In other words,
+ * the following statements are equivalent:
- *
+ * Other databases may not support derived column lists at all, but they do
+ * support common table expressions. The following statements are
+ * equivalent:
- *
*
+ *
* Use {@link #insert()} or {@link #update()} to explicitly force either
* statement type.
@@ -156,7 +157,8 @@ public interface UpdatableRecord
+ *
* If an
* See {@link SelectQuery#setForUpdate(boolean)} for more details
*
- *
+ *
* Possible statements are
*
- *
* If a
* See {@link SelectQuery#setForUpdate(boolean)} for more details
*
* The executed statement is
- *
* [#1326] This is necessary in those dialects that have long-lived
* temporary lob objects, which can cause memory leaks in certain contexts,
@@ -114,7 +114,7 @@ class DefaultExecuteContext extends AbstractConfiguration implements ExecuteCont
* {@link OutOfMemoryError}
* If
The resulting array is of the
- * nature described in {@link #intoArray()}. Arrays more specific than
- * type is an array:Object[] can be specified as well, e.g.
- * String[]. If conversion fails, a {@link MappingException} is
- * thrown, wrapping conversion exceptions.
* If a default constructor is available and any JPA {@link Column}
+ *
If
+ * type is an array:Object[] can be specified as well,
+ * e.g. String[]. If conversion fails, a
+ * {@link MappingException} is thrown, wrapping conversion exceptions.
+ * If a default constructor is available and any JPA {@link Column}
* annotations are found on the provided
+ * type, only those are
- * used:
+ * used:
*
- * type contains public single-argument instance methods
* annotated with Column, those methods are invokedIf a default constructor is available and if there are no JPA
+ *
If a default constructor is available and if there are no JPA
*
+ * Column annotations, or jOOQ can't find the
* javax.persistence API on the classpath, jOOQ will map
- * Record values by naming convention: If
- * {@link Field#getName()} is MY_field (case-sensitive!), then
- * this field's value will be set on all of these:
+ * Record values by naming convention:MY_field (case-sensitive!),
+ * then this field's value will be set on all of these:
*
*
- * MY_field(...)myField(...)MY_fieldmyFieldIf no default constructor is available, but at least one constructor
+ *
If no default constructor is available, but at least one constructor
* annotated with
+ * ConstructorProperties is available, that one
- * is used
+ * is used
*
- * If no default constructor is available, but at least one "matching"
- * constructor is available, that one is used
+ * If no default constructor is available, but at least one "matching"
+ * constructor is available, that one is used
+ *
*
- * If the supplied type is an interface or an abstract class
+ * If the supplied type is an interface or an abstract class
+ * Other restrictions
+ * Other restrictions
+ *
*
type must provide a default or a "matching" constructor.
* Non-public default constructors are made accessible using
@@ -746,8 +759,8 @@ public interface Record extends Attachable, ComparablejOOQ will map
+ * The mapping algorithm is this:Record values by equal field names:jOOQ will map
Record values by equal field names:
*
- * table argument with
* {@link Field#getName()} "MY_field" (case-sensitive!), a
@@ -756,8 +769,8 @@ public interface Record extends Attachable, ComparableOther restrictions
+ * Other restrictions
*
If
+ * Load data into this record from a source.source is an arrayIf
* source is an arrayIf
+ * Loading of data is delegated to {@link #fromArray(Object...)}source is a {@link Map}If
source is a {@link Map}If any JPA {@link Column} annotations are found on the {@link Class}
+ * Loading of data is delegated to {@link #fromMap(Map)}
If any JPA {@link Column} annotations are found on the {@link Class}
* of the provided
source, only those are used. Matching
- * candidates are:
+ * candidates are:
*
- * ColumnIf there are no JPA
Column annotations, or jOOQ can't
+ * If there are no JPA
Column annotations, or jOOQ can't
* find the javax.persistence API on the classpath, jOOQ will
- * map members by naming convention: If {@link Field#getName()} is
+ * map members by naming convention:MY_field (case-sensitive!), then this field's value will be
* fetched from the first of these:
*
@@ -852,12 +865,12 @@ public interface Record extends Attachable, Comparable
- * getMyField()MY_fieldmyFieldOther restrictions
+ * Other restrictions
*
- * General notes
The resulting record will have its internal
+ * General notes
INSERT
* statement. If you wish to store the record using an UPDATE
@@ -958,13 +971,13 @@ public interface Record extends Attachable, ComparableRecords being compared must have the same ROW type
+ * Records being compared must have the same ROW type
* ROW type, i.e. if their {@link Record#fieldsRow() fieldsRow()}
- * methods return fields of the same type and degree.
+ * ROW type, i.e. if their {@link Record#fieldsRow()
+ * fieldsRow()} methods return fields of the same type and degree.
* Comparison rules
+ * Comparison rules
*
diff --git a/jOOQ/src/main/java/org/jooq/SelectQuery.java b/jOOQ/src/main/java/org/jooq/SelectQuery.java
index 42da1ff04e..c0817a6c6c 100644
--- a/jOOQ/src/main/java/org/jooq/SelectQuery.java
+++ b/jOOQ/src/main/java/org/jooq/SelectQuery.java
@@ -502,8 +502,9 @@ public interface SelectQuery
* Native implementation
This has been observed to be supported by
- * any of these dialects:
+ * Native implementation
+ * Simulation
These dialects can simulate the
- * FOR UPDATE clause using a cursor. The cursor is handled by
- * the JDBC driver, at {@link PreparedStatement} construction time, when
- * calling {@link Connection#prepareStatement(String, int, int)} with
+ * Simulation
+ * FOR UPDATE clause using a
+ * cursor. The cursor is handled by the JDBC driver, at
+ * {@link PreparedStatement} construction time, when calling
+ * {@link Connection#prepareStatement(String, int, int)} with
* {@link ResultSet#CONCUR_UPDATABLE}. jOOQ handles simulation of a
* FOR UPDATE clause using CONCUR_UPDATABLE for
* these dialects:
@@ -539,8 +543,11 @@ public interface SelectQueryNot supported
These dialects are known not to support the
- * FOR UPDATE clause in regular SQL:
+ * Not supported
+ * FOR UPDATE
+ * clause in regular SQL:
*
*
diff --git a/jOOQ/src/main/java/org/jooq/Table.java b/jOOQ/src/main/java/org/jooq/Table.java
index e794f25716..d30faee90f 100644
--- a/jOOQ/src/main/java/org/jooq/Table.java
+++ b/jOOQ/src/main/java/org/jooq/Table.java
@@ -99,12 +99,13 @@ public interface TableDerived column lists for table references
Note, not all
- * databases support derived column lists for their table aliases. On the
- * other hand, some databases do support derived column lists, but only for
- * derived tables. jOOQ will try to turn table references into derived
- * tables to make this syntax work. In other words, the following statements
- * are equivalent:
+ *
Derived column lists for table references
+ *
*
* -- Using derived column lists to rename columns (e.g. Postgres)
* SELECT t.a, t.b
* FROM my_table t(a, b)
@@ -116,9 +117,11 @@ public interface TableDerived column lists for derived tables
Other databases may not
- * support derived column lists at all, but they do support common table
- * expressions. The following statements are equivalent:
+ *
Derived column lists for derived tables
+ *
* -- Using derived column lists to rename columns (e.g. Postgres)
* SELECT t.a, t.b
* FROM (
diff --git a/jOOQ/src/main/java/org/jooq/UpdatableRecord.java b/jOOQ/src/main/java/org/jooq/UpdatableRecord.java
index f9d32b1238..43e3fbb521 100644
--- a/jOOQ/src/main/java/org/jooq/UpdatableRecord.java
+++ b/jOOQ/src/main/java/org/jooq/UpdatableRecord.java
@@ -104,7 +104,7 @@ public interface UpdatableRecordStatement type
+ * Statement type
*
*
- * INSERT
@@ -124,7 +124,8 @@ public interface UpdatableRecordDEFAULT values to be applied by the underlying RDBMS. If no
* fields were modified, neither an UPDATE nor an
* INSERT will be executed.
- * Automatic value generation
+ * Automatic value generation
* Optimistic locking
+ * Optimistic locking
* UPDATE statement is executed and
* {@link Settings#isExecuteWithOptimisticLocking()} is set to
@@ -191,7 +193,8 @@ public interface UpdatableRecordStatement examples
+ * Statement examples
*
@@ -251,7 +254,7 @@ public interface UpdatableRecord
- * Optimistic locking
+ * Optimistic locking
* DELETE statement is executed and
* {@link Settings#isExecuteWithOptimisticLocking()} is set to
@@ -286,7 +289,7 @@ public interface UpdatableRecordStatement examples
+ * Statement examples
*
* DELETE FROM [table]
diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultExecuteContext.java b/jOOQ/src/main/java/org/jooq/impl/DefaultExecuteContext.java
index 58e5ad2f43..1899516424 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DefaultExecuteContext.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DefaultExecuteContext.java
@@ -100,7 +100,7 @@ class DefaultExecuteContext extends AbstractConfiguration implements ExecuteCont
/**
* Clean up blobs, clobs and the local configuration.
* BLOBS and CLOBS
+ * BLOBS and CLOBS
*
- *
* [#1544] There exist some corner-cases regarding the {@link SQLOutput} * API, used for UDT serialisation / deserialisation, which have no elegant diff --git a/jOOQ/src/main/java/org/jooq/impl/Executor.java b/jOOQ/src/main/java/org/jooq/impl/Executor.java index 82053e209a..9f102ca2ce 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Executor.java +++ b/jOOQ/src/main/java/org/jooq/impl/Executor.java @@ -4742,11 +4742,14 @@ public class Executor implements Configuration { * batch mode (with bind values). *
* This batch operation can be executed in two modes: - *
+ *
{@link Settings#getStatementType()} == {@link StatementType#PREPARED_STATEMENT}
- * (the default) In this mode, record order is preserved as much as
- * possible, as long as two subsequent records generate the same SQL (with
- * bind variables). The number of executed batch operations corresponds to
+ * (the default)
+ * In this mode, record order is preserved as much as possible, as long as
+ * two subsequent records generate the same SQL (with bind variables). The
+ * number of executed batch operations corresponds to
* [number of distinct rendered SQL statements]. In the worst
* case, this corresponds to the number of total records.
*
@@ -4764,12 +4767,14 @@ public class Executor implements Configuration { *
+ *
{@link Settings#getStatementType()} == {@link StatementType#STATIC_STATEMENT}
- * This mode may be better for large and complex batch store
- * operations, as the order of records is preserved entirely, and jOOQ can
- * guarantee that only a single batch statement is serialised to the
- * database.
+ *
+ * This mode may be better for large and complex batch store operations, as
+ * the order of records is preserved entirely, and jOOQ can guarantee that
+ * only a single batch statement is serialised to the database.
*
* @see Statement#executeBatch()
*/
@@ -4837,16 +4842,20 @@ public class Executor implements Configuration {
public final Batch batchUpdate(Collection extends UpdatableRecord>> records) {
return batchUpdate(records.toArray(new UpdatableRecord[records.size()]));
}
+
/**
* Execute a set of DELETE queries in batch mode (with bind
* values).
*
* This batch operation can be executed in two modes: - *
+ *
{@link Settings#getStatementType()} == {@link StatementType#PREPARED_STATEMENT}
- * (the default) In this mode, record order is preserved as much as
- * possible, as long as two subsequent records generate the same SQL (with
- * bind variables). The number of executed batch operations corresponds to
+ * (the default)
+ * In this mode, record order is preserved as much as possible, as long as
+ * two subsequent records generate the same SQL (with bind variables). The
+ * number of executed batch operations corresponds to
* [number of distinct rendered SQL statements]. In the worst
* case, this corresponds to the number of total records.
*
@@ -4864,12 +4873,14 @@ public class Executor implements Configuration { *
+ *
{@link Settings#getStatementType()} == {@link StatementType#STATIC_STATEMENT}
- * This mode may be better for large and complex batch delete
- * operations, as the order of records is preserved entirely, and jOOQ can
- * guarantee that only a single batch statement is serialised to the
- * database.
+ * + * This mode may be better for large and complex batch delete operations, as + * the order of records is preserved entirely, and jOOQ can guarantee that + * only a single batch statement is serialised to the database. * * @see Statement#executeBatch() */ diff --git a/jOOQ/src/main/java/org/jooq/impl/Factory.java b/jOOQ/src/main/java/org/jooq/impl/Factory.java index 9be9091f50..80b8efb84d 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Factory.java +++ b/jOOQ/src/main/java/org/jooq/impl/Factory.java @@ -160,9 +160,11 @@ import org.jooq.types.DayToSecond; * Condition condition = Factory.exists(Factory.select(...)); * *
- *
Factory. For example:
+ * Factory and static imports
+ *
+ * For increased fluency and readability of your jOOQ client code, it is
+ * recommended that you static import all methods from the Factory.
+ * For example:
* import static org.jooq.impl.Factory.*;
*
* public class Main {