public class Jdbc41Bridge extends Object
AbstractMethodError
) when using a JDBC driver written for JDBC 4.0 (Java 6).Constructor and Description |
---|
Jdbc41Bridge() |
public Jdbc41Bridge()
public static void abort(Connection connection, Executor executor) throws SQLException
Connection.abort(Executor)
without throwing a AbstractMethodError
.
If the JDBC driver does not implement Connection.abort(Executor)
, then call Connection.close()
.
connection
- the receiverexecutor
- See Connection.abort(Executor)
.SQLException
- See Connection.abort(Executor)
.Connection.abort(Executor)
public static boolean generatedKeyAlwaysReturned(DatabaseMetaData databaseMetaData) throws SQLException
DatabaseMetaData.generatedKeyAlwaysReturned()
without throwing a
AbstractMethodError
.
If the JDBC driver does not implement DatabaseMetaData.generatedKeyAlwaysReturned()
, then return false.
databaseMetaData
- See DatabaseMetaData.generatedKeyAlwaysReturned()
DatabaseMetaData.generatedKeyAlwaysReturned()
SQLException
- See DatabaseMetaData.generatedKeyAlwaysReturned()
DatabaseMetaData.generatedKeyAlwaysReturned()
public static int getNetworkTimeout(Connection connection) throws SQLException
Connection.getNetworkTimeout()
without throwing a AbstractMethodError
.
If the JDBC driver does not implement Connection.getNetworkTimeout()
, then return 0.
connection
- the receiverConnection.getNetworkTimeout()
SQLException
- See Connection.getNetworkTimeout()
Connection.getNetworkTimeout()
public static <T> T getObject(ResultSet resultSet, int columnIndex, Class<T> type) throws SQLException
ResultSet.getObject(int, Class)
without throwing a AbstractMethodError
.
If the JDBC driver does not implement ResultSet.getObject(int, Class)
, then return 0.
T
- See ResultSet.getObject(int, Class)
resultSet
- See ResultSet.getObject(int, Class)
columnIndex
- See ResultSet.getObject(int, Class)
type
- See ResultSet.getObject(int, Class)
ResultSet.getObject(int, Class)
SQLException
- See ResultSet.getObject(int, Class)
ResultSet.getObject(int, Class)
public static <T> T getObject(ResultSet resultSet, String columnLabel, Class<T> type) throws SQLException
ResultSet.getObject(String, Class)
without throwing a AbstractMethodError
.T
- See ResultSet.getObject(String, Class)
resultSet
- See ResultSet.getObject(String, Class)
columnLabel
- See ResultSet.getObject(String, Class)
type
- See ResultSet.getObject(String, Class)
ResultSet.getObject(String, Class)
SQLException
- See ResultSet.getObject(String, Class)
ResultSet.getObject(int, Class)
public static ResultSet getPseudoColumns(DatabaseMetaData databaseMetaData, String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
DatabaseMetaData.getPseudoColumns(String, String, String, String)
without throwing a
AbstractMethodError
.
If the JDBC driver does not implement DatabaseMetaData.getPseudoColumns(String, String, String, String)
,
then return null.
databaseMetaData
- the receivercatalog
- See DatabaseMetaData.getPseudoColumns(String, String, String, String)
schemaPattern
- See DatabaseMetaData.getPseudoColumns(String, String, String, String)
tableNamePattern
- See DatabaseMetaData.getPseudoColumns(String, String, String, String)
columnNamePattern
- See DatabaseMetaData.getPseudoColumns(String, String, String, String)
DatabaseMetaData.getPseudoColumns(String, String, String, String)
SQLException
- See DatabaseMetaData.getPseudoColumns(String, String, String, String)
DatabaseMetaData.getPseudoColumns(String, String, String, String)
public static String getSchema(Connection connection) throws SQLException
Connection.getSchema()
without throwing a AbstractMethodError
.
If the JDBC driver does not implement Connection.getSchema()
, then return null.
connection
- the receiverConnection.getSchema()
.SQLException
- See Connection.getSchema()
.Connection.getSchema()
public static void setNetworkTimeout(Connection connection, Executor executor, int milliseconds) throws SQLException
Connection.setNetworkTimeout(Executor, int)
without throwing a AbstractMethodError
.
If the JDBC driver does not implement Connection.setNetworkTimeout(Executor, int)
, then do nothing.
connection
- the receiverexecutor
- See Connection.setNetworkTimeout(Executor, int)
milliseconds
- Connection.setNetworkTimeout(Executor, int)
SQLException
- Connection.setNetworkTimeout(Executor, int)
Connection.setNetworkTimeout(Executor, int)
public static void setSchema(Connection connection, String schema) throws SQLException
Connection.setSchema(String)
without throwing a AbstractMethodError
.
If the JDBC driver does not implement Connection.setSchema(String)
, then do nothing.
connection
- the receiverschema
- See Connection.setSchema(String)
.SQLException
- See Connection.setSchema(String)
.Connection.setSchema(String)
public static void closeOnCompletion(Statement statement) throws SQLException
Statement.closeOnCompletion()
without throwing a AbstractMethodError
.
If the JDBC driver does not implement Statement.closeOnCompletion()
, then just check that the connection
is closed to then throw a SQLException.
statement
- See Statement.closeOnCompletion()
SQLException
- See Statement.closeOnCompletion()
Statement.closeOnCompletion()
public static boolean isCloseOnCompletion(Statement statement) throws SQLException
Statement.isCloseOnCompletion()
without throwing a AbstractMethodError
.
If the JDBC driver does not implement Statement.isCloseOnCompletion()
, then just check that the
connection is closed to then throw a SQLException.
statement
- See Statement.isCloseOnCompletion()
Statement.isCloseOnCompletion()
SQLException
- See Statement.isCloseOnCompletion()
Statement.closeOnCompletion()
public static Logger getParentLogger(CommonDataSource commonDataSource) throws SQLFeatureNotSupportedException
CommonDataSource.getParentLogger()
without throwing a AbstractMethodError
.
If the JDBC driver does not implement CommonDataSource.getParentLogger()
, then return null.
commonDataSource
- See CommonDataSource.getParentLogger()
CommonDataSource.getParentLogger()
SQLFeatureNotSupportedException
- See CommonDataSource.getParentLogger()
Copyright © 2001–2019 The Apache Software Foundation. All rights reserved.