Configuration configures a DSLContext, providing it
with information for query rendering and execution.
A Configuration wraps all information elements that are
needed...
RenderContext to render Query objects and
QueryPartsBindContext to bind values to Query objects and
QueryPartsQuery or Routine object to execute themselves
A Configuration is composed of types composing its state and of
SPIs:
dialect(): The SQLDialect that defines the underlying
database's behaviour when generating SQL syntax, or bind variables, or when
executing the querysettings(): The Settings that define general jOOQ
behaviourdata(): A Map containing user-defined data for the
Scope of this configuration.connectionProvider(): The ConnectionProvider that
defines the semantics of ConnectionProvider#acquire() and
ConnectionProvider#release(Connection) for all queries executed in
the context of this Configuration. DefaultConnectionProvider: a non-thread-safe implementation that
wraps a single JDBC Connection. Ideal for batch processing.DataSourceConnectionProvider: a possibly thread-safe
implementation that wraps a JDBC DataSource. Ideal for use with
connection pools, Java EE, or Spring.executeListenerProviders(): A set of
ExecuteListenerProvider that implement Query execution
lifecycle management.LoggerListener: generating default query execution log output
(active by default)StopWatchListener: generating default query execution speed log
output (inactive by default)executorProvider(): A provider for an Executor, which is
used by default, in the absence of an explicit executor, to execute
asynchronous logic throughout the jOOQ API, such as for example
ResultQuery#fetchAsync().metaProvider(): A provider for the DSLContext#meta()
object which is used to look up database meta data from various jOOQ APIs,
such as for example the DSLContext#parser().migrationListenerProviders(): A set of
MigrationListenerProvider that allow for listening to the database
migration lifecycle.recordListenerProviders(): A set of
RecordListenerProvider that implement Record fetching and
storing lifecycle management, specifically for use with
UpdatableRecord.recordMapperProvider(): The RecordMapperProvider that
defines and implements the behaviour of Record#into(Class),
ResultQuery#fetchInto(Class), Cursor#fetchInto(Class), and
various related methods. DefaultRecordMapperProvider: an implementation delegating to the
DefaultRecordMapper, which implements the most common mapping
use-cases.recordUnmapperProvider(): The inverse of the
recordMapperProvider() that allows to implement the behaviour of
Record#from(Object), and various related methods.transactionProvider(): The TransactionProvider that
defines and implements the behaviour of the
DSLContext#transaction(TransactionalRunnable) and
DSLContext#transactionResult(TransactionalCallable) methods.DefaultTransactionProvider: an implementation backed by JDBC
directly, via Connection#commit(), Connection#rollback(), and
Connection#rollback(Savepoint) for nested transactions.unwrapperProvider(): An UnwrapperProvider that allows
for injecting custom JDBC Wrapper#unwrap(Class) behaviour.visitListenerProviders(): A set of VisitListenerProvider
that implement Query rendering and variable binding lifecycle
management, and that are allowed to implement query transformation - e.g. to
implement row-level security, or multi-tenancy.
The simplest usage of a Configuration instance is to use it
exactly for a single Query execution, disposing it immediately.
This will make it very simple to implement thread-safe behaviour, but
reflection caches will not be used optimally, e.g. when using
DefaultRecordMapper.
At the same time, jOOQ does not require Configuration instances
to be that short-lived. Thread-safety will then be delegated to component
objects, such as the ConnectionProvider, the ExecuteListener
list, etc.
For a Configuration to be used in a thread safe way, all
set() methods must be avoided post initialisation, and
settings() must not be modified either. If you wish to create a
derived configuration for local usage, with some configuration parts changed,
use the various derive() methods, instead.
| Modifier and Type | Method and Description |
|---|---|
| public @NotNull CacheProvider | |
| public @NotNull CharsetProvider | |
| public @NotNull Clock | |
| public default boolean | |
| public boolean | commercial(Supplier<String> logMessage)
Whether this is a commercial edition of jOOQ, logging a warning message, if not. |
| public @NotNull CommitProvider | |
| public @NotNull ConnectionFactory | |
| public @NotNull ConnectionProvider | |
| public @NotNull ConverterProvider | |
| public @NotNull Map | |
| public @Nullable Object | |
| public @Nullable Object | |
| public @NotNull Configuration | Returns: The derived configuration.Create a derived configuration from this one, without changing any properties. |
| public @NotNull Configuration | |
| public @NotNull Configuration | Returns: The derived configuration.The new connection to be contained in the derived
configuration. newConnection)Create a derived configuration from this one, with a new connection
wrapped in a |
| public @NotNull Configuration | Returns: The derived configuration.The new data source to be contained in the derived
configuration. newDataSource)Create a derived configuration from this one, with a new data source
wrapped in a |
| public @NotNull Configuration | Returns: The derived configuration.The new connection factory to be contained in
the derived configuration. newConnectionFactory)Create a derived configuration from this one, with a new R2DBC connection factory. |
| public @NotNull Configuration | Returns: The derived configuration.The new connection provider to be contained
in the derived configuration. newConnectionProvider)Create a derived configuration from this one, with a new connection provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new meta provider to be contained in the
derived configuration. newMetaProvider)Create a derived configuration from this one, with a new meta provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new commit provider to be contained in the
derived configuration. newCommitProvider)Create a derived configuration from this one, with a new commit provider. |
| public @NotNull Configuration | |
| public @NotNull Configuration | Returns: The derived configuration.The new executor provider to be contained in
the derived configuration. newExecutorProvider)Create a derived configuration from this one, with a new executor provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new cache provider to be contained in the
derived configuration. newCacheProvider)Create a derived configuration from this one, with a new cache provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new transaction provider to be
contained in the derived configuration. newTransactionProvider)Create a derived configuration from this one, with a new transaction provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new record mapper to be contained in the
derived configuration. newRecordMapper)Create a derived configuration from this one, with a new record mapper. |
| public @NotNull Configuration | Returns: The derived configuration.The new record mapper provider to be
contained in the derived configuration. newRecordMapperProvider)Create a derived configuration from this one, with a new record mapper provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new record unmapper to be contained in the
derived configuration. newRecordUnmapper)Create a derived configuration from this one, with a new record unmapper. |
| public @NotNull Configuration | Returns: The derived configuration.The new record unmapper provider to be
contained in the derived configuration. newRecordUnmapperProvider)Create a derived configuration from this one, with a new record unmapper provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new record listeners to be contained in the
derived configuration. newRecordListeners)Create a derived configuration from this one, with new record listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The new record listener providers to be
contained in the derived configuration. newRecordListenerProviders)Create a derived configuration from this one, with new record listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The new execute listener to be contained in
the derived configuration. newExecuteListeners)Create a derived configuration from this one, with new execute listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The new execute listener providers to
be contained in the derived configuration. newExecuteListenerProviders)Create a derived configuration from this one, with new execute listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The new migration listener to be contained
in the derived configuration. newMigrationListeners)Create a derived configuration from this one, with new migration listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The new migration listener providers
to be contained in the derived configuration. newMigrationListenerProviders)Create a derived configuration from this one, with new migration listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The new visit listeners to be contained in the
derived configuration. newVisitListeners)Create a derived configuration from this one, with new visit listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The new visit listener providers to
be contained in the derived configuration. newVisitListenerProviders)Create a derived configuration from this one, with new visit listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The new transaction listeners to be
contained in the derived configuration. newTransactionListeners)Create a derived configuration from this one, with new transaction listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The new transaction listener
providers to be contained in the derived configuration. newTransactionListenerProviders)Create a derived configuration from this one, with new transaction listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The new diagnostics listeners to be
contained in the derived configuration. newDiagnosticsListeners)Create a derived configuration from this one, with new diagnostics listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The new diagnostics listener
providers to be contained in the derived configuration. newDiagnosticsListenerProviders)Create a derived configuration from this one, with new diagnostics listener providers. |
| public @NotNull Configuration | |
| public @NotNull Configuration | Returns: The derived configuration.The new unwrapper provider to be contained in
the derived configuration. newUnwrapperProvider)Create a derived configuration from this one, with a new unwrapper provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new charset provider to be contained in
the derived configuration. newCharsetProvider)Create a derived configuration from this one, with a new charset provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new converter provider to be contained in
the derived configuration. newConverterProvider)Create a derived configuration from this one, with new converter provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new formatting provider to be contained
in the derived configuration. newFormattingProvider)Create a derived configuration from this one, with new formatting provider. |
| public @NotNull Configuration | Returns: The derived configuration.The new dialect to be contained in the derived
configuration. newDialect)Create a derived configuration from this one, with a new dialect. |
| public @NotNull Configuration | |
| public @NotNull Configuration | Returns: The derived configuration.The appended record listeners to be contained
in the derived configuration. newRecordListeners)Create a derived configuration from this one, with appended record listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The appended record listener providers
to be contained in the derived configuration. newRecordListenerProviders)Create a derived configuration from this one, with appended record listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The appended execute listener to be contained
in the derived configuration. newExecuteListeners)Create a derived configuration from this one, with appended execute listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The appended execute listener
providers to be contained in the derived configuration. newExecuteListenerProviders)Create a derived configuration from this one, with appended execute listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The appended migration listener to be
contained in the derived configuration. newMigrationListeners)Create a derived configuration from this one, with appended migration listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The appended migration listener
providers to be contained in the derived configuration. newMigrationListenerProviders)Create a derived configuration from this one, with appended migration listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The appended visit listeners to be contained in
the derived configuration. newVisitListeners)Create a derived configuration from this one, with appended visit listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The appended visit listener providers to
be contained in the derived configuration. newVisitListenerProviders)Create a derived configuration from this one, with appended visit listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The appended transaction listeners to be
contained in the derived configuration. newTransactionListeners)Create a derived configuration from this one, with appended transaction listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The appended transaction listener
providers to be contained in the derived configuration. newTransactionListenerProviders)Create a derived configuration from this one, with appended transaction listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.The appended diagnostics listeners to be
contained in the derived configuration. newDiagnosticsListeners)Create a derived configuration from this one, with appended diagnostics listeners. |
| public @NotNull Configuration | Returns: The derived configuration.The appended diagnostics listener
providers to be contained in the derived configuration. newDiagnosticsListenerProviders)Create a derived configuration from this one, with appended diagnostics listener providers. |
| public @NotNull Configuration | Returns: The derived configuration.A function producing the new settings to be contained
in the derived configuration based on a clone of the current
settings. newSettings)Create a derived configuration from this one, with new settings constructed from a clone of the current settings. |
| public @NotNull @NotNull DiagnosticsListenerProvider[] | diagnosticsListenerProviders()
Get the configured |
| public @NotNull SQLDialect | |
| public @NotNull DSLContext | dsl()
Wrap this |
| public @NotNull @NotNull ExecuteListenerProvider[] | Returns: The configured set of execute listeners.Get the configured |
| public @NotNull ExecutorProvider | |
| public @NotNull SQLDialect | |
| public @NotNull FormattingProvider | |
| public @NotNull ConnectionProvider | interpreterConnectionProvider()
Get this configuration's underlying interpreter connection provider, which provides connections for DDL interpretation. |
| public @NotNull MetaProvider | |
| public @NotNull @NotNull MigrationListenerProvider[] | Returns: The configured set of migration listeners.Get the configured |
| public @NotNull @NotNull RecordListenerProvider[] | Returns: The configured set of record listeners.Get the configured |
| public @NotNull RecordMapperProvider | |
| public @NotNull RecordUnmapperProvider | |
| public boolean | requireCommercial(Supplier<String> logMessage)
Whether this is a commercial edition of jOOQ, throwing an exception with a message, if not. |
| public @NotNull SchemaMapping | schemaMapping()
Deprecated
for removal since 2.0. - 2.0.5 - Use
Retrieve the configured schema mapping.
settings() instead
|
| public @NotNull Configuration | |
| public @NotNull Configuration | Returns: The changed configuration.The new connection provider to be contained
in the changed configuration. newConnectionProvider)Change this configuration to hold a new connection provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new meta provider to be contained in the
changed configuration. newMetaProvider)Change this configuration to hold a new meta provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new commit provider to be contained in the
changed configuration. newCommitProvider)Change this configuration to hold a new commit provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new executor provider to be contained in
the changed configuration. newExecutorProvider)Change this configuration to hold a new executor provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new cache provider to be contained in the
changed configuration. newCacheProvider)Change this configuration to hold a new cache provider. |
| public @NotNull Configuration | |
| public @NotNull Configuration | Returns: The changed configuration.The new connection to be contained in the changed
configuration. newConnection)Change this configuration to hold a new connection wrapped in a
|
| public @NotNull Configuration | Returns: The changed configuration.The new data source to be contained in the changed
configuration. newDataSource)Change this configuration to hold a new data source wrapped in a
|
| public @NotNull Configuration | Returns: The changed configuration.The new connection to be contained in the changed
configuration. newConnectionFactory)Change this configuration to hold a new R2DBC connection factory. |
| public @NotNull Configuration | Returns: The changed configuration.The new transaction provider to be
contained in the changed configuration. newTransactionProvider)Change this configuration to hold a new transaction provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new record mapper to be contained in the
changed configuration. newRecordMapper)Change this configuration to hold a new record mapper. |
| public @NotNull Configuration | Returns: The changed configuration.The new record mapper provider to be
contained in the changed configuration. newRecordMapperProvider)Change this configuration to hold a new record mapper provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new record unmapper to be contained in the
changed configuration. newRecordUnmapper)Change this configuration to hold a new record unmapper. |
| public @NotNull Configuration | Returns: The changed configuration.The new record unmapper provider to be
contained in the changed configuration. newRecordUnmapperProvider)Change this configuration to hold a new record unmapper provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new record listener to be contained
in the changed configuration. newRecordListeners)Change this configuration to hold new record listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The new record listener providers to
be contained in the changed configuration. newRecordListenerProviders)Change this configuration to hold new record listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The new execute listeners to be contained in
the changed configuration. newExecuteListeners)Change this configuration to hold new execute listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The new execute listener providers to
be contained in the changed configuration. newExecuteListenerProviders)Change this configuration to hold new execute listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The new migration listeners to be contained
in the changed configuration. newMigrationListeners)Change this configuration to hold new migration listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The new migration listener providers
to be contained in the changed configuration. newMigrationListenerProviders)Change this configuration to hold new migration listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The new visit listeners to be contained
in the changed configuration. newVisitListeners)Change this configuration to hold a new visit listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The new visit listener providers to be
contained in the changed configuration. newVisitListenerProviders)Change this configuration to hold new visit listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The new transaction listeners to be
contained in the changed configuration. newTransactionListeners)Change this configuration to hold new transaction listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The new transaction listener
providers to be contained in the changed configuration. newTransactionListenerProviders)Change this configuration to hold new transaction listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The new diagnostics listeners to be
contained in the changed configuration. newDiagnosticsListeners)Change this configuration to hold new diagnostics listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The new diagnostics listener
providers to be contained in the changed configuration. newDiagnosticsListenerProviders)Change this configuration to hold new diagnostics listener providers. |
| public @NotNull Configuration | |
| public @NotNull Configuration | Returns: The changed configuration.The new unwrapper provider to be contained in
the changed configuration. newUnwrapperProvider)Change this configuration to hold a new unwrapper provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new charset provider to be contained in
the changed configuration. newCharsetProvider)Change this configuration to hold a new charset provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new converter provider to be contained in
the changed configuration. newConverterProvider)Change this configuration to hold a new converter provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new formatting provider to be contained
in the changed configuration. newFormattingProvider)Change this configuration to hold a new formatting provider. |
| public @NotNull Configuration | Returns: The changed configuration.The new dialect to be contained in the changed
configuration. newDialect)Change this configuration to hold a new dialect. |
| public @NotNull Configuration | |
| public @NotNull Configuration | Returns: The changed configuration.The appended record listener to be contained in
the changed configuration. newRecordListeners)Change this configuration by appending new record listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The appended record listener providers
to be contained in the changed configuration. newRecordListenerProviders)Change this configuration by appending new record listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The appended execute listeners to be contained
in the changed configuration. newExecuteListeners)Change this configuration by appending new execute listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The appended execute listener
providers to be contained in the changed configuration. newExecuteListenerProviders)Change this configuration by appending new execute listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The appended migration listeners to be
contained in the changed configuration. newMigrationListeners)Change this configuration by appending new migration listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The appended migration listener
providers to be contained in the changed configuration. newMigrationListenerProviders)Change this configuration to hold by appending new migration listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The new visit listeners to be contained in the
changed configuration. newVisitListeners)Change this configuration to hold new visit listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The appended visit listener providers to
be contained in the changed configuration. newVisitListenerProviders)Change this configuration by appending new visit listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The appended transaction listeners to be
contained in the changed configuration. newTransactionListeners)Change this configuration by appending new transaction listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The appended transaction listener
providers to be contained in the changed configuration. newTransactionListenerProviders)Change this configuration by appending new transaction listener providers. |
| public @NotNull Configuration | Returns: The changed configuration.The new diagnostics listeners to be
contained in the changed configuration. newDiagnosticsListeners)Change this configuration by appending new diagnostics listeners. |
| public @NotNull Configuration | Returns: The changed configuration.The new diagnostics listener
providers to be contained in the changed configuration. newDiagnosticsListenerProviders)Change this configuration by appending new diagnostics listener providers. |
| public @NotNull Settings | |
| public @NotNull ConnectionProvider | systemConnectionProvider()
Get this configuration's underlying system connection provider, which provides connections for system tasks. |
| public @NotNull @NotNull TransactionListenerProvider[] | transactionListenerProviders()
Get the configured |
| public @NotNull TransactionProvider | |
| public @NotNull UnwrapperProvider | |
| public @NotNull @NotNull VisitListenerProvider[] | Returns: The configured set of visit listeners.Get the configured |