com.landawn.abacus.util.AsyncSQLExecutor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of abacus-android Show documentation
Show all versions of abacus-android Show documentation
A general and simple library for Android
/*
* Copyright (C) 2015 HaiYang Li
*
* 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.
*/
package com.landawn.abacus.util;
import java.math.BigDecimal;
import java.sql.Connection;
import java.util.List;
import java.util.concurrent.Callable;
import com.landawn.abacus.DataSet;
import com.landawn.abacus.logging.Logger;
import com.landawn.abacus.logging.LoggerFactory;
import com.landawn.abacus.util.SQLExecutor.JdbcSettings;
import com.landawn.abacus.util.SQLExecutor.ResultExtractor;
import com.landawn.abacus.util.SQLExecutor.StatementSetter;
import com.landawn.abacus.util.u.Nullable;
import com.landawn.abacus.util.u.Optional;
import com.landawn.abacus.util.u.OptionalBoolean;
import com.landawn.abacus.util.u.OptionalByte;
import com.landawn.abacus.util.u.OptionalChar;
import com.landawn.abacus.util.u.OptionalDouble;
import com.landawn.abacus.util.u.OptionalFloat;
import com.landawn.abacus.util.u.OptionalInt;
import com.landawn.abacus.util.u.OptionalLong;
import com.landawn.abacus.util.u.OptionalShort;
import com.landawn.abacus.util.stream.Stream;
/**
* Asynchronous SQLExecutor
.
*
* @since 0.8
*
* @author Haiyang Li
*/
public final class AsyncSQLExecutor {
protected static final Logger logger = LoggerFactory.getLogger(AsyncSQLExecutor.class);
private final SQLExecutor sqlExecutor;
private final AsyncExecutor asyncExecutor;
AsyncSQLExecutor(final SQLExecutor sqlExecutor, final AsyncExecutor asyncExecutor) {
this.sqlExecutor = sqlExecutor;
this.asyncExecutor = asyncExecutor;
}
public SQLExecutor sync() {
return sqlExecutor;
}
AsyncExecutor asyncExecutor() {
return asyncExecutor;
}
@SafeVarargs
public final ContinuableFuture insert(final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture insert(final String sql, final StatementSetter statementSetter, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(sql, statementSetter, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture insert(final String sql, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture insert(final String sql, final StatementSetter statementSetter, final JdbcSettings jdbcSettings,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(sql, statementSetter, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture insert(final String sql, final StatementSetter statementSetter,
final JdbcUtil.RowMapper autoGeneratedKeyExtractor, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(sql, statementSetter, autoGeneratedKeyExtractor, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture insert(final Connection conn, final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(conn, sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture insert(final Connection conn, final String sql, final StatementSetter statementSetter, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(conn, sql, statementSetter, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture insert(final Connection conn, final String sql, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(conn, sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture insert(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(conn, sql, statementSetter, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture insert(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcUtil.RowMapper autoGeneratedKeyExtractor, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public ID call() throws Exception {
return sqlExecutor.insert(conn, sql, statementSetter, autoGeneratedKeyExtractor, jdbcSettings, parameters);
}
});
}
public ContinuableFuture> batchInsert(final String sql, final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(sql, parametersList);
}
});
}
public ContinuableFuture> batchInsert(final String sql, final StatementSetter statementSetter, final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(sql, statementSetter, parametersList);
}
});
}
public ContinuableFuture> batchInsert(final String sql, final JdbcSettings jdbcSettings, final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(sql, jdbcSettings, parametersList);
}
});
}
public ContinuableFuture> batchInsert(final String sql, final StatementSetter statementSetter, final JdbcSettings jdbcSettings,
final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(sql, statementSetter, jdbcSettings, parametersList);
}
});
}
public ContinuableFuture> batchInsert(final String sql, final StatementSetter statementSetter,
final JdbcUtil.BiRowMapper autoGeneratedKeyExtractor, final JdbcSettings jdbcSettings, final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(sql, statementSetter, autoGeneratedKeyExtractor, jdbcSettings, parametersList);
}
});
}
public ContinuableFuture> batchInsert(final Connection conn, final String sql, final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(conn, sql, parametersList);
}
});
}
public ContinuableFuture> batchInsert(final Connection conn, final String sql, final StatementSetter statementSetter,
final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(conn, sql, statementSetter, parametersList);
}
});
}
public ContinuableFuture> batchInsert(final Connection conn, final String sql, final JdbcSettings jdbcSettings,
final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(conn, sql, jdbcSettings, parametersList);
}
});
}
public ContinuableFuture> batchInsert(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcSettings jdbcSettings, final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(conn, sql, statementSetter, jdbcSettings, parametersList);
}
});
}
public ContinuableFuture> batchInsert(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcUtil.BiRowMapper autoGeneratedKeyExtractor, final JdbcSettings jdbcSettings, final List> parametersList) {
return asyncExecutor.execute(new Callable>() {
@Override
public List call() throws Exception {
return sqlExecutor.batchInsert(conn, sql, statementSetter, autoGeneratedKeyExtractor, jdbcSettings, parametersList);
}
});
}
@SafeVarargs
public final ContinuableFuture update(final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.update(sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture update(final String sql, final StatementSetter statementSetter, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.update(sql, statementSetter, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture update(final String sql, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.update(sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture update(final String sql, final StatementSetter statementSetter, final JdbcSettings jdbcSettings,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.update(sql, statementSetter, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture update(final Connection conn, final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.update(conn, sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture update(final Connection conn, final String sql, final StatementSetter statementSetter, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.update(conn, sql, statementSetter, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture update(final Connection conn, final String sql, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.update(conn, sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture update(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.update(conn, sql, statementSetter, jdbcSettings, parameters);
}
});
}
public ContinuableFuture batchUpdate(final String sql, final List> parametersList) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.batchUpdate(sql, parametersList);
}
});
}
public ContinuableFuture batchUpdate(final String sql, final StatementSetter statementSetter, final List> parametersList) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.batchUpdate(sql, statementSetter, parametersList);
}
});
}
public ContinuableFuture batchUpdate(final String sql, final JdbcSettings jdbcSettings, final List> parametersList) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.batchUpdate(sql, jdbcSettings, parametersList);
}
});
}
public ContinuableFuture batchUpdate(final String sql, final StatementSetter statementSetter, final JdbcSettings jdbcSettings,
final List> parametersList) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.batchUpdate(sql, statementSetter, jdbcSettings, parametersList);
}
});
}
public ContinuableFuture batchUpdate(final Connection conn, final String sql, final List> parametersList) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.batchUpdate(conn, sql, parametersList);
}
});
}
public ContinuableFuture batchUpdate(final Connection conn, final String sql, final StatementSetter statementSetter,
final List> parametersList) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.batchUpdate(conn, sql, statementSetter, parametersList);
}
});
}
public ContinuableFuture batchUpdate(final Connection conn, final String sql, final JdbcSettings jdbcSettings, final List> parametersList) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.batchUpdate(conn, sql, jdbcSettings, parametersList);
}
});
}
public ContinuableFuture batchUpdate(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcSettings jdbcSettings, final List> parametersList) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.batchUpdate(conn, sql, statementSetter, jdbcSettings, parametersList);
}
});
}
@SafeVarargs
public final ContinuableFuture exists(final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Boolean call() throws Exception {
return sqlExecutor.exists(sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture exists(final Connection conn, final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Boolean call() throws Exception {
return sqlExecutor.exists(conn, sql, parameters);
}
});
}
/**
*
* @param sql
* @param parameters
* @return
* @deprecated may be misused and it's inefficient.
*/
@Deprecated
@SafeVarargs
public final ContinuableFuture count(final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.count(sql, parameters);
}
});
}
/**
*
* @param conn
* @param sql
* @param parameters
* @return
* @deprecated may be misused and it's inefficient.
*/
@Deprecated
@SafeVarargs
public final ContinuableFuture count(final Connection conn, final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public Integer call() throws Exception {
return sqlExecutor.count(conn, sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Class targetClass, final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(targetClass, sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Class targetClass, final String sql, final StatementSetter statementSetter,
final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(targetClass, sql, statementSetter, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Class targetClass, final String sql, final JdbcSettings jdbcSettings,
final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(targetClass, sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Class targetClass, final String sql, final StatementSetter statementSetter,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(targetClass, sql, statementSetter, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Class targetClass, final Connection conn, final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(targetClass, conn, sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Class targetClass, final Connection conn, final String sql,
final StatementSetter statementSetter, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(targetClass, conn, sql, statementSetter, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Class targetClass, final Connection conn, final String sql, final JdbcSettings jdbcSettings,
final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(targetClass, conn, sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Class targetClass, final Connection conn, final String sql,
final StatementSetter statementSetter, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(targetClass, conn, sql, statementSetter, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final String sql, final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(sql, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final String sql, final StatementSetter statementSetter,
final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(sql, statementSetter, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final String sql, final JdbcUtil.RowMapper rowMapper,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(sql, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final String sql, final StatementSetter statementSetter,
final JdbcUtil.RowMapper rowMapper, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(sql, statementSetter, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Connection conn, final String sql, final JdbcUtil.RowMapper rowMapper,
final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(conn, sql, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(conn, sql, statementSetter, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Connection conn, final String sql, final JdbcUtil.RowMapper rowMapper,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(conn, sql, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture> get(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcUtil.RowMapper rowMapper, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable>() {
@Override
public Optional call() throws Exception {
return sqlExecutor.get(conn, sql, statementSetter, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Class targetClass, final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(targetClass, sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Class targetClass, final String sql, final StatementSetter statementSetter,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(targetClass, sql, statementSetter, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Class targetClass, final String sql, final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(targetClass, sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Class targetClass, final String sql, final StatementSetter statementSetter,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(targetClass, sql, statementSetter, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Class targetClass, final Connection conn, final String sql, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(targetClass, conn, sql, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Class targetClass, final Connection conn, final String sql, final StatementSetter statementSetter,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(targetClass, conn, sql, statementSetter, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Class targetClass, final Connection conn, final String sql, final JdbcSettings jdbcSettings,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(targetClass, conn, sql, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Class targetClass, final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(targetClass, conn, sql, statementSetter, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final String sql, final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(sql, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final String sql, final StatementSetter statementSetter, final JdbcUtil.RowMapper rowMapper,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(sql, statementSetter, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final String sql, final JdbcUtil.RowMapper rowMapper, final JdbcSettings jdbcSettings,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(sql, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final String sql, final StatementSetter statementSetter, final JdbcUtil.RowMapper rowMapper,
final JdbcSettings jdbcSettings, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(sql, statementSetter, rowMapper, jdbcSettings, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Connection conn, final String sql, final JdbcUtil.RowMapper rowMapper,
final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(conn, sql, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture gett(final Connection conn, final String sql, final StatementSetter statementSetter,
final JdbcUtil.RowMapper rowMapper, final Object... parameters) {
return asyncExecutor.execute(new Callable() {
@Override
public T call() throws Exception {
return sqlExecutor.gett(conn, sql, statementSetter, rowMapper, parameters);
}
});
}
@SafeVarargs
public final ContinuableFuture