support spring Jdbc4NativeJdbcExtractor

This commit is contained in:
wenshao
2012-01-04 16:16:09 +08:00
parent 408b5c778f
commit e7c4095020
15 changed files with 224 additions and 109 deletions
@@ -33,6 +33,8 @@ import java.sql.SQLXML;
import java.sql.Statement;
import java.util.Calendar;
import com.alibaba.druid.proxy.jdbc.ResultSetProxy;
/**
* @author wenshao<szujobs@hotmail.com>
*/
@@ -1766,4 +1768,17 @@ public final class DruidPooledResultSet extends PoolableWrapper implements Resul
public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
throw new SQLFeatureNotSupportedException();
}
@SuppressWarnings("unchecked")
public <T> T unwrap(Class<T> iface) throws SQLException {
if (iface == ResultSet.class) {
if (rs instanceof ResultSetProxy) {
return rs.unwrap(iface);
}
return (T) rs;
}
return super.unwrap(iface);
}
}