db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1204934 - in /db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc: BrokeredCallableStatement40.java BrokeredPreparedStatement40.java BrokeredStatement.java BrokeredStatement40.java EngineStatement.java
Date Tue, 22 Nov 2011 11:45:08 GMT
Author: kahatlen
Date: Tue Nov 22 11:45:07 2011
New Revision: 1204934

URL: http://svn.apache.org/viewvc?rev=1204934&view=rev
Log:
DERBY-4845: Improve the dependency tracking for our build targets

Get rid of a call to Util.notImplemented() from BrokeredStatement by
pulling the isClosed() method up from BrokeredStatement40,
BrokeredPreparedStatement40 and BrokeredCallableStatement40 to their
common super-class.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement40.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
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java

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=1204934&r1=1204933&r2=1204934&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
Tue Nov 22 11:45:07 2011
@@ -283,17 +283,6 @@ public class BrokeredCallableStatement40
     }
     
     /**
-     * Checks if the statement is closed.
-     *
-     * @return <code>true</code> if the statement is closed,
-     * <code>false</code> otherwise
-     * @exception SQLException if an error occurs
-     */
-    public final boolean isClosed() throws SQLException {
-        return getCallableStatement().isClosed();
-    }
-    
-    /**
      * Returns <code>this</code> if this class implements the interface
      *
      * @param  interfaces a Class defining an interface

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=1204934&r1=1204933&r2=1204934&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
Tue Nov 22 11:45:07 2011
@@ -82,17 +82,6 @@ public class BrokeredPreparedStatement40
     }    
     
     /**
-     * Checks if the statement is closed.
-     *
-     * @return <code>true</code> if the statement is closed,
-     * <code>false</code> otherwise
-     * @exception SQLException if an error occurs
-     */
-    public final boolean isClosed() throws SQLException {
-        return getPreparedStatement().isClosed();
-    }
-    
-    /**
      * Returns <code>this</code> if this class implements the interface
      *
      * @param  interfaces a Class defining an interface

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=1204934&r1=1204933&r2=1204934&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 Tue
Nov 22 11:45:07 2011
@@ -21,12 +21,8 @@
 
 package org.apache.derby.iapi.jdbc;
 
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.SQLState;
 
-import org.apache.derby.iapi.error.StandardException;
-import org.apache.derby.iapi.error.PublicAPI;
-import org.apache.derby.iapi.services.info.JVMInfo;
 import org.apache.derby.impl.jdbc.Util;
 
 import java.sql.Connection;
@@ -35,8 +31,6 @@ import java.sql.SQLException;
 import java.sql.SQLWarning;
 import java.sql.Statement;
 
-import java.lang.reflect.*;
-
 /**
 	A Statement implementation that forwards all of its requests to an underlying Statement.
  */
@@ -552,21 +546,14 @@ public class BrokeredStatement implement
     }
 
     /**
-     * Checks if the statement is closed. Not implemented for this
-     * class since <code>isClosed()</code> is a new method in JDBC
-     * 4.0. The JDBC 4.0 sub-classes should override this method.
+     * Checks if the statement is closed.
      *
      * @return <code>true</code> if the statement is closed,
      * <code>false</code> otherwise
-     * @exception SQLException not-implemented exception
+     * @exception SQLException if an error occurs
      */
-    protected boolean isClosed() throws SQLException {
-        // Not implemented since we cannot forward the call to a JDBC
-        // 4.0 method from this class. This dummy implementation is
-        // provided here so that checkIfClosed() can be implemented
-        // once in this class instead of once in each of the
-        // Brokered*Statement40 classes.
-        throw Util.notImplemented();
+    public final boolean isClosed() throws SQLException {
+        return ((EngineStatement) getStatement()).isClosed();
     }
 
     /**

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=1204934&r1=1204933&r2=1204934&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 Tue
Nov 22 11:45:07 2011
@@ -41,17 +41,6 @@ public class BrokeredStatement40 extends
     }
     
     /**
-     * Checks if the statement is closed.
-     *
-     * @return <code>true</code> if the statement is closed,
-     * <code>false</code> otherwise
-     * @exception SQLException if an error occurs
-     */
-    public final boolean isClosed() throws SQLException {
-        return getStatement().isClosed();
-    }
-    
-    /**
      * Returns <code>this</code> if this class implements the interface
      *
      * @param  interfaces a Class defining an interface

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java?rev=1204934&r1=1204933&r2=1204934&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java Tue Nov
22 11:45:07 2011
@@ -46,6 +46,11 @@ public interface EngineStatement extends
      * @see java.sql.Statement#getResultSetHoldability()
      */ 
     public int getResultSetHoldability() throws SQLException;
+
+    /**
+     * Identical to the JDBC 4 isClosed() method.
+     */
+    public boolean isClosed() throws SQLException;
     
     ////////////////////////////////////////////////////////////////////
     //



Mime
View raw message