-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultConfiguration
,MockConfiguration
public interface Configuration extends Serializable
AConfiguration
configures aDSLContext
, providing it with information for query rendering and execution.A
Configuration
wraps all information elements that are needed...- by a
RenderContext
to renderQuery
objects andQueryPart
s - by a
BindContext
to bind values toQuery
objects andQueryPart
s - by a
Query
orRoutine
object to execute themselves
The simplest usage of a
Configuration
instance is to use it exactly for a singleQuery
execution, disposing it immediately. This will make it very simple to implement thread-safe behaviour.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 theConnectionProvider
, theExecuteListener
list, etc.A
Configuration
is composed of types composing its state and of SPIs:Types composing its state:
dialect()
: TheSQLDialect
that defines the underlying database's behaviour when generating SQL syntax, or bind variables, or when executing the querysettings()
: TheSettings
that define general jOOQ behaviourdata()
: AMap
containing user-defined data for theScope
of this configuration.
SPIs:
connectionProvider()
: TheConnectionProvider
that defines the semantics ofConnectionProvider.acquire()
andConnectionProvider.release(Connection)
for all queries executed in the context of thisConfiguration
.
jOOQ-provided default implementations include:DefaultConnectionProvider
: a non-thread-safe implementation that wraps a single JDBCConnection
. Ideal for batch processing.DataSourceConnectionProvider
: a possibly thread-safe implementation that wraps a JDBCDataSource
. Ideal for use with connection pools, Java EE, or Spring.
executeListenerProviders()
: A set ofExecuteListenerProvider
that implementQuery
execution lifecycle management.
jOOQ-provided example implementations include: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 anExecutor
, which is used by default, in the absence of an explicit executor, to execute asynchronous logic throughout the jOOQ API, such as for exampleResultQuery.fetchAsync()
.metaProvider()
: A provider for theDSLContext.meta()
object which is used to look up database meta data from various jOOQ APIs, such as for example theDSLContext.parser()
.migrationListenerProviders()
: A set ofMigrationListenerProvider
that allow for listening to the database migration lifecycle.recordListenerProviders()
: A set ofRecordListenerProvider
that implementRecord
fetching and storing lifecycle management, specifically for use withUpdatableRecord
.
jOOQ does not provide any implementations.recordMapperProvider()
: TheRecordMapperProvider
that defines and implements the behaviour ofRecord.into(Class)
,ResultQuery.fetchInto(Class)
,Cursor.fetchInto(Class)
, and various related methods.
jOOQ-provided default implementations include:DefaultRecordMapperProvider
: an implementation delegating to theDefaultRecordMapper
, which implements the most common mapping use-cases.
recordUnmapperProvider()
: The inverse of therecordMapperProvider()
that allows to implement the behaviour ofRecord.from(Object)
, and various related methods.transactionProvider()
: TheTransactionProvider
that defines and implements the behaviour of theDSLContext.transaction(TransactionalRunnable)
andDSLContext.transactionResult(TransactionalCallable)
methods.
jOOQ-provided default implementations include:DefaultTransactionProvider
: an implementation backed by JDBC directly, viaConnection.commit()
,Connection.rollback()
, andConnection.rollback(Savepoint)
for nested transactions.
unwrapperProvider()
: AnUnwrapperProvider
that allows for injecting custom JDBCWrapper.unwrap(Class)
behaviour.visitListenerProviders()
: A set ofVisitListenerProvider
that implementQuery
rendering and variable binding lifecycle management, and that are allowed to implement query transformation - e.g. to implement row-level security, or multi-tenancy.
jOOQ does not provide any implementations.
- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Clock
clock()
Get this configuration'sClock
, which is used for optimistic locking, transaction time, and other time-depending features.ConnectionProvider
connectionProvider()
Get this configuration's underlying connection provider.ConverterProvider
converterProvider()
Deprecated.- This API is still EXPERIMENTAL.Map<Object,Object>
data()
Get all custom data from thisConfiguration
.Object
data(Object key)
Get some custom data from thisConfiguration
.Object
data(Object key, Object value)
Set some custom data to thisConfiguration
.Configuration
derive()
Create a derived configuration from this one, without changing any properties.Configuration
derive(Connection newConnection)
Create a derived configuration from this one, with a new connection wrapped in aDefaultConnectionProvider
.Configuration
derive(Clock newClock)
Create a derived configuration from this one, with a newClock
.Configuration
derive(Executor newExecutor)
Create a derived configuration from this one, with a new executor.Configuration
derive(DataSource newDataSource)
Create a derived configuration from this one, with a new data source wrapped in aDataSourceConnectionProvider
.Configuration
derive(Settings newSettings)
Create a derived configuration from this one, with new settings.Configuration
derive(ConnectionProvider newConnectionProvider)
Create a derived configuration from this one, with a new connection provider.Configuration
derive(ConverterProvider newConverterProvider)
Deprecated.- This API is still EXPERIMENTAL.Configuration
derive(DiagnosticsListener... newDiagnosticsListeners)
Create a derived configuration from this one, with new diagnostics listeners.Configuration
derive(DiagnosticsListenerProvider... newDiagnosticsListenerProviders)
Create a derived configuration from this one, with new diagnostics listener providers.Configuration
derive(ExecuteListener... newExecuteListeners)
Create a derived configuration from this one, with new execute listeners.Configuration
derive(ExecuteListenerProvider... newExecuteListenerProviders)
Create a derived configuration from this one, with new execute listener providers.Configuration
derive(ExecutorProvider newExecutorProvider)
Create a derived configuration from this one, with a new executor provider.Configuration
derive(MetaProvider newMetaProvider)
Create a derived configuration from this one, with a new meta provider.Configuration
derive(MigrationListener... newMigrationListeners)
Create a derived configuration from this one, with new migration listeners.Configuration
derive(MigrationListenerProvider... newMigrationListenerProviders)
Create a derived configuration from this one, with new migration listener providers.Configuration
derive(RecordListener... newRecordListeners)
Create a derived configuration from this one, with new record listeners.Configuration
derive(RecordListenerProvider... newRecordListenerProviders)
Create a derived configuration from this one, with new record listener providers.Configuration
derive(RecordMapper<?,?> newRecordMapper)
Create a derived configuration from this one, with a new record mapper.Configuration
derive(RecordMapperProvider newRecordMapperProvider)
Create a derived configuration from this one, with a new record mapper provider.Configuration
derive(RecordUnmapper<?,?> newRecordUnmapper)
Create a derived configuration from this one, with a new record unmapper.Configuration
derive(RecordUnmapperProvider newRecordUnmapperProvider)
Create a derived configuration from this one, with a new record unmapper provider.Configuration
derive(SQLDialect newDialect)
Create a derived configuration from this one, with a new dialect.Configuration
derive(TransactionListener... newTransactionListeners)
Create a derived configuration from this one, with new transaction listeners.Configuration
derive(TransactionListenerProvider... newTransactionListenerProviders)
Create a derived configuration from this one, with new transaction listener providers.Configuration
derive(TransactionProvider newTransactionProvider)
Create a derived configuration from this one, with a new transaction provider.Configuration
derive(Unwrapper newUnwrapper)
Create a derived configuration from this one, with a new unwrapper.Configuration
derive(UnwrapperProvider newUnwrapperProvider)
Create a derived configuration from this one, with a new unwrapper provider.Configuration
derive(VersionProvider newVersionProvider)
Create a derived configuration from this one, with a new version provider.Configuration
derive(VisitListener... newVisitListeners)
Create a derived configuration from this one, with new visit listeners.Configuration
derive(VisitListenerProvider... newVisitListenerProviders)
Create a derived configuration from this one, with new visit listener providers.DiagnosticsListenerProvider[]
diagnosticsListenerProviders()
Get the configuredDiagnosticsListenerProvider
s from this configuration.SQLDialect
dialect()
Retrieve the configured dialect.DSLContext
dsl()
Wrap thisConfiguration
in aDSLContext
, providing access to the configuration-contextual DSL to construct executable queries.ExecuteListenerProvider[]
executeListenerProviders()
Get the configuredExecuteListenerProvider
s from this configuration.ExecutorProvider
executorProvider()
Get this configuration's underlying executor provider.SQLDialect
family()
Retrieve the family of the configured dialect.ConnectionProvider
interpreterConnectionProvider()
Get this configuration's underlying interpreter connection provider, which provides connections for DDL interpretation.MetaProvider
metaProvider()
Get this configuration's underlying meta provider.MigrationListenerProvider[]
migrationListenerProviders()
Get the configuredMigrationListenerProvider
s from this configuration.RecordListenerProvider[]
recordListenerProviders()
Get the configuredRecordListenerProvider
s from this configuration.RecordMapperProvider
recordMapperProvider()
Get this configuration's underlying record mapper provider.RecordUnmapperProvider
recordUnmapperProvider()
Get this configuration's underlying record unmapper provider.SchemaMapping
schemaMapping()
Deprecated.- 2.0.5 - Usesettings()
insteadConfiguration
set(Connection newConnection)
Change this configuration to hold a new connection wrapped in aDefaultConnectionProvider
.Configuration
set(Clock newClock)
Change this configuration to hold a newClock
.Configuration
set(Executor newExecutor)
Change this configuration to hold a new executor.Configuration
set(DataSource newDataSource)
Change this configuration to hold a new data source wrapped in aDataSourceConnectionProvider
.Configuration
set(Settings newSettings)
Change this configuration to hold a new settings.Configuration
set(ConnectionProvider newConnectionProvider)
Change this configuration to hold a new connection provider.Configuration
set(ConverterProvider newConverterProvider)
Deprecated.- This API is still EXPERIMENTAL.Configuration
set(DiagnosticsListener... newDiagnosticsListeners)
Change this configuration to hold a new diagnostics listeners.Configuration
set(DiagnosticsListenerProvider... newDiagnosticsListenerProviders)
Change this configuration to hold new diagnostics listener providers.Configuration
set(ExecuteListener... newExecuteListeners)
Change this configuration to hold a new execute listeners.Configuration
set(ExecuteListenerProvider... newExecuteListenerProviders)
Change this configuration to hold a new execute listener providers.Configuration
set(ExecutorProvider newExecutorProvider)
Change this configuration to hold a new executor provider.Configuration
set(MetaProvider newMetaProvider)
Change this configuration to hold a new meta provider.Configuration
set(MigrationListener... newMigrationListeners)
Change this configuration to hold a new migration listeners.Configuration
set(MigrationListenerProvider... newMigrationListenerProviders)
Change this configuration to hold a new migration listener providers.Configuration
set(RecordListener... newRecordListeners)
Change this configuration to hold a new record listeners.Configuration
set(RecordListenerProvider... newRecordListenerProviders)
Change this configuration to hold a new record listener providers.Configuration
set(RecordMapper<?,?> newRecordMapper)
Change this configuration to hold a new record mapper.Configuration
set(RecordMapperProvider newRecordMapperProvider)
Change this configuration to hold a new record mapper provider.Configuration
set(RecordUnmapper<?,?> newRecordUnmapper)
Change this configuration to hold a new record unmapper.Configuration
set(RecordUnmapperProvider newRecordUnmapperProvider)
Change this configuration to hold a new record unmapper provider.Configuration
set(SQLDialect newDialect)
Change this configuration to hold a new dialect.Configuration
set(TransactionListener... newTransactionListeners)
Change this configuration to hold a new transaction listeners.Configuration
set(TransactionListenerProvider... newTransactionListenerProviders)
Change this configuration to hold a new transaction listener providers.Configuration
set(TransactionProvider newTransactionProvider)
Change this configuration to hold a new transaction provider.Configuration
set(Unwrapper newUnwrapper)
Change this configuration to hold a new unwrapper.Configuration
set(UnwrapperProvider newUnwrapperProvider)
Change this configuration to hold a new unwrapper provider.Configuration
set(VersionProvider newVersionProvider)
Change this configuration to hold a new version provider.Configuration
set(VisitListener... newVisitListeners)
Change this configuration to hold a new visit listeners.Configuration
set(VisitListenerProvider... newVisitListenerProviders)
Change this configuration to hold a new visit listener providers.Settings
settings()
Retrieve the runtime configuration settings.ConnectionProvider
systemConnectionProvider()
Get this configuration's underlying system connection provider, which provides connections for system tasks.TransactionListenerProvider[]
transactionListenerProviders()
Get the configuredTransactionListenerProvider
s from this configuration.TransactionProvider
transactionProvider()
Get this configuration's underlying transaction provider.UnwrapperProvider
unwrapperProvider()
Get the configuredUnwrapperProvider
from this configuration.VersionProvider
versionProvider()
Get this configuration's underlying meta provider.VisitListenerProvider[]
visitListenerProviders()
Get the configuredVisitListenerProvider
instances from this configuration.
-
-
-
Method Detail
-
dsl
DSLContext dsl()
Wrap thisConfiguration
in aDSLContext
, providing access to the configuration-contextual DSL to construct executable queries.In the
DefaultConfiguration
implementation, this is just convenience forDSL.using(Configuration)
. There's no functional difference between the two methods.
-
data
Map<Object,Object> data()
Get all custom data from thisConfiguration
.This is custom data that was previously set to the configuration using
data(Object, Object)
. Use custom data if you want to pass data to your customQueryPart
orExecuteListener
objects to be made available at render, bind, execution, fetch time.See
ExecuteListener
for more details.- Returns:
- The custom data. This is never
null
- See Also:
ExecuteListener
-
data
Object data(Object key)
Get some custom data from thisConfiguration
.This is custom data that was previously set to the configuration using
data(Object, Object)
. Use custom data if you want to pass data to your customQueryPart
orExecuteListener
objects to be made available at render, bind, execution, fetch time.See
ExecuteListener
for more details.- Parameters:
key
- A key to identify the custom data- Returns:
- The custom data or
null
if no such data is contained in thisConfiguration
- See Also:
ExecuteListener
-
data
Object data(Object key, Object value)
Set some custom data to thisConfiguration
.Use custom data if you want to pass data to your custom
QueryPart
orExecuteListener
objects to be made available at render, bind, execution, fetch time.Be sure that your custom data implements
Serializable
if you want to serialise thisConfiguration
or objects referencing thisConfiguration
, e.g. yourRecord
types.See
ExecuteListener
for more details.- Parameters:
key
- A key to identify the custom datavalue
- The custom data- Returns:
- The previously set custom data or
null
if no data was previously set for the given key - See Also:
ExecuteListener
-
clock
Clock clock()
Get this configuration'sClock
, which is used for optimistic locking, transaction time, and other time-depending features.
-
connectionProvider
ConnectionProvider connectionProvider()
Get this configuration's underlying connection provider.
-
interpreterConnectionProvider
ConnectionProvider interpreterConnectionProvider()
Get this configuration's underlying interpreter connection provider, which provides connections for DDL interpretation.- See Also:
DSLContext.meta(Source...)
-
systemConnectionProvider
ConnectionProvider systemConnectionProvider()
Get this configuration's underlying system connection provider, which provides connections for system tasks.System tasks may include the generation of auxiliary data types or stored procedures, which users may want to generate using a different data source or transaction. By default, this connection provider is the same as
connectionProvider()
.
-
metaProvider
MetaProvider metaProvider()
Get this configuration's underlying meta provider.
-
versionProvider
VersionProvider versionProvider()
Get this configuration's underlying meta provider.
-
executorProvider
ExecutorProvider executorProvider()
Get this configuration's underlying executor provider.Asynchronous operations will call back to this SPI to obtain an executor. This applies, for example, to
ResultQuery.fetchAsync()
.The following logic is applied when resolving the appropriate
executor
:- If
executorProvider()
does not returnnull
, thenExecutorProvider.provide()
is called to obtain anExecutor
for the asynchronous task. - In the jOOQ Java 8 distribution,
ForkJoinPool.commonPool()
is used ifForkJoinPool.getCommonPoolParallelism()
> 1 - A new "one thread per call"
Executor
is used in any other case.
The SPI will not be called if an asynchronous operation explicitly overrides the
Executor
, e.g. as is the case forResultQuery.fetchAsync(Executor)
. - If
-
transactionProvider
TransactionProvider transactionProvider()
Get this configuration's underlying transaction provider.If no explicit transaction provider was specified, and if
connectionProvider()
is aDefaultConnectionProvider
, then this will return aDefaultTransactionProvider
.
-
transactionListenerProviders
TransactionListenerProvider[] transactionListenerProviders()
Get the configuredTransactionListenerProvider
s from this configuration.
-
diagnosticsListenerProviders
DiagnosticsListenerProvider[] diagnosticsListenerProviders()
Get the configuredDiagnosticsListenerProvider
s from this configuration.
-
unwrapperProvider
UnwrapperProvider unwrapperProvider()
Get the configuredUnwrapperProvider
from this configuration.
-
recordMapperProvider
RecordMapperProvider recordMapperProvider()
Get this configuration's underlying record mapper provider.
-
recordUnmapperProvider
RecordUnmapperProvider recordUnmapperProvider()
Get this configuration's underlying record unmapper provider.
-
recordListenerProviders
RecordListenerProvider[] recordListenerProviders()
Get the configuredRecordListenerProvider
s from this configuration.This method allows for retrieving the configured
RecordListenerProvider
from this configuration. The providers will provide jOOQ withRecordListener
instances. These instances receive record manipulation notification events every time jOOQ executes queries. jOOQ makes no assumptions about the internal state of these listeners, i.e. listener instances may- share this
Configuration
's lifecycle (i.e. that of a JDBCConnection
, or that of a transaction) - share the lifecycle of an
RecordContext
(i.e. that of a single record manipulation) - follow an entirely different lifecycle.
- Returns:
- The configured set of record listeners.
- See Also:
RecordListenerProvider
,RecordListener
,RecordContext
- share this
-
executeListenerProviders
ExecuteListenerProvider[] executeListenerProviders()
Get the configuredExecuteListenerProvider
s from this configuration.This method allows for retrieving the configured
ExecuteListenerProvider
from this configuration. The providers will provide jOOQ withExecuteListener
instances. These instances receive execution lifecycle notification events every time jOOQ executes queries. jOOQ makes no assumptions about the internal state of these listeners, i.e. listener instances may- share this
Configuration
's lifecycle (i.e. that of a JDBCConnection
, or that of a transaction) - share the lifecycle of an
ExecuteContext
(i.e. that of a single query execution) - follow an entirely different lifecycle.
Note, depending on your
Settings.isExecuteLogging()
, some additional listeners may be prepended to this list, internally. Those listeners will never be exposed through this method, though.- Returns:
- The configured set of execute listeners.
- See Also:
ExecuteListenerProvider
,ExecuteListener
,ExecuteContext
- share this
-
migrationListenerProviders
MigrationListenerProvider[] migrationListenerProviders()
Get the configuredMigrationListenerProvider
s from this configuration.This method allows for retrieving the configured
MigrationListenerProvider
from this configuration. The providers will provide jOOQ withMigrationListener
instances. These instances receive migration lifecycle notification events every time jOOQ executes migrations. jOOQ makes no assumptions about the internal state of these listeners, i.e. listener instances may- share this
Configuration
's lifecycle (i.e. that of a JDBCConnection
, or that of a transaction) - share the lifecycle of an
MigrationContext
(i.e. that of a single query execution) - follow an entirely different lifecycle.
- Returns:
- The configured set of migration listeners.
- See Also:
MigrationListenerProvider
,MigrationListener
,MigrationContext
- share this
-
visitListenerProviders
VisitListenerProvider[] visitListenerProviders()
Get the configuredVisitListenerProvider
instances from this configuration.This method allows for retrieving the configured
VisitListenerProvider
instances from this configuration. The providers will provide jOOQ withVisitListener
instances. These instances receive query rendering lifecycle notification events every time jOOQ renders queries. jOOQ makes no assumptions about the internal state of these listeners, i.e. listener instances may- share this
Configuration
's lifecycle (i.e. that of a JDBCConnection
, or that of a transaction) - share the lifecycle of an
ExecuteContext
(i.e. that of a single query execution) - follow an entirely different lifecycle.
- Returns:
- The configured set of visit listeners.
- See Also:
VisitListenerProvider
,VisitListener
,VisitContext
- share this
-
converterProvider
@Deprecated ConverterProvider converterProvider()
Deprecated.- This API is still EXPERIMENTAL. Do not use yetGet the configuredConverterProvider
from this configuration.
-
schemaMapping
@Deprecated SchemaMapping schemaMapping()
Deprecated.- 2.0.5 - Usesettings()
insteadRetrieve the configured schema mapping.
-
dialect
SQLDialect dialect()
Retrieve the configured dialect.
-
family
SQLDialect family()
Retrieve the family of the configured dialect.
-
settings
Settings settings()
Retrieve the runtime configuration settings.
-
set
Configuration set(Clock newClock)
Change this configuration to hold a newClock
.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newClock
- The new clock to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(ConnectionProvider newConnectionProvider)
Change this configuration to hold a new connection provider.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newConnectionProvider
- The new connection provider to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(MetaProvider newMetaProvider)
Change this configuration to hold a new meta provider.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newMetaProvider
- The new meta provider to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(VersionProvider newVersionProvider)
Change this configuration to hold a new version provider.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newVersionProvider
- The new version provider to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(ExecutorProvider newExecutorProvider)
Change this configuration to hold a new executor provider.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newExecutorProvider
- The new executor provider to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(Executor newExecutor)
Change this configuration to hold a new executor.This will wrap the argument
Executor
in aDefaultExecutorProvider
for convenience.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newExecutor
- The new executor to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(Connection newConnection)
Change this configuration to hold a new connection wrapped in aDefaultConnectionProvider
.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newConnection
- The new connection to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(DataSource newDataSource)
Change this configuration to hold a new data source wrapped in aDataSourceConnectionProvider
.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newDataSource
- The new data source to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(TransactionProvider newTransactionProvider)
Change this configuration to hold a new transaction provider.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newTransactionProvider
- The new transaction provider to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(RecordMapper<?,?> newRecordMapper)
Change this configuration to hold a new record mapper.This will wrap the argument
RecordMapper
in aDefaultRecordMapperProvider
for convenience.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newRecordMapper
- The new record mapper to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(RecordMapperProvider newRecordMapperProvider)
Change this configuration to hold a new record mapper provider.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newRecordMapperProvider
- The new record mapper provider to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(RecordUnmapper<?,?> newRecordUnmapper)
Change this configuration to hold a new record unmapper.This will wrap the argument
RecordUnmapper
in aDefaultRecordUnmapperProvider
for convenience.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newRecordUnmapper
- The new record unmapper to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(RecordUnmapperProvider newRecordUnmapperProvider)
Change this configuration to hold a new record unmapper provider.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newRecordUnmapperProvider
- The new record unmapper provider to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(RecordListener... newRecordListeners)
Change this configuration to hold a new record listeners.This will wrap the argument
RecordListener
in aDefaultRecordListenerProvider
for convenience.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newRecordListeners
- The new record listener to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(RecordListenerProvider... newRecordListenerProviders)
Change this configuration to hold a new record listener providers.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newRecordListenerProviders
- The new record listener providers to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(ExecuteListener... newExecuteListeners)
Change this configuration to hold a new execute listeners.This will wrap the argument
ExecuteListener
in aDefaultExecuteListenerProvider
for convenience.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newExecuteListeners
- The new execute listeners to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(ExecuteListenerProvider... newExecuteListenerProviders)
Change this configuration to hold a new execute listener providers.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newExecuteListenerProviders
- The new execute listener providers to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(MigrationListener... newMigrationListeners)
Change this configuration to hold a new migration listeners.This will wrap the argument
MigrationListener
in aDefaultMigrationListenerProvider
for convenience.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newMigrationListeners
- The new migration listeners to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(MigrationListenerProvider... newMigrationListenerProviders)
Change this configuration to hold a new migration listener providers.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newMigrationListenerProviders
- The new migration listener providers to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(VisitListener... newVisitListeners)
Change this configuration to hold a new visit listeners.This will wrap the argument
VisitListener
in aDefaultVisitListenerProvider
for convenience.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newVisitListeners
- The new visit listeners to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(VisitListenerProvider... newVisitListenerProviders)
Change this configuration to hold a new visit listener providers.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newVisitListenerProviders
- The new visit listener providers to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(TransactionListener... newTransactionListeners)
Change this configuration to hold a new transaction listeners.This will wrap the argument
TransactionListener
in aDefaultTransactionListenerProvider
for convenience.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newTransactionListeners
- The new transaction listeners to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(TransactionListenerProvider... newTransactionListenerProviders)
Change this configuration to hold a new transaction listener providers.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newTransactionListenerProviders
- The new transaction listener providers to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(DiagnosticsListener... newDiagnosticsListeners)
Change this configuration to hold a new diagnostics listeners.This will wrap the argument
DiagnosticsListener
in aDefaultDiagnosticsListenerProvider
for convenience.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newDiagnosticsListeners
- The new diagnostics listeners to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(DiagnosticsListenerProvider... newDiagnosticsListenerProviders)
Change this configuration to hold new diagnostics listener providers.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newDiagnosticsListenerProviders
- The new diagnostics listener providers to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(Unwrapper newUnwrapper)
Change this configuration to hold a new unwrapper.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newUnwrapper
- The new unwrapper to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(UnwrapperProvider newUnwrapperProvider)
Change this configuration to hold a new unwrapper provider.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newUnwrapperProvider
- The new unwrapper provider to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
@Deprecated Configuration set(ConverterProvider newConverterProvider)
Deprecated.- This API is still EXPERIMENTAL. Do not use yetChange this configuration to hold a new converter provider.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newConverterProvider
- The new converter provider to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(SQLDialect newDialect)
Change this configuration to hold a new dialect.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newDialect
- The new dialect to be contained in the changed configuration.- Returns:
- The changed configuration.
-
set
Configuration set(Settings newSettings)
Change this configuration to hold a new settings.This method is not thread-safe and should not be used in globally available
Configuration
objects.- Parameters:
newSettings
- The new settings to be contained in the changed configuration.- Returns:
- The changed configuration.
-
derive
Configuration derive()
Create a derived configuration from this one, without changing any properties.- Returns:
- The derived configuration.
-
derive
Configuration derive(Clock newClock)
Create a derived configuration from this one, with a newClock
.- Parameters:
newClock
- The new clock to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(Connection newConnection)
Create a derived configuration from this one, with a new connection wrapped in aDefaultConnectionProvider
.- Parameters:
newConnection
- The new connection to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(DataSource newDataSource)
Create a derived configuration from this one, with a new data source wrapped in aDataSourceConnectionProvider
.- Parameters:
newDataSource
- The new data source to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(ConnectionProvider newConnectionProvider)
Create a derived configuration from this one, with a new connection provider.- Parameters:
newConnectionProvider
- The new connection provider to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(MetaProvider newMetaProvider)
Create a derived configuration from this one, with a new meta provider.- Parameters:
newMetaProvider
- The new meta provider to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(VersionProvider newVersionProvider)
Create a derived configuration from this one, with a new version provider.- Parameters:
newVersionProvider
- The new version provider to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(Executor newExecutor)
Create a derived configuration from this one, with a new executor.This will wrap the argument
Executor
in aDefaultExecutorProvider
for convenience.- Parameters:
newExecutor
- The new executor to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(ExecutorProvider newExecutorProvider)
Create a derived configuration from this one, with a new executor provider.- Parameters:
newExecutorProvider
- The new executor provider to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(TransactionProvider newTransactionProvider)
Create a derived configuration from this one, with a new transaction provider.- Parameters:
newTransactionProvider
- The new transaction provider to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(RecordMapper<?,?> newRecordMapper)
Create a derived configuration from this one, with a new record mapper.This will wrap the argument
RecordMapper
in aDefaultRecordMapperProvider
for convenience.- Parameters:
newRecordMapper
- The new record mapper to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(RecordMapperProvider newRecordMapperProvider)
Create a derived configuration from this one, with a new record mapper provider.- Parameters:
newRecordMapperProvider
- The new record mapper provider to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(RecordUnmapper<?,?> newRecordUnmapper)
Create a derived configuration from this one, with a new record unmapper.This will wrap the argument
RecordUnmapper
in aDefaultRecordUnmapperProvider
for convenience.- Parameters:
newRecordUnmapper
- The new record unmapper to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(RecordUnmapperProvider newRecordUnmapperProvider)
Create a derived configuration from this one, with a new record unmapper provider.- Parameters:
newRecordUnmapperProvider
- The new record unmapper provider to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(RecordListener... newRecordListeners)
Create a derived configuration from this one, with new record listeners.This will wrap the argument
RecordListener
in aDefaultRecordListenerProvider
for convenience.- Parameters:
newRecordListeners
- The new record listeners to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(RecordListenerProvider... newRecordListenerProviders)
Create a derived configuration from this one, with new record listener providers.- Parameters:
newRecordListenerProviders
- The new record listener providers to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(ExecuteListener... newExecuteListeners)
Create a derived configuration from this one, with new execute listeners.This will wrap the argument
ExecuteListener
in aDefaultExecuteListenerProvider
for convenience.- Parameters:
newExecuteListeners
- The new execute listener to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(ExecuteListenerProvider... newExecuteListenerProviders)
Create a derived configuration from this one, with new execute listener providers.- Parameters:
newExecuteListenerProviders
- The new execute listener providers to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(MigrationListener... newMigrationListeners)
Create a derived configuration from this one, with new migration listeners.This will wrap the argument
MigrationListener
in aDefaultMigrationListenerProvider
for convenience.- Parameters:
newMigrationListeners
- The new migration listener to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(MigrationListenerProvider... newMigrationListenerProviders)
Create a derived configuration from this one, with new migration listener providers.- Parameters:
newMigrationListenerProviders
- The new migration listener providers to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(VisitListener... newVisitListeners)
Create a derived configuration from this one, with new visit listeners.This will wrap the argument
VisitListener
in aDefaultVisitListenerProvider
for convenience.- Parameters:
newVisitListeners
- The new visit listeners to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(VisitListenerProvider... newVisitListenerProviders)
Create a derived configuration from this one, with new visit listener providers.- Parameters:
newVisitListenerProviders
- The new visit listener providers to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(TransactionListener... newTransactionListeners)
Create a derived configuration from this one, with new transaction listeners.This will wrap the argument
TransactionListener
in aDefaultTransactionListenerProvider
for convenience.- Parameters:
newTransactionListeners
- The new transaction listeners to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(TransactionListenerProvider... newTransactionListenerProviders)
Create a derived configuration from this one, with new transaction listener providers.- Parameters:
newTransactionListenerProviders
- The new transaction listener providers to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(DiagnosticsListener... newDiagnosticsListeners)
Create a derived configuration from this one, with new diagnostics listeners.- Parameters:
newDiagnosticsListeners
- The new diagnostics listeners to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(DiagnosticsListenerProvider... newDiagnosticsListenerProviders)
Create a derived configuration from this one, with new diagnostics listener providers.- Parameters:
newDiagnosticsListenerProviders
- The new diagnostics listener providers to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(Unwrapper newUnwrapper)
Create a derived configuration from this one, with a new unwrapper.- Parameters:
newUnwrapper
- The new unwrapper to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(UnwrapperProvider newUnwrapperProvider)
Create a derived configuration from this one, with a new unwrapper provider.- Parameters:
newUnwrapperProvider
- The new unwrapper provider to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
@Deprecated Configuration derive(ConverterProvider newConverterProvider)
Deprecated.- This API is still EXPERIMENTAL. Do not use yetCreate a derived configuration from this one, with new converter provider.- Parameters:
newConverterProvider
- The new converter provider to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(SQLDialect newDialect)
Create a derived configuration from this one, with a new dialect.- Parameters:
newDialect
- The new dialect to be contained in the derived configuration.- Returns:
- The derived configuration.
-
derive
Configuration derive(Settings newSettings)
Create a derived configuration from this one, with new settings.- Parameters:
newSettings
- The new settings to be contained in the derived configuration.- Returns:
- The derived configuration.
-
-