提交 b76d9b20 authored 作者: Thomas Mueller Graf's avatar Thomas Mueller Graf

Merged

...@@ -23,6 +23,10 @@ Change Log ...@@ -23,6 +23,10 @@ Change Log
<ul> <ul>
<li>Issue #299: Nested derrived tables did not always work as expected. <li>Issue #299: Nested derrived tables did not always work as expected.
</li> </li>
<li>Use interfaces to replace the java version templating, idea from Lukas Eder.
</li>
<li>Issue #295: JdbcResultSet.getObject(int, Class) returns null instead of throwing.
</li>
</ul> </ul>
<h2>Version 1.4.192 Beta (2016-05-26)</h2> <h2>Version 1.4.192 Beta (2016-05-26)</h2>
......
...@@ -10,15 +10,12 @@ import java.sql.DriverManager; ...@@ -10,15 +10,12 @@ import java.sql.DriverManager;
import java.sql.DriverPropertyInfo; import java.sql.DriverPropertyInfo;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Logger;
import org.h2.engine.Constants; import org.h2.engine.Constants;
import org.h2.jdbc.JdbcConnection; import org.h2.jdbc.JdbcConnection;
import org.h2.message.DbException; import org.h2.message.DbException;
import org.h2.upgrade.DbUpgrade; import org.h2.upgrade.DbUpgrade;
/*## Java 1.7 ##
import java.util.logging.Logger;
//*/
/** /**
* The database driver. An application should not use this class directly. The * The database driver. An application should not use this class directly. The
* only thing the application needs to do is load the driver. This can be done * only thing the application needs to do is load the driver. This can be done
...@@ -31,7 +28,7 @@ import java.util.logging.Logger; ...@@ -31,7 +28,7 @@ import java.util.logging.Logger;
* &quot;jdbc:h2:&tilde;/test&quot;, &quot;sa&quot;, &quot;sa&quot;); * &quot;jdbc:h2:&tilde;/test&quot;, &quot;sa&quot;, &quot;sa&quot;);
* </pre> * </pre>
*/ */
public class Driver implements java.sql.Driver { public class Driver implements java.sql.Driver, JdbcDriverBackwardsCompat {
private static final Driver INSTANCE = new Driver(); private static final Driver INSTANCE = new Driver();
private static final String DEFAULT_URL = "jdbc:default:connection"; private static final String DEFAULT_URL = "jdbc:default:connection";
...@@ -143,12 +140,10 @@ public class Driver implements java.sql.Driver { ...@@ -143,12 +140,10 @@ public class Driver implements java.sql.Driver {
/** /**
* [Not supported] * [Not supported]
*/ */
/*## Java 1.7 ##
@Override @Override
public Logger getParentLogger() { public Logger getParentLogger() {
return null; return null;
} }
//*/
/** /**
* INTERNAL * INTERNAL
......
/*
* Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2;
import java.util.logging.Logger;
/**
* Allows us to compile on older platforms, while still implementing the methods from the newer JDBC API.
*/
public interface JdbcDriverBackwardsCompat {
Logger getParentLogger();
}
...@@ -25,7 +25,6 @@ import java.sql.Timestamp; ...@@ -25,7 +25,6 @@ import java.sql.Timestamp;
import java.util.Calendar; import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.h2.api.ErrorCode; import org.h2.api.ErrorCode;
import org.h2.expression.ParameterInterface; import org.h2.expression.ParameterInterface;
import org.h2.message.DbException; import org.h2.message.DbException;
...@@ -41,7 +40,7 @@ import org.h2.value.ValueNull; ...@@ -41,7 +40,7 @@ import org.h2.value.ValueNull;
* @author Thomas Mueller * @author Thomas Mueller
*/ */
public class JdbcCallableStatement extends JdbcPreparedStatement implements public class JdbcCallableStatement extends JdbcPreparedStatement implements
CallableStatement { CallableStatement, JdbcCallableStatementBackwardsCompat {
private BitField outParameters; private BitField outParameters;
private int maxOutParameters; private int maxOutParameters;
...@@ -300,6 +299,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements ...@@ -300,6 +299,7 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements
* @throws SQLException if the column is not found or if this object is * @throws SQLException if the column is not found or if this object is
* closed * closed
*/ */
@Deprecated
@Override @Override
public BigDecimal getBigDecimal(int parameterIndex, int scale) public BigDecimal getBigDecimal(int parameterIndex, int scale)
throws SQLException { throws SQLException {
...@@ -1569,12 +1569,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements ...@@ -1569,12 +1569,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
* @param type the class of the returned value * @param type the class of the returned value
*/ */
/*## Java 1.7 ##
@Override @Override
public <T> T getObject(int parameterIndex, Class<T> type) { public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException {
return null; throw unsupported("getObject");
} }
//*/
/** /**
* [Not supported] * [Not supported]
...@@ -1582,12 +1580,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements ...@@ -1582,12 +1580,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements
* @param parameterName the parameter name * @param parameterName the parameter name
* @param type the class of the returned value * @param type the class of the returned value
*/ */
/*## Java 1.7 ##
@Override @Override
public <T> T getObject(String parameterName, Class<T> type) { public <T> T getObject(String parameterName, Class<T> type) throws SQLException {
return null; throw unsupported("getObject");
} }
//*/
private ResultSetMetaData getCheckedMetaData() throws SQLException { private ResultSetMetaData getCheckedMetaData() throws SQLException {
ResultSetMetaData meta = getMetaData(); ResultSetMetaData meta = getMetaData();
......
/*
* Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.jdbc;
import java.sql.SQLException;
/**
* Allows us to compile on older platforms, while still implementing the methods from the newer JDBC API.
*/
public interface JdbcCallableStatementBackwardsCompat {
<T> T getObject(int parameterIndex, Class<T> type) throws SQLException;
<T> T getObject(String parameterName, Class<T> type) throws SQLException;
}
...@@ -26,16 +26,12 @@ import java.sql.SQLXML; ...@@ -26,16 +26,12 @@ import java.sql.SQLXML;
import java.sql.Savepoint; import java.sql.Savepoint;
import java.sql.Statement; import java.sql.Statement;
import java.sql.Struct; import java.sql.Struct;
/*## Java 1.7 ##
import java.util.concurrent.Executor;
//*/
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.concurrent.Executor;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.h2.api.ErrorCode; import org.h2.api.ErrorCode;
import org.h2.command.CommandInterface; import org.h2.command.CommandInterface;
...@@ -67,7 +63,7 @@ import org.h2.value.ValueString; ...@@ -67,7 +63,7 @@ import org.h2.value.ValueString;
* connection should only be used in one thread at any time. * connection should only be used in one thread at any time.
* </p> * </p>
*/ */
public class JdbcConnection extends TraceObject implements Connection { public class JdbcConnection extends TraceObject implements Connection, JdbcConnectionBackwardsCompat {
private static final String NUM_SERVERS = "numServers"; private static final String NUM_SERVERS = "numServers";
private static final String PREFIX_SERVER = "server"; private static final String PREFIX_SERVER = "server";
...@@ -1896,34 +1892,28 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1896,34 +1892,28 @@ public class JdbcConnection extends TraceObject implements Connection {
* *
* @param schema the schema * @param schema the schema
*/ */
/*## Java 1.7 ##
@Override @Override
public void setSchema(String schema) { public void setSchema(String schema) {
// not supported // not supported
} }
//*/
/** /**
* [Not supported] * [Not supported]
*/ */
/*## Java 1.7 ##
@Override @Override
public String getSchema() { public String getSchema() {
return null; return null;
} }
//*/
/** /**
* [Not supported] * [Not supported]
* *
* @param executor the executor used by this method * @param executor the executor used by this method
*/ */
/*## Java 1.7 ##
@Override @Override
public void abort(Executor executor) { public void abort(Executor executor) {
// not supported // not supported
} }
//*/
/** /**
* [Not supported] * [Not supported]
...@@ -1931,22 +1921,18 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1931,22 +1921,18 @@ public class JdbcConnection extends TraceObject implements Connection {
* @param executor the executor used by this method * @param executor the executor used by this method
* @param milliseconds the TCP connection timeout * @param milliseconds the TCP connection timeout
*/ */
/*## Java 1.7 ##
@Override @Override
public void setNetworkTimeout(Executor executor, int milliseconds) { public void setNetworkTimeout(Executor executor, int milliseconds) {
// not supported // not supported
} }
//*/
/** /**
* [Not supported] * [Not supported]
*/ */
/*## Java 1.7 ##
@Override @Override
public int getNetworkTimeout() { public int getNetworkTimeout() {
return 0; return 0;
} }
//*/
/** /**
* Check that the given type map is either null or empty. * Check that the given type map is either null or empty.
......
/*
* Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.jdbc;
import java.util.concurrent.Executor;
/**
* Allows us to compile on older platforms, while still implementing the methods from the newer JDBC API.
*/
public interface JdbcConnectionBackwardsCompat {
void setSchema(String schema);
String getSchema();
void abort(Executor executor);
void setNetworkTimeout(Executor executor, int milliseconds);
int getNetworkTimeout();
}
...@@ -26,7 +26,7 @@ import org.h2.util.StringUtils; ...@@ -26,7 +26,7 @@ import org.h2.util.StringUtils;
* Represents the meta data for a database. * Represents the meta data for a database.
*/ */
public class JdbcDatabaseMetaData extends TraceObject implements public class JdbcDatabaseMetaData extends TraceObject implements
DatabaseMetaData { DatabaseMetaData, JdbcDatabaseMetaDataBackwardsCompat {
private final JdbcConnection conn; private final JdbcConnection conn;
...@@ -3133,12 +3133,10 @@ public class JdbcDatabaseMetaData extends TraceObject implements ...@@ -3133,12 +3133,10 @@ public class JdbcDatabaseMetaData extends TraceObject implements
/** /**
* [Not supported] * [Not supported]
*/ */
/*## Java 1.7 ##
@Override @Override
public boolean generatedKeyAlwaysReturned() { public boolean generatedKeyAlwaysReturned() {
return true; return true;
} }
//*/
/** /**
* [Not supported] * [Not supported]
...@@ -3151,13 +3149,11 @@ public class JdbcDatabaseMetaData extends TraceObject implements ...@@ -3151,13 +3149,11 @@ public class JdbcDatabaseMetaData extends TraceObject implements
* @param columnNamePattern null (to get all objects) or a column name * @param columnNamePattern null (to get all objects) or a column name
* (uppercase for unquoted names) * (uppercase for unquoted names)
*/ */
/*## Java 1.7 ##
@Override @Override
public ResultSet getPseudoColumns(String catalog, String schemaPattern, public ResultSet getPseudoColumns(String catalog, String schemaPattern,
String tableNamePattern, String columnNamePattern) { String tableNamePattern, String columnNamePattern) {
return null; return null;
} }
//*/
/** /**
* INTERNAL * INTERNAL
......
/*
* Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, and the
* EPL 1.0 (http://h2database.com/html/license.html). Initial Developer: H2
* Group
*/
package org.h2.jdbc;
import java.sql.ResultSet;
/**
* Allows us to compile on older platforms, while still implementing the methods
* from the newer JDBC API.
*/
public interface JdbcDatabaseMetaDataBackwardsCompat {
boolean generatedKeyAlwaysReturned();
ResultSet getPseudoColumns(String catalog, String schemaPattern,
String tableNamePattern, String columnNamePattern);
}
...@@ -27,7 +27,6 @@ import java.sql.Timestamp; ...@@ -27,7 +27,6 @@ import java.sql.Timestamp;
import java.util.Calendar; import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.h2.api.ErrorCode; import org.h2.api.ErrorCode;
import org.h2.engine.SysProperties; import org.h2.engine.SysProperties;
import org.h2.message.DbException; import org.h2.message.DbException;
...@@ -72,7 +71,7 @@ import org.h2.value.ValueTimestamp; ...@@ -72,7 +71,7 @@ import org.h2.value.ValueTimestamp;
* changes are visible, but not own inserts and deletes. * changes are visible, but not own inserts and deletes.
* </p> * </p>
*/ */
public class JdbcResultSet extends TraceObject implements ResultSet { public class JdbcResultSet extends TraceObject implements ResultSet, JdbcResultSetBackwardsCompat {
private final boolean closeStatement; private final boolean closeStatement;
private final boolean scrollable; private final boolean scrollable;
private final boolean updatable; private final boolean updatable;
...@@ -3685,12 +3684,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3685,12 +3684,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param columnIndex the column index (1, 2, ...) * @param columnIndex the column index (1, 2, ...)
* @param type the class of the returned value * @param type the class of the returned value
*/ */
/*## Java 1.7 ##
@Override @Override
public <T> T getObject(int columnIndex, Class<T> type) { public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
return null; throw unsupported("getObject");
} }
//*/
/** /**
* [Not supported] * [Not supported]
...@@ -3698,12 +3695,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3698,12 +3695,10 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param columnName the column name * @param columnName the column name
* @param type the class of the returned value * @param type the class of the returned value
*/ */
/*## Java 1.7 ##
@Override @Override
public <T> T getObject(String columnName, Class<T> type) { public <T> T getObject(String columnName, Class<T> type) throws SQLException {
return null; throw unsupported("getObject");
} }
//*/
/** /**
* INTERNAL * INTERNAL
......
/*
* Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.jdbc;
import java.sql.SQLException;
/**
* Allows us to compile on older platforms, while still implementing the methods from the newer JDBC API.
*/
public interface JdbcResultSetBackwardsCompat {
public abstract <T> T getObject(int columnIndex, Class<T> type) throws SQLException;
public abstract <T> T getObject(String columnName, Class<T> type) throws SQLException;
}
...@@ -23,7 +23,7 @@ import org.h2.util.New; ...@@ -23,7 +23,7 @@ import org.h2.util.New;
/** /**
* Represents a statement. * Represents a statement.
*/ */
public class JdbcStatement extends TraceObject implements Statement { public class JdbcStatement extends TraceObject implements Statement, JdbcStatementBackwardsCompat {
protected JdbcConnection conn; protected JdbcConnection conn;
protected SessionInterface session; protected SessionInterface session;
...@@ -929,22 +929,18 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -929,22 +929,18 @@ public class JdbcStatement extends TraceObject implements Statement {
/** /**
* [Not supported] * [Not supported]
*/ */
/*## Java 1.7 ##
@Override @Override
public void closeOnCompletion() { public void closeOnCompletion() {
// not supported // not supported
} }
//*/
/** /**
* [Not supported] * [Not supported]
*/ */
/*## Java 1.7 ##
@Override @Override
public boolean isCloseOnCompletion() { public boolean isCloseOnCompletion() {
return true; return true;
} }
//*/
// ============================================================= // =============================================================
......
/*
* Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.jdbc;
/**
* Allows us to compile on older platforms, while still implementing the methods from the newer JDBC API.
*/
public interface JdbcStatementBackwardsCompat {
void closeOnCompletion();
boolean isCloseOnCompletion();
}
...@@ -23,17 +23,14 @@ import java.io.PrintWriter; ...@@ -23,17 +23,14 @@ import java.io.PrintWriter;
import java.sql.Connection; import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.logging.Logger;
import javax.sql.ConnectionEvent; import javax.sql.ConnectionEvent;
import javax.sql.ConnectionEventListener; import javax.sql.ConnectionEventListener;
import javax.sql.ConnectionPoolDataSource; import javax.sql.ConnectionPoolDataSource;
import javax.sql.DataSource; import javax.sql.DataSource;
import javax.sql.PooledConnection; import javax.sql.PooledConnection;
import org.h2.util.New;
import org.h2.message.DbException; import org.h2.message.DbException;
import org.h2.util.New;
/*## Java 1.7 ##
import java.util.logging.Logger;
//*/
/** /**
* A simple standalone JDBC connection pool. * A simple standalone JDBC connection pool.
...@@ -62,7 +59,7 @@ import java.util.logging.Logger; ...@@ -62,7 +59,7 @@ import java.util.logging.Logger;
* (<a href="http://www.source-code.biz">www.source-code.biz</a>) * (<a href="http://www.source-code.biz">www.source-code.biz</a>)
* @author Thomas Mueller * @author Thomas Mueller
*/ */
public class JdbcConnectionPool implements DataSource, ConnectionEventListener { public class JdbcConnectionPool implements DataSource, ConnectionEventListener, JdbcConnectionPoolBackwardsCompat {
private static final int DEFAULT_TIMEOUT = 30; private static final int DEFAULT_TIMEOUT = 30;
private static final int DEFAULT_MAX_CONNECTIONS = 10; private static final int DEFAULT_MAX_CONNECTIONS = 10;
...@@ -333,12 +330,10 @@ public class JdbcConnectionPool implements DataSource, ConnectionEventListener { ...@@ -333,12 +330,10 @@ public class JdbcConnectionPool implements DataSource, ConnectionEventListener {
/** /**
* [Not supported] * [Not supported]
*/ */
/*## Java 1.7 ##
@Override @Override
public Logger getParentLogger() { public Logger getParentLogger() {
return null; return null;
} }
//*/
} }
/*
* Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.jdbcx;
import java.util.logging.Logger;
/**
* Allows us to compile on older platforms, while still implementing the methods from the newer JDBC API.
*/
public interface JdbcConnectionPoolBackwardsCompat {
Logger getParentLogger();
}
...@@ -12,6 +12,7 @@ import java.io.Serializable; ...@@ -12,6 +12,7 @@ import java.io.Serializable;
import java.sql.Connection; import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Logger;
import javax.naming.Reference; import javax.naming.Reference;
import javax.naming.Referenceable; import javax.naming.Referenceable;
import javax.naming.StringRefAddr; import javax.naming.StringRefAddr;
...@@ -25,10 +26,6 @@ import org.h2.jdbc.JdbcConnection; ...@@ -25,10 +26,6 @@ import org.h2.jdbc.JdbcConnection;
import org.h2.message.TraceObject; import org.h2.message.TraceObject;
import org.h2.util.StringUtils; import org.h2.util.StringUtils;
/*## Java 1.7 ##
import java.util.logging.Logger;
//*/
/** /**
* A data source for H2 database connections. It is a factory for XAConnection * A data source for H2 database connections. It is a factory for XAConnection
* and Connection objects. This class is usually registered in a JNDI naming * and Connection objects. This class is usually registered in a JNDI naming
...@@ -63,7 +60,7 @@ import java.util.logging.Logger; ...@@ -63,7 +60,7 @@ import java.util.logging.Logger;
* well; this may be a security problem in some cases. * well; this may be a security problem in some cases.
*/ */
public class JdbcDataSource extends TraceObject implements XADataSource, public class JdbcDataSource extends TraceObject implements XADataSource,
DataSource, ConnectionPoolDataSource, Serializable, Referenceable { DataSource, ConnectionPoolDataSource, Serializable, Referenceable, JdbcDataSourceBackwardsCompat {
private static final long serialVersionUID = 1288136338451857771L; private static final long serialVersionUID = 1288136338451857771L;
...@@ -425,12 +422,10 @@ public class JdbcDataSource extends TraceObject implements XADataSource, ...@@ -425,12 +422,10 @@ public class JdbcDataSource extends TraceObject implements XADataSource,
/** /**
* [Not supported] * [Not supported]
*/ */
/*## Java 1.7 ##
@Override @Override
public Logger getParentLogger() { public Logger getParentLogger() {
return null; return null;
} }
//*/
/** /**
* INTERNAL * INTERNAL
......
/*
* Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.jdbcx;
import java.util.logging.Logger;
/**
* Allows us to compile on older platforms, while still implementing the methods from the newer JDBC API.
*/
public interface JdbcDataSourceBackwardsCompat {
Logger getParentLogger();
}
...@@ -28,8 +28,8 @@ import java.sql.Types; ...@@ -28,8 +28,8 @@ import java.sql.Types;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Map; import java.util.Map;
import org.h2.api.ErrorCode; import org.h2.api.ErrorCode;
import org.h2.jdbc.JdbcResultSetBackwardsCompat;
import org.h2.message.DbException; import org.h2.message.DbException;
import org.h2.util.JdbcUtils; import org.h2.util.JdbcUtils;
import org.h2.util.MathUtils; import org.h2.util.MathUtils;
...@@ -54,7 +54,7 @@ import org.h2.value.DataType; ...@@ -54,7 +54,7 @@ import org.h2.value.DataType;
* </pre> * </pre>
* *
*/ */
public class SimpleResultSet implements ResultSet, ResultSetMetaData { public class SimpleResultSet implements ResultSet, ResultSetMetaData, JdbcResultSetBackwardsCompat {
private ArrayList<Object[]> rows; private ArrayList<Object[]> rows;
private Object[] currentRow; private Object[] currentRow;
...@@ -391,6 +391,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData { ...@@ -391,6 +391,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/** /**
* @deprecated INTERNAL * @deprecated INTERNAL
*/ */
@Deprecated
@Override @Override
public BigDecimal getBigDecimal(int columnIndex, int scale) public BigDecimal getBigDecimal(int columnIndex, int scale)
throws SQLException { throws SQLException {
...@@ -400,6 +401,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData { ...@@ -400,6 +401,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/** /**
* @deprecated INTERNAL * @deprecated INTERNAL
*/ */
@Deprecated
@Override @Override
public BigDecimal getBigDecimal(String columnLabel, int scale) public BigDecimal getBigDecimal(String columnLabel, int scale)
throws SQLException { throws SQLException {
...@@ -821,12 +823,10 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData { ...@@ -821,12 +823,10 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
* @param columnIndex the column index (1, 2, ...) * @param columnIndex the column index (1, 2, ...)
* @param type the class of the returned value * @param type the class of the returned value
*/ */
/*## Java 1.7 ##
@Override @Override
public <T> T getObject(int columnIndex, Class<T> type) { public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
return null; throw getUnsupportedException();
} }
//*/
/** /**
* INTERNAL * INTERNAL
...@@ -834,12 +834,10 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData { ...@@ -834,12 +834,10 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
* @param columnName the column name * @param columnName the column name
* @param type the class of the returned value * @param type the class of the returned value
*/ */
/*## Java 1.7 ##
@Override @Override
public <T> T getObject(String columnName, Class<T> type) { public <T> T getObject(String columnName, Class<T> type) throws SQLException {
return null; throw getUnsupportedException();
} }
//*/
/** /**
* INTERNAL * INTERNAL
...@@ -1045,6 +1043,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData { ...@@ -1045,6 +1043,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/** /**
* @deprecated INTERNAL * @deprecated INTERNAL
*/ */
@Deprecated
@Override @Override
public InputStream getUnicodeStream(int columnIndex) throws SQLException { public InputStream getUnicodeStream(int columnIndex) throws SQLException {
throw getUnsupportedException(); throw getUnsupportedException();
...@@ -1053,6 +1052,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData { ...@@ -1053,6 +1052,7 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/** /**
* @deprecated INTERNAL * @deprecated INTERNAL
*/ */
@Deprecated
@Override @Override
public InputStream getUnicodeStream(String columnLabel) throws SQLException { public InputStream getUnicodeStream(String columnLabel) throws SQLException {
throw getUnsupportedException(); throw getUnsupportedException();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论