提交 1bf77427 authored 作者: noelgrandin's avatar noelgrandin

remove the

   //## Java 1.6 ##
comments. We no longer need them, since we depend on Java6 or better now.
上级 b272a2df
...@@ -15,14 +15,12 @@ import java.sql.Blob; ...@@ -15,14 +15,12 @@ import java.sql.Blob;
import java.sql.CallableStatement; import java.sql.CallableStatement;
import java.sql.Clob; import java.sql.Clob;
import java.sql.Date; import java.sql.Date;
import java.sql.NClob;
import java.sql.Ref; import java.sql.Ref;
import java.sql.ResultSetMetaData; import java.sql.ResultSetMetaData;
//## Java 1.6 ##
import java.sql.NClob;
import java.sql.SQLXML;
import java.sql.RowId; import java.sql.RowId;
//*/
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.SQLXML;
import java.sql.Time; import java.sql.Time;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Calendar; import java.util.Calendar;
...@@ -724,22 +722,18 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -724,22 +722,18 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* *
* @param parameterIndex the parameter index (1, 2, ...) * @param parameterIndex the parameter index (1, 2, ...)
*/ */
//## Java 1.6 ##
public RowId getRowId(int parameterIndex) throws SQLException { public RowId getRowId(int parameterIndex) throws SQLException {
throw unsupported("rowId"); throw unsupported("rowId");
} }
//*/
/** /**
* [Not supported] Returns the value of the specified column as a row id. * [Not supported] Returns the value of the specified column as a row id.
* *
* @param parameterName the parameter name * @param parameterName the parameter name
*/ */
//## Java 1.6 ##
public RowId getRowId(String parameterName) throws SQLException { public RowId getRowId(String parameterName) throws SQLException {
throw unsupported("rowId"); throw unsupported("rowId");
} }
//*/
/** /**
* Returns the value of the specified column as a Clob. * Returns the value of the specified column as a Clob.
...@@ -748,12 +742,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -748,12 +742,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @return the value * @return the value
* @throws SQLException if the column is not found or if the result set is closed * @throws SQLException if the column is not found or if the result set is closed
*/ */
//## Java 1.6 ##
public NClob getNClob(int parameterIndex) throws SQLException { public NClob getNClob(int parameterIndex) throws SQLException {
checkRegistered(parameterIndex); checkRegistered(parameterIndex);
return getOpenResultSet().getNClob(parameterIndex); return getOpenResultSet().getNClob(parameterIndex);
} }
//*/
/** /**
* Returns the value of the specified column as a Clob. * Returns the value of the specified column as a Clob.
...@@ -762,29 +754,23 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -762,29 +754,23 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @return the value * @return the value
* @throws SQLException if the column is not found or if the result set is closed * @throws SQLException if the column is not found or if the result set is closed
*/ */
//## Java 1.6 ##
public NClob getNClob(String parameterName) throws SQLException { public NClob getNClob(String parameterName) throws SQLException {
return getNClob(getIndexForName(parameterName)); return getNClob(getIndexForName(parameterName));
} }
//*/
/** /**
* [Not supported] Returns the value of the specified column as a SQLXML object. * [Not supported] Returns the value of the specified column as a SQLXML object.
*/ */
//## Java 1.6 ##
public SQLXML getSQLXML(int parameterIndex) throws SQLException { public SQLXML getSQLXML(int parameterIndex) throws SQLException {
throw unsupported("SQLXML"); throw unsupported("SQLXML");
} }
//*/
/** /**
* [Not supported] Returns the value of the specified column as a SQLXML object. * [Not supported] Returns the value of the specified column as a SQLXML object.
*/ */
//## Java 1.6 ##
public SQLXML getSQLXML(String parameterName) throws SQLException { public SQLXML getSQLXML(String parameterName) throws SQLException {
throw unsupported("SQLXML"); throw unsupported("SQLXML");
} }
//*/
/** /**
* Returns the value of the specified column as a String. * Returns the value of the specified column as a String.
...@@ -1166,12 +1152,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1166,12 +1152,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
/** /**
* [Not supported] Sets the value of a parameter as a row id. * [Not supported] Sets the value of a parameter as a row id.
*/ */
//## Java 1.6 ##
public void setRowId(String parameterName, RowId x) public void setRowId(String parameterName, RowId x)
throws SQLException { throws SQLException {
throw unsupported("rowId"); throw unsupported("rowId");
} }
//*/
/** /**
* Sets the value of a parameter. * Sets the value of a parameter.
...@@ -1207,12 +1191,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1207,12 +1191,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNClob(String parameterName, NClob x) public void setNClob(String parameterName, NClob x)
throws SQLException { throws SQLException {
setNClob(getIndexForName(parameterName), x); setNClob(getIndexForName(parameterName), x);
} }
//*/
/** /**
* Sets the value of a parameter as a Clob. * Sets the value of a parameter as a Clob.
...@@ -1427,12 +1409,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call ...@@ -1427,12 +1409,10 @@ public class JdbcCallableStatement extends JdbcPreparedStatement implements Call
/** /**
* [Not supported] Sets the value of a parameter as a SQLXML object. * [Not supported] Sets the value of a parameter as a SQLXML object.
*/ */
//## Java 1.6 ##
public void setSQLXML(String parameterName, SQLXML x) public void setSQLXML(String parameterName, SQLXML x)
throws SQLException { throws SQLException {
throw unsupported("SQLXML"); throw unsupported("SQLXML");
} }
//*/
/** /**
* [Not supported] * [Not supported]
......
...@@ -16,25 +16,21 @@ import java.io.StringReader; ...@@ -16,25 +16,21 @@ import java.io.StringReader;
import java.io.StringWriter; import java.io.StringWriter;
import java.io.Writer; import java.io.Writer;
import java.sql.Clob; import java.sql.Clob;
//## Java 1.6 ##
import java.sql.NClob; import java.sql.NClob;
//*/
import java.sql.SQLException; import java.sql.SQLException;
import org.h2.constant.ErrorCode; import org.h2.constant.ErrorCode;
import org.h2.engine.Constants; import org.h2.engine.Constants;
import org.h2.message.DbException; import org.h2.message.DbException;
import org.h2.message.TraceObject; import org.h2.message.TraceObject;
import org.h2.util.Task;
import org.h2.util.IOUtils; import org.h2.util.IOUtils;
import org.h2.util.Task;
import org.h2.value.Value; import org.h2.value.Value;
/** /**
* Represents a CLOB value. * Represents a CLOB value.
*/ */
public class JdbcClob extends TraceObject implements Clob public class JdbcClob extends TraceObject implements Clob
//## Java 1.6 ##
, NClob , NClob
//*/
{ {
Value value; Value value;
......
...@@ -10,17 +10,22 @@ import java.io.ByteArrayInputStream; ...@@ -10,17 +10,22 @@ import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.Reader; import java.io.Reader;
import java.sql.Array;
import java.sql.Blob; import java.sql.Blob;
import java.sql.CallableStatement; import java.sql.CallableStatement;
import java.sql.Clob; import java.sql.Clob;
import java.sql.Connection; import java.sql.Connection;
import java.sql.DatabaseMetaData; import java.sql.DatabaseMetaData;
import java.sql.NClob;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLClientInfoException;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.SQLWarning; import java.sql.SQLWarning;
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.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import org.h2.command.CommandInterface; import org.h2.command.CommandInterface;
...@@ -41,14 +46,6 @@ import org.h2.value.ValueInt; ...@@ -41,14 +46,6 @@ import org.h2.value.ValueInt;
import org.h2.value.ValueNull; import org.h2.value.ValueNull;
import org.h2.value.ValueString; import org.h2.value.ValueString;
//## Java 1.6 ##
import java.sql.Array;
import java.sql.NClob;
import java.sql.Struct;
import java.sql.SQLXML;
import java.sql.SQLClientInfoException;
//*/
/*## Java 1.7 ## /*## Java 1.7 ##
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
//*/ //*/
...@@ -1495,7 +1492,6 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1495,7 +1492,6 @@ public class JdbcConnection extends TraceObject implements Connection {
* *
* @return the object * @return the object
*/ */
//## Java 1.6 ##
public NClob createNClob() throws SQLException { public NClob createNClob() throws SQLException {
try { try {
int id = getNextId(TraceObject.CLOB); int id = getNextId(TraceObject.CLOB);
...@@ -1513,36 +1509,29 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1513,36 +1509,29 @@ public class JdbcConnection extends TraceObject implements Connection {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* [Not supported] Create a new empty SQLXML object. * [Not supported] Create a new empty SQLXML object.
*/ */
//## Java 1.6 ##
public SQLXML createSQLXML() throws SQLException { public SQLXML createSQLXML() throws SQLException {
throw unsupported("SQLXML"); throw unsupported("SQLXML");
} }
//*/
/** /**
* [Not supported] Create a new empty Array object. * [Not supported] Create a new empty Array object.
*/ */
//## Java 1.6 ##
public Array createArrayOf(String typeName, Object[] elements) public Array createArrayOf(String typeName, Object[] elements)
throws SQLException { throws SQLException {
throw unsupported("createArray"); throw unsupported("createArray");
} }
//*/
/** /**
* [Not supported] Create a new empty Struct object. * [Not supported] Create a new empty Struct object.
*/ */
//## Java 1.6 ##
public Struct createStruct(String typeName, Object[] attributes) public Struct createStruct(String typeName, Object[] attributes)
throws SQLException { throws SQLException {
throw unsupported("Struct"); throw unsupported("Struct");
} }
//*/
/** /**
* Returns true if this connection is still valid. * Returns true if this connection is still valid.
...@@ -1570,61 +1559,49 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1570,61 +1559,49 @@ public class JdbcConnection extends TraceObject implements Connection {
/** /**
* [Not supported] Set a client property. * [Not supported] Set a client property.
*/ */
//## Java 1.6 ##
public void setClientInfo(String name, String value) public void setClientInfo(String name, String value)
throws SQLClientInfoException { throws SQLClientInfoException {
throw new SQLClientInfoException(); throw new SQLClientInfoException();
} }
//*/
/** /**
* [Not supported] Set the client properties. * [Not supported] Set the client properties.
*/ */
//## Java 1.6 ##
public void setClientInfo(Properties properties) throws SQLClientInfoException { public void setClientInfo(Properties properties) throws SQLClientInfoException {
throw new SQLClientInfoException(); throw new SQLClientInfoException();
} }
//*/
/** /**
* [Not supported] Get the client properties. * [Not supported] Get the client properties.
*/ */
//## Java 1.6 ##
public Properties getClientInfo() throws SQLClientInfoException { public Properties getClientInfo() throws SQLClientInfoException {
throw new SQLClientInfoException(); throw new SQLClientInfoException();
} }
//*/
/** /**
* [Not supported] Set a client property. * [Not supported] Set a client property.
*/ */
//## Java 1.6 ##
public String getClientInfo(String name) throws SQLException { public String getClientInfo(String name) throws SQLException {
throw unsupported("clientInfo"); throw unsupported("clientInfo");
} }
//*/
/** /**
* [Not supported] Return an object of this class if possible. * [Not supported] Return an object of this class if possible.
* *
* @param iface the class * @param iface the class
*/ */
//## Java 1.6 ##
public <T> T unwrap(Class<T> iface) throws SQLException { public <T> T unwrap(Class<T> iface) throws SQLException {
throw unsupported("unwrap"); throw unsupported("unwrap");
} }
//*/
/** /**
* [Not supported] Checks if unwrap can return an object of this class. * [Not supported] Checks if unwrap can return an object of this class.
* *
* @param iface the class * @param iface the class
*/ */
//## Java 1.6 ##
public boolean isWrapperFor(Class<?> iface) throws SQLException { public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw unsupported("isWrapperFor"); throw unsupported("isWrapperFor");
} }
//*/
/** /**
* Create a Clob value from this reader. * Create a Clob value from this reader.
......
...@@ -10,11 +10,8 @@ import java.sql.Connection; ...@@ -10,11 +10,8 @@ import java.sql.Connection;
import java.sql.DatabaseMetaData; import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
//## Java 1.6 ##
import java.sql.RowIdLifetime; import java.sql.RowIdLifetime;
//*/
import java.sql.SQLException; import java.sql.SQLException;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.engine.Constants; import org.h2.engine.Constants;
import org.h2.message.Trace; import org.h2.message.Trace;
...@@ -2746,18 +2743,12 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2746,18 +2743,12 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/** /**
* Gets the major version of the supported JDBC API. * Gets the major version of the supported JDBC API.
* This method returns 4 when the driver is compiled using Java 5 or 6.
* It returns 3 otherwise.
* *
* @return the major version (4 or 3) * @return the major version (4)
*/ */
public int getJDBCMajorVersion() { public int getJDBCMajorVersion() {
debugCodeCall("getJDBCMajorVersion"); debugCodeCall("getJDBCMajorVersion");
int majorVersion = 3; return 4;
//## Java 1.6 ##
majorVersion = 4;
//*/
return majorVersion;
} }
/** /**
...@@ -2824,12 +2815,10 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2824,12 +2815,10 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* *
* @return ROWID_UNSUPPORTED * @return ROWID_UNSUPPORTED
*/ */
//## Java 1.6 ##
public RowIdLifetime getRowIdLifetime() { public RowIdLifetime getRowIdLifetime() {
debugCodeCall("getRowIdLifetime"); debugCodeCall("getRowIdLifetime");
return RowIdLifetime.ROWID_UNSUPPORTED; return RowIdLifetime.ROWID_UNSUPPORTED;
} }
//*/
/** /**
* Gets the list of schemas in the database. * Gets the list of schemas in the database.
...@@ -2847,7 +2836,6 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2847,7 +2836,6 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* @return the schema list * @return the schema list
* @throws SQLException if the connection is closed * @throws SQLException if the connection is closed
*/ */
//## Java 1.6 ##
public ResultSet getSchemas(String catalogPattern, String schemaPattern) public ResultSet getSchemas(String catalogPattern, String schemaPattern)
throws SQLException { throws SQLException {
try { try {
...@@ -2871,7 +2859,6 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2871,7 +2859,6 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Returns whether the database supports calling functions using the call syntax. * Returns whether the database supports calling functions using the call syntax.
...@@ -2903,41 +2890,33 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2903,41 +2890,33 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
/** /**
* [Not supported] Return an object of this class if possible. * [Not supported] Return an object of this class if possible.
*/ */
//## Java 1.6 ##
public <T> T unwrap(Class<T> iface) throws SQLException { public <T> T unwrap(Class<T> iface) throws SQLException {
throw unsupported("unwrap"); throw unsupported("unwrap");
} }
//*/
/** /**
* [Not supported] Checks if unwrap can return an object of this class. * [Not supported] Checks if unwrap can return an object of this class.
*/ */
//## Java 1.6 ##
public boolean isWrapperFor(Class<?> iface) throws SQLException { public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw unsupported("isWrapperFor"); throw unsupported("isWrapperFor");
} }
//*/
/** /**
* [Not supported] Gets the list of function columns. * [Not supported] Gets the list of function columns.
*/ */
//## Java 1.6 ##
public ResultSet getFunctionColumns(String catalog, String schemaPattern, public ResultSet getFunctionColumns(String catalog, String schemaPattern,
String functionNamePattern, String columnNamePattern) String functionNamePattern, String columnNamePattern)
throws SQLException { throws SQLException {
throw unsupported("getFunctionColumns"); throw unsupported("getFunctionColumns");
} }
//*/
/** /**
* [Not supported] Gets the list of functions. * [Not supported] Gets the list of functions.
*/ */
//## Java 1.6 ##
public ResultSet getFunctions(String catalog, String schemaPattern, public ResultSet getFunctions(String catalog, String schemaPattern,
String functionNamePattern) throws SQLException { String functionNamePattern) throws SQLException {
throw unsupported("getFunctions"); throw unsupported("getFunctions");
} }
//*/
/** /**
* [Not supported] * [Not supported]
......
...@@ -211,20 +211,16 @@ public class JdbcParameterMetaData extends TraceObject implements ParameterMetaD ...@@ -211,20 +211,16 @@ public class JdbcParameterMetaData extends TraceObject implements ParameterMetaD
/** /**
* [Not supported] Return an object of this class if possible. * [Not supported] Return an object of this class if possible.
*/ */
//## Java 1.6 ##
public <T> T unwrap(Class<T> iface) throws SQLException { public <T> T unwrap(Class<T> iface) throws SQLException {
throw unsupported("unwrap"); throw unsupported("unwrap");
} }
//*/
/** /**
* [Not supported] Checks if unwrap can return an object of this class. * [Not supported] Checks if unwrap can return an object of this class.
*/ */
//## Java 1.6 ##
public boolean isWrapperFor(Class<?> iface) throws SQLException { public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw unsupported("isWrapperFor"); throw unsupported("isWrapperFor");
} }
//*/
/** /**
* INTERNAL * INTERNAL
......
...@@ -13,17 +13,19 @@ import java.net.URL; ...@@ -13,17 +13,19 @@ import java.net.URL;
import java.sql.Array; import java.sql.Array;
import java.sql.Blob; import java.sql.Blob;
import java.sql.Clob; import java.sql.Clob;
import java.sql.NClob;
import java.sql.ParameterMetaData; import java.sql.ParameterMetaData;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.Ref; import java.sql.Ref;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.ResultSetMetaData; import java.sql.ResultSetMetaData;
import java.sql.RowId;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.SQLXML;
import java.sql.Statement; import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import org.h2.command.CommandInterface; import org.h2.command.CommandInterface;
import org.h2.constant.ErrorCode; import org.h2.constant.ErrorCode;
import org.h2.expression.ParameterInterface; import org.h2.expression.ParameterInterface;
...@@ -50,12 +52,6 @@ import org.h2.value.ValueString; ...@@ -50,12 +52,6 @@ import org.h2.value.ValueString;
import org.h2.value.ValueTime; import org.h2.value.ValueTime;
import org.h2.value.ValueTimestamp; import org.h2.value.ValueTimestamp;
//## Java 1.6 ##
import java.sql.RowId;
import java.sql.NClob;
import java.sql.SQLXML;
//*/
/** /**
* Represents a prepared statement. * Represents a prepared statement.
*/ */
...@@ -1291,11 +1287,9 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1291,11 +1287,9 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* [Not supported] Sets the value of a parameter as a row id. * [Not supported] Sets the value of a parameter as a row id.
*/ */
//## Java 1.6 ##
public void setRowId(int parameterIndex, RowId x) throws SQLException { public void setRowId(int parameterIndex, RowId x) throws SQLException {
throw unsupported("rowId"); throw unsupported("rowId");
} }
//*/
/** /**
* Sets the value of a parameter. * Sets the value of a parameter.
...@@ -1366,7 +1360,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1366,7 +1360,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
* @param x the value * @param x the value
* @throws SQLException if this object is closed * @throws SQLException if this object is closed
*/ */
//## Java 1.6 ##
public void setNClob(int parameterIndex, NClob x) throws SQLException { public void setNClob(int parameterIndex, NClob x) throws SQLException {
try { try {
if (isDebugEnabled()) { if (isDebugEnabled()) {
...@@ -1384,7 +1377,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1384,7 +1377,6 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Sets the value of a parameter as a Clob. * Sets the value of a parameter as a Clob.
...@@ -1497,11 +1489,9 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat ...@@ -1497,11 +1489,9 @@ public class JdbcPreparedStatement extends JdbcStatement implements PreparedStat
/** /**
* [Not supported] Sets the value of a parameter as a SQLXML object. * [Not supported] Sets the value of a parameter as a SQLXML object.
*/ */
//## Java 1.6 ##
public void setSQLXML(int parameterIndex, SQLXML x) throws SQLException { public void setSQLXML(int parameterIndex, SQLXML x) throws SQLException {
throw unsupported("SQLXML"); throw unsupported("SQLXML");
} }
//*/
/** /**
* INTERNAL * INTERNAL
......
...@@ -14,24 +14,20 @@ import java.sql.Array; ...@@ -14,24 +14,20 @@ import java.sql.Array;
import java.sql.Blob; import java.sql.Blob;
import java.sql.Clob; import java.sql.Clob;
import java.sql.Date; import java.sql.Date;
import java.sql.NClob;
import java.sql.Ref; import java.sql.Ref;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.ResultSetMetaData; import java.sql.ResultSetMetaData;
import java.sql.RowId;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.SQLWarning; import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Statement; import java.sql.Statement;
import java.sql.Time; import java.sql.Time;
import java.sql.Timestamp; 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;
//## Java 1.6 ##
import java.sql.NClob;
import java.sql.RowId;
import java.sql.SQLXML;
//*/
import org.h2.constant.ErrorCode; import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.message.DbException; import org.h2.message.DbException;
...@@ -3017,22 +3013,18 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3017,22 +3013,18 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* *
* @param columnIndex (1,2,...) * @param columnIndex (1,2,...)
*/ */
//## Java 1.6 ##
public RowId getRowId(int columnIndex) throws SQLException { public RowId getRowId(int columnIndex) throws SQLException {
throw unsupported("rowId"); throw unsupported("rowId");
} }
//*/
/** /**
* [Not supported] Returns the value of the specified column as a row id. * [Not supported] Returns the value of the specified column as a row id.
* *
* @param columnLabel the column label * @param columnLabel the column label
*/ */
//## Java 1.6 ##
public RowId getRowId(String columnLabel) throws SQLException { public RowId getRowId(String columnLabel) throws SQLException {
throw unsupported("rowId"); throw unsupported("rowId");
} }
//*/
/** /**
* [Not supported] Updates a column in the current or insert row. * [Not supported] Updates a column in the current or insert row.
...@@ -3040,11 +3032,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3040,11 +3032,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param columnIndex (1,2,...) * @param columnIndex (1,2,...)
* @param x the value * @param x the value
*/ */
//## Java 1.6 ##
public void updateRowId(int columnIndex, RowId x) throws SQLException { public void updateRowId(int columnIndex, RowId x) throws SQLException {
throw unsupported("rowId"); throw unsupported("rowId");
} }
//*/
/** /**
* [Not supported] Updates a column in the current or insert row. * [Not supported] Updates a column in the current or insert row.
...@@ -3052,11 +3042,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3052,11 +3042,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @param columnLabel the column label * @param columnLabel the column label
* @param x the value * @param x the value
*/ */
//## Java 1.6 ##
public void updateRowId(String columnLabel, RowId x) throws SQLException { public void updateRowId(String columnLabel, RowId x) throws SQLException {
throw unsupported("rowId"); throw unsupported("rowId");
} }
//*/
/** /**
* Returns the current result set holdability. * Returns the current result set holdability.
...@@ -3129,11 +3117,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3129,11 +3117,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
/** /**
* [Not supported] * [Not supported]
*/ */
//## Java 1.6 ##
public void updateNClob(int columnIndex, NClob x) throws SQLException { public void updateNClob(int columnIndex, NClob x) throws SQLException {
throw unsupported("NClob"); throw unsupported("NClob");
} }
//*/
/** /**
* Updates a column in the current or insert row. * Updates a column in the current or insert row.
...@@ -3186,11 +3172,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3186,11 +3172,9 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
/** /**
* [Not supported] * [Not supported]
*/ */
//## Java 1.6 ##
public void updateNClob(String columnLabel, NClob x) throws SQLException { public void updateNClob(String columnLabel, NClob x) throws SQLException {
throw unsupported("NClob"); throw unsupported("NClob");
} }
//*/
/** /**
* Returns the value of the specified column as a Clob. * Returns the value of the specified column as a Clob.
...@@ -3199,7 +3183,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3199,7 +3183,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @return the value * @return the value
* @throws SQLException if the column is not found or if the result set is closed * @throws SQLException if the column is not found or if the result set is closed
*/ */
//## Java 1.6 ##
public NClob getNClob(int columnIndex) throws SQLException { public NClob getNClob(int columnIndex) throws SQLException {
try { try {
int id = getNextId(TraceObject.CLOB); int id = getNextId(TraceObject.CLOB);
...@@ -3210,7 +3193,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3210,7 +3193,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* Returns the value of the specified column as a Clob. * Returns the value of the specified column as a Clob.
...@@ -3219,7 +3201,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3219,7 +3201,6 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
* @return the value * @return the value
* @throws SQLException if the column is not found or if the result set is closed * @throws SQLException if the column is not found or if the result set is closed
*/ */
//## Java 1.6 ##
public NClob getNClob(String columnLabel) throws SQLException { public NClob getNClob(String columnLabel) throws SQLException {
try { try {
int id = getNextId(TraceObject.CLOB); int id = getNextId(TraceObject.CLOB);
...@@ -3230,45 +3211,36 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3230,45 +3211,36 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
throw logAndConvert(e); throw logAndConvert(e);
} }
} }
//*/
/** /**
* [Not supported] Returns the value of the specified column as a SQLXML object. * [Not supported] Returns the value of the specified column as a SQLXML object.
*/ */
//## Java 1.6 ##
public SQLXML getSQLXML(int columnIndex) throws SQLException { public SQLXML getSQLXML(int columnIndex) throws SQLException {
throw unsupported("SQLXML"); throw unsupported("SQLXML");
} }
//*/
/** /**
* [Not supported] Returns the value of the specified column as a SQLXML object. * [Not supported] Returns the value of the specified column as a SQLXML object.
*/ */
//## Java 1.6 ##
public SQLXML getSQLXML(String columnLabel) throws SQLException { public SQLXML getSQLXML(String columnLabel) throws SQLException {
throw unsupported("SQLXML"); throw unsupported("SQLXML");
} }
//*/
/** /**
* [Not supported] Updates a column in the current or insert row. * [Not supported] Updates a column in the current or insert row.
*/ */
//## Java 1.6 ##
public void updateSQLXML(int columnIndex, SQLXML xmlObject) public void updateSQLXML(int columnIndex, SQLXML xmlObject)
throws SQLException { throws SQLException {
throw unsupported("SQLXML"); throw unsupported("SQLXML");
} }
//*/
/** /**
* [Not supported] Updates a column in the current or insert row. * [Not supported] Updates a column in the current or insert row.
*/ */
//## Java 1.6 ##
public void updateSQLXML(String columnLabel, SQLXML xmlObject) public void updateSQLXML(String columnLabel, SQLXML xmlObject)
throws SQLException { throws SQLException {
throw unsupported("SQLXML"); throw unsupported("SQLXML");
} }
//*/
/** /**
* Returns the value of the specified column as a String. * Returns the value of the specified column as a String.
...@@ -3409,20 +3381,16 @@ public class JdbcResultSet extends TraceObject implements ResultSet { ...@@ -3409,20 +3381,16 @@ public class JdbcResultSet extends TraceObject implements ResultSet {
/** /**
* [Not supported] Return an object of this class if possible. * [Not supported] Return an object of this class if possible.
*/ */
//## Java 1.6 ##
public <T> T unwrap(Class<T> iface) throws SQLException { public <T> T unwrap(Class<T> iface) throws SQLException {
throw unsupported("unwrap"); throw unsupported("unwrap");
} }
//*/
/** /**
* [Not supported] Checks if unwrap can return an object of this class. * [Not supported] Checks if unwrap can return an object of this class.
*/ */
//## Java 1.6 ##
public boolean isWrapperFor(Class<?> iface) throws SQLException { public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw unsupported("isWrapperFor"); throw unsupported("isWrapperFor");
} }
//*/
/** /**
* [Not supported] * [Not supported]
......
...@@ -434,20 +434,16 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD ...@@ -434,20 +434,16 @@ public class JdbcResultSetMetaData extends TraceObject implements ResultSetMetaD
/** /**
* [Not supported] Return an object of this class if possible. * [Not supported] Return an object of this class if possible.
*/ */
//## Java 1.6 ##
public <T> T unwrap(Class<T> iface) throws SQLException { public <T> T unwrap(Class<T> iface) throws SQLException {
throw unsupported("unwrap"); throw unsupported("unwrap");
} }
//*/
/** /**
* [Not supported] Checks if unwrap can return an object of this class. * [Not supported] Checks if unwrap can return an object of this class.
*/ */
//## Java 1.6 ##
public boolean isWrapperFor(Class<?> iface) throws SQLException { public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw unsupported("isWrapperFor"); throw unsupported("isWrapperFor");
} }
//*/
/** /**
* INTERNAL * INTERNAL
......
...@@ -1004,20 +1004,16 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -1004,20 +1004,16 @@ public class JdbcStatement extends TraceObject implements Statement {
/** /**
* [Not supported] Return an object of this class if possible. * [Not supported] Return an object of this class if possible.
*/ */
//## Java 1.6 ##
public <T> T unwrap(Class<T> iface) throws SQLException { public <T> T unwrap(Class<T> iface) throws SQLException {
throw unsupported("unwrap"); throw unsupported("unwrap");
} }
//*/
/** /**
* [Not supported] Checks if unwrap can return an object of this class. * [Not supported] Checks if unwrap can return an object of this class.
*/ */
//## Java 1.6 ##
public boolean isWrapperFor(Class<?> iface) throws SQLException { public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw unsupported("isWrapperFor"); throw unsupported("isWrapperFor");
} }
//*/
/** /**
* Returns whether this object is poolable. * Returns whether this object is poolable.
......
...@@ -30,10 +30,7 @@ import javax.sql.ConnectionPoolDataSource; ...@@ -30,10 +30,7 @@ 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.util.New;
//## Java 1.6 ##
import org.h2.message.DbException; import org.h2.message.DbException;
//*/
/*## Java 1.7 ## /*## Java 1.7 ##
import java.util.logging.Logger; import java.util.logging.Logger;
...@@ -310,22 +307,18 @@ public class JdbcConnectionPool implements DataSource, ConnectionEventListener { ...@@ -310,22 +307,18 @@ public class JdbcConnectionPool implements DataSource, ConnectionEventListener {
* *
* @param iface the class * @param iface the class
*/ */
//## Java 1.6 ##
public <T> T unwrap(Class<T> iface) throws SQLException { public <T> T unwrap(Class<T> iface) throws SQLException {
throw DbException.getUnsupportedException("unwrap"); throw DbException.getUnsupportedException("unwrap");
} }
//*/
/** /**
* [Not supported] Checks if unwrap can return an object of this class. * [Not supported] Checks if unwrap can return an object of this class.
* *
* @param iface the class * @param iface the class
*/ */
//## Java 1.6 ##
public boolean isWrapperFor(Class<?> iface) throws SQLException { public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw DbException.getUnsupportedException("isWrapperFor"); throw DbException.getUnsupportedException("isWrapperFor");
} }
//*/
/** /**
* [Not supported] * [Not supported]
......
...@@ -361,22 +361,18 @@ public class JdbcDataSource extends TraceObject ...@@ -361,22 +361,18 @@ public class JdbcDataSource extends TraceObject
* *
* @param iface the class * @param iface the class
*/ */
//## Java 1.6 ##
public <T> T unwrap(Class<T> iface) throws SQLException { public <T> T unwrap(Class<T> iface) throws SQLException {
throw unsupported("unwrap"); throw unsupported("unwrap");
} }
//*/
/** /**
* [Not supported] Checks if unwrap can return an object of this class. * [Not supported] Checks if unwrap can return an object of this class.
* *
* @param iface the class * @param iface the class
*/ */
//## Java 1.6 ##
public boolean isWrapperFor(Class<?> iface) throws SQLException { public boolean isWrapperFor(Class<?> iface) throws SQLException {
throw unsupported("isWrapperFor"); throw unsupported("isWrapperFor");
} }
//*/
/** /**
* [Not supported] * [Not supported]
......
...@@ -13,6 +13,7 @@ import java.sql.Statement; ...@@ -13,6 +13,7 @@ import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import javax.sql.ConnectionEvent; import javax.sql.ConnectionEvent;
import javax.sql.ConnectionEventListener; import javax.sql.ConnectionEventListener;
import javax.sql.StatementEventListener;
import javax.sql.XAConnection; import javax.sql.XAConnection;
import javax.transaction.xa.XAException; import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;
...@@ -25,9 +26,6 @@ import org.h2.util.New; ...@@ -25,9 +26,6 @@ import org.h2.util.New;
import org.h2.message.DbException; import org.h2.message.DbException;
import org.h2.message.TraceObject; import org.h2.message.TraceObject;
//## Java 1.6 ##
import javax.sql.StatementEventListener;
//*/
/** /**
* This class provides support for distributed transactions. * This class provides support for distributed transactions.
...@@ -369,22 +367,18 @@ public class JdbcXAConnection extends TraceObject implements XAConnection, XARes ...@@ -369,22 +367,18 @@ public class JdbcXAConnection extends TraceObject implements XAConnection, XARes
* *
* @param listener the new statement event listener * @param listener the new statement event listener
*/ */
//## Java 1.6 ##
public void addStatementEventListener(StatementEventListener listener) { public void addStatementEventListener(StatementEventListener listener) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
//*/
/** /**
* [Not supported] Remove a statement event listener. * [Not supported] Remove a statement event listener.
* *
* @param listener the statement event listener * @param listener the statement event listener
*/ */
//## Java 1.6 ##
public void removeStatementEventListener(StatementEventListener listener) { public void removeStatementEventListener(StatementEventListener listener) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
//*/
/** /**
* INTERNAL * INTERNAL
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论