com.hundsun.lightdb.unisql.proxy.multijdbc.MultiPreparedStatement Maven / Gradle / Ivy
package com.hundsun.lightdb.unisql.proxy.multijdbc;
import com.hundsun.lightdb.unisql.model.UnisqlProperties;
import lombok.extern.slf4j.Slf4j;
import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.NClob;
import java.sql.ParameterMetaData;
import java.sql.PreparedStatement;
import java.sql.Ref;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.RowId;
import java.sql.SQLException;
import java.sql.SQLType;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.*;
import java.util.Calendar;
import java.util.List;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* @Author yupeishi
* @Date 2023/10/13
**/
@SuppressFBWarnings({"RV_RETURN_VALUE_IGNORED", "SQL_INJECTION_JDBC"})
@Slf4j
public class MultiPreparedStatement implements PreparedStatement {
private final PreparedStatement delegate;
private final List delegateMulti;
/** 配置参数 */
private final boolean debug = UnisqlProperties.getInstance().isDebug();
public MultiPreparedStatement(PreparedStatement delegate, List delegateMulti) {
this.delegate = delegate;
this.delegateMulti = delegateMulti;
}
public PreparedStatement getDelegate() {
return delegate;
}
@Override
public ResultSet executeQuery() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeQuery();
}
return delegate.executeQuery();
}
@Override
public int executeUpdate() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeUpdate();
}
return delegate.executeUpdate();
}
@Override
public void setNull(int parameterIndex, int sqlType) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setNull(parameterIndex, sqlType);
}
delegate.setNull(parameterIndex, sqlType);
}
@Override
public void setBoolean(int parameterIndex, boolean x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setBoolean(parameterIndex, x);
}
delegate.setBoolean(parameterIndex, x);
}
@Override
public void setByte(int parameterIndex, byte x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setByte(parameterIndex, x);
}
delegate.setByte(parameterIndex, x);
}
@Override
public void setShort(int parameterIndex, short x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setShort(parameterIndex, x);
}
delegate.setShort(parameterIndex, x);
}
@Override
public void setInt(int parameterIndex, int x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setInt(parameterIndex, x);
}
delegate.setInt(parameterIndex, x);
}
@Override
public void setLong(int parameterIndex, long x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setLong(parameterIndex, x);
}
delegate.setLong(parameterIndex, x);
}
@Override
public void setFloat(int parameterIndex, float x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setFloat(parameterIndex, x);
}
delegate.setFloat(parameterIndex, x);
}
@Override
public void setDouble(int parameterIndex, double x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setDouble(parameterIndex, x);
}
delegate.setDouble(parameterIndex, x);
}
@Override
public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setBigDecimal(parameterIndex, x);
}
delegate.setBigDecimal(parameterIndex, x);
}
@Override
public void setString(int parameterIndex, String x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setString(parameterIndex, x);
}
delegate.setString(parameterIndex, x);
}
@Override
public void setBytes(int parameterIndex, byte[] x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setBytes(parameterIndex, x);
}
delegate.setBytes(parameterIndex, x);
}
@Override
public void setDate(int parameterIndex, Date x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setDate(parameterIndex, x);
}
delegate.setDate(parameterIndex, x);
}
@Override
public void setTime(int parameterIndex, Time x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setTime(parameterIndex, x);
}
delegate.setTime(parameterIndex, x);
}
@Override
public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setTimestamp(parameterIndex, x);
}
delegate.setTimestamp(parameterIndex, x);
}
@Override
public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setAsciiStream(parameterIndex, x, length);
}
delegate.setAsciiStream(parameterIndex, x, length);
}
@Override
@Deprecated
public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setUnicodeStream(parameterIndex, x, length);
}
delegate.setUnicodeStream(parameterIndex, x, length);
}
@Override
public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setBinaryStream(parameterIndex, x, length);
}
delegate.setBinaryStream(parameterIndex, x, length);
}
@Override
public void clearParameters() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.clearParameters();
}
delegate.clearParameters();
}
@Override
public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setObject(parameterIndex, x, targetSqlType);
}
delegate.setObject(parameterIndex, x, targetSqlType);
}
@Override
public void setObject(int parameterIndex, Object x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setObject(parameterIndex, x);
}
delegate.setObject(parameterIndex, x);
}
@Override
public boolean execute() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.execute();
}
return delegate.execute();
}
@Override
public void addBatch() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.addBatch();
}
delegate.addBatch();
}
@Override
public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setCharacterStream(parameterIndex, reader, length);
}
delegate.setCharacterStream(parameterIndex, reader, length);
}
@Override
public void setRef(int parameterIndex, Ref x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setRef(parameterIndex, x);
}
delegate.setRef(parameterIndex, x);
}
@Override
public void setBlob(int parameterIndex, Blob x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setBlob(parameterIndex, x);
}
delegate.setBlob(parameterIndex, x);
}
@Override
public void setClob(int parameterIndex, Clob x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setClob(parameterIndex, x);
}
delegate.setClob(parameterIndex, x);
}
@Override
public void setArray(int parameterIndex, Array x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setArray(parameterIndex, x);
}
delegate.setArray(parameterIndex, x);
}
@Override
public ResultSetMetaData getMetaData() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getMetaData();
}
return delegate.getMetaData();
}
@Override
public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setDate(parameterIndex, x, cal);
}
delegate.setDate(parameterIndex, x, cal);
}
@Override
public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setTime(parameterIndex, x, cal);
}
delegate.setTime(parameterIndex, x, cal);
}
@Override
public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setTimestamp(parameterIndex, x, cal);
}
delegate.setTimestamp(parameterIndex, x, cal);
}
@Override
public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setNull(parameterIndex, sqlType, typeName);
}
delegate.setNull(parameterIndex, sqlType, typeName);
}
@Override
public void setURL(int parameterIndex, URL x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setURL(parameterIndex, x);
}
delegate.setURL(parameterIndex, x);
}
@Override
public ParameterMetaData getParameterMetaData() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getParameterMetaData();
}
return delegate.getParameterMetaData();
}
@Override
public void setRowId(int parameterIndex, RowId x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setRowId(parameterIndex, x);
}
delegate.setRowId(parameterIndex, x);
}
@Override
public void setNString(int parameterIndex, String value) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setNString(parameterIndex, value);
}
delegate.setNString(parameterIndex, value);
}
@Override
public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setNCharacterStream(parameterIndex, value, length);
}
delegate.setNCharacterStream(parameterIndex, value, length);
}
@Override
public void setNClob(int parameterIndex, NClob value) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setNClob(parameterIndex, value);
}
delegate.setNClob(parameterIndex, value);
}
@Override
public void setClob(int parameterIndex, Reader reader, long length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setClob(parameterIndex, reader, length);
}
delegate.setClob(parameterIndex, reader, length);
}
@Override
public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setBlob(parameterIndex, inputStream, length);
}
delegate.setBlob(parameterIndex, inputStream, length);
}
@Override
public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setNClob(parameterIndex, reader, length);
}
delegate.setNClob(parameterIndex, reader, length);
}
@Override
public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setSQLXML(parameterIndex, xmlObject);
}
delegate.setSQLXML(parameterIndex, xmlObject);
}
@Override
public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setObject(parameterIndex, x, targetSqlType, scaleOrLength);
}
delegate.setObject(parameterIndex, x, targetSqlType, scaleOrLength);
}
@Override
public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setAsciiStream(parameterIndex, x, length);
}
delegate.setAsciiStream(parameterIndex, x, length);
}
@Override
public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setBinaryStream(parameterIndex, x, length);
}
delegate.setBinaryStream(parameterIndex, x, length);
}
@Override
public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setCharacterStream(parameterIndex, reader, length);
}
delegate.setCharacterStream(parameterIndex, reader, length);
}
@Override
public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setAsciiStream(parameterIndex, x);
}
delegate.setAsciiStream(parameterIndex, x);
}
@Override
public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setBinaryStream(parameterIndex, x);
}
delegate.setBinaryStream(parameterIndex, x);
}
@Override
public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setCharacterStream(parameterIndex, reader);
}
delegate.setCharacterStream(parameterIndex, reader);
}
@Override
public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setNCharacterStream(parameterIndex, value);
}
delegate.setNCharacterStream(parameterIndex, value);
}
@Override
public void setClob(int parameterIndex, Reader reader) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setClob(parameterIndex, reader);
}
delegate.setClob(parameterIndex, reader);
}
@Override
public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setBlob(parameterIndex, inputStream);
}
delegate.setBlob(parameterIndex, inputStream);
}
@Override
public void setNClob(int parameterIndex, Reader reader) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setNClob(parameterIndex, reader);
}
delegate.setNClob(parameterIndex, reader);
}
@Override
public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setObject(parameterIndex, x, targetSqlType, scaleOrLength);
}
delegate.setObject(parameterIndex, x, targetSqlType, scaleOrLength);
}
@Override
public void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setObject(parameterIndex, x, targetSqlType);
}
delegate.setObject(parameterIndex, x, targetSqlType);
}
@Override
public long executeLargeUpdate() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeLargeUpdate();
}
return delegate.executeLargeUpdate();
}
@Override
public ResultSet executeQuery(String sql) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeQuery(sql);
}
return delegate.executeQuery(sql);
}
@Override
public int executeUpdate(String sql) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
int result = unisqlPreparedStatement.executeUpdate(sql);
if(debug){
if (log.isDebugEnabled()) {
log.debug("multi preparedStatement executeUpdate result is {}", result);
}
}
}
return delegate.executeUpdate(sql);
}
@Override
public void close() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.close();
}
delegate.close();
}
@Override
public int getMaxFieldSize() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getMaxFieldSize();
}
return delegate.getMaxFieldSize();
}
@Override
public void setMaxFieldSize(int max) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setMaxFieldSize(max);
}
delegate.setMaxFieldSize(max);
}
@Override
public int getMaxRows() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getMaxRows();
}
return delegate.getMaxRows();
}
@Override
public void setMaxRows(int max) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setMaxRows(max);
}
delegate.setMaxRows(max);
}
@Override
public void setEscapeProcessing(boolean enable) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setEscapeProcessing(enable);
}
delegate.setEscapeProcessing(enable);
}
@Override
public int getQueryTimeout() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getQueryTimeout();
}
return delegate.getQueryTimeout();
}
@Override
public void setQueryTimeout(int seconds) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setQueryTimeout(seconds);
}
delegate.setQueryTimeout(seconds);
}
@Override
public void cancel() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.cancel();
}
delegate.cancel();
}
@Override
public SQLWarning getWarnings() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getWarnings();
}
return delegate.getWarnings();
}
@Override
public void clearWarnings() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.clearWarnings();
}
delegate.clearWarnings();
}
@Override
public void setCursorName(String name) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setCursorName(name);
}
delegate.setCursorName(name);
}
@Override
public boolean execute(String sql) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
boolean execute = unisqlPreparedStatement.execute(sql);
if(debug){
if (log.isDebugEnabled()) {
log.debug("multi preparedStatement execute result is {}", execute);
}
}
}
return delegate.execute(sql);
}
@Override
public ResultSet getResultSet() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getResultSet();
}
return delegate.getResultSet();
}
@Override
public int getUpdateCount() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getUpdateCount();
}
return delegate.getUpdateCount();
}
@Override
public boolean getMoreResults() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getMoreResults();
}
return delegate.getMoreResults();
}
@Override
public void setFetchDirection(int direction) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setFetchDirection(direction);
}
delegate.setFetchDirection(direction);
}
@Override
public int getFetchDirection() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getFetchDirection();
}
return delegate.getFetchDirection();
}
@Override
public void setFetchSize(int rows) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setFetchSize(rows);
}
delegate.setFetchSize(rows);
}
@Override
public int getFetchSize() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getFetchSize();
}
return delegate.getFetchSize();
}
@Override
public int getResultSetConcurrency() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getResultSetConcurrency();
}
return delegate.getResultSetConcurrency();
}
@Override
public int getResultSetType() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getResultSetType();
}
return delegate.getResultSetType();
}
@Override
public void addBatch(String sql) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.addBatch(sql);
}
delegate.addBatch(sql);
}
@Override
public void clearBatch() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.clearBatch();
}
delegate.clearBatch();
}
@Override
public int[] executeBatch() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeBatch();
}
return delegate.executeBatch();
}
@Override
public Connection getConnection() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getConnection();
}
return delegate.getConnection();
}
@Override
public boolean getMoreResults(int current) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getMoreResults(current);
}
return delegate.getMoreResults(current);
}
@Override
public ResultSet getGeneratedKeys() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getGeneratedKeys();
}
return delegate.getGeneratedKeys();
}
@Override
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeUpdate(sql, autoGeneratedKeys);
}
return delegate.executeUpdate(sql, autoGeneratedKeys);
}
@Override
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeUpdate(sql, columnIndexes);
}
return delegate.executeUpdate(sql, columnIndexes);
}
@Override
public int executeUpdate(String sql, String[] columnNames) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeUpdate(sql, columnNames);
}
return delegate.executeUpdate(sql, columnNames);
}
@Override
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.execute(sql, autoGeneratedKeys);
}
return delegate.execute(sql, autoGeneratedKeys);
}
@Override
public boolean execute(String sql, int[] columnIndexes) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.execute(sql, columnIndexes);
}
return delegate.execute(sql, columnIndexes);
}
@Override
public boolean execute(String sql, String[] columnNames) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.execute(sql, columnNames);
}
return delegate.execute(sql, columnNames);
}
@Override
public int getResultSetHoldability() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getResultSetHoldability();
}
return delegate.getResultSetHoldability();
}
@Override
public boolean isClosed() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.isClosed();
}
return delegate.isClosed();
}
@Override
public void setPoolable(boolean poolable) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setPoolable(poolable);
}
delegate.setPoolable(poolable);
}
@Override
public boolean isPoolable() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.isPoolable();
}
return delegate.isPoolable();
}
@Override
public void closeOnCompletion() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.closeOnCompletion();
}
delegate.closeOnCompletion();
}
@Override
public boolean isCloseOnCompletion() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.isCloseOnCompletion();
}
return delegate.isCloseOnCompletion();
}
@Override
public long getLargeUpdateCount() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getLargeUpdateCount();
}
return delegate.getLargeUpdateCount();
}
@Override
public void setLargeMaxRows(long max) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.setLargeMaxRows(max);
}
delegate.setLargeMaxRows(max);
}
@Override
public long getLargeMaxRows() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.getLargeMaxRows();
}
return delegate.getLargeMaxRows();
}
@Override
public long[] executeLargeBatch() throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeLargeBatch();
}
return delegate.executeLargeBatch();
}
@Override
public long executeLargeUpdate(String sql) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeLargeUpdate(sql);
}
return delegate.executeLargeUpdate(sql);
}
@Override
public long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeLargeUpdate(sql, autoGeneratedKeys);
}
return delegate.executeLargeUpdate(sql, autoGeneratedKeys);
}
@Override
public long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeLargeUpdate(sql, columnIndexes);
}
return delegate.executeLargeUpdate(sql, columnIndexes);
}
@Override
public long executeLargeUpdate(String sql, String[] columnNames) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.executeLargeUpdate(sql, columnNames);
}
return delegate.executeLargeUpdate(sql, columnNames);
}
@Override
public T unwrap(Class iface) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.unwrap(iface);
}
return delegate.unwrap(iface);
}
@Override
public boolean isWrapperFor(Class> iface) throws SQLException {
for(PreparedStatement unisqlPreparedStatement : delegateMulti){
unisqlPreparedStatement.isWrapperFor(iface);
}
return delegate.isWrapperFor(iface);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy