improve wrap support

This commit is contained in:
wenshao
2013-05-26 14:52:17 +08:00
parent abd919c6fd
commit 6901d359c4
6 changed files with 233 additions and 2 deletions
@@ -573,4 +573,21 @@ public class PreparedStatementProxyImpl extends StatementProxyImpl implements Pr
public String getLastExecuteSql() {
return this.sql;
}
@SuppressWarnings("unchecked")
public <T> T unwrap(Class<T> iface) throws SQLException {
if (iface == PreparedStatementProxy.class) {
return (T) this;
}
return super.unwrap(iface);
}
public boolean isWrapperFor(Class<?> iface) throws SQLException {
if (iface == PreparedStatementProxy.class) {
return true;
}
return super.isWrapperFor(iface);
}
}