svn commit: r530827 - in /incubator/openjpa/branches/0.9.7-incubating-RC2: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence
Author: mikedd Date: Fri Apr 20 07:34:48 2007 New Revision: 530827 URL: http://svn.apache.org/viewvc?view=revrev=530827 Log: OpenJPA-222 and copyright fixes for RC2. Modified: incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.java incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/xml/orm.xml incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-project/CHANGES.txt incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-project/RELEASE-NOTES.html Modified: incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java URL: http://svn.apache.org/viewvc/incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?view=diffrev=530827r1=530826r2=530827 == --- incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java (original) +++ incubator/openjpa/branches/0.9.7-incubating-RC2/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Fri Apr 20 07:34:48 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)) @@ -245,45 +245,38 @@ else isolationLevel = conf.getTransactionIsolationConstant(); -if (!forUpdate) { -// This sql is not for update so add FOR Read Only clause -forUpdateString.append( ).append(forReadOnlyClause) -.append( ); -} else { - +if (forUpdate) { switch(db2ServerType) { case db2ISeriesV5R3AndEarlier: case db2UDBV81OrEarlier: if (isolationLevel == Connection.TRANSACTION_READ_UNCOMMITTED) { forUpdateString.append( ).append(withRSClause) -.append( ).append(forUpdateOfClause).append( ); -} else { -forUpdateString.append( ).append(forUpdateOfClause) - .append( ); -} +.append( ).append(forUpdateOfClause); +} else +forUpdateString.append( ).append(forUpdateOfClause); break; -case db2ZOSV8x: +case db2ZOSV8xOrLater: case db2UDBV82AndLater: if (isolationLevel == Connection.TRANSACTION_SERIALIZABLE) { -forUpdateString.append( ).append(withRRClause) -.append( ).append(useKeepUpdateLockClause) -.append( ); +forUpdateString.append( ).append(forReadOnlyClause) +.append( ).append(withRRClause) +.append( ).append(useKeepUpdateLockClause); } else { -forUpdateString.append( ).append(withRSClause) -.append( ).append(useKeepUpdateLockClause) -.append( ); +forUpdateString.append( ).append(forReadOnlyClause) +.append( ).append(withRSClause) +.append( ).append(useKeepUpdateLockClause); } break; case db2ISeriesV5R4AndLater: if
svn commit: r530860 - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/
Author: wisneskid Date: Fri Apr 20 10:24:32 2007 New Revision: 530860 URL: http://svn.apache.org/viewvc?view=revrev=530860 Log: OPENJPA-222 clean up Modified: incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestIsolationLevelOverride.java incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestSelectForUpdateOverride.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=diffrev=530860r1=530859r2=530860 == --- 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 Fri Apr 20 10:24:32 2007 @@ -37,11 +37,11 @@ public String optimizeClause = optimize for; public String rowClause = row; private int db2ServerType = 0; -private static final int db2ISeriesV5R3AndEarlier = 1; +private static final int db2ISeriesV5R3OrEarlier = 1; private static final int db2UDBV81OrEarlier = 2; private static final int db2ZOSV8xOrLater = 3; -private static final int db2UDBV82AndLater = 4; -private static final int db2ISeriesV5R4AndLater = 5; +private static final int db2UDBV82OrLater = 4; +private static final int db2ISeriesV5R4OrLater = 5; private static final String forUpdateOfClause = FOR UPDATE OF; private static final String withRSClause = WITH RS; private static final String withRRClause = WITH RR; @@ -191,16 +191,16 @@ int min = metaData.getDatabaseMinorVersion(); // Determine the type of DB2 database - if (isDB2ISeriesV5R3AndEarlier(metaData)) - db2ServerType = db2ISeriesV5R3AndEarlier; + if (isDB2ISeriesV5R3OrEarlier(metaData)) + db2ServerType = db2ISeriesV5R3OrEarlier; else if (isDB2UDBV81OrEarlier(metaData,maj,min)) db2ServerType = db2UDBV81OrEarlier; else if (isDB2ZOSV8xOrLater(metaData,maj)) db2ServerType = db2ZOSV8xOrLater; - else if (isDB2UDBV82AndLater(metaData,maj,min)) - db2ServerType = db2UDBV82AndLater; - else if (isDB2ISeriesV5R4AndLater(metaData)) - db2ServerType = db2ISeriesV5R4AndLater; + else if (isDB2UDBV82OrLater(metaData,maj,min)) + db2ServerType = db2UDBV82OrLater; + else if (isDB2ISeriesV5R4OrLater(metaData)) + db2ServerType = db2ISeriesV5R4OrLater; if (maj = 9 || (maj == 8 min = 2)) { supportsLockingWithMultipleTables = true; @@ -247,7 +247,7 @@ if (forUpdate) { switch(db2ServerType) { -case db2ISeriesV5R3AndEarlier: +case db2ISeriesV5R3OrEarlier: case db2UDBV81OrEarlier: if (isolationLevel == Connection.TRANSACTION_READ_UNCOMMITTED) { @@ -257,7 +257,7 @@ forUpdateString.append( ).append(forUpdateOfClause); break; case db2ZOSV8xOrLater: -case db2UDBV82AndLater: +case db2UDBV82OrLater: if (isolationLevel == Connection.TRANSACTION_SERIALIZABLE) { forUpdateString.append( ).append(forReadOnlyClause) .append( ).append(withRRClause) @@ -268,7 +268,7 @@ .append( ).append(useKeepUpdateLockClause); } break; -case db2ISeriesV5R4AndLater: +case db2ISeriesV5R4OrLater: if (isolationLevel == Connection.TRANSACTION_SERIALIZABLE) { forUpdateString.append( ).append(forReadOnlyClause) .append( ).append(withRRClause) @@ -289,7 +289,7 @@ return forUpdateString.toString(); } -public boolean isDB2UDBV82AndLater(DatabaseMetaData metadata, int maj, +public boolean isDB2UDBV82OrLater(DatabaseMetaData metadata, int maj, int min) throws SQLException { boolean match = false; if (metadata.getDatabaseProductVersion().indexOf(SQL) != -1 @@ -307,7 +307,7 @@ return match; } -public boolean isDB2ISeriesV5R3AndEarlier(DatabaseMetaData metadata) +public boolean isDB2ISeriesV5R3OrEarlier(DatabaseMetaData metadata) throws
svn commit: r530939 [2/2] - in /incubator/openjpa/trunk/openjpa-examples/src/main/java: ./ META-INF/ reversemapping/ reversemapping/schema/
Added: incubator/openjpa/trunk/openjpa-examples/src/main/java/reversemapping/schema/loadFLIGHTS1.sql URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-examples/src/main/java/reversemapping/schema/loadFLIGHTS1.sql?view=autorev=530939 == --- incubator/openjpa/trunk/openjpa-examples/src/main/java/reversemapping/schema/loadFLIGHTS1.sql (added) +++ incubator/openjpa/trunk/openjpa-examples/src/main/java/reversemapping/schema/loadFLIGHTS1.sql Fri Apr 20 15:52:37 2007 @@ -0,0 +1,274 @@ +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the License); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an AS IS BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +insert into FLIGHTS values ('AA',1,'ABQ','09:00:00','LAX','09:19:00','S',1.328,664,'B747'); +insert into FLIGHTS values ('AA1112',1,'LAX','09:00:00','ABQ','11:19:00','S',1.328,664,'B747'); +insert into FLIGHTS values ('AA1113',1,'ABQ','09:00:00','PHX','09:39:00','S',0.658,329,'B747'); +insert into FLIGHTS values ('AA1114',1,'PHX','09:00:00','ABQ','09:39:00','S',0.658,329,'B747'); +insert into FLIGHTS values ('AA1115',1,'ABQ','09:00:00','OKC','11:02:00','B',1.034,517,'B747'); +insert into FLIGHTS values ('AA1116',1,'OKC','09:00:00','ABQ','09:02:00','B',1.034,517,'B747'); +insert into FLIGHTS values ('AA1117',1,'AKL','09:00:00','HNL','18:48:00','L',8.804,4402,'B747'); +insert into FLIGHTS values ('AA1118',1,'HNL','13:30:00','AKL','21:18:00','D',8.804,4402,'DC10'); +insert into FLIGHTS values ('AA1119',1,'AKL','09:00:00','NRT','15:59:00','L',10.996,5498,'B747'); +insert into FLIGHTS values ('AA1120',1,'NRT','09:00:00','AKL','23:59:00','L',10.996,5498,'B747'); +insert into FLIGHTS values ('AA1121',1,'AKL','09:00:00','SYD','09:40:00','B',2.682,1341,'B747'); +insert into FLIGHTS values ('AA1122',1,'SYD','09:00:00','AKL','13:40:00','L',2.682,1341,'B747'); +insert into FLIGHTS values ('AA1123',1,'ALB','09:00:00','JFK','09:16:00','S',0.27,135,'DC10'); +insert into FLIGHTS values ('AA1124',1,'JFK','09:00:00','ALB','09:16:00','S',0.27,135,'DC10'); +insert into FLIGHTS values ('AA1125',1,'ALB','07:00:00','BOS','07:16:00','S',0.278,139,'B747'); +insert into FLIGHTS values ('AA1126',1,'BOS','14:00:00','ALB','14:16:00','S',0.278,139,'B747'); +insert into FLIGHTS values ('AA1127',1,'ALB','09:00:00','IAD','09:32:00','S',0.548,274,'B747'); +insert into FLIGHTS values ('AA1128',1,'IAD','09:00:00','ALB','09:32:00','S',0.548,274,'B747'); +insert into FLIGHTS values ('US1517',1,'AMS','09:00:00','JFK','10:17:00','B',7.296,3648,'B747'); +insert into FLIGHTS values ('US1516',2,'JFK','20:59:00','AMS','10:16:00','L',7.296,3648,'B747'); +insert into FLIGHTS values ('AA1131',1,'AMS','09:00:00','ATH','12:41:00','L',2.688,1344,'B747'); +insert into FLIGHTS values ('AA1132',1,'ATH','09:00:00','AMS','10:41:00','B',2.688,1344,'B747'); +insert into FLIGHTS values ('AA1133',1,'AMS','09:00:00','CDG','09:31:00','S',0.532,266,'B747'); +insert into FLIGHTS values ('AA1134',1,'CDG','09:00:00','AMS','09:31:00','S',0.532,266,'B747'); +insert into FLIGHTS values ('AA1135',1,'ARN','09:00:00','BOS','11:07:00','L',8.126,4063,'B747'); +insert into FLIGHTS values ('AA1136',1,'BOS','22:00:00','ARN','12:07:00','L',8.126,4063,'B747'); +insert into FLIGHTS values ('AA1137',1,'ARN','09:00:00','SVO','12:51:00','B',1.858,929,'A320'); +insert into FLIGHTS values ('AA1138',2,'SVO','16:00:00','ARN','15:51:00','S',1.858,929,'A320'); +insert into FLIGHTS values ('AA1139',1,'ARN','09:00:00','CPH','09:59:00','S',0.988,494,'B747'); +insert into FLIGHTS values ('AA1140',1,'CPH','09:00:00','ARN','09:59:00','S',0.988,494,'B747'); +insert into FLIGHTS values ('AA1141',1,'ATH','09:00:00','LHR','09:58:00','B',2.974,1487,'B747'); +insert into FLIGHTS values ('AA1142',1,'LHR','09:00:00','ATH','13:58:00','L',2.974,1487,'B747'); +insert into FLIGHTS values ('AA1143',1,'ATH','09:00:00','CAI','10:23:00','B',1.394,697,'B747'); +insert into FLIGHTS values ('AA1144',1,'CAI','09:00:00','ATH','10:23:00','B',1.394,697,'B747'); +insert into FLIGHTS values ('AA1145',1,'ATH','09:00:00','CDG','10:36:00','B',2.608,1304,'B747'); +insert into FLIGHTS values ('AA1146',1,'CDG','09:00:00','ATH','12:36:00','L',2.608,1304,'B747'); +insert into FLIGHTS values
svn commit: r530942 - /incubator/openjpa/trunk/openjpa-examples/pom.xml
Author: mprudhom Date: Fri Apr 20 16:02:24 2007 New Revision: 530942 URL: http://svn.apache.org/viewvc?view=revrev=530942 Log: Exclude reversemapping/Main.java from the test compile, since it is dependant on classes that are only generated when running the reverse mapping demo. Modified: incubator/openjpa/trunk/openjpa-examples/pom.xml Modified: incubator/openjpa/trunk/openjpa-examples/pom.xml URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-examples/pom.xml?view=diffrev=530942r1=530941r2=530942 == --- incubator/openjpa/trunk/openjpa-examples/pom.xml (original) +++ incubator/openjpa/trunk/openjpa-examples/pom.xml Fri Apr 20 16:02:24 2007 @@ -66,6 +66,13 @@ configuration source1.5/source target1.5/target +!-- +need to skip reversemapping since it depends on +classes that are generated by the build.xml file +-- +excludes +exclude**/reversemapping/Main.java/exclude +/excludes /configuration /plugin !-- ###