diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java b/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java index b027f6a4bd..45de7885a9 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/AbstractDatabase.java @@ -78,6 +78,7 @@ import org.jooq.Condition; import org.jooq.Configuration; import org.jooq.DSLContext; import org.jooq.ExecuteContext; +import org.jooq.ExecuteListener; import org.jooq.ExecuteListenerProvider; import org.jooq.Field; import org.jooq.Log; @@ -345,10 +346,7 @@ public abstract class AbstractDatabase implements Database { } else { final Settings newSettings = SettingsTools.clone(configuration.settings()).withRenderFormatted(true); - final ExecuteListenerProvider[] oldProviders = configuration.executeListenerProviders(); - final ExecuteListenerProvider[] newProviders = new ExecuteListenerProvider[oldProviders.length + 1]; - System.arraycopy(oldProviders, 0, newProviders, 0, oldProviders.length); - newProviders[oldProviders.length] = new DefaultExecuteListenerProvider(new DefaultExecuteListener() { + final ExecuteListener newListener = new DefaultExecuteListener() { class SQLPerformanceWarning extends Exception {} @@ -449,8 +447,8 @@ public abstract class AbstractDatabase implements Database { private String formatted(Query query) { return DSL.using(configuration.derive(newSettings)).renderInlined(query); } - }); - return DSL.using(configuration.derive(newProviders)); + }; + return DSL.using(configuration.deriveAppending(newListener)); } } diff --git a/jOOQ/src/main/java/org/jooq/Configuration.java b/jOOQ/src/main/java/org/jooq/Configuration.java index 69272b35d2..c61a9f060e 100644 --- a/jOOQ/src/main/java/org/jooq/Configuration.java +++ b/jOOQ/src/main/java/org/jooq/Configuration.java @@ -743,7 +743,7 @@ public interface Configuration extends Serializable { Configuration set(RecordUnmapperProvider newRecordUnmapperProvider); /** - * Change this configuration to hold a new record listeners. + * Change this configuration to hold new record listeners. *
* This will wrap the argument {@link RecordListener} in a * {@link DefaultRecordListenerProvider} for convenience. @@ -759,7 +759,23 @@ public interface Configuration extends Serializable { Configuration set(RecordListener... newRecordListeners); /** - * Change this configuration to hold a new record listener providers. + * Change this configuration by appending new record listeners. + *
+ * This will wrap the argument {@link RecordListener} in a + * {@link DefaultRecordListenerProvider} for convenience. + *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newRecordListeners The appended record listener to be contained in
+ * the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(RecordListener... newRecordListeners);
+
+ /**
+ * Change this configuration to hold new record listener providers.
*
* This method is not thread-safe and should not be used in globally
* available Configuration objects.
@@ -772,7 +788,20 @@ public interface Configuration extends Serializable {
Configuration set(RecordListenerProvider... newRecordListenerProviders);
/**
- * Change this configuration to hold a new execute listeners.
+ * Change this configuration by appending new record listener providers.
+ *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newRecordListenerProviders The appended record listener providers
+ * to be contained in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(RecordListenerProvider... newRecordListenerProviders);
+
+ /**
+ * Change this configuration to hold new execute listeners.
*
* This will wrap the argument {@link ExecuteListener} in a * {@link DefaultExecuteListenerProvider} for convenience. @@ -788,7 +817,23 @@ public interface Configuration extends Serializable { Configuration set(ExecuteListener... newExecuteListeners); /** - * Change this configuration to hold a new execute listener providers. + * Change this configuration by appending new execute listeners. + *
+ * This will wrap the argument {@link ExecuteListener} in a + * {@link DefaultExecuteListenerProvider} for convenience. + *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newExecuteListeners The appended execute listeners to be contained
+ * in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(ExecuteListener... newExecuteListeners);
+
+ /**
+ * Change this configuration to hold new execute listener providers.
*
* This method is not thread-safe and should not be used in globally
* available Configuration objects.
@@ -801,7 +846,20 @@ public interface Configuration extends Serializable {
Configuration set(ExecuteListenerProvider... newExecuteListenerProviders);
/**
- * Change this configuration to hold a new migration listeners.
+ * Change this configuration by appending new execute listener providers.
+ *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newExecuteListenerProviders The appended execute listener
+ * providers to be contained in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(ExecuteListenerProvider... newExecuteListenerProviders);
+
+ /**
+ * Change this configuration to hold new migration listeners.
*
* This will wrap the argument {@link MigrationListener} in a * {@link DefaultMigrationListenerProvider} for convenience. @@ -817,18 +875,48 @@ public interface Configuration extends Serializable { Configuration set(MigrationListener... newMigrationListeners); /** - * Change this configuration to hold a new migration listener providers. + * Change this configuration by appending new migration listeners. + *
+ * This will wrap the argument {@link MigrationListener} in a + * {@link DefaultMigrationListenerProvider} for convenience. *
* This method is not thread-safe and should not be used in globally
* available Configuration objects.
*
- * @param newMigrationListenerProviders The new migration listener providers to
- * be contained in the changed configuration.
+ * @param newMigrationListeners The appended migration listeners to be
+ * contained in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(MigrationListener... newMigrationListeners);
+
+ /**
+ * Change this configuration to hold new migration listener providers.
+ *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newMigrationListenerProviders The new migration listener providers
+ * to be contained in the changed configuration.
* @return The changed configuration.
*/
@NotNull
Configuration set(MigrationListenerProvider... newMigrationListenerProviders);
+ /**
+ * Change this configuration to hold by appending new migration listener
+ * providers.
+ *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newMigrationListenerProviders The appended migration listener
+ * providers to be contained in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(MigrationListenerProvider... newMigrationListenerProviders);
+
/**
* Change this configuration to hold a new visit listeners.
*
@@ -846,20 +934,49 @@ public interface Configuration extends Serializable { Configuration set(VisitListener... newVisitListeners); /** - * Change this configuration to hold a new visit listener providers. + * Change this configuration to hold new visit listeners. + *
+ * This will wrap the argument {@link VisitListener} in a + * {@link DefaultVisitListenerProvider} for convenience. *
* This method is not thread-safe and should not be used in globally
* available Configuration objects.
*
- * @param newVisitListenerProviders The new visit listener providers to
- * be contained in the changed configuration.
+ * @param newVisitListeners The new visit listeners to be contained in the
+ * changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(VisitListener... newVisitListeners);
+
+ /**
+ * Change this configuration to hold new visit listener providers.
+ *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newVisitListenerProviders The new visit listener providers to be
+ * contained in the changed configuration.
* @return The changed configuration.
*/
@NotNull
Configuration set(VisitListenerProvider... newVisitListenerProviders);
/**
- * Change this configuration to hold a new transaction listeners.
+ * Change this configuration by appending new visit listener providers.
+ *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newVisitListenerProviders The appended visit listener providers to
+ * be contained in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(VisitListenerProvider... newVisitListenerProviders);
+
+ /**
+ * Change this configuration to hold new transaction listeners.
*
* This will wrap the argument {@link TransactionListener} in a * {@link DefaultTransactionListenerProvider} for convenience. @@ -875,7 +992,23 @@ public interface Configuration extends Serializable { Configuration set(TransactionListener... newTransactionListeners); /** - * Change this configuration to hold a new transaction listener providers. + * Change this configuration by appending new transaction listeners. + *
+ * This will wrap the argument {@link TransactionListener} in a + * {@link DefaultTransactionListenerProvider} for convenience. + *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newTransactionListeners The appended transaction listeners to be
+ * contained in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(TransactionListener... newTransactionListeners);
+
+ /**
+ * Change this configuration to hold new transaction listener providers.
*
* This method is not thread-safe and should not be used in globally
* available Configuration objects.
@@ -888,7 +1021,21 @@ public interface Configuration extends Serializable {
Configuration set(TransactionListenerProvider... newTransactionListenerProviders);
/**
- * Change this configuration to hold a new diagnostics listeners.
+ * Change this configuration by appending new transaction listener
+ * providers.
+ *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newTransactionListenerProviders The appended transaction listener
+ * providers to be contained in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(TransactionListenerProvider... newTransactionListenerProviders);
+
+ /**
+ * Change this configuration to hold new diagnostics listeners.
*
* This will wrap the argument {@link DiagnosticsListener} in a * {@link DefaultDiagnosticsListenerProvider} for convenience. @@ -903,6 +1050,22 @@ public interface Configuration extends Serializable { @NotNull Configuration set(DiagnosticsListener... newDiagnosticsListeners); + /** + * Change this configuration by appending new diagnostics listeners. + *
+ * This will wrap the argument {@link DiagnosticsListener} in a + * {@link DefaultDiagnosticsListenerProvider} for convenience. + *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newDiagnosticsListeners The new diagnostics listeners to be
+ * contained in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(DiagnosticsListener... newDiagnosticsListeners);
+
/**
* Change this configuration to hold new diagnostics listener providers.
*
@@ -916,6 +1079,20 @@ public interface Configuration extends Serializable { @NotNull Configuration set(DiagnosticsListenerProvider... newDiagnosticsListenerProviders); + /** + * Change this configuration by appending new diagnostics listener + * providers. + *
+ * This method is not thread-safe and should not be used in globally
+ * available Configuration objects.
+ *
+ * @param newDiagnosticsListenerProviders The new diagnostics listener
+ * providers to be contained in the changed configuration.
+ * @return The changed configuration.
+ */
+ @NotNull
+ Configuration setAppending(DiagnosticsListenerProvider... newDiagnosticsListenerProviders);
+
/**
* Change this configuration to hold a new unwrapper.
*
@@ -982,6 +1159,37 @@ public interface Configuration extends Serializable { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1201,17 +1409,42 @@ public interface Configuration extends Serializable { @NotNull Configuration derive(RecordListener... newRecordListeners); + /** + * Create a derived configuration from this one, with appended record + * listeners. + *
+ * This will wrap the argument {@link RecordListener} in a + * {@link DefaultRecordListenerProvider} for convenience. + * + * @param newRecordListeners The appended record listeners to be contained + * in the derived configuration. + * @return The derived configuration. + */ + @NotNull + Configuration deriveAppending(RecordListener... newRecordListeners); + /** * Create a derived configuration from this one, with new record listener * providers. * - * @param newRecordListenerProviders The new record listener providers to - * be contained in the derived configuration. + * @param newRecordListenerProviders The new record listener providers to be + * contained in the derived configuration. * @return The derived configuration. */ @NotNull Configuration derive(RecordListenerProvider... newRecordListenerProviders); + /** + * Create a derived configuration from this one, with appended record + * listener providers. + * + * @param newRecordListenerProviders The appended record listener providers + * to be contained in the derived configuration. + * @return The derived configuration. + */ + @NotNull + Configuration deriveAppending(RecordListenerProvider... newRecordListenerProviders); + /** * Create a derived configuration from this one, with new execute listeners. *
@@ -1225,6 +1458,20 @@ public interface Configuration extends Serializable { @NotNull Configuration derive(ExecuteListener... newExecuteListeners); + /** + * Create a derived configuration from this one, with appended execute + * listeners. + *
+ * This will wrap the argument {@link ExecuteListener} in a + * {@link DefaultExecuteListenerProvider} for convenience. + * + * @param newExecuteListeners The appended execute listener to be contained + * in the derived configuration. + * @return The derived configuration. + */ + @NotNull + Configuration deriveAppending(ExecuteListener... newExecuteListeners); + /** * Create a derived configuration from this one, with new execute listener * providers. @@ -1237,29 +1484,66 @@ public interface Configuration extends Serializable { Configuration derive(ExecuteListenerProvider... newExecuteListenerProviders); /** - * Create a derived configuration from this one, with new migration listeners. + * Create a derived configuration from this one, with appended execute + * listener providers. + * + * @param newExecuteListenerProviders The appended execute listener + * providers to be contained in the derived configuration. + * @return The derived configuration. + */ + @NotNull + Configuration deriveAppending(ExecuteListenerProvider... newExecuteListenerProviders); + + /** + * Create a derived configuration from this one, with new migration + * listeners. *
* This will wrap the argument {@link MigrationListener} in a * {@link DefaultMigrationListenerProvider} for convenience. * - * @param newMigrationListeners The new migration listener to be contained in - * the derived configuration. + * @param newMigrationListeners The new migration listener to be contained + * in the derived configuration. * @return The derived configuration. */ @NotNull Configuration derive(MigrationListener... newMigrationListeners); + /** + * Create a derived configuration from this one, with appended migration + * listeners. + *
+ * This will wrap the argument {@link MigrationListener} in a + * {@link DefaultMigrationListenerProvider} for convenience. + * + * @param newMigrationListeners The appended migration listener to be + * contained in the derived configuration. + * @return The derived configuration. + */ + @NotNull + Configuration deriveAppending(MigrationListener... newMigrationListeners); + /** * Create a derived configuration from this one, with new migration listener * providers. * - * @param newMigrationListenerProviders The new migration listener providers to - * be contained in the derived configuration. + * @param newMigrationListenerProviders The new migration listener providers + * to be contained in the derived configuration. * @return The derived configuration. */ @NotNull Configuration derive(MigrationListenerProvider... newMigrationListenerProviders); + /** + * Create a derived configuration from this one, with appended migration + * listener providers. + * + * @param newMigrationListenerProviders The appended migration listener + * providers to be contained in the derived configuration. + * @return The derived configuration. + */ + @NotNull + Configuration deriveAppending(MigrationListenerProvider... newMigrationListenerProviders); + /** * Create a derived configuration from this one, with new visit listeners. *
@@ -1273,6 +1557,20 @@ public interface Configuration extends Serializable { @NotNull Configuration derive(VisitListener... newVisitListeners); + /** + * Create a derived configuration from this one, with appended visit + * listeners. + *
+ * This will wrap the argument {@link VisitListener} in a + * {@link DefaultVisitListenerProvider} for convenience. + * + * @param newVisitListeners The appended visit listeners to be contained in + * the derived configuration. + * @return The derived configuration. + */ + @NotNull + Configuration deriveAppending(VisitListener... newVisitListeners); + /** * Create a derived configuration from this one, with new visit listener * providers. @@ -1284,6 +1582,17 @@ public interface Configuration extends Serializable { @NotNull Configuration derive(VisitListenerProvider... newVisitListenerProviders); + /** + * Create a derived configuration from this one, with appended visit + * listener providers. + * + * @param newVisitListenerProviders The appended visit listener providers to + * be contained in the derived configuration. + * @return The derived configuration. + */ + @NotNull + Configuration deriveAppending(VisitListenerProvider... newVisitListenerProviders); + /** * Create a derived configuration from this one, with new transaction * listeners. @@ -1298,6 +1607,20 @@ public interface Configuration extends Serializable { @NotNull Configuration derive(TransactionListener... newTransactionListeners); + /** + * Create a derived configuration from this one, with appended transaction + * listeners. + *
+ * This will wrap the argument {@link TransactionListener} in a
+ * {@link DefaultTransactionListenerProvider} for convenience.
+ *
+ * @param newTransactionListeners The appended transaction listeners to be
+ * contained in the derived configuration.
+ * @return The derived configuration.
+ */
+ @NotNull
+ Configuration deriveAppending(TransactionListener... newTransactionListeners);
+
/**
* Create a derived configuration from this one, with new transaction
* listener providers.
@@ -1309,6 +1632,17 @@ public interface Configuration extends Serializable {
@NotNull
Configuration derive(TransactionListenerProvider... newTransactionListenerProviders);
+ /**
+ * Create a derived configuration from this one, with appended transaction
+ * listener providers.
+ *
+ * @param newTransactionListenerProviders The appended transaction listener
+ * providers to be contained in the derived configuration.
+ * @return The derived configuration.
+ */
+ @NotNull
+ Configuration deriveAppending(TransactionListenerProvider... newTransactionListenerProviders);
+
/**
* Create a derived configuration from this one, with new diagnostics
* listeners.
@@ -1320,6 +1654,17 @@ public interface Configuration extends Serializable {
@NotNull
Configuration derive(DiagnosticsListener... newDiagnosticsListeners);
+ /**
+ * Create a derived configuration from this one, with appended diagnostics
+ * listeners.
+ *
+ * @param newDiagnosticsListeners The appended diagnostics listeners to be
+ * contained in the derived configuration.
+ * @return The derived configuration.
+ */
+ @NotNull
+ Configuration deriveAppending(DiagnosticsListener... newDiagnosticsListeners);
+
/**
* Create a derived configuration from this one, with new diagnostics
* listener providers.
@@ -1331,6 +1676,17 @@ public interface Configuration extends Serializable {
@NotNull
Configuration derive(DiagnosticsListenerProvider... newDiagnosticsListenerProviders);
+ /**
+ * Create a derived configuration from this one, with appended diagnostics
+ * listener providers.
+ *
+ * @param newDiagnosticsListenerProviders The appended diagnostics listener
+ * providers to be contained in the derived configuration.
+ * @return The derived configuration.
+ */
+ @NotNull
+ Configuration deriveAppending(DiagnosticsListenerProvider... newDiagnosticsListenerProviders);
+
/**
* Create a derived configuration from this one, with a new unwrapper.
*
@@ -1393,6 +1749,30 @@ public interface Configuration extends Serializable {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractConfiguration.java b/jOOQ/src/main/java/org/jooq/impl/AbstractConfiguration.java
new file mode 100644
index 0000000000..1530e20ed4
--- /dev/null
+++ b/jOOQ/src/main/java/org/jooq/impl/AbstractConfiguration.java
@@ -0,0 +1,296 @@
+/*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Other licenses:
+ * -----------------------------------------------------------------------------
+ * Commercial licenses for this work are available. These replace the above
+ * ASL 2.0 and offer limited warranties, support, maintenance, and commercial
+ * database integrations.
+ *
+ * For more information, please visit: http://www.jooq.org/licenses
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+package org.jooq.impl;
+
+import static org.jooq.impl.Tools.combine;
+
+import org.jooq.Configuration;
+import org.jooq.DiagnosticsListener;
+import org.jooq.DiagnosticsListenerProvider;
+import org.jooq.ExecuteListener;
+import org.jooq.ExecuteListenerProvider;
+import org.jooq.MigrationListener;
+import org.jooq.MigrationListenerProvider;
+// ...
+// ...
+// ...
+import org.jooq.RecordListener;
+import org.jooq.RecordListenerProvider;
+import org.jooq.TransactionListener;
+import org.jooq.TransactionListenerProvider;
+import org.jooq.VisitListener;
+import org.jooq.VisitListenerProvider;
+
+/**
+ * A base implementation for {@link Configuration} classes, implementing the
+ * usual convenience API.
+ *
+ * @author Lukas Eder
+ */
+public abstract class AbstractConfiguration implements Configuration {
+
+ /**
+ * Generated UID
+ */
+ private static final long serialVersionUID = 4192586780235493065L;
+
+ @Override
+ public final Configuration set(RecordListener... newRecordListeners) {
+ return set(DefaultRecordListenerProvider.providers(newRecordListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(RecordListener... newRecordListeners) {
+ return setAppending(DefaultRecordListenerProvider.providers(newRecordListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(RecordListenerProvider... newRecordListenerProviders) {
+ return set(combine(recordListenerProviders(), newRecordListenerProviders));
+ }
+
+ @Override
+ public final Configuration set(ExecuteListener... newExecuteListeners) {
+ return set(DefaultExecuteListenerProvider.providers(newExecuteListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(ExecuteListener... newExecuteListeners) {
+ return setAppending(DefaultExecuteListenerProvider.providers(newExecuteListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(ExecuteListenerProvider... newExecuteListenerProviders) {
+ return set(combine(executeListenerProviders(), newExecuteListenerProviders));
+ }
+
+ @Override
+ public final Configuration set(MigrationListener... newMigrationListeners) {
+ return set(DefaultMigrationListenerProvider.providers(newMigrationListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(MigrationListener... newMigrationListeners) {
+ return setAppending(DefaultMigrationListenerProvider.providers(newMigrationListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(MigrationListenerProvider... newMigrationListenerProviders) {
+ return set(combine(migrationListenerProviders(), newMigrationListenerProviders));
+ }
+
+ @Override
+ public final Configuration set(VisitListener... newVisitListeners) {
+ return set(DefaultVisitListenerProvider.providers(newVisitListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(VisitListener... newVisitListeners) {
+ return setAppending(DefaultVisitListenerProvider.providers(newVisitListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(VisitListenerProvider... newVisitListenerProviders) {
+ return set(combine(visitListenerProviders(), newVisitListenerProviders));
+ }
+
+ @Override
+ public final Configuration set(TransactionListener... newTransactionListeners) {
+ return set(DefaultTransactionListenerProvider.providers(newTransactionListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(TransactionListener... newTransactionListeners) {
+ return setAppending(DefaultTransactionListenerProvider.providers(newTransactionListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(TransactionListenerProvider... newTransactionListenerProviders) {
+ return set(combine(transactionListenerProviders(), newTransactionListenerProviders));
+ }
+
+ @Override
+ public final Configuration set(DiagnosticsListener... newDiagnosticsListeners) {
+ return set(DefaultDiagnosticsListenerProvider.providers(newDiagnosticsListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(DiagnosticsListener... newDiagnosticsListeners) {
+ return setAppending(DefaultDiagnosticsListenerProvider.providers(newDiagnosticsListeners));
+ }
+
+ @Override
+ public final Configuration setAppending(DiagnosticsListenerProvider... newDiagnosticsListenerProviders) {
+ return set(combine(diagnosticsListenerProviders(), newDiagnosticsListenerProviders));
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @Override
+ public final Configuration derive(RecordListener... newRecordListeners) {
+ return derive(DefaultRecordListenerProvider.providers(newRecordListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(RecordListener... newRecordListeners) {
+ return deriveAppending(DefaultRecordListenerProvider.providers(newRecordListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(RecordListenerProvider... newRecordListenerProviders) {
+ return derive(combine(recordListenerProviders(), newRecordListenerProviders));
+ }
+
+ @Override
+ public final Configuration derive(ExecuteListener... newExecuteListeners) {
+ return derive(DefaultExecuteListenerProvider.providers(newExecuteListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(ExecuteListener... newExecuteListeners) {
+ return deriveAppending(DefaultExecuteListenerProvider.providers(newExecuteListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(ExecuteListenerProvider... newExecuteListenerProviders) {
+ return derive(combine(executeListenerProviders(), newExecuteListenerProviders));
+ }
+
+ @Override
+ public final Configuration derive(MigrationListener... newMigrationListeners) {
+ return derive(DefaultMigrationListenerProvider.providers(newMigrationListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(MigrationListener... newMigrationListeners) {
+ return deriveAppending(DefaultMigrationListenerProvider.providers(newMigrationListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(MigrationListenerProvider... newMigrationListenerProviders) {
+ return derive(combine(migrationListenerProviders(), newMigrationListenerProviders));
+ }
+
+ @Override
+ public final Configuration derive(VisitListener... newVisitListeners) {
+ return derive(DefaultVisitListenerProvider.providers(newVisitListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(VisitListener... newVisitListeners) {
+ return deriveAppending(DefaultVisitListenerProvider.providers(newVisitListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(VisitListenerProvider... newVisitListenerProviders) {
+ return derive(combine(visitListenerProviders(), newVisitListenerProviders));
+ }
+
+ @Override
+ public final Configuration derive(TransactionListener... newTransactionListeners) {
+ return derive(DefaultTransactionListenerProvider.providers(newTransactionListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(TransactionListener... newTransactionListeners) {
+ return deriveAppending(DefaultTransactionListenerProvider.providers(newTransactionListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(TransactionListenerProvider... newTransactionListenerProviders) {
+ return derive(combine(transactionListenerProviders(), newTransactionListenerProviders));
+ }
+
+ @Override
+ public final Configuration derive(DiagnosticsListener... newDiagnosticsListeners) {
+ return derive(DefaultDiagnosticsListenerProvider.providers(newDiagnosticsListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(DiagnosticsListener... newDiagnosticsListeners) {
+ return deriveAppending(DefaultDiagnosticsListenerProvider.providers(newDiagnosticsListeners));
+ }
+
+ @Override
+ public final Configuration deriveAppending(DiagnosticsListenerProvider... newDiagnosticsListenerProviders) {
+ return derive(combine(diagnosticsListenerProviders(), newDiagnosticsListenerProviders));
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/jOOQ/src/main/java/org/jooq/impl/BatchCRUD.java b/jOOQ/src/main/java/org/jooq/impl/BatchCRUD.java
index ef08bfdf2f..737f5ae73a 100644
--- a/jOOQ/src/main/java/org/jooq/impl/BatchCRUD.java
+++ b/jOOQ/src/main/java/org/jooq/impl/BatchCRUD.java
@@ -96,10 +96,7 @@ final class BatchCRUD extends AbstractBatch {
QueryCollector collector = new QueryCollector();
// Add the QueryCollector to intercept query execution after rendering
- Configuration local = configuration.derive(Tools.combine(
- configuration.executeListenerProviders(),
- new DefaultExecuteListenerProvider(collector)
- ));
+ Configuration local = configuration.deriveAppending(collector);
// [#1537] Communicate with UpdatableRecordImpl
local.data(DATA_OMIT_RETURNING_CLAUSE, true);
@@ -153,11 +150,7 @@ final class BatchCRUD extends AbstractBatch {
private final int[] executeStatic() {
List