db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r632456 - in /db/derby/code/trunk/java: client/org/apache/derby/client/am/ client/org/apache/derby/client/net/ drda/org/apache/derby/impl/drda/ engine/org/apache/derby/catalog/ engine/org/apache/derby/iapi/jdbc/ engine/org/apache/derby/iapi...
Date Fri, 29 Feb 2008 22:02:34 GMT
Author: djd
Date: Fri Feb 29 14:02:27 2008
New Revision: 632456

URL: http://svn.apache.org/viewvc?rev=632456&view=rev
Log:
DERBY-3484 For JDBC 2.0/3.0 java.sql.ResultSet constants use directly instead of through JDBC[2,3]0Translation
as JSR169 supports all the types

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
    db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java
    db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerOldTransitionRows.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAConnection.java
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAResource.java
    db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java
    db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java Fri Feb 29
14:02:27 2008
@@ -23,7 +23,6 @@
 
 import org.apache.derby.jdbc.ClientBaseDataSource;
 import org.apache.derby.jdbc.ClientDataSource;
-import org.apache.derby.shared.common.reference.JDBC30Translation;
 import org.apache.derby.shared.common.reference.SQLState;
 
 import java.sql.SQLException;
@@ -71,7 +70,7 @@
      * to ensure the correct value is returned for an
      * XA connection.
      */
-    private int holdability = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+    private int holdability = ResultSet.HOLD_CURSORS_OVER_COMMIT;
     
     public String databaseName_;
 
@@ -300,7 +299,7 @@
             loginTimeout_ = ds.getLoginTimeout();
             dataSource_ = ds;
             
-            holdability = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+            holdability = ResultSet.HOLD_CURSORS_OVER_COMMIT;
         }
 
         
@@ -1429,7 +1428,7 @@
             // commits, as the engine does not support it.
             if (this.isXAConnection_ && this.xaState_ == XA_T1_ASSOCIATED)
             {
-                if (holdability == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT)
+                if (holdability == ResultSet.HOLD_CURSORS_OVER_COMMIT)
                     throw new SqlException(agent_.logWriter_, 
                             new ClientMessageId(SQLState.CANNOT_HOLD_CURSOR_XA));
             }
@@ -1701,8 +1700,8 @@
         // engine and handled there.
         if (this.isXAConnection_ && this.xaState_ == XA_T1_ASSOCIATED)
         {
-            if (resultSetHoldability == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {
-                resultSetHoldability = JDBC30Translation.CLOSE_CURSORS_AT_COMMIT;
+            if (resultSetHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
+                resultSetHoldability = ResultSet.CLOSE_CURSORS_AT_COMMIT;
                 accumulateWarning(new SqlWarning(agent_.logWriter_, 
                         new ClientMessageId(SQLState.HOLDABLE_RESULT_SET_NOT_AVAILABLE)));
             }
@@ -2303,7 +2302,7 @@
     final int holdability()
     {
         if (this.isXAConnection_ && this.xaState_ == XA_T1_ASSOCIATED)
-            return JDBC30Translation.CLOSE_CURSORS_AT_COMMIT;
+            return ResultSet.CLOSE_CURSORS_AT_COMMIT;
         return holdability;
     }
     

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DatabaseMetaData.java Fri Feb
29 14:02:27 2008
@@ -24,7 +24,6 @@
 import java.sql.SQLException;
 
 import org.apache.derby.shared.common.reference.SQLState;
-import org.apache.derby.shared.common.reference.JDBC30Translation;
 
 // Note:
 //   Tag members using the strictest visibility.
@@ -1438,7 +1437,7 @@
         cs.setStringX(3, "");
         cs.setStringX(4, "%");
         int cursorHold;
-        if (connection_.holdability() == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {
+        if (connection_.holdability() == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             cursorHold = 1;
         } else {
             cursorHold = 0;
@@ -1783,7 +1782,7 @@
         cs.setStringX(6, table);
         // We're passing the keyword EXPORTEDKEY, but this support may not be in the GA version
of SPs.
         // As a workaround in getCrossReference(), we'll just "select * where 0=1" when primaryTable==""
-        if (connection_.holdability() == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {
+        if (connection_.holdability() == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             cs.setStringX(7, "DATATYPE='JDBC';IMPORTEDKEY=1; CURSORHOLD=1");
         } else {
             cs.setStringX(7, "DATATYPE='JDBC';IMPORTEDKEY=1; CURSORHOLD=0");
@@ -1840,7 +1839,7 @@
         cs.setStringX(6, "");
         // We're passing the keyword EXPORTEDKEY, but this support may not be in the GA version
of SPs.
         // As a workaround in getCrossReference(), we'll just "select * where 0=1" when foreignTable==""
-        if (connection_.holdability() == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {
+        if (connection_.holdability() == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             cs.setStringX(7, "DATATYPE='JDBC';EXPORTEDKEY=1; CURSORHOLD=1");
         } else {
             cs.setStringX(7, "DATATYPE='JDBC';EXPORTEDKEY=1; CURSORHOLD=0");
@@ -2064,7 +2063,7 @@
     // helper method for the catalog queries only
     private String getOptions() {
         int cursorHold;
-        if (connection_.holdability() == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {
+        if (connection_.holdability() == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             cursorHold = 1;
         } else {
             cursorHold = 0;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java Fri Feb
29 14:02:27 2008
@@ -23,7 +23,6 @@
 
 import java.lang.ref.WeakReference;
 
-import org.apache.derby.shared.common.reference.JDBC30Translation;
 
 import org.apache.derby.shared.common.reference.SQLState;
 
@@ -103,9 +102,9 @@
      *                             CLOSE_CURSORS_AT_COMMIT
      */
     public void setPKGNAMCBytes(byte[] b, int resultSetHoldability) {
-        if (resultSetHoldability == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {
+        if (resultSetHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             agent_.sectionManager_.holdPKGNAMCBytes = b;
-        } else if (resultSetHoldability == JDBC30Translation.CLOSE_CURSORS_AT_COMMIT) {
+        } else if (resultSetHoldability == ResultSet.CLOSE_CURSORS_AT_COMMIT) {
             agent_.sectionManager_.noHoldPKGNAMCBytes = b;
         }
     }
@@ -116,9 +115,9 @@
     // Get a section for either a jdbc update or query statement.
     public Section getDynamicSection(int resultSetHoldability) throws SqlException {
         int cursorHoldIndex;
-        if (resultSetHoldability == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {
+        if (resultSetHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             return getSection(freeSectionsHold_, packageNameWithHold__, cursorNamePrefixWithHold__,
resultSetHoldability);
-        } else if (resultSetHoldability == JDBC30Translation.CLOSE_CURSORS_AT_COMMIT) {
+        } else if (resultSetHoldability == ResultSet.CLOSE_CURSORS_AT_COMMIT) {
             return getSection(freeSectionsNonHold_, packageNameWithNoHold__, cursorNamePrefixWithNoHold__,
resultSetHoldability);
         } else {
             throw new SqlException(agent_.logWriter_,
@@ -145,9 +144,9 @@
     }
 
     public void freeSection(Section section, int resultSetHoldability) {
-        if (resultSetHoldability == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {
+        if (resultSetHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             this.freeSectionsHold_.push(section);
-        } else if (resultSetHoldability == JDBC30Translation.CLOSE_CURSORS_AT_COMMIT) {
+        } else if (resultSetHoldability == ResultSet.CLOSE_CURSORS_AT_COMMIT) {
             this.freeSectionsNonHold_.push(section);
         }
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java Fri Feb 29 14:02:27
2008
@@ -23,7 +23,6 @@
 import java.sql.SQLException;
 import java.util.Arrays;
 
-import org.apache.derby.shared.common.reference.JDBC30Translation;
 import org.apache.derby.shared.common.reference.SQLState;
 import org.apache.derby.shared.common.sanity.SanityManager;
 
@@ -412,8 +411,8 @@
         }
 
         switch (holdability) {
-        case JDBC30Translation.CLOSE_CURSORS_AT_COMMIT:
-        case JDBC30Translation.HOLD_CURSORS_OVER_COMMIT:
+        case ResultSet.CLOSE_CURSORS_AT_COMMIT:
+        case ResultSet.HOLD_CURSORS_OVER_COMMIT:
             resultSetHoldability_ = holdability;
             break;
         default:

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetStatementReply.java Fri
Feb 29 14:02:27 2008
@@ -21,6 +21,8 @@
 
 package org.apache.derby.client.net;
 
+import java.sql.ResultSet;
+
 import org.apache.derby.client.am.ColumnMetaData;
 import org.apache.derby.client.am.DisconnectException;
 import org.apache.derby.client.am.PreparedStatementCallbackInterface;
@@ -35,7 +37,6 @@
 import org.apache.derby.jdbc.ClientDriver;
 import org.apache.derby.client.am.ClientJDBCObjectFactory;
 import org.apache.derby.shared.common.i18n.MessageUtil;
-import org.apache.derby.shared.common.reference.JDBC30Translation;
 import org.apache.derby.client.am.ClientMessageId;
 import org.apache.derby.shared.common.reference.SQLState;
 import org.apache.derby.shared.common.reference.MessageId;
@@ -2386,9 +2387,9 @@
 
     private int calculateResultSetHoldability(int sqlcsrhld) {
         if (sqlcsrhld == 0xF0) {
-            return JDBC30Translation.CLOSE_CURSORS_AT_COMMIT;
+            return ResultSet.CLOSE_CURSORS_AT_COMMIT;
         } else {
-            return JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+            return ResultSet.HOLD_CURSORS_OVER_COMMIT;
         }
     }
 

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Fri Feb 29
14:02:27 2008
@@ -2743,7 +2743,7 @@
 		//hold cursors over commit set. In case of stored procedures which use server-side
 		//JDBC, the holdability of the ResultSet will be the holdability of the statement 
 		//in the stored procedure, not the holdability of the calling statement.
-		if (stmt.getCurrentDrdaResultSet().withHoldCursor == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT)
+		if (stmt.getCurrentDrdaResultSet().withHoldCursor == ResultSet.HOLD_CURSORS_OVER_COMMIT)
 			writer.writeScalar1Byte(CodePoint.SQLCSRHLD, CodePoint.TRUE);
 		if (sqlamLevel >= MGRLVL_7)
 		{
@@ -3759,7 +3759,7 @@
 
 		if (attrs.indexOf("WITH HOLD") != -1)
 		{
-			stmt.withHoldCursor = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+			stmt.withHoldCursor = ResultSet.HOLD_CURSORS_OVER_COMMIT;
 			validAttribute = true;
 		}
 

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java Fri Feb 29
14:02:27 2008
@@ -1605,13 +1605,13 @@
 		if (isDynamicPkgid(pkgid))
 		{       
 			if(pkgid.charAt(4) == 'N')
-				withHoldCursor = JDBC30Translation.CLOSE_CURSORS_AT_COMMIT;
+				withHoldCursor = ResultSet.CLOSE_CURSORS_AT_COMMIT;
 			else  
-				withHoldCursor = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+				withHoldCursor = ResultSet.HOLD_CURSORS_OVER_COMMIT;
 		}
 		else 
 		{            
-			withHoldCursor = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+			withHoldCursor = ResultSet.HOLD_CURSORS_OVER_COMMIT;
 		
 		}
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerNewTransitionRows.java
Fri Feb 29 14:02:27 2008
@@ -23,7 +23,6 @@
 
 import org.apache.derby.iapi.db.Factory;
 import org.apache.derby.iapi.db.TriggerExecutionContext;
-import org.apache.derby.iapi.reference.JDBC20Translation;
 
 import java.sql.Connection;
 import java.sql.Statement;
@@ -86,7 +85,7 @@
    }
     
    public int getResultSetConcurrency() {
-        return JDBC20Translation.CONCUR_READ_ONLY;
+        return ResultSet.CONCUR_READ_ONLY;
    }
    
    public void close() throws SQLException {

Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerOldTransitionRows.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerOldTransitionRows.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerOldTransitionRows.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/TriggerOldTransitionRows.java
Fri Feb 29 14:02:27 2008
@@ -23,7 +23,6 @@
 
 import org.apache.derby.iapi.db.Factory;
 import org.apache.derby.iapi.db.TriggerExecutionContext;
-import org.apache.derby.iapi.reference.JDBC20Translation;
 
 import java.sql.Connection;
 import java.sql.Statement;
@@ -82,7 +81,7 @@
        }
         
        public int getResultSetConcurrency() {
-            return JDBC20Translation.CONCUR_READ_ONLY;
+            return ResultSet.CONCUR_READ_ONLY;
        }
        public void close() throws SQLException {
            resultSet.close();

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=632456&r1=632455&r2=632456&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 Fri
Feb 29 14:02:27 2008
@@ -22,6 +22,7 @@
 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;
@@ -37,7 +38,6 @@
 
 import java.lang.reflect.*;
 
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.error.PublicAPI;
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.shared.common.reference.SQLState;
@@ -50,7 +50,7 @@
 {
 	
 	// default for Derby
-	int stateHoldability = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+	int stateHoldability = ResultSet.HOLD_CURSORS_OVER_COMMIT;
 
 	final BrokeredConnectionControl control;
 	private boolean isClosed;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/reference/JDBC20Translation.java
Fri Feb 29 14:02:27 2008
@@ -21,7 +21,6 @@
 
 package org.apache.derby.iapi.reference;
 
-import java.sql.ResultSet;
 import javax.transaction.xa.XAResource;
 
 /**
@@ -41,30 +40,6 @@
 */
 
 public interface JDBC20Translation {
-        /*
-        ** public statics from 2.0 version of java.sql.ResultSet
-        */
-
-        /**
-         *      java.sql.ResultSet - result set concurrency
-         */
-        public static final int CONCUR_READ_ONLY = ResultSet.CONCUR_READ_ONLY;
-
-        public static final int CONCUR_UPDATABLE = ResultSet.CONCUR_UPDATABLE;
-
-        /**
-         *      java.sql.ResultSet - result set type
-         */
-        public static final int TYPE_FORWARD_ONLY = ResultSet.TYPE_FORWARD_ONLY;
-        public static final int TYPE_SCROLL_INSENSITIVE = ResultSet.TYPE_SCROLL_INSENSITIVE;
-        public static final int TYPE_SCROLL_SENSITIVE = ResultSet.TYPE_SCROLL_SENSITIVE;
-
-        /**
-         *      java.sql.ResultSet - fetch direction
-         */
-        public static final int FETCH_FORWARD = ResultSet.FETCH_FORWARD;
-        public static final int FETCH_REVERSE = ResultSet.FETCH_REVERSE;
-        public static final int FETCH_UNKNOWN = ResultSet.FETCH_UNKNOWN;
 
         /*
         ** public statics from javax.transaction.xa.XAResource

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedConnection.java Fri Feb
29 14:02:27 2008
@@ -25,8 +25,6 @@
 import org.apache.derby.jdbc.InternalDriver;
 
 import org.apache.derby.iapi.reference.Attribute;
-import org.apache.derby.iapi.reference.JDBC20Translation;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.MessageId;
 import org.apache.derby.iapi.reference.Property;
 import org.apache.derby.iapi.reference.SQLState;
@@ -61,6 +59,7 @@
 import java.sql.Blob;
 import java.sql.Clob;
 import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.SQLWarning;
 import java.sql.Statement;
@@ -147,7 +146,7 @@
 	 new method setHoldability(int) in JDBC3.0
      * 
 	 */
-	private int	connectionHoldAbility = JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+	private int	connectionHoldAbility = ResultSet.HOLD_CURSORS_OVER_COMMIT;
 
 
 	//////////////////////////////////////////////////////////
@@ -1119,8 +1118,8 @@
      */
 	public final Statement createStatement() throws SQLException 
 	{
-		return createStatement(JDBC20Translation.TYPE_FORWARD_ONLY,
-							   JDBC20Translation.CONCUR_READ_ONLY,
+		return createStatement(ResultSet.TYPE_FORWARD_ONLY,
+							   ResultSet.CONCUR_READ_ONLY,
 							   connectionHoldAbility);
 	}
 
@@ -1198,8 +1197,8 @@
     public final PreparedStatement prepareStatement(String sql)
 	    throws SQLException
 	{
-		return prepareStatement(sql,JDBC20Translation.TYPE_FORWARD_ONLY,
-			JDBC20Translation.CONCUR_READ_ONLY,
+		return prepareStatement(sql,ResultSet.TYPE_FORWARD_ONLY,
+			ResultSet.CONCUR_READ_ONLY,
 			connectionHoldAbility,
 			Statement.NO_GENERATED_KEYS,
 			null,
@@ -1287,8 +1286,8 @@
     throws SQLException
 	{
   		return prepareStatement(sql,
-			JDBC20Translation.TYPE_FORWARD_ONLY,
-			JDBC20Translation.CONCUR_READ_ONLY,
+			ResultSet.TYPE_FORWARD_ONLY,
+			ResultSet.CONCUR_READ_ONLY,
 			connectionHoldAbility,
 			(columnIndexes == null || columnIndexes.length == 0)
 				? Statement.NO_GENERATED_KEYS
@@ -1322,8 +1321,8 @@
     throws SQLException
 	{
   		return prepareStatement(sql,
-			JDBC20Translation.TYPE_FORWARD_ONLY,
-			JDBC20Translation.CONCUR_READ_ONLY,
+			ResultSet.TYPE_FORWARD_ONLY,
+			ResultSet.CONCUR_READ_ONLY,
 			connectionHoldAbility,
 			(columnNames == null || columnNames.length == 0)
 				? Statement.NO_GENERATED_KEYS
@@ -1354,8 +1353,8 @@
     throws SQLException
 	{
 		return prepareStatement(sql,
-			JDBC20Translation.TYPE_FORWARD_ONLY,
-			JDBC20Translation.CONCUR_READ_ONLY,
+			ResultSet.TYPE_FORWARD_ONLY,
+			ResultSet.CONCUR_READ_ONLY,
 			connectionHoldAbility,
 			autoGeneratedKeys,
 			null,
@@ -1411,8 +1410,8 @@
 	public final CallableStatement prepareCall(String sql) 
 		throws SQLException 
 	{
-		return prepareCall(sql, JDBC20Translation.TYPE_FORWARD_ONLY,
-						   JDBC20Translation.CONCUR_READ_ONLY,
+		return prepareCall(sql, ResultSet.TYPE_FORWARD_ONLY,
+						   ResultSet.CONCUR_READ_ONLY,
 						   connectionHoldAbility);
 	}
 
@@ -2373,8 +2372,8 @@
 			PreparedStatement s = null;
 			try {
 			    s = factory.newEmbedPreparedStatement(this, sql, true,
-											  JDBC20Translation.TYPE_FORWARD_ONLY,
-											  JDBC20Translation.CONCUR_READ_ONLY,
+											  ResultSet.TYPE_FORWARD_ONLY,
+											  ResultSet.CONCUR_READ_ONLY,
 											  connectionHoldAbility,
 											  Statement.NO_GENERATED_KEYS,
 											  null,
@@ -2609,10 +2608,10 @@
 		/* Add warning if scroll sensitive cursor
 		 * and downgrade to scroll insensitive cursor.
 		 */
-		if (resultSetType == JDBC20Translation.TYPE_SCROLL_SENSITIVE)
+		if (resultSetType == ResultSet.TYPE_SCROLL_SENSITIVE)
 		{
 			addWarning(EmbedSQLWarning.newEmbedSQLWarning(SQLState.NO_SCROLL_SENSITIVE_CURSORS));
-			resultSetType = JDBC20Translation.TYPE_SCROLL_INSENSITIVE;
+			resultSetType = ResultSet.TYPE_SCROLL_INSENSITIVE;
 		}
 		return resultSetType;
 	}

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
Fri Feb 29 14:02:27 2008
@@ -39,8 +39,6 @@
 
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.reference.Limits;
-import org.apache.derby.iapi.reference.JDBC20Translation;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 
 import java.util.Properties;
 
@@ -2818,8 +2816,8 @@
      * @see Connection
      */
 	public boolean supportsResultSetType(int type) {
-		if ((type == JDBC20Translation.TYPE_FORWARD_ONLY) ||
-		    (type == JDBC20Translation.TYPE_SCROLL_INSENSITIVE)) {
+		if ((type == ResultSet.TYPE_FORWARD_ONLY) ||
+		    (type == ResultSet.TYPE_SCROLL_INSENSITIVE)) {
 			return true;
 		}
     //we don't support TYPE_SCROLL_SENSITIVE yet.
@@ -2838,7 +2836,7 @@
      * @see Connection
      */
 	public boolean supportsResultSetConcurrency(int type, int concurrency) {
- 		if (type == JDBC20Translation.TYPE_SCROLL_SENSITIVE) {
+ 		if (type == ResultSet.TYPE_SCROLL_SENSITIVE) {
  			// (TYPE_SCROLL_SENSITIVE, *)
   			return false;
  		} else {
@@ -2859,7 +2857,7 @@
      * @return true if updates are visible for the result set type
      */
     public boolean ownUpdatesAreVisible(int type)   {
- 		if (type == JDBC20Translation.TYPE_SCROLL_INSENSITIVE) {
+ 		if (type == ResultSet.TYPE_SCROLL_INSENSITIVE) {
  			return true;
  		} else {
  			return false;
@@ -2875,7 +2873,7 @@
      * @return true if deletes are visible for the result set type
      */
     public boolean ownDeletesAreVisible(int type)   {
- 		if (type == JDBC20Translation.TYPE_SCROLL_INSENSITIVE) {
+ 		if (type == ResultSet.TYPE_SCROLL_INSENSITIVE) {
  			return true;
  		} else {
  			return false;
@@ -2907,7 +2905,7 @@
        * @return true if updates are visible for the result set type
        */
     public boolean othersUpdatesAreVisible(int type) {
-		if (type == JDBC20Translation.TYPE_FORWARD_ONLY)
+		if (type == ResultSet.TYPE_FORWARD_ONLY)
 			return true;
 		return false;
 	}
@@ -2921,7 +2919,7 @@
      * @return true if deletes are visible for the result set type
      */
     public boolean othersDeletesAreVisible(int type)  {
-		if (type == JDBC20Translation.TYPE_FORWARD_ONLY)
+		if (type == ResultSet.TYPE_FORWARD_ONLY)
 			return true;
 		return false;
 	}
@@ -2935,7 +2933,7 @@
      * @return true if inserts are visible for the result set type
      */
     public boolean othersInsertsAreVisible(int type)  {
-		if (type == JDBC20Translation.TYPE_FORWARD_ONLY)
+		if (type == ResultSet.TYPE_FORWARD_ONLY)
 			return true;
 		return false;
 	}
@@ -2950,7 +2948,7 @@
      * @return true if updates are detected by the resultset type
      */
     public boolean updatesAreDetected(int type) {
-		if (type == JDBC20Translation.TYPE_SCROLL_INSENSITIVE) {
+		if (type == ResultSet.TYPE_SCROLL_INSENSITIVE) {
 			return true;
 		} else {
 			// For forward only resultsets, we move to before the next
@@ -2971,7 +2969,7 @@
      * @return true if deletes are detected by the resultset type
      */
     public boolean deletesAreDetected(int type) {
-		if (type == JDBC20Translation.TYPE_SCROLL_INSENSITIVE) {
+		if (type == ResultSet.TYPE_SCROLL_INSENSITIVE) {
 			return true;
 		} else {
 			// For forward only resultsets, we move to before the next
@@ -3191,7 +3189,7 @@
 	*/
 	public int getResultSetHoldability()
   {
-		return JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+		return ResultSet.HOLD_CURSORS_OVER_COMMIT;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
Fri Feb 29 14:02:27 2008
@@ -44,7 +44,6 @@
 
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.reference.JDBC40Translation;
-import org.apache.derby.iapi.reference.JDBC20Translation;
 
 import java.util.Calendar;
 import java.util.Vector;
@@ -127,11 +126,14 @@
 
 			try {
 			    preparedStatement = lcc.prepareInternalStatement
-				(lcc.getDefaultSchema(), sql, resultSetConcurrency==JDBC20Translation.CONCUR_READ_ONLY,
forMetaData);
+				(lcc.getDefaultSchema(), sql,
+                        resultSetConcurrency == java.sql.ResultSet.CONCUR_READ_ONLY,
+                        forMetaData);
 			    
 			    addWarning(preparedStatement.getCompileTimeWarnings());
 
-			    activation = preparedStatement.getActivation(lcc, resultSetType == JDBC20Translation.TYPE_SCROLL_INSENSITIVE);
+			    activation = preparedStatement.getActivation(lcc,
+                        resultSetType == java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE);
 
 				checkRequiresCallableStatement(activation);
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java Fri Feb
29 14:02:27 2008
@@ -52,8 +52,6 @@
 import org.apache.derby.iapi.services.io.LimitInputStream;
 import org.apache.derby.iapi.services.io.NewByteArrayInputStream;
 import org.apache.derby.iapi.error.ExceptionSeverity;
-import org.apache.derby.iapi.reference.JDBC20Translation;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.SQLState;
 
 /* can't import these due to name overlap:
@@ -239,16 +237,16 @@
 		//If the underlying language resultset is not updateable, then the concurrency of the ResultSet
object will be CONCUR_READ_ONLY
 		//and a warning will be issued on the ResultSet object.
 		if (stmt == null)
-			concurrencyOfThisResultSet = JDBC20Translation.CONCUR_READ_ONLY;
-		else if (stmt.resultSetConcurrency == JDBC20Translation.CONCUR_READ_ONLY)
-			concurrencyOfThisResultSet = JDBC20Translation.CONCUR_READ_ONLY;
+			concurrencyOfThisResultSet = java.sql.ResultSet.CONCUR_READ_ONLY;
+		else if (stmt.resultSetConcurrency == java.sql.ResultSet.CONCUR_READ_ONLY)
+			concurrencyOfThisResultSet = java.sql.ResultSet.CONCUR_READ_ONLY;
 		else {
 			if (!isForUpdate()) { //language resultset not updatable
-				concurrencyOfThisResultSet = JDBC20Translation.CONCUR_READ_ONLY;
+				concurrencyOfThisResultSet = java.sql.ResultSet.CONCUR_READ_ONLY;
 				SQLWarning w = StandardException.newWarning(SQLState.QUERY_NOT_QUALIFIED_FOR_UPDATABLE_RESULTSET);
 				addWarning(w);
 			} else
-					concurrencyOfThisResultSet = JDBC20Translation.CONCUR_UPDATABLE;
+					concurrencyOfThisResultSet = java.sql.ResultSet.CONCUR_UPDATABLE;
 		}
 
 		// Fill in the column types
@@ -256,7 +254,7 @@
 		
 		// Only incur the cost of allocating and maintaining
 		// updated column information if the columns can be updated.
-		if (concurrencyOfThisResultSet == JDBC20Translation.CONCUR_UPDATABLE)
+		if (concurrencyOfThisResultSet == java.sql.ResultSet.CONCUR_UPDATABLE)
 		{
             final int columnCount = resultDescription.getColumnCount();
             final ExecutionFactory factory = conn.getLanguageConnection().
@@ -284,7 +282,7 @@
         if (stmt != null)
         {
            // At connectivity level we handle only for forward only cursor
-           if (stmt.resultSetType == JDBC20Translation.TYPE_FORWARD_ONLY)
+           if (stmt.resultSetType == java.sql.ResultSet.TYPE_FORWARD_ONLY)
                maxRows = stmt.maxRows;
 
            maxFieldSize = stmt.MaxFieldSize;
@@ -406,7 +404,7 @@
 				 */
                 StatementContext statementContext =
                     lcc.pushStatementContext(isAtomic, 
-					     concurrencyOfThisResultSet==JDBC20Translation.CONCUR_READ_ONLY, 
+					     concurrencyOfThisResultSet==java.sql.ResultSet.CONCUR_READ_ONLY, 
 					     getSQLText(),
 					     getParameterValueSet(),
                                              false, timeoutMillis);
@@ -550,7 +548,7 @@
 								// underlying connection.  Do this outside of
 								// the connection synchronization.
 		// Would like to throw an exception if already closed, but
-		// some code assumes you can close a ResultSet more than once.
+		// some code assumes you can close a java.sql.ResultSet more than once.
 		// checkIfClosed("close");
 
 		// synchronize out here so the close and the autocommit are
@@ -1614,9 +1612,9 @@
     public final int getHoldability() throws SQLException {
         checkIfClosed("getHoldability");
         if (theResults.getActivation().getResultSetHoldability()) {
-            return JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+            return java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT;
         }
-        return JDBC30Translation.CLOSE_CURSORS_AT_COMMIT;
+        return java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT;
     }
 
     /**
@@ -4436,7 +4434,7 @@
      */
     private void checkScrollCursor(String methodName) throws SQLException {
 		checkIfClosed(methodName);
-		if (stmt.getResultSetType() == JDBC20Translation.TYPE_FORWARD_ONLY)
+		if (stmt.getResultSetType() == java.sql.ResultSet.TYPE_FORWARD_ONLY)
 			throw Util
 					.newEmbedSQLException(
 							SQLState.NOT_ON_FORWARD_ONLY_CURSOR,
@@ -4446,7 +4444,7 @@
 	}
     
     private void checkUpdatableCursor(String operation) throws SQLException {
-        if (getConcurrency() != JDBC20Translation.CONCUR_UPDATABLE) {
+        if (getConcurrency() != java.sql.ResultSet.CONCUR_UPDATABLE) {
             throw Util.generateCsSQLException(
                     SQLState.UPDATABLE_RESULTSET_API_DISALLOWED, 
                     operation);
@@ -4474,7 +4472,7 @@
                     // No timeout for this operation (use 0)
 					StatementContext statementContext =
                         lcc.pushStatementContext(isAtomic, 
-						 concurrencyOfThisResultSet==JDBC20Translation.CONCUR_READ_ONLY,
+						 concurrencyOfThisResultSet==java.sql.ResultSet.CONCUR_READ_ONLY,
 						 getSQLText(),
                                                  getParameterValueSet(),
                                                  false, 0L);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java Fri Feb
29 14:02:27 2008
@@ -21,8 +21,6 @@
 
 package org.apache.derby.impl.jdbc;
 
-import org.apache.derby.iapi.reference.JDBC20Translation;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.reference.SQLState;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
@@ -93,7 +91,7 @@
 	String SQLText;
 
     private int fetchSize = 1;
-    private int fetchDirection = JDBC20Translation.FETCH_FORWARD;
+    private int fetchDirection = java.sql.ResultSet.FETCH_FORWARD;
     int MaxFieldSize;
 	/**
 	 * Query timeout in milliseconds. By default, no statements time
@@ -606,9 +604,11 @@
 			Activation activation;
 			try {
 				PreparedStatement preparedStatement = lcc.prepareInternalStatement
-				    (lcc.getDefaultSchema(), sql, resultSetConcurrency==JDBC20Translation.CONCUR_READ_ONLY,
false);
+				    (lcc.getDefaultSchema(), sql, resultSetConcurrency==
+                        java.sql.ResultSet.CONCUR_READ_ONLY, false);
 				activation =
-					preparedStatement.getActivation(lcc, resultSetType == JDBC20Translation.TYPE_SCROLL_INSENSITIVE);
+					preparedStatement.getActivation(lcc, resultSetType ==
+                        java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE);
 				checkRequiresCallableStatement(activation);
 			 } catch (Throwable t) {
 				throw handleException(t);
@@ -804,9 +804,9 @@
                 /* fetch direction is meaningless to us. we just save
                  * it off if it is valid  and return the current value if asked.
                  */
-                if (direction == JDBC20Translation.FETCH_FORWARD || 
-                    direction == JDBC20Translation.FETCH_REVERSE ||
-                    direction == JDBC20Translation.FETCH_UNKNOWN )
+                if (direction == java.sql.ResultSet.FETCH_FORWARD || 
+                    direction == java.sql.ResultSet.FETCH_REVERSE ||
+                    direction == java.sql.ResultSet.FETCH_UNKNOWN )
                 {
                     fetchDirection = direction;
                 }else
@@ -1706,7 +1706,7 @@
      */
     private boolean getExecuteHoldable() throws SQLException
     {
-        if (resultSetHoldability  == JDBC30Translation.CLOSE_CURSORS_AT_COMMIT)
+        if (resultSetHoldability  == java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT)
             return false;
         
         // Simple non-XA case
@@ -1714,7 +1714,7 @@
             return true;
         
         return applicationStatement.getResultSetHoldability() ==
-            JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+            java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT;
     }
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java Fri Feb
29 14:02:27 2008
@@ -54,7 +54,6 @@
 import org.apache.derby.iapi.types.DataTypeDescriptor;
 
 import org.apache.derby.iapi.reference.ClassName;
-import org.apache.derby.iapi.reference.JDBC20Translation;
 import org.apache.derby.iapi.reference.SQLState;
 
 import org.apache.derby.iapi.sql.Activation;
@@ -694,7 +693,7 @@
 			{
 				ps = (PreparedStatement) getNewInstance();
 
-				if (ps.getResultSetConcurrency() != JDBC20Translation.CONCUR_UPDATABLE)
+				if (ps.getResultSetConcurrency() != ResultSet.CONCUR_UPDATABLE)
 				{
 					throw StandardException.newException(SQLState.LANG_UPDATABLE_VTI_NON_UPDATABLE_RS, 
 														 getVTIName());

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedPooledConnection.java Fri Feb
29 14:02:27 2008
@@ -24,7 +24,6 @@
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.reference.Property;
 import org.apache.derby.iapi.error.ExceptionSeverity;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
 
 /* import impl class */
@@ -38,6 +37,7 @@
 
 
 import java.sql.Connection;
+import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.sql.PreparedStatement;
@@ -225,8 +225,8 @@
 		if (realConnection.isReadOnly() != defaultReadOnly)
 			realConnection.setReadOnly(defaultReadOnly);
 
-		if (realConnection.getHoldability() != JDBC30Translation.HOLD_CURSORS_OVER_COMMIT)
-			realConnection.setHoldability(JDBC30Translation.HOLD_CURSORS_OVER_COMMIT);
+		if (realConnection.getHoldability() != ResultSet.HOLD_CURSORS_OVER_COMMIT)
+			realConnection.setHoldability(ResultSet.HOLD_CURSORS_OVER_COMMIT);
 
 		// reset any remaining state of the connection
 		realConnection.resetFromPool();

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAConnection.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAConnection.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAConnection.java Fri Feb 29
14:02:27 2008
@@ -26,9 +26,9 @@
 import org.apache.derby.iapi.jdbc.ResourceAdapter;
 
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 
 import java.sql.Connection;
+import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.sql.PreparedStatement;
@@ -85,12 +85,12 @@
 	public int  checkHoldCursors(int holdability, boolean downgrade)
         throws SQLException
     {
-		if (holdability == JDBC30Translation.HOLD_CURSORS_OVER_COMMIT) {		
+		if (holdability == ResultSet.HOLD_CURSORS_OVER_COMMIT) {		
 			if (xaRes.getCurrentXid () != null) {
                 if (!downgrade)
                     throw Util.generateCsSQLException(SQLState.CANNOT_HOLD_CURSOR_XA);
                 
-                holdability = JDBC30Translation.CLOSE_CURSORS_AT_COMMIT;
+                holdability = ResultSet.CLOSE_CURSORS_AT_COMMIT;
             }
 		}
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAResource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAResource.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAResource.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/EmbedXAResource.java Fri Feb 29
14:02:27 2008
@@ -21,6 +21,7 @@
 
 package org.apache.derby.jdbc;
 
+import java.sql.ResultSet;
 import java.sql.SQLException;
 
 
@@ -32,7 +33,6 @@
 import org.apache.derby.iapi.jdbc.BrokeredConnection;
 import org.apache.derby.iapi.jdbc.ResourceAdapter;
 import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 import org.apache.derby.iapi.services.context.ContextManager;
 import org.apache.derby.iapi.services.context.ContextService;
 import org.apache.derby.iapi.services.info.JVMInfo;
@@ -637,7 +637,7 @@
                     // and holdability false (cannot hold cursors across 
                     // XA transactions.
                     con.realConnection.setHoldability(
-                            JDBC30Translation.CLOSE_CURSORS_AT_COMMIT);
+                            ResultSet.CLOSE_CURSORS_AT_COMMIT);
                     
                     con.realConnection.getLanguageConnection().
                             getTransactionExecute().

Modified: db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/vti/UpdatableVTITemplate.java Fri Feb
29 14:02:27 2008
@@ -41,7 +41,6 @@
 import java.sql.Timestamp;
 import java.util.Calendar;
 
-import org.apache.derby.iapi.reference.JDBC20Translation;
 
 /**
 
@@ -277,7 +276,7 @@
 	 */
 	public int getResultSetConcurrency() throws SQLException
 	{
-        return JDBC20Translation.CONCUR_UPDATABLE;
+        return ResultSet.CONCUR_UPDATABLE;
 	}
 
     //

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java
(original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/JDBC30Translation.java
Fri Feb 29 14:02:27 2008
@@ -21,7 +21,6 @@
 
 package org.apache.derby.shared.common.reference;
 import java.sql.ParameterMetaData;
-import java.sql.ResultSet;
 /**
         This class contains public statics that map directly
         to the new public statics in the jdbc 3.0 classes.
@@ -50,10 +49,4 @@
         public static final int PARAMETER_MODE_IN = ParameterMetaData.parameterModeIn;
         public static final int PARAMETER_MODE_IN_OUT = ParameterMetaData.parameterModeInOut;
         public static final int PARAMETER_MODE_OUT = ParameterMetaData.parameterModeOut;
-
-        /*
-        ** public statics from 3.0 version of java.sql.ResultSet
-        */
-        public static final int HOLD_CURSORS_OVER_COMMIT = ResultSet.HOLD_CURSORS_OVER_COMMIT;
-        public static final int CLOSE_CURSORS_AT_COMMIT = ResultSet.CLOSE_CURSORS_AT_COMMIT;
 }

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj?rev=632456&r1=632455&r2=632456&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/ij.jj Fri Feb 29 14:02:27
2008
@@ -35,7 +35,6 @@
 package org.apache.derby.impl.tools.ij;
 
 import org.apache.derby.iapi.reference.JDBC20Translation;
-import org.apache.derby.iapi.reference.JDBC30Translation;
 
 import org.apache.derby.tools.JDBCDisplayUtil;
 
@@ -1997,7 +1996,7 @@
 :
 {
 	haveConnection();
-	int scrollType = JDBC20Translation.TYPE_FORWARD_ONLY;
+	int scrollType = ResultSet.TYPE_FORWARD_ONLY;
 	Token s;
 	Token scrolling = null;
 	Token withtoken = null;
@@ -2050,12 +2049,12 @@
 {
 	<INSENSITIVE>
 	{
-		return JDBC20Translation.TYPE_SCROLL_INSENSITIVE;
+		return ResultSet.TYPE_SCROLL_INSENSITIVE;
 	}
 |
 	<SENSITIVE>
 	{
-		return JDBC20Translation.TYPE_SCROLL_SENSITIVE;
+		return ResultSet.TYPE_SCROLL_SENSITIVE;
 	}
 }	
 
@@ -2068,12 +2067,12 @@
 {
 	<HOLD>
 	{
-		return JDBC30Translation.HOLD_CURSORS_OVER_COMMIT;
+		return ResultSet.HOLD_CURSORS_OVER_COMMIT;
 	}
 |
 	<NOHOLD>
 	{
-		return JDBC30Translation.CLOSE_CURSORS_AT_COMMIT;
+		return ResultSet.CLOSE_CURSORS_AT_COMMIT;
 	}
 }	
 



Mime
View raw message