java/jdbc-loopback-driver/src/info/globalcode/jdbc/loopback/AbstractStatement.java
Avoid reusing/rewriting the DB connection properties.
There was weird random errors while testing connection to multiple DB in parallel when one of them was meta connection to same DB connection.
Two kinds of exception: 1) missing password 2) „Passing DB password as CLI parameter is insecure!“
/**
* SQL-DK
* Copyright © 2014 František Kučera (frantovo.cz)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package info.globalcode.jdbc.loopback;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.SQLWarning;
/**
*
* @author Ing. František Kučera (frantovo.cz)
*/
public abstract class AbstractStatement implements java.sql.Statement {
@Override
public ResultSet executeQuery(String sql) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int executeUpdate(String sql) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void close() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int getMaxFieldSize() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void setMaxFieldSize(int max) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int getMaxRows() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void setMaxRows(int max) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void setEscapeProcessing(boolean enable) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int getQueryTimeout() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void setQueryTimeout(int seconds) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void cancel() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public SQLWarning getWarnings() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void clearWarnings() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void setCursorName(String name) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean execute(String sql) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public java.sql.ResultSet getResultSet() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int getUpdateCount() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean getMoreResults() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void setFetchDirection(int direction) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int getFetchDirection() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void setFetchSize(int rows) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int getFetchSize() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int getResultSetConcurrency() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int getResultSetType() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void addBatch(String sql) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void clearBatch() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int[] executeBatch() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public Connection getConnection() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean getMoreResults(int current) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public ResultSet getGeneratedKeys() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int executeUpdate(String sql, String[] columnNames) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean execute(String sql, int[] columnIndexes) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean execute(String sql, String[] columnNames) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public int getResultSetHoldability() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean isClosed() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void setPoolable(boolean poolable) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean isPoolable() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public void closeOnCompletion() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean isCloseOnCompletion() throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public <T> T unwrap(Class<T> iface) throws SQLException {
throw new SQLException("Not supported yet.");
}
@Override
public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw new SQLException("Not supported yet.");
}
}