openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wisnes...@apache.org
Subject svn commit: r530174 - /incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Date Wed, 18 Apr 2007 21:58:17 GMT
Author: wisneskid
Date: Wed Apr 18 14:58:16 2007
New Revision: 530174

URL: http://svn.apache.org/viewvc?view=rev&rev=530174
Log:
further clean up for OPENJPA-222

Modified:
    incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java

Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?view=diff&rev=530174&r1=530173&r2=530174
==============================================================================
--- incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
(original)
+++ incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
Wed Apr 18 14:58:16 2007
@@ -39,7 +39,7 @@
     private int db2ServerType = 0;
     private static final int db2ISeriesV5R3AndEarlier = 1;
     private static final int db2UDBV81OrEarlier = 2;
-    private static final int db2ZOSV8x = 3;
+    private static final int db2ZOSV8xOrLater = 3;
     private static final int db2UDBV82AndLater = 4;
     private static final int db2ISeriesV5R4AndLater = 5;
 	private static final String forUpdateOfClause = "FOR UPDATE OF";
@@ -195,8 +195,8 @@
 	    	    db2ServerType = db2ISeriesV5R3AndEarlier;
 	    	else if (isDB2UDBV81OrEarlier(metaData,maj,min))
 	    	    db2ServerType = db2UDBV81OrEarlier;
-	    	else if (isDB2ZOSV8x(metaData,maj))
-	    	    db2ServerType = db2ZOSV8x;
+	    	else if (isDB2ZOSV8xOrLater(metaData,maj))
+	    	    db2ServerType = db2ZOSV8xOrLater;
 	    	else if (isDB2UDBV82AndLater(metaData,maj,min))
 	    	    db2ServerType = db2UDBV82AndLater;
 	    	else if (isDB2ISeriesV5R4AndLater(metaData))
@@ -246,7 +246,6 @@
                 isolationLevel = conf.getTransactionIsolationConstant();
 
             if (forUpdate) {
-
                 switch(db2ServerType) {
                 case db2ISeriesV5R3AndEarlier:
                 case db2UDBV81OrEarlier:
@@ -259,7 +258,7 @@
                            .append(" ");
                     }
                     break;
-                case db2ZOSV8x:
+                case db2ZOSV8xOrLater:
                 case db2UDBV82AndLater:
                     if (isolationLevel == Connection.TRANSACTION_SERIALIZABLE) {
                         forUpdateString.append(" ").append(forReadOnlyClause)
@@ -305,11 +304,11 @@
         return match;
     }
 
-    public boolean isDB2ZOSV8x(DatabaseMetaData metadata, int maj)
+    public boolean isDB2ZOSV8xOrLater(DatabaseMetaData metadata, int maj)
        throws SQLException {
        boolean match = false;
        if (metadata.getDatabaseProductVersion().indexOf("DSN") != -1
-           && maj == 8)
+           && maj >= 8)
            match = true;
         return match;
     }



Mime
View raw message