mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
JDK 7编译兼容
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@914 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -3,6 +3,8 @@ package com.alibaba.druid.pool;
|
||||
import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -43,4 +45,9 @@ public class DataSourceAdapter extends WrapperAdapter implements DataSource {
|
||||
public Connection getConnection(String username, String password) throws SQLException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.sql.Driver;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@@ -36,6 +37,7 @@ import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.management.JMException;
|
||||
import javax.management.openmbean.CompositeDataSupport;
|
||||
@@ -1304,4 +1306,7 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
|
||||
public abstract String getProperties();
|
||||
|
||||
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.Driver;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -471,4 +473,7 @@ public class DruidDataSourceC3P0Adapter implements DataSource, DruidDataSourceC3
|
||||
this.propertyCycle = propertyCycle;
|
||||
}
|
||||
|
||||
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.sql.NClob;
|
||||
import java.sql.Ref;
|
||||
import java.sql.RowId;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.sql.SQLXML;
|
||||
import java.util.Calendar;
|
||||
|
||||
@@ -1046,4 +1047,12 @@ public class PoolableCallableStatement extends PoolablePreparedStatement impleme
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public <T> T getObject(String parameterName, Class<T> type) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.sql.NClob;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLClientInfoException;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.sql.SQLWarning;
|
||||
import java.sql.SQLXML;
|
||||
import java.sql.Savepoint;
|
||||
@@ -32,6 +33,7 @@ import java.sql.Statement;
|
||||
import java.sql.Struct;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import javax.sql.ConnectionEvent;
|
||||
import javax.sql.ConnectionEventListener;
|
||||
@@ -876,4 +878,23 @@ public class PoolableConnection implements PooledConnection, Connection {
|
||||
}
|
||||
}
|
||||
|
||||
public void setSchema(String schema) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public String getSchema() throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public void abort(Executor executor) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public int getNetworkTimeout() throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.RowId;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.sql.SQLWarning;
|
||||
import java.sql.SQLXML;
|
||||
import java.sql.Statement;
|
||||
@@ -1739,4 +1740,11 @@ public final class PoolableResultSet extends PoolableWrapper implements ResultSe
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -544,4 +544,12 @@ public class PoolableStatement extends PoolableWrapper implements Statement {
|
||||
public String toString() {
|
||||
return stmt.toString();
|
||||
}
|
||||
|
||||
public void closeOnCompletion() throws SQLException {
|
||||
|
||||
}
|
||||
|
||||
public boolean isCloseOnCompletion() throws SQLException {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.sql.NClob;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLClientInfoException;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.sql.SQLWarning;
|
||||
import java.sql.SQLXML;
|
||||
import java.sql.Savepoint;
|
||||
@@ -19,6 +20,7 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import com.alibaba.druid.pool.WrapperAdapter;
|
||||
import com.alibaba.druid.proxy.jdbc.CallableStatementProxyImpl;
|
||||
@@ -578,4 +580,24 @@ public class MultiDataSourceConnection extends WrapperAdapter implements Connect
|
||||
return connectedTime;
|
||||
}
|
||||
|
||||
public void setSchema(String schema) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public String getSchema() throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public void abort(Executor executor) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public int getNetworkTimeout() throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.alibaba.druid.pool.ha;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.sql.SQLWarning;
|
||||
import java.sql.Statement;
|
||||
|
||||
@@ -449,4 +450,12 @@ public class MultiDataSourceStatement extends WrapperAdapter implements Statemen
|
||||
public String getCursorName() {
|
||||
return cursorName;
|
||||
}
|
||||
|
||||
public void closeOnCompletion() throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
|
||||
public boolean isCloseOnCompletion() throws SQLException {
|
||||
throw new SQLFeatureNotSupportedException();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user