db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r636753 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/
Date Thu, 13 Mar 2008 13:09:41 GMT
Author: kmarsden
Date: Thu Mar 13 06:09:37 2008
New Revision: 636753

URL: http://svn.apache.org/viewvc?rev=636753&view=rev
Log:
DERBY-3525 Remove unneeded code to get JDBC level in BrokeredConnection and BrokeredStatement
classes


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/BrokeredCallableStatement30.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/BrokeredConnection30.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/BrokeredPreparedStatement30.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/BrokeredStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.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=636753&r1=636752&r2=636753&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
Thu Mar 13 06:09:37 2008
@@ -35,8 +35,8 @@
           implements CallableStatement
 {
 
-	public BrokeredCallableStatement(BrokeredStatementControl control, int jdbcLevel, String
sql) throws SQLException {
-		super(control, jdbcLevel, sql);
+	public BrokeredCallableStatement(BrokeredStatementControl control, String sql) throws SQLException
{
+		super(control,sql);
 	}
 
     public final void registerOutParameter(int parameterIndex,

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement30.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement30.java?rev=636753&r1=636752&r2=636753&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement30.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement30.java
Thu Mar 13 06:09:37 2008
@@ -35,8 +35,8 @@
 public class BrokeredCallableStatement30 extends BrokeredCallableStatement
 {
 
-	public BrokeredCallableStatement30(BrokeredStatementControl control, int jdbcLevel, String
sql) throws SQLException {
-		super(control, jdbcLevel, sql);
+	public BrokeredCallableStatement30(BrokeredStatementControl control, String sql) throws
SQLException {
+		super(control, sql);
 	}
     public final void setURL(java.lang.String parameterName, java.net.URL value) throws SQLException
{
 		getCallableStatement().setURL(parameterName, value);

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=636753&r1=636752&r2=636753&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
Thu Mar 13 06:09:37 2008
@@ -34,8 +34,8 @@
 
 public class BrokeredCallableStatement40 extends  BrokeredCallableStatement30{
     
-    public BrokeredCallableStatement40(BrokeredStatementControl control, int jdbcLevel, String
sql) throws SQLException{
-        super(control,jdbcLevel,sql);
+    public BrokeredCallableStatement40(BrokeredStatementControl control, String sql) throws
SQLException{
+        super(control, sql);
     }
     
     public Reader getCharacterStream(int parameterIndex)

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=636753&r1=636752&r2=636753&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 Thu
Mar 13 06:09:37 2008
@@ -447,7 +447,7 @@
 	}
 
 	public BrokeredStatement newBrokeredStatement(BrokeredStatementControl statementControl)
throws SQLException {
-		return new BrokeredStatement(statementControl, getJDBCLevel());
+		return new BrokeredStatement(statementControl);
 	}
 	public abstract BrokeredPreparedStatement
         newBrokeredStatement(BrokeredStatementControl statementControl,
@@ -546,8 +546,6 @@
         
         return connString;
     }
-
-	int getJDBCLevel() { return 2;}
 
     /*
      * JDBC 3.0 methods that are exposed through EngineConnection.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection30.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection30.java?rev=636753&r1=636752&r2=636753&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection30.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection30.java Thu
Mar 13 06:09:37 2008
@@ -189,12 +189,10 @@
 	}
 
 	public BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl,
String sql, Object generatedKeys) throws SQLException {
-		return new BrokeredPreparedStatement30(statementControl, getJDBCLevel(), sql, generatedKeys);
+		return new BrokeredPreparedStatement30(statementControl, sql, generatedKeys);
 	}
 	public BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl statementControl,
String sql) throws SQLException {
-		return new BrokeredCallableStatement30(statementControl, getJDBCLevel(), sql);
+		return new BrokeredCallableStatement30(statementControl, sql);
 	}
-
-	int getJDBCLevel() { return 3;}
 
 }

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=636753&r1=636752&r2=636753&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 Thu
Mar 13 06:09:37 2008
@@ -257,7 +257,7 @@
     public final BrokeredStatement newBrokeredStatement
             (BrokeredStatementControl statementControl) throws SQLException {
         try {
-            return new BrokeredStatement40(statementControl, getJDBCLevel());
+            return new BrokeredStatement40(statementControl);
         } catch (SQLException sqle) {
             notifyException(sqle);
             throw sqle;
@@ -265,7 +265,7 @@
     }
     public final BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl
statementControl, String sql, Object generatedKeys) throws SQLException {
         try {
-            return new BrokeredPreparedStatement40(statementControl, getJDBCLevel(), sql,
generatedKeys);
+            return new BrokeredPreparedStatement40(statementControl, sql, generatedKeys);
         } catch (SQLException sqle) {
             notifyException(sqle);
             throw sqle;
@@ -273,7 +273,7 @@
     }
     public final BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl
statementControl, String sql) throws SQLException {
         try {
-            return new BrokeredCallableStatement40(statementControl, getJDBCLevel(), sql);
+            return new BrokeredCallableStatement40(statementControl, sql);
         } catch (SQLException sqle) {
             notifyException(sqle);
             throw sqle;
@@ -294,8 +294,6 @@
             throw se;
         }
     }
-    
-    final int getJDBCLevel() { return 4;}
     
     /**
      * Returns false unless <code>interfaces</code> is implemented 

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=636753&r1=636752&r2=636753&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
Thu Mar 13 06:09:37 2008
@@ -41,9 +41,9 @@
 	*/
 	final String	sql;
 
-    public BrokeredPreparedStatement(BrokeredStatementControl control, int jdbcLevel, String
sql) throws SQLException
+    public BrokeredPreparedStatement(BrokeredStatementControl control, String sql) throws
SQLException
     {
-        super(control, jdbcLevel);
+        super(control);
 		this.sql = sql;
     }
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement30.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement30.java?rev=636753&r1=636752&r2=636753&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement30.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement30.java
Thu Mar 13 06:09:37 2008
@@ -30,8 +30,8 @@
 public class BrokeredPreparedStatement30 extends BrokeredPreparedStatement {
 
 	private final Object generatedKeys;
-	public BrokeredPreparedStatement30(BrokeredStatementControl control, int jdbcLevel, String
sql, Object generatedKeys) throws SQLException {
-		super(control, jdbcLevel, sql);
+	public BrokeredPreparedStatement30(BrokeredStatementControl control, String sql, Object
generatedKeys) throws SQLException {
+		super(control,sql);
 		this.generatedKeys = generatedKeys;
 	}
 

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=636753&r1=636752&r2=636753&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
Thu Mar 13 06:09:37 2008
@@ -32,8 +32,8 @@
 
 public class BrokeredPreparedStatement40 extends BrokeredPreparedStatement30{
     
-    public BrokeredPreparedStatement40(BrokeredStatementControl control, int jdbcLevel, String
sql, Object generatedKeys) throws SQLException {
-        super(control, jdbcLevel, sql,generatedKeys);
+    public BrokeredPreparedStatement40(BrokeredStatementControl control, String sql, Object
generatedKeys) throws SQLException {
+        super(control, sql,generatedKeys);
     }
     
     public void setRowId(int parameterIndex, RowId x) throws SQLException{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java?rev=636753&r1=636752&r2=636753&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java Thu
Mar 13 06:09:37 2008
@@ -50,7 +50,6 @@
 	*/
 	final BrokeredStatementControl control;
 
-	final int jdbcLevel;
 	final int resultSetType;
 	final int resultSetConcurrency;
 	final int resultSetHoldability;
@@ -61,10 +60,9 @@
 	private String cursorName;
 	private Boolean escapeProcessing;
 
-    BrokeredStatement(BrokeredStatementControl control, int jdbcLevel) throws SQLException
+    BrokeredStatement(BrokeredStatementControl control) throws SQLException
     {
 		this.control = control;
-		this.jdbcLevel = jdbcLevel;
 
 		// save the state of the Statement while we are pretty much guaranteed the
 		// underlying statement is open.
@@ -487,11 +485,7 @@
 	public Statement createDuplicateStatement(Connection conn, Statement oldStatement) throws
SQLException {
 
 		Statement newStatement;
-		
-		if (jdbcLevel == 2)
-			newStatement = conn.createStatement(resultSetType, resultSetConcurrency);
-		else
-			newStatement = conn.createStatement(resultSetType, resultSetConcurrency,
+		newStatement = conn.createStatement(resultSetType, resultSetConcurrency,
                     resultSetHoldability);
 
 		setStatementState(oldStatement, newStatement);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java?rev=636753&r1=636752&r2=636753&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement40.java Thu
Mar 13 06:09:37 2008
@@ -31,14 +31,13 @@
      * calls the superclass constructor to pass the parameters
      *
      * @param control   BrokeredStatementControl
-     * @param jdbcLevel int
      * @throws java.sql.SQLException
      *
      */
     
-    BrokeredStatement40(BrokeredStatementControl control, int jdbcLevel) 
+    BrokeredStatement40(BrokeredStatementControl control) 
                                                     throws SQLException {
-        super(control, jdbcLevel);
+        super(control);
     }
     
     /**



Mime
View raw message