JDK 7编译兼容

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@914 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-09-28 15:29:53 +00:00
parent 7ce7234f64
commit bdd0671d85
21 changed files with 212 additions and 8 deletions
@@ -20,6 +20,7 @@ import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.DriverPropertyInfo;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
@@ -27,6 +28,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Logger;
import com.alibaba.druid.filter.Filter;
import com.alibaba.druid.logging.Log;
@@ -281,4 +283,8 @@ public class DruidDriver implements Driver, DruidDriverMBean {
public static ConcurrentMap<String, DataSourceProxyImpl> getProxyDataSources() {
return proxyDataSources;
}
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;
@@ -600,4 +601,12 @@ public class CallableStatementProxyImpl extends PreparedStatementProxyImpl imple
createChain().callableStatement_setNClob(this, parameterName, reader);
}
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;
@@ -33,6 +34,7 @@ import java.sql.Struct;
import java.util.Date;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Executor;
import com.alibaba.druid.filter.FilterChain;
import com.alibaba.druid.filter.FilterChainImpl;
@@ -319,4 +321,24 @@ public class ConnectionProxyImpl extends WrapperProxyImpl implements ConnectionP
createChain().connection_setTypeMap(this, map);
}
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();
}
}
@@ -29,6 +29,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;
@@ -1007,4 +1008,12 @@ public class ResultSetProxyImpl extends WrapperProxyImpl implements ResultSetPro
return createChain().resultSet_wasNull(this);
}
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();
}
}
@@ -18,6 +18,7 @@ package com.alibaba.druid.proxy.jdbc;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.ArrayList;
@@ -305,4 +306,12 @@ public class StatementProxyImpl extends WrapperProxyImpl implements StatementPro
public String getLastExecuteSql() {
return lastExecuteSql;
}
public void closeOnCompletion() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
public boolean isCloseOnCompletion() throws SQLException {
throw new SQLFeatureNotSupportedException();
}
}