
com.github.housepower.jdbc.wrapper.SQLConnection Maven / Gradle / Ivy
/*
* 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.github.housepower.jdbc.wrapper;
import java.sql.*;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Executor;
public interface SQLConnection extends Connection {
@Override
default void setClientInfo(Properties properties) throws SQLClientInfoException {
throw new SQLClientInfoException();
}
@Override
default void setClientInfo(String name, String value) throws SQLClientInfoException {
throw new SQLClientInfoException();
}
@Override
default Statement createStatement() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default PreparedStatement prepareStatement(String sql) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default CallableStatement prepareCall(String sql) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default String nativeSQL(String sql) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default void setAutoCommit(boolean autoCommit) throws SQLException {
}
@Override
default boolean getAutoCommit() throws SQLException {
return false;
}
@Override
default void commit() throws SQLException {
}
@Override
default void rollback() throws SQLException {
}
@Override
default void close() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default boolean isClosed() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default DatabaseMetaData getMetaData() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default void setReadOnly(boolean readOnly) throws SQLException {
}
@Override
default boolean isReadOnly() throws SQLException {
return false;
}
@Override
default void setCatalog(String catalog) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default String getCatalog() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default void setTransactionIsolation(int level) throws SQLException {
}
@Override
default int getTransactionIsolation() throws SQLException {
return Connection.TRANSACTION_NONE;
}
@Override
default SQLWarning getWarnings() throws SQLException {
return null;
}
@Override
default void clearWarnings() throws SQLException {
}
@Override
default Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)
throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default Map> getTypeMap() throws SQLException {
return null;
}
@Override
default void setTypeMap(Map> map) throws SQLException {
}
@Override
default void setHoldability(int holdability) throws SQLException {
}
@Override
default int getHoldability() throws SQLException {
return 0;
}
@Override
default Savepoint setSavepoint() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default Savepoint setSavepoint(String name) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default void rollback(Savepoint savepoint) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default void releaseSavepoint(Savepoint savepoint) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency,
int resultSetHoldability) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency,
int resultSetHoldability) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default Clob createClob() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default Blob createBlob() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default NClob createNClob() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default SQLXML createSQLXML() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default boolean isValid(int timeout) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default String getClientInfo(String name) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default Properties getClientInfo() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default Array createArrayOf(String typeName, Object[] elements) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default Struct createStruct(String typeName, Object[] attributes) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default void setSchema(String schema) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default String getSchema() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default void abort(Executor executor) throws SQLException {
this.close();
}
@Override
default void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
}
@Override
default int getNetworkTimeout() throws SQLException {
return 0;
}
@Override
default T unwrap(Class iface) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@Override
default boolean isWrapperFor(Class> iface) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy