db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1365465 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/jdbc/ jdbc/
Date Wed, 25 Jul 2012 06:33:54 GMT
Author: kahatlen
Date: Wed Jul 25 06:33:53 2012
New Revision: 1365465

URL: http://svn.apache.org/viewvc?rev=1365465&view=rev
Log:
DERBY-5877: Prune the brokered class tree

Removed:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement30.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection30.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement30.java
Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver30.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement.java?rev=1365465&r1=1365464&r2=1365465&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement.java
Wed Jul 25 06:33:53 2012
@@ -29,16 +29,18 @@ import java.util.Map;
 
 
 /**
-	JDBC 2 brokered CallableStatement
+ * JDBC 3 brokered CallableStatement
  */
-public abstract class BrokeredCallableStatement extends BrokeredPreparedStatement
+public class BrokeredCallableStatement extends BrokeredPreparedStatement
           implements CallableStatement
 {
 
 	public BrokeredCallableStatement(BrokeredStatementControl control, String sql) throws SQLException
{
-		super(control,sql);
+        super(control, sql, null);
 	}
 
+    // JDBC 2.0 methods
+
     public final void registerOutParameter(int parameterIndex,
                                      int sqlType)
         throws SQLException
@@ -60,6 +62,7 @@ public abstract class BrokeredCallableSt
         return getCallableStatement().wasNull();
     }
 
+    @Override
     public final void close() throws SQLException {
         control.closeRealCallableStatement();
     }
@@ -215,6 +218,216 @@ public abstract class BrokeredCallableSt
         getCallableStatement().registerOutParameter( paramIndex, sqlType, typeName);
     }
 
+    // JDBC 3.0 methods
+
+    public final void setURL(String parameterName, java.net.URL value) throws SQLException
{
+        getCallableStatement().setURL(parameterName, value);
+    }
+
+    public final void setNull(String parameterName, int type) throws SQLException {
+        getCallableStatement().setNull(parameterName, type);
+    }
+
+    public final void setBoolean(String parameterName, boolean value) throws SQLException
{
+        getCallableStatement().setBoolean(parameterName, value);
+    }
+
+    public final void setByte(String parameterName, byte value) throws SQLException {
+        getCallableStatement().setByte(parameterName, value);
+    }
+
+    public final void setShort(String parameterName, short value) throws SQLException {
+        getCallableStatement().setShort(parameterName, value);
+    }
+
+    public final void setInt(String parameterName, int value) throws SQLException {
+        getCallableStatement().setInt(parameterName, value);
+    }
+
+    public final void setLong(String parameterName, long value) throws SQLException {
+        getCallableStatement().setLong(parameterName, value);
+    }
+
+    public final void setFloat(String parameterName, float value) throws SQLException {
+        getCallableStatement().setFloat(parameterName, value);
+    }
+
+    public final void setDouble(String parameterName, double value) throws SQLException {
+        getCallableStatement().setDouble(parameterName, value);
+    }
+
+    public final void setBigDecimal(String parameterName, BigDecimal value) throws SQLException
{
+        getCallableStatement().setBigDecimal(parameterName, value);
+    }
+
+    public final void setString(String parameterName, String value) throws SQLException {
+        getCallableStatement().setString(parameterName, value);
+    }
+
+    public final void setBytes(String parameterName, byte[] value) throws SQLException {
+        getCallableStatement().setBytes(parameterName, value);
+    }
+
+    public final void setDate(String parameterName, Date value) throws SQLException {
+        getCallableStatement().setDate(parameterName, value);
+    }
+
+    public final void setTime(String parameterName, Time value) throws SQLException {
+        getCallableStatement().setTime(parameterName, value);
+    }
+
+    public final void setTimestamp(String parameterName, Timestamp value) throws SQLException
{
+        getCallableStatement().setTimestamp(parameterName, value);
+    }
+
+    public final void setAsciiStream(String parameterName, java.io.InputStream value, int
length) throws SQLException {
+        getCallableStatement().setAsciiStream(parameterName, value, length);
+    }
+
+    public final void setBinaryStream(String parameterName, java.io.InputStream value, int
length) throws SQLException {
+        getCallableStatement().setBinaryStream(parameterName, value, length);
+    }
+
+    public final void setObject(String parameterName, Object value, int a, int b) throws
SQLException {
+        getCallableStatement().setObject(parameterName, value, a, b);
+    }
+
+    public final void setObject(String parameterName, Object value, int a) throws SQLException
{
+        getCallableStatement().setObject(parameterName, value, a);
+    }
+
+    public final void setObject(String parameterName, Object value) throws SQLException {
+        getCallableStatement().setObject(parameterName, value);
+    }
+
+    public final void setCharacterStream(String parameterName, java.io.Reader value, int
length) throws SQLException {
+        getCallableStatement().setCharacterStream(parameterName, value, length);
+    }
+
+    public final void setDate(String parameterName, Date value, Calendar cal) throws SQLException
{
+        getCallableStatement().setDate(parameterName, value, cal);
+    }
+
+    public final void setTime(String parameterName, Time value, Calendar cal) throws SQLException
{
+        getCallableStatement().setTime(parameterName, value, cal);
+    }
+
+    public final void setTimestamp(String parameterName, Timestamp value, Calendar cal) throws
SQLException {
+        getCallableStatement().setTimestamp(parameterName, value, cal);
+    }
+
+    public final void setNull(String parameterName, int a, String b) throws SQLException
{
+        getCallableStatement().setNull(parameterName, a, b);
+    }
+
+    public final String getString(String parameterName) throws SQLException {
+        return getCallableStatement().getString(parameterName);
+    }
+
+    public final boolean getBoolean(String parameterName) throws SQLException {
+        return getCallableStatement().getBoolean(parameterName);
+    }
+
+    public final byte getByte(String parameterName) throws SQLException {
+        return getCallableStatement().getByte(parameterName);
+    }
+
+    public final short getShort(String parameterName) throws SQLException {
+        return getCallableStatement().getShort(parameterName);
+    }
+
+    public final int getInt(String parameterName) throws SQLException {
+        return getCallableStatement().getInt(parameterName);
+    }
+
+    public final long getLong(String parameterName) throws SQLException {
+        return getCallableStatement().getLong(parameterName);
+    }
+
+    public final float getFloat(String parameterName) throws SQLException {
+        return getCallableStatement().getFloat(parameterName);
+    }
+
+    public final double getDouble(String parameterName) throws SQLException {
+        return getCallableStatement().getDouble(parameterName);
+    }
+
+    public final byte[] getBytes(String parameterName) throws SQLException {
+        return getCallableStatement().getBytes(parameterName);
+    }
+
+    public final Date getDate(String parameterName) throws SQLException {
+        return getCallableStatement().getDate(parameterName);
+    }
+
+    public final Time getTime(String parameterName) throws SQLException {
+        return getCallableStatement().getTime(parameterName);
+    }
+
+    public final Timestamp getTimestamp(String parameterName) throws SQLException {
+        return getCallableStatement().getTimestamp(parameterName);
+    }
+
+    public final Object getObject(String parameterName) throws SQLException {
+        return getCallableStatement().getObject(parameterName);
+    }
+
+    public final BigDecimal getBigDecimal(String parameterName) throws SQLException {
+        return getCallableStatement().getBigDecimal(parameterName);
+    }
+
+    public final Object getObject(String parameterName, Map<String, Class<?>>
map) throws SQLException {
+        return getCallableStatement().getObject(parameterName, map);
+    }
+
+    public final Ref getRef(String parameterName) throws SQLException {
+        return getCallableStatement().getRef(parameterName);
+    }
+
+    public final Blob getBlob(String parameterName) throws SQLException {
+        return getCallableStatement().getBlob(parameterName);
+    }
+
+    public final Clob getClob(String parameterName) throws SQLException {
+        return getCallableStatement().getClob(parameterName);
+    }
+
+    public final Array getArray(String parameterName) throws SQLException {
+        return getCallableStatement().getArray(parameterName);
+    }
+
+    public final Date getDate(String parameterName, Calendar cal) throws SQLException {
+        return getCallableStatement().getDate(parameterName, cal);
+    }
+
+    public final Time getTime(String parameterName, Calendar cal) throws SQLException {
+        return getCallableStatement().getTime(parameterName, cal);
+    }
+
+    public final Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException
{
+        return getCallableStatement().getTimestamp(parameterName, cal);
+    }
+
+    public final java.net.URL getURL(String parameterName) throws SQLException {
+        return getCallableStatement().getURL(parameterName);
+    }
+
+    public final java.net.URL getURL(int i) throws SQLException {
+        return getCallableStatement().getURL(i);
+    }
+
+    public final void registerOutParameter(String a, int b) throws SQLException {
+        getCallableStatement().registerOutParameter(a, b);
+    }
+
+    public final void registerOutParameter(String a, int b, int c) throws SQLException {
+        getCallableStatement().registerOutParameter(a, b, c);
+    }
+
+    public final void registerOutParameter(String a, int b, String c) throws SQLException
{
+        getCallableStatement().registerOutParameter(a, b, c);
+    }
+
 	/*
 	** Control methods
 	*/
@@ -237,6 +450,7 @@ public abstract class BrokeredCallableSt
      * access the underlying object thtough a public method would
      * 
      */
+    @Override
     final PreparedStatement getPreparedStatement() throws SQLException {
 		return getCallableStatement();
 	}
@@ -245,7 +459,8 @@ public abstract class BrokeredCallableSt
 	*/
 	public CallableStatement createDuplicateStatement(Connection conn, CallableStatement oldStatement)
throws SQLException {
 
-		CallableStatement newStatement = conn.prepareCall(sql, resultSetType, resultSetConcurrency);
+        CallableStatement newStatement = conn.prepareCall(
+            sql, resultSetType, resultSetConcurrency, resultSetHoldability);
 
 		setStatementState(oldStatement, newStatement);
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java?rev=1365465&r1=1365464&r2=1365465&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.java
Wed Jul 25 06:33:53 2012
@@ -30,7 +30,7 @@ import java.sql.RowId;
 import java.sql.SQLException;
 import java.sql.SQLXML;
 
-public class BrokeredCallableStatement40 extends BrokeredCallableStatement30
+public class BrokeredCallableStatement40 extends BrokeredCallableStatement
         implements EngineCallableStatement40 {
     
     public BrokeredCallableStatement40(BrokeredStatementControl control, String sql) throws
SQLException{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java?rev=1365465&r1=1365464&r2=1365465&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java Wed
Jul 25 06:33:53 2012
@@ -21,15 +21,15 @@
 
 package org.apache.derby.iapi.jdbc;
 
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.Statement;
-import java.sql.PreparedStatement;
 import java.sql.CallableStatement;
+import java.sql.Connection;
 import java.sql.DatabaseMetaData;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.SQLWarning;
-
+import java.sql.Savepoint;
+import java.sql.Statement;
 import org.apache.derby.iapi.error.SQLWarningFactory;
 import org.apache.derby.shared.common.reference.SQLState;
 
@@ -37,7 +37,7 @@ import org.apache.derby.shared.common.re
  * This is a rudimentary connection that delegates
  * EVERYTHING to Connection.
  */
-public abstract class BrokeredConnection implements EngineConnection
+public class BrokeredConnection implements EngineConnection
 {
 	
 	// default for Derby
@@ -72,6 +72,8 @@ public abstract class BrokeredConnection
                 control.getRealConnection().getExceptionFactory();
 	}
 
+    // JDBC 2.0 methods
+
 	public final void setAutoCommit(boolean autoCommit) throws SQLException 
 	{
 		try {
@@ -362,6 +364,136 @@ public abstract class BrokeredConnection
 		}
 	}
 
+    // JDBC 3.0 methods
+
+    public final Statement createStatement(int resultSetType,
+            int resultSetConcurrency,
+            int resultSetHoldability)
+            throws SQLException {
+        try {
+            resultSetHoldability =
+                    statementHoldabilityCheck(resultSetHoldability);
+            return control.wrapStatement(
+                    getRealConnection().createStatement(resultSetType,
+                    resultSetConcurrency, resultSetHoldability));
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+    public final CallableStatement prepareCall(String sql,
+            int resultSetType,
+            int resultSetConcurrency,
+            int resultSetHoldability)
+            throws SQLException {
+        try {
+            resultSetHoldability =
+                    statementHoldabilityCheck(resultSetHoldability);
+            return control.wrapStatement(
+                    getRealConnection().prepareCall(sql, resultSetType,
+                    resultSetConcurrency, resultSetHoldability), sql);
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+    public final Savepoint setSavepoint()
+            throws SQLException {
+        try {
+            control.checkSavepoint();
+            return getRealConnection().setSavepoint();
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+    public final Savepoint setSavepoint(String name)
+            throws SQLException {
+        try {
+            control.checkSavepoint();
+            return getRealConnection().setSavepoint(name);
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+    public final void rollback(Savepoint savepoint)
+            throws SQLException {
+        try {
+            control.checkRollback();
+            getRealConnection().rollback(savepoint);
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+    public final void releaseSavepoint(Savepoint savepoint)
+            throws SQLException {
+        try {
+            getRealConnection().releaseSavepoint(savepoint);
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+    public final void setHoldability(int holdability)
+            throws SQLException {
+        try {
+            holdability = control.checkHoldCursors(holdability, false);
+            getRealConnection().setHoldability(holdability);
+            stateHoldability = holdability;
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+    public final PreparedStatement prepareStatement(
+            String sql,
+            int autoGeneratedKeys)
+            throws SQLException {
+        try {
+            return control.wrapStatement(getRealConnection().prepareStatement(
+                sql, autoGeneratedKeys), sql, autoGeneratedKeys);
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+    public final PreparedStatement prepareStatement(
+            String sql,
+            int[] columnIndexes)
+            throws SQLException {
+        try {
+            return control.wrapStatement(getRealConnection().prepareStatement(
+                    sql, columnIndexes), sql, columnIndexes);
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+    public final PreparedStatement prepareStatement(
+            String sql,
+            String[] columnNames)
+            throws SQLException {
+        try {
+            return control.wrapStatement(getRealConnection().prepareStatement(
+                    sql, columnNames), sql, columnNames);
+        } catch (SQLException se) {
+            notifyException(se);
+            throw se;
+        }
+    }
+
+
 	/////////////////////////////////////////////////////////////////////////
 	//
 	//	MINIONS
@@ -446,12 +578,19 @@ public abstract class BrokeredConnection
 	public BrokeredStatement newBrokeredStatement(BrokeredStatementControl statementControl)
throws SQLException {
 		return new BrokeredStatement(statementControl);
 	}
-	public abstract BrokeredPreparedStatement
-        newBrokeredStatement(BrokeredStatementControl statementControl,
-                String sql, Object generatedKeys) throws SQLException;
-	public abstract BrokeredCallableStatement
-        newBrokeredStatement(BrokeredStatementControl statementControl,
-                String sql) throws SQLException;
+
+    public BrokeredPreparedStatement newBrokeredStatement(
+            BrokeredStatementControl statementControl, String sql,
+            Object generatedKeys) throws SQLException {
+        return new BrokeredPreparedStatement(
+                statementControl, sql, generatedKeys);
+    }
+
+    public BrokeredCallableStatement newBrokeredStatement(
+            BrokeredStatementControl statementControl, String sql)
+            throws SQLException {
+        return new BrokeredCallableStatement(statementControl, sql);
+    }
 
 	/**
 	 *  set the DrdaId for this connection. The drdaID prints with the 
@@ -694,5 +833,5 @@ public abstract class BrokeredConnection
     		throw se;
     	}
     }
-    
+
 }

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java?rev=1365465&r1=1365464&r2=1365465&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java Wed
Jul 25 06:33:53 2012
@@ -35,7 +35,7 @@ import org.apache.derby.iapi.reference.S
 
 
 public class BrokeredConnection40
-        extends BrokeredConnection30 implements EngineConnection40 {
+        extends BrokeredConnection implements EngineConnection40 {
     
     /** Creates a new instance of BrokeredConnection40 */
     public BrokeredConnection40(BrokeredConnectionControl control)

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java?rev=1365465&r1=1365464&r2=1365465&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java
Wed Jul 25 06:33:53 2012
@@ -23,16 +23,15 @@ package org.apache.derby.iapi.jdbc;
 
 import java.io.InputStream;
 import java.io.Reader;
-import java.util.Calendar;
-
-import java.sql.*;
 import java.net.URL;
+import java.sql.*;
+import java.util.Calendar;
 
 /**
-	JDBC 2 brokered PreparedStatement. Forwards calls off to a real prepared statement
+	JDBC 3 brokered PreparedStatement. Forwards calls off to a real prepared statement
 	obtained through the BrokeredStatementControl getRealPreparedStatement method.
  */
-public abstract class BrokeredPreparedStatement extends BrokeredStatement
+public class BrokeredPreparedStatement extends BrokeredStatement
 	implements EnginePreparedStatement
 {
 
@@ -41,10 +40,18 @@ public abstract class BrokeredPreparedSt
 	*/
 	final String	sql;
 
-    public BrokeredPreparedStatement(BrokeredStatementControl control, String sql) throws
SQLException
+    /**
+     * An Integer, an int array or a String array that specifies generated
+     * key columns, or null if there are no generated key columns.
+     */
+    private final Object generatedKeys;
+
+    public BrokeredPreparedStatement(BrokeredStatementControl control,
+            String sql, Object generatedKeys) throws SQLException
     {
         super(control);
 		this.sql = sql;
+        this.generatedKeys = generatedKeys;
     }
 
 	/**
@@ -73,6 +80,7 @@ public abstract class BrokeredPreparedSt
         return getPreparedStatement().executeUpdate();
     }
 
+    @Override
 	public void close() throws SQLException
 	{
 	    control.closeRealPreparedStatement();
@@ -516,6 +524,16 @@ public abstract class BrokeredPreparedSt
         
     }
 
+    // JDBC 3.0 methods
+
+    public final void setURL(int i, URL x) throws SQLException {
+        getPreparedStatement().setURL(i, x);
+    }
+
+    public final ParameterMetaData getParameterMetaData() throws SQLException {
+        return getPreparedStatement().getParameterMetaData();
+    }
+
 	/*
 	** Control methods.
 	*/
@@ -534,6 +552,7 @@ public abstract class BrokeredPreparedSt
 	/**
 		Override the BrokeredStatement's getStatement() to always return a PreparedStatement.
 	*/
+    @Override
 	public final Statement getStatement() throws SQLException {
 		return getPreparedStatement();
 	}
@@ -543,7 +562,25 @@ public abstract class BrokeredPreparedSt
 	*/
 	public PreparedStatement createDuplicateStatement(Connection conn, PreparedStatement oldStatement)
throws SQLException {
 
-		PreparedStatement newStatement = conn.prepareStatement(sql, resultSetType, resultSetConcurrency);
+        PreparedStatement newStatement;
+
+        if (generatedKeys == null) {
+            newStatement = conn.prepareStatement(
+                sql, resultSetType, resultSetConcurrency, resultSetHoldability);
+        } else {
+            // The prepareStatement() calls that take a generated key value do not take resultSet*
type
+            // parameters, but since they don't return ResultSets that is OK. There are only
for INSERT statements.
+            if (generatedKeys instanceof Integer) {
+                newStatement = conn.prepareStatement(
+                    sql, ((Integer) generatedKeys).intValue());
+            } else if (generatedKeys instanceof int[]) {
+                newStatement =
+                    conn.prepareStatement(sql, (int[]) generatedKeys);
+            } else {
+                newStatement = conn.prepareStatement(
+                    sql, (String[]) generatedKeys);
+            }
+        }
 
 		setStatementState(oldStatement, newStatement);
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java?rev=1365465&r1=1365464&r2=1365465&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement40.java
Wed Jul 25 06:33:53 2012
@@ -28,7 +28,7 @@ import java.sql.RowId;
 import java.sql.SQLException;
 import java.sql.SQLXML;
 
-public class BrokeredPreparedStatement40 extends BrokeredPreparedStatement30{
+public class BrokeredPreparedStatement40 extends BrokeredPreparedStatement {
     
     public BrokeredPreparedStatement40(BrokeredStatementControl control, String sql, Object
generatedKeys) throws SQLException {
         super(control, sql,generatedKeys);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml?rev=1365465&r1=1365464&r2=1365465&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/build.xml Wed Jul 25 06:33:53
2012
@@ -58,13 +58,10 @@
       </classpath>
       <include name="${derby.dir}/${cur.dir}/*.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredConnection.java"/>
-	  <exclude name="${derby.dir}/${cur.dir}/BrokeredConnection30.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredConnection40.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredPreparedStatement.java"/>
-	  <exclude name="${derby.dir}/${cur.dir}/BrokeredPreparedStatement30.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredPreparedStatement40.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredCallableStatement.java"/>
-	  <exclude name="${derby.dir}/${cur.dir}/BrokeredCallableStatement30.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredCallableStatement40.java"/>
 	  <exclude name="${derby.dir}/${cur.dir}/BrokeredStatement.java"/>
       <exclude name="${derby.dir}/${cur.dir}/BrokeredStatement40.java"/>
@@ -75,28 +72,7 @@
     </javac>
   </target>
 
-  <target name="compile_iapi_jdbc_stmt">
-    <javac
-      source="1.4"
-      target="1.4"
-      bootclasspath="${empty}"
-      nowarn="on"
-      debug="${debug}"
-      depend="${depend}"
-      deprecation="${deprecation}"
-      optimize="${optimize}"
-      proceed="${proceed}"
-      verbose="${verbose}"
-      srcdir="${derby.engine.src.dir}"
-      destdir="${out.dir}">
-      <classpath>
-        <pathelement path="${java15compile.classpath}"/>
-      </classpath>
-	  <include name="${derby.dir}/${cur.dir}/BrokeredStatement.java"/>
-    </javac>
-  </target>
-
-  <target name="compile_iapi_jdbc_jdbc3" depends="compile_iapi_jdbc_stmt,compile_iapi_jdbc_jsr169">
+  <target name="compile_iapi_jdbc_jdbc3" depends="compile_iapi_jdbc_jsr169">
     <javac
       source="1.5"
       target="1.5"
@@ -113,12 +89,10 @@
       <classpath>
         <pathelement path="${java15compile.classpath}"/>
       </classpath>
+      <include name="${derby.dir}/${cur.dir}/BrokeredStatement.java"/>
 	  <include name="${derby.dir}/${cur.dir}/BrokeredConnection.java"/>
 	  <include name="${derby.dir}/${cur.dir}/BrokeredPreparedStatement.java"/>
 	  <include name="${derby.dir}/${cur.dir}/BrokeredCallableStatement.java"/>
-	  <include name="${derby.dir}/${cur.dir}/BrokeredConnection30.java"/>
-	  <include name="${derby.dir}/${cur.dir}/BrokeredPreparedStatement30.java"/>
-	  <include name="${derby.dir}/${cur.dir}/BrokeredCallableStatement30.java"/>
       <include name="${derby.dir}/${cur.dir}/XAResourceAdapter.java"/>
 	  <include name="${derby.dir}/${cur.dir}/ResourceAdapter.java"/>
     </javac>

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver30.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver30.java?rev=1365465&r1=1365464&r2=1365465&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver30.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver30.java Wed Jul 25 06:33:53
2012
@@ -21,26 +21,15 @@
 
 package org.apache.derby.jdbc;
 
-import org.apache.derby.impl.jdbc.EmbedConnection;
-
-import org.apache.derby.iapi.services.sanity.SanityManager;
-
-import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
-import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.jdbc.BrokeredConnection;
-import org.apache.derby.iapi.jdbc.BrokeredConnection30;
-import org.apache.derby.iapi.jdbc.BrokeredConnectionControl;
-import org.apache.derby.iapi.jdbc.ResourceAdapter;
-
 import java.sql.Connection;
 import java.sql.SQLException;
-import org.apache.derby.impl.jdbc.*;
-
-/** -- jdbc 2.0. extension -- */
+import java.util.Properties;
 import javax.sql.PooledConnection;
 import javax.sql.XAConnection;
-
-import java.util.Properties;
+import org.apache.derby.iapi.jdbc.BrokeredConnection;
+import org.apache.derby.iapi.jdbc.BrokeredConnectionControl;
+import org.apache.derby.iapi.jdbc.ResourceAdapter;
+import org.apache.derby.impl.jdbc.*;
 
 /**
 	This class extends the local20 JDBC driver in order to determine at JBMS
@@ -124,8 +113,7 @@ public class Driver30 extends Driver20 {
             BrokeredConnectionControl control)
         throws SQLException
     {
-
-		return new BrokeredConnection30(control);
+        return new BrokeredConnection(control);
 	}
 
     /**



Mime
View raw message