Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 2009-2016, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* 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;
import java.io.Serializable;
import java.sql.Connection;
import java.sql.Savepoint;
import java.util.Map;
import java.util.concurrent.Executor;
import java.util.concurrent.ForkJoinPool;
import javax.sql.DataSource;
import org.jooq.conf.Settings;
import org.jooq.impl.DataSourceConnectionProvider;
import org.jooq.impl.DefaultConnectionProvider;
import org.jooq.impl.DefaultExecuteListenerProvider;
import org.jooq.impl.DefaultExecutorProvider;
import org.jooq.impl.DefaultRecordListenerProvider;
import org.jooq.impl.DefaultRecordMapper;
import org.jooq.impl.DefaultRecordMapperProvider;
import org.jooq.impl.DefaultTransactionListenerProvider;
import org.jooq.impl.DefaultTransactionProvider;
import org.jooq.impl.DefaultVisitListenerProvider;
import org.jooq.tools.LoggerListener;
import org.jooq.tools.StopWatchListener;
/**
* A Configuration configures a {@link DSLContext}, providing it
* with information for query rendering and execution.
*
* A Configuration wraps all information elements that are
* needed...
*
*
by a {@link RenderContext} to render {@link Query} objects and
* {@link QueryPart}s
*
by a {@link BindContext} to bind values to {@link Query} objects and
* {@link QueryPart}s
*
by a {@link Query} or {@link Routine} object to execute themselves
*
*
* 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 {@link ConnectionProvider}, the {@link ExecuteListener}
* list, etc.
*
* A Configuration is composed of types composing its state and of
* SPIs:
*
Types composing its state:
*
*
{@link #dialect()}: The {@link SQLDialect} that defines the underlying
* database's behaviour when generating SQL syntax, or binding variables, or
* when executing the query
*
{@link #settings()}: The {@link Settings} that define general jOOQ
* behaviour
*
{@link #data()}: A {@link Map} containing user-defined data for the
* {@link Scope} of this configuration.
*
*
SPIs:
*
*
{@link #connectionProvider()}: The {@link ConnectionProvider} that
* defines the semantics of {@link ConnectionProvider#acquire()} and
* {@link ConnectionProvider#release(Connection)} for all queries executed in
* the context of this Configuration.
*
* jOOQ-provided default implementations include:
*
*
{@link DefaultConnectionProvider}: a non-thread-safe implementation that
* wraps a single JDBC {@link Connection}. Ideal for batch processing.
*
{@link DataSourceConnectionProvider}: a possibly thread-safe
* implementation that wraps a JDBC {@link DataSource}. Ideal for use with
* connection pools, Java EE, or Spring.
*
*
*
{@link #transactionProvider()}: The {@link TransactionProvider} that
* defines and implements the behaviour of the
* {@link DSLContext#transaction(TransactionalRunnable)} and
* {@link DSLContext#transactionResult(TransactionalCallable)} methods.
*
* jOOQ-provided default implementations include:
*
*
{@link DefaultTransactionProvider}: an implementation backed by JDBC
* directly, via {@link Connection#commit()}, {@link Connection#rollback()}, and
* {@link Connection#rollback(Savepoint)} for nested transactions.
*
*
*
{@link #recordMapperProvider()}: The {@link RecordMapperProvider} that
* defines and implements the behaviour of {@link Record#into(Class)},
* {@link ResultQuery#fetchInto(Class)}, {@link Cursor#fetchInto(Class)}, and
* various related methods.
*
* jOOQ-provided default implementations include:
*
*
{@link DefaultRecordMapperProvider}: an implementation delegating to the
* {@link DefaultRecordMapper}, which implements the most common mapping
* use-cases.
*
*
*
{@link #recordListenerProviders()}: A set of
* {@link RecordListenerProvider} that implement {@link Record} fetching and
* storing lifecycle management, specifically for use with
* {@link UpdatableRecord}.
*
* jOOQ does not provide any implementations.
*
{@link #executeListenerProviders()}: A set of
* {@link ExecuteListenerProvider} that implement {@link Query} execution
* lifecycle management.
*
* jOOQ-provided example implementations include:
*
{@link #visitListenerProviders()}: A set of {@link VisitListenerProvider}
* that implement {@link 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.
*
* jOOQ does not provide any implementations.
*
*
*
* @author Lukas Eder
*/
public interface Configuration extends Serializable {
// -------------------------------------------------------------------------
// Custom data
// -------------------------------------------------------------------------
/**
* Get all custom data from this Configuration.
*
* This is custom data that was previously set to the configuration using
* {@link #data(Object, Object)}. Use custom data if you want to pass data
* to your custom {@link QueryPart} or {@link ExecuteListener} objects to be
* made available at render, bind, execution, fetch time.
*
* See {@link ExecuteListener} for more details.
*
* @return The custom data. This is never null
* @see ExecuteListener
*/
Map