Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > fa6174e5dc8623ee2e905241ccebe5c9 > files > 3

eclipse-dtp-1.10.1-3.mga3.src.rpm

commit 27dbf596874e44a8449afaa22e27dbba359b010c
Author: Andrew Overholt <overholt@redhat.com>
Date:   Fri Dec 2 15:32:05 2011 -0500

    220787: Fix Delelegation of our ConnectionAdapter when compiling against
    the Java 6 API
    https://bugs.eclipse.org/bugs/show_bug.cgi?id=220787
    
    Update old patch for Java 6 source compatibility to apply against 1.9.1.

diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core/.classpath b/plugins/org.eclipse.datatools.connectivity.sqm.core/.classpath
index 64c5e31..ad0ad09 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core/.classpath
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/1.7"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.datatools.connectivity.sqm.core/META-INF/MANIFEST.MF
index 12ec4ae..1c694ef 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core/META-INF/MANIFEST.MF
@@ -34,4 +34,4 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
  com.ibm.icu;bundle-version="[3.4.0,5.0.0)"
 Eclipse-LazyStart: true
 Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/ConnectionAdapter.java b/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/ConnectionAdapter.java
index cc78c4e..7ce282e 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/ConnectionAdapter.java
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/ConnectionAdapter.java
@@ -10,15 +10,24 @@
  *******************************************************************************/
 package org.eclipse.datatools.connectivity.sqm.internal.core.connection;
 
+import java.sql.Array;
+import java.sql.Blob;
 import java.sql.CallableStatement;
+import java.sql.Clob;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
+import java.sql.NClob;
 import java.sql.PreparedStatement;
+import java.sql.SQLClientInfoException;
 import java.sql.SQLException;
 import java.sql.SQLWarning;
+import java.sql.SQLXML;
 import java.sql.Savepoint;
 import java.sql.Statement;
+import java.sql.Struct;
 import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.Executor;
 
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
@@ -183,18 +192,95 @@ public class ConnectionAdapter implements Connection {
 	}
 
 	public CallableStatement prepareCall(String arg0, int arg1, int arg2, int arg3) throws SQLException {
-		return prepareCall(arg0, arg1, arg2, arg3);
+		return connection.prepareCall(arg0, arg1, arg2, arg3);
 	}
 
 	public PreparedStatement prepareStatement(String arg0, int arg1) throws SQLException {
-		return prepareStatement(arg0, arg1);
+		return connection.prepareStatement(arg0, arg1);
 	}
 
 	public PreparedStatement prepareStatement(String arg0, int[] arg1) throws SQLException {
-		return prepareStatement(arg0, arg1);
+		return connection.prepareStatement(arg0, arg1);
 	}
 
 	public PreparedStatement prepareStatement(String arg0, String[] arg1) throws SQLException {
-		return prepareStatement(arg0, arg1);
+		return connection.prepareStatement(arg0, arg1);
+	}
+
+	public Array createArrayOf(String typeName, Object[] elements)
+			throws SQLException {
+		return connection.createArrayOf(typeName, elements);
+	}
+
+	public Blob createBlob() throws SQLException {
+		return connection.createBlob();
+	}
+
+	public Clob createClob() throws SQLException {
+		return connection.createClob();
+	}
+
+	public NClob createNClob() throws SQLException {
+		return connection.createNClob();
+	}
+
+	public SQLXML createSQLXML() throws SQLException {
+		return connection.createSQLXML();
+	}
+
+	public Struct createStruct(String typeName, Object[] attributes)
+			throws SQLException {
+		return connection.createStruct(typeName, attributes);
+	}
+
+	public Properties getClientInfo() throws SQLException {
+		return connection.getClientInfo();
+	}
+
+	public String getClientInfo(String name) throws SQLException {
+		return connection.getClientInfo(name);
+	}
+
+	public boolean isValid(int timeout) throws SQLException {
+		return connection.isValid(timeout);
+	}
+
+	public void setClientInfo(Properties properties)
+			throws SQLClientInfoException {
+		connection.setClientInfo(properties);
+	}
+
+	public void setClientInfo(String name, String value)
+			throws SQLClientInfoException {
+		connection.setClientInfo(name, value);
+	}
+
+	public void setSchema(String schema) throws SQLException {
+		connection.setSchema(schema);
+	}
+
+	public String getSchema() throws SQLException {
+		return connection.getSchema();
+	}
+
+	public void abort(Executor executor) throws SQLException {
+		connection.abort(executor);
+	}
+
+	public void setNetworkTimeout(Executor executor, int milliseconds)
+			throws SQLException {
+		connection.setNetworkTimeout(executor, milliseconds);
+	}
+
+	public int getNetworkTimeout() throws SQLException {
+		return connection.getNetworkTimeout();
+	}
+
+	public <T> T unwrap(Class<T> iface) throws SQLException {
+		return connection.unwrap(iface);
+	}
+
+	public boolean isWrapperFor(Class<?> iface) throws SQLException {
+		return connection.isWrapperFor(iface);
 	}
 }
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/ResultSetAdapter.java b/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/ResultSetAdapter.java
index c560777..179fb5c 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/ResultSetAdapter.java
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/ResultSetAdapter.java
@@ -18,11 +18,14 @@ import java.sql.Array;
 import java.sql.Blob;
 import java.sql.Clob;
 import java.sql.Date;
+import java.sql.NClob;
 import java.sql.Ref;
 import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
+import java.sql.RowId;
 import java.sql.SQLException;
 import java.sql.SQLWarning;
+import java.sql.SQLXML;
 import java.sql.Statement;
 import java.sql.Time;
 import java.sql.Timestamp;
@@ -516,4 +519,191 @@ public class ResultSetAdapter implements ResultSet {
 	public boolean wasNull() throws SQLException {
 		return resultSet.wasNull();
 	}
+	public int getHoldability() throws SQLException {
+		return resultSet.getHoldability();
+	}
+	public Reader getNCharacterStream(int columnIndex) throws SQLException {
+		return resultSet.getNCharacterStream(columnIndex);
+	}
+	public Reader getNCharacterStream(String columnLabel) throws SQLException {
+		return resultSet.getNCharacterStream(columnLabel);
+	}
+	public NClob getNClob(int columnIndex) throws SQLException {
+		return resultSet.getNClob(columnIndex);
+	}
+	public NClob getNClob(String columnLabel) throws SQLException {
+		return resultSet.getNClob(columnLabel);
+	}
+	public String getNString(int columnIndex) throws SQLException {
+		return resultSet.getNString(columnIndex);
+	}
+	public String getNString(String columnLabel) throws SQLException {
+		return resultSet.getNString(columnLabel);
+	}
+	public RowId getRowId(int columnIndex) throws SQLException {
+		return resultSet.getRowId(columnIndex);
+	}
+	public RowId getRowId(String columnLabel) throws SQLException {
+		return resultSet.getRowId(columnLabel);
+	}
+	public SQLXML getSQLXML(int columnIndex) throws SQLException {
+		return resultSet.getSQLXML(columnIndex);
+	}
+	public SQLXML getSQLXML(String columnLabel) throws SQLException {
+		return resultSet.getSQLXML(columnLabel);
+	}
+	public boolean isClosed() throws SQLException {
+		return resultSet.isClosed();
+	}
+	public boolean isWrapperFor(Class arg0) throws SQLException {
+		return resultSet.isWrapperFor(arg0);
+	}
+	public Object unwrap(Class arg0) throws SQLException {
+		return resultSet.unwrap(arg0);
+	}
+	public void updateAsciiStream(int columnIndex, InputStream x, long length)
+			throws SQLException {
+		resultSet.updateAsciiStream(columnIndex, x, length);
+	}
+	public void updateAsciiStream(int columnIndex, InputStream x)
+			throws SQLException {
+		resultSet.updateAsciiStream(columnIndex, x);
+	}
+	public void updateAsciiStream(String columnLabel, InputStream x, long length)
+			throws SQLException {
+		resultSet.updateAsciiStream(columnLabel, x, length);
+	}
+	public void updateAsciiStream(String columnLabel, InputStream x)
+			throws SQLException {
+		resultSet.updateAsciiStream(columnLabel, x);
+	}
+	public void updateBinaryStream(int columnIndex, InputStream x, long length)
+			throws SQLException {
+		resultSet.updateBinaryStream(columnIndex, x, length);
+	}
+	public void updateBinaryStream(int columnIndex, InputStream x)
+			throws SQLException {
+		resultSet.updateBinaryStream(columnIndex, x);
+	}
+	public void updateBinaryStream(String columnLabel, InputStream x,
+			long length) throws SQLException {
+		resultSet.updateBinaryStream(columnLabel, x, length);
+	}
+	public void updateBinaryStream(String columnLabel, InputStream x)
+			throws SQLException {
+		resultSet.updateBinaryStream(columnLabel, x);
+	}
+	public void updateBlob(int columnIndex, InputStream inputStream, long length)
+			throws SQLException {
+		resultSet.updateBlob(columnIndex, inputStream, length);
+	}
+	public void updateBlob(int columnIndex, InputStream inputStream)
+			throws SQLException {
+		resultSet.updateBlob(columnIndex, inputStream);
+	}
+	public void updateBlob(String columnLabel, InputStream inputStream,
+			long length) throws SQLException {
+		resultSet.updateBlob(columnLabel, inputStream, length);
+	}
+	public void updateBlob(String columnLabel, InputStream inputStream)
+			throws SQLException {
+		resultSet.updateBlob(columnLabel, inputStream);
+	}
+	public void updateCharacterStream(int columnIndex, Reader x, long length)
+			throws SQLException {
+		resultSet.updateCharacterStream(columnIndex, x, length);
+	}
+	public void updateCharacterStream(int columnIndex, Reader x)
+			throws SQLException {
+		resultSet.updateCharacterStream(columnIndex, x);
+	}
+	public void updateCharacterStream(String columnLabel, Reader reader,
+			long length) throws SQLException {
+		resultSet.updateCharacterStream(columnLabel, reader, length);
+	}
+	public void updateCharacterStream(String columnLabel, Reader reader)
+			throws SQLException {
+		resultSet.updateCharacterStream(columnLabel, reader);
+	}
+	public void updateClob(int columnIndex, Reader reader, long length)
+			throws SQLException {
+		resultSet.updateClob(columnIndex, reader, length);
+	}
+	public void updateClob(int columnIndex, Reader reader) throws SQLException {
+		resultSet.updateClob(columnIndex, reader);
+	}
+	public void updateClob(String columnLabel, Reader reader, long length)
+			throws SQLException {
+		resultSet.updateClob(columnLabel, reader, length);
+	}
+	public void updateClob(String columnLabel, Reader reader)
+			throws SQLException {
+		resultSet.updateClob(columnLabel, reader);
+	}
+	public void updateNCharacterStream(int columnIndex, Reader x, long length)
+			throws SQLException {
+		resultSet.updateNCharacterStream(columnIndex, x, length);
+	}
+	public void updateNCharacterStream(int columnIndex, Reader x)
+			throws SQLException {
+		resultSet.updateNCharacterStream(columnIndex, x);
+	}
+	public void updateNCharacterStream(String columnLabel, Reader reader,
+			long length) throws SQLException {
+		resultSet.updateNCharacterStream(columnLabel, reader, length);
+	}
+	public void updateNCharacterStream(String columnLabel, Reader reader)
+			throws SQLException {
+		resultSet.updateNCharacterStream(columnLabel, reader);
+	}
+	public void updateNClob(int columnIndex, NClob clob) throws SQLException {
+		resultSet.updateNClob(columnIndex, clob);
+	}
+	public void updateNClob(int columnIndex, Reader reader, long length)
+			throws SQLException {
+		resultSet.updateNClob(columnIndex, reader, length);
+	}
+	public void updateNClob(int columnIndex, Reader reader) throws SQLException {
+		resultSet.updateNClob(columnIndex, reader);
+	}
+	public void updateNClob(String columnLabel, NClob clob) throws SQLException {
+		resultSet.updateNClob(columnLabel, clob);
+	}
+	public void updateNClob(String columnLabel, Reader reader, long length)
+			throws SQLException {
+		resultSet.updateNClob(columnLabel, reader, length);
+	}
+	public void updateNClob(String columnLabel, Reader reader)
+			throws SQLException {
+		resultSet.updateNClob(columnLabel, reader);
+	}
+	public void updateNString(int columnIndex, String string)
+			throws SQLException {
+		resultSet.updateNString(columnIndex, string);
+	}
+	public void updateNString(String columnLabel, String string)
+			throws SQLException {
+		resultSet.updateNString(columnLabel, string);
+	}
+	public void updateRowId(int columnIndex, RowId x) throws SQLException {
+		resultSet.updateRowId(columnIndex, x);
+	}
+	public void updateRowId(String columnLabel, RowId x) throws SQLException {
+		resultSet.updateRowId(columnLabel, x);
+	}
+	public void updateSQLXML(int columnIndex, SQLXML xmlObject)
+			throws SQLException {
+		resultSet.updateSQLXML(columnIndex, xmlObject);
+	}
+	public void updateSQLXML(String columnLabel, SQLXML xmlObject)
+			throws SQLException {
+		resultSet.updateSQLXML(columnLabel, xmlObject);
+	}
+	public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
+		return resultSet.getObject(columnIndex, type);
+	}
+	public <T> T getObject(String columnLabel, Class<T> type)
+			throws SQLException {
+		return resultSet.getObject(columnLabel, type);
+	}
 }
diff --git a/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/StatementAdapter.java b/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/StatementAdapter.java
index a226a0d..511595d 100644
--- a/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/StatementAdapter.java
+++ b/plugins/org.eclipse.datatools.connectivity.sqm.core/src/org/eclipse/datatools/connectivity/sqm/internal/core/connection/StatementAdapter.java
@@ -169,6 +169,22 @@ public class StatementAdapter implements Statement {
 		return statement.toString();
 	}
 	
+	public boolean isClosed() throws SQLException {
+		return statement.isClosed();
+	}
+	public boolean isPoolable() throws SQLException {
+		return statement.isPoolable();
+	}
+	public boolean isWrapperFor(Class arg0) throws SQLException {
+		return statement.isWrapperFor(arg0);
+	}
+	public void setPoolable(boolean poolable) throws SQLException {
+		statement.setPoolable(poolable);
+	}
+	public Object unwrap(Class arg0) throws SQLException {
+		return statement.unwrap(arg0);
+	}
+	
 	private void notifySQLExceptionHandler (SQLException sqlexception) {
 	    ArrayList handlers = getSQLExceptionHandler();
 	    for (int i = 0; i < handlers.size(); i++) {
@@ -204,4 +220,11 @@ public class StatementAdapter implements Statement {
 	}
 	    
 	private static ArrayList handers = null;
+
+	public void closeOnCompletion() throws SQLException {
+		statement.closeOnCompletion();
+	}
+	public boolean isCloseOnCompletion() throws SQLException {
+		return statement.isCloseOnCompletion();
+	}
 }