[#5971] Do not throw UnsupportedOperationException in DefaultResultSet etc
This commit is contained in:
parent
37943c0381
commit
208d77a13c
@ -47,6 +47,7 @@ import java.sql.NClob;
|
||||
import java.sql.Ref;
|
||||
import java.sql.RowId;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLType;
|
||||
import java.sql.SQLXML;
|
||||
import java.sql.Statement;
|
||||
import java.sql.Time;
|
||||
@ -638,4 +639,66 @@ public class DefaultCallableStatement extends DefaultPreparedStatement implement
|
||||
public void setNClob(String parameterName, Reader reader) throws SQLException {
|
||||
getDelegateCallableStatement().setNClob(parameterName, reader);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// JDBC 4.1
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException {
|
||||
return getDelegate().getObject(parameterIndex, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getObject(String parameterName, Class<T> type) throws SQLException {
|
||||
return getDelegate().getObject(parameterName, type);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// JDBC 4.2
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public void setObject(String parameterName, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException {
|
||||
getDelegate().setObject(parameterName, x, targetSqlType, scaleOrLength);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(String parameterName, Object x, SQLType targetSqlType) throws SQLException {
|
||||
getDelegate().setObject(parameterName, x, targetSqlType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerOutParameter(int parameterIndex, SQLType sqlType) throws SQLException {
|
||||
getDelegate().registerOutParameter(parameterIndex, sqlType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException {
|
||||
getDelegate().registerOutParameter(parameterIndex, sqlType, scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException {
|
||||
getDelegate().registerOutParameter(parameterIndex, sqlType, typeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerOutParameter(String parameterName, SQLType sqlType) throws SQLException {
|
||||
getDelegate().registerOutParameter(parameterName, sqlType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException {
|
||||
getDelegate().registerOutParameter(parameterName, sqlType, scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException {
|
||||
getDelegate().registerOutParameter(parameterName, sqlType, typeName);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -51,6 +51,7 @@ import java.sql.Statement;
|
||||
import java.sql.Struct;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* A default JDBC Connection implementation delegating all JDBC 4.0 calls to an
|
||||
@ -318,4 +319,37 @@ public class DefaultConnection extends JDBC41Connection implements Connection {
|
||||
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
|
||||
return getDelegate().createStruct(typeName, attributes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// JDBC 4.1
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public void setSchema(String s) throws SQLException {
|
||||
getDelegate().setSchema(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSchema() throws SQLException {
|
||||
return getDelegate().getSchema();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void abort(Executor executor) throws SQLException {
|
||||
getDelegate().abort(executor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
|
||||
getDelegate().setNetworkTimeout(executor, milliseconds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNetworkTimeout() throws SQLException {
|
||||
return getDelegate().getNetworkTimeout();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -50,6 +50,7 @@ import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.RowId;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLType;
|
||||
import java.sql.SQLXML;
|
||||
import java.sql.Statement;
|
||||
import java.sql.Time;
|
||||
@ -364,4 +365,27 @@ public class DefaultPreparedStatement extends DefaultStatement implements Prepar
|
||||
public void setNClob(int parameterIndex, Reader reader) throws SQLException {
|
||||
getDelegatePreparedStatement().setNClob(parameterIndex, reader);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// JDBC 4.2
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException {
|
||||
getDelegatePreparedStatement().setObject(parameterIndex, x, targetSqlType, scaleOrLength);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException {
|
||||
getDelegatePreparedStatement().setObject(parameterIndex, x, targetSqlType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long executeLargeUpdate() throws SQLException {
|
||||
return getDelegatePreparedStatement().executeLargeUpdate();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -48,6 +48,7 @@ import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.RowId;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLType;
|
||||
import java.sql.SQLWarning;
|
||||
import java.sql.SQLXML;
|
||||
import java.sql.Statement;
|
||||
@ -1028,4 +1029,46 @@ public class DefaultResultSet extends JDBC41ResultSet implements ResultSet {
|
||||
public void updateNClob(String columnLabel, Reader reader) throws SQLException {
|
||||
getDelegate().updateNClob(columnLabel, reader);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// JDBC 4.1
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
|
||||
return getDelegate().getObject(columnIndex, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
|
||||
return getDelegate().getObject(columnLabel, type);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// JDBC 4.2
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public void updateObject(int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException {
|
||||
getDelegate().updateObject(columnIndex, x, targetSqlType, scaleOrLength);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateObject(String columnLabel, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException {
|
||||
getDelegate().updateObject(columnLabel, x, targetSqlType, scaleOrLength);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateObject(int columnIndex, Object x, SQLType targetSqlType) throws SQLException {
|
||||
getDelegate().updateObject(columnIndex, x, targetSqlType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateObject(String columnLabel, Object x, SQLType targetSqlType) throws SQLException {
|
||||
getDelegate().updateObject(columnLabel, x, targetSqlType);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -285,4 +285,66 @@ public class DefaultStatement extends JDBC41Statement implements Statement {
|
||||
public boolean isPoolable() throws SQLException {
|
||||
return getDelegateStatement().isPoolable();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// JDBC 4.1
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public void closeOnCompletion() throws SQLException {
|
||||
getDelegate().closeOnCompletion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCloseOnCompletion() throws SQLException {
|
||||
return getDelegate().isCloseOnCompletion();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// JDBC 4.2
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public long getLargeUpdateCount() throws SQLException {
|
||||
return getDelegate().getLargeUpdateCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLargeMaxRows(long max) throws SQLException {
|
||||
getDelegate().setLargeMaxRows(max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLargeMaxRows() throws SQLException {
|
||||
return getDelegate().getLargeMaxRows();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long[] executeLargeBatch() throws SQLException {
|
||||
return getDelegate().executeLargeBatch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long executeLargeUpdate(String sql) throws SQLException {
|
||||
return getDelegate().executeLargeUpdate(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException {
|
||||
return getDelegate().executeLargeUpdate(sql, autoGeneratedKeys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLException {
|
||||
return getDelegate().executeLargeUpdate(sql, columnIndexes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long executeLargeUpdate(String sql, String[] columnNames) throws SQLException {
|
||||
return getDelegate().executeLargeUpdate(sql, columnNames);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -50,31 +50,31 @@ public abstract class JDBC41Connection {
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final void setSchema(String s) throws SQLException {
|
||||
public void setSchema(String s) throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final String getSchema() throws SQLException {
|
||||
public String getSchema() throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final void abort(Executor executor) throws SQLException {
|
||||
public void abort(Executor executor) throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
|
||||
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final int getNetworkTimeout() throws SQLException {
|
||||
public int getNetworkTimeout() throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,13 +49,13 @@ public abstract class JDBC41ResultSet {
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
|
||||
public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
|
||||
public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,13 +56,13 @@ public abstract class JDBC41Statement {
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final void closeOnCompletion() throws SQLException {
|
||||
public void closeOnCompletion() throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final boolean isCloseOnCompletion() throws SQLException {
|
||||
public boolean isCloseOnCompletion() throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@ -72,13 +72,13 @@ public abstract class JDBC41Statement {
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final <T> T getObject(int parameterIndex, Class<T> type) throws SQLException {
|
||||
public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
// JDBC 4.1 compliance: @Override
|
||||
@SuppressWarnings("unused")
|
||||
public final <T> T getObject(String parameterName, Class<T> type) throws SQLException {
|
||||
public <T> T getObject(String parameterName, Class<T> type) throws SQLException {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user