public interface Configuration extends Serializable
Configuration configures a DSLContext, providing it
with information for query construction, rendering and execution.
A Configuration wraps all information elements that are
needed...
DSLContext to construct Query objectsRenderContext to render Query objects and
QueryPartsBindContext to bind values to Query objects and
QueryPartsQuery or Routine object to execute itself
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.
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.
| Modifier and Type | Method and Description |
|---|---|
ConnectionProvider |
connectionProvider()
Get this configuration's underlying connection provider.
|
Map<Object,Object> |
data()
Get all custom data from this
Configuration. |
Object |
data(Object key)
Get some custom data from this
Configuration. |
Object |
data(Object key,
Object value)
Set some custom data to this
Configuration. |
Configuration |
derive()
Create a derived configuration from this one, without changing any
properties.
|
Configuration |
derive(ConnectionProvider newConnectionProvider)
Create a derived configuration from this one, with a new connection
provider.
|
Configuration |
derive(ExecuteListenerProvider... newExecuteListenerProviders)
Create a derived configuration from this one, with a new execute listener
providers.
|
Configuration |
derive(Settings newSettings)
Create a derived configuration from this one, with new settings.
|
Configuration |
derive(SQLDialect newDialect)
Create a derived configuration from this one, with a new dialect.
|
SQLDialect |
dialect()
Retrieve the configured dialect.
|
ExecuteListenerProvider[] |
executeListenerProviders()
Get the configured
ExecuteListenerProvider from this
configuration. |
SchemaMapping |
schemaMapping()
Deprecated.
- 2.0.5 - Use
settings() instead |
Configuration |
set(ConnectionProvider newConnectionProvider)
Change this configuration to hold a new connection provider.
|
Configuration |
set(ExecuteListenerProvider... newExecuteListenerProviders)
Change this configuration to hold a new execute listener providers.
|
Configuration |
set(Settings newSettings)
Change this configuration to hold a new settings.
|
Configuration |
set(SQLDialect newDialect)
Change this configuration to hold a new dialect.
|
Settings |
settings()
Retrieve the runtime configuration settings.
|
SQLDialect dialect()
ConnectionProvider connectionProvider()
@Deprecated SchemaMapping schemaMapping()
settings() insteadSettings settings()
Map<Object,Object> data()
Configuration.
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 custom QueryPart or ExecuteListener objects to be
made available at render, bind, execution, fetch time.
See ExecuteListener for more details.
nullExecuteListenerObject data(Object key)
Configuration.
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 custom QueryPart or ExecuteListener objects to be
made available at render, bind, execution, fetch time.
See ExecuteListener for more details.
key - A key to identify the custom datanull if no such data is contained
in this ConfigurationExecuteListenerObject data(Object key, Object value)
Configuration.
Use custom data if you want to pass data to your custom QueryPart
or ExecuteListener objects to be made available at render, bind,
execution, fetch time.
Be sure that your custom data implements Serializable if you want
to serialise this Configuration or objects referencing this
Configuration, e.g. your Record types.
See ExecuteListener for more details.
key - A key to identify the custom datavalue - The custom data or null to unset the custom
datanull if no data
was previously set for the given keyExecuteListenerExecuteListenerProvider[] executeListenerProviders()
ExecuteListenerProvider from this
configuration.
This method allows for retrieving the configured
ExecuteListenerProvider from this configuration. The
provider will provide jOOQ with ExecuteListener 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
Configuration's lifecycle (i.e. that of a
JDBC Connection, or that of a transaction)ExecuteContext (i.e. that of a
single query execution)
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.
ExecuteListenerProvider,
ExecuteListener,
ExecuteContextConfiguration derive()
Configuration derive(SQLDialect newDialect)
newDialect - The new dialect to be contained in the derived
configuration.Configuration derive(ConnectionProvider newConnectionProvider)
newConnectionProvider - The new connection provider to be contained
in the derived configuration.Configuration derive(Settings newSettings)
newSettings - The new settings to be contained in the derived
configuration.Configuration derive(ExecuteListenerProvider... newExecuteListenerProviders)
newExecuteListenerProviders - The new execute listener providers to
be contained in the derived configuration.Configuration set(SQLDialect newDialect)
This method is not thread-safe and should not be used in globally
available Configuration objects.
newDialect - The new dialect to be contained in the changed
configuration.Configuration set(ConnectionProvider newConnectionProvider)
This method is not thread-safe and should not be used in globally
available Configuration objects.
newConnectionProvider - The new connection provider to be contained
in the changed configuration.Configuration set(Settings newSettings)
This method is not thread-safe and should not be used in globally
available Configuration objects.
newSettings - The new settings to be contained in the changed
configuration.Configuration set(ExecuteListenerProvider... newExecuteListenerProviders)
This method is not thread-safe and should not be used in globally
available Configuration objects.
newExecuteListenerProviders - The new execute listener providers to
be contained in the changed configuration.Copyright © 2013. All Rights Reserved.