db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r359104 - in /db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query: api/ delete/ jdoql/keywords/ jdoql/variables/ result/
Date Mon, 26 Dec 2005 21:35:58 GMT
Author: mbo
Date: Mon Dec 26 13:35:41 2005
New Revision: 359104

URL: http://svn.apache.org/viewcvs?rev=359104&view=rev
Log:
JDO-194 change variable names to avoid a conflict modulo capitalization with class names

Modified:
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/ChangeQuery.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/SingleStringQuery.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/keywords/SingleString.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/MixedVariables.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/DistinctCandidateInstances.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/NPEInResultExpr.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/ResultExpressions.java
    db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/VariableInResult.java

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/ChangeQuery.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/ChangeQuery.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/ChangeQuery.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/ChangeQuery.java Mon Dec 26
13:35:41 2005
@@ -64,21 +64,21 @@
         query.setResult("firstname, lastname");
         query.setResultClass(FullName.class);
         query.setClass(FullTimeEmployee.class);
-        String filter = "salary > 1000 & projects.contains(project) & " +
-                        "project.budget > limit";
+        String filter = "salary > 1000 & projects.contains(p) & " +
+                        "p.budget > limit";
         query.setFilter(filter);
         String imports = "import org.apache.jdo.tck.pc.company.Project; " +
                          "import java.math.BigDecimal;";
         query.declareImports(imports);
-        query.declareVariables("Project project");
+        query.declareVariables("Project p");
         query.declareParameters("BigDecimal limit");
         query.setOrdering("personid ASCENDING");
         query.setRange(0, 5);
         String singleStringQuery = 
             "SELECT firstname, lastname INTO FullName FROM FullTimeEmployee " +
-            "WHERE salary > 1000 & projects.contains(project) & " +
-            "project.budget > limit " +
-            "VARIABLES Project project PARAMETERS BigDecimal limit " +
+            "WHERE salary > 1000 & projects.contains(p) & " +
+            "p.budget > limit " +
+            "VARIABLES Project p PARAMETERS BigDecimal limit " +
             "ORDER BY personid ASCENDING RANGE 0, 5";
 
         // query parameters

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/SingleStringQuery.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/SingleStringQuery.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/SingleStringQuery.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/api/SingleStringQuery.java Mon Dec
26 13:35:41 2005
@@ -54,9 +54,9 @@
         "INTO FullName " +
         "FROM Person " +
         "WHERE salary > 1000 & " +
-        "      projects.contains(project) & project.budget > limit & " +
+        "      projects.contains(p) & p.budget > limit & " +
         "      firstname == 'emp1First' " +
-        "VARIABLES Project project " +
+        "VARIABLES Project p " +
         "PARAMETERS BigDecimal limit " +
         "IMPORTS import org.apache.jdo.tck.query.result.classes.FullName; " +
         "        import org.apache.jdo.tck.pc.company.Person; " +

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java
(original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java
Mon Dec 26 13:35:41 2005
@@ -59,9 +59,9 @@
         /*INTO*/        null, 
         /*FROM*/        FullTimeEmployee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "salary > 10000 & projects.contains(project) & " +
-                        "project.budget > limit",
-        /*VARIABLES*/   "Project project",
+        /*WHERE*/       "salary > 10000 & projects.contains(p) & " +
+                        "p.budget > limit",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  "BigDecimal limit",
         /*IMPORTS*/     "import org.apache.jdo.tck.pc.company.Project; " +
                         "import java.math.BigDecimal;",

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/keywords/SingleString.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/keywords/SingleString.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/keywords/SingleString.java
(original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/keywords/SingleString.java
Mon Dec 26 13:35:41 2005
@@ -55,9 +55,9 @@
         /*INTO*/        FullName.class, 
         /*FROM*/        FullTimeEmployee.class,
         /*EXCLUDE*/     Boolean.TRUE,
-        /*WHERE*/       "salary > 1000 & projects.contains(project) & " +
-                        "project.budget > limit",
-        /*VARIABLES*/   "Project project",
+        /*WHERE*/       "salary > 1000 & projects.contains(p) & " +
+                        "p.budget > limit",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  "BigDecimal limit",
         /*IMPORTS*/     "import org.apache.jdo.tck.pc.company.Project; " +
                         "import java.math.BigDecimal",

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/MixedVariables.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/MixedVariables.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/MixedVariables.java
(original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/MixedVariables.java
Mon Dec 26 13:35:41 2005
@@ -51,9 +51,9 @@
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "(team.contains(employee) & employee.firstname == 'emp1First')
& " +
-                        "(projects.contains(project) & project.name == 'orange')",
-        /*VARIABLES*/   "Employee employee",
+        /*WHERE*/       "(team.contains(e) & e.firstname == 'emp1First') & " +
+                        "(projects.contains(p) & p.name == 'orange')",
+        /*VARIABLES*/   "Employee e",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -73,9 +73,9 @@
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "(team.contains(employee) & employee.firstname == 'emp1First')
& " +
-                        "(projects.contains(project) & project.name == 'orange')",
-        /*VARIABLES*/   "Employee employee; Project project",
+        /*WHERE*/       "(team.contains(e) & e.firstname == 'emp1First') & " +
+                        "(projects.contains(p) & p.name == 'orange')",
+        /*VARIABLES*/   "Employee e; Project p",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -88,8 +88,8 @@
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "(team.contains(employee) & employee.firstname == 'emp1First')
& " +
-                        "(projects.contains(project) & project.name == 'orange')",
+        /*WHERE*/       "(team.contains(e) & e.firstname == 'emp1First') & " +
+                        "(projects.contains(p) & p.name == 'orange')",
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java
(original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java
Mon Dec 26 13:35:41 2005
@@ -56,9 +56,9 @@
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "team.contains(employee) & " +
-                        "employee.firstname == 'emp1First'",
-        /*VARIABLES*/   "Employee employee",
+        /*WHERE*/       "team.contains(e) & " +
+                        "e.firstname == 'emp1First'",
+        /*VARIABLES*/   "Employee e",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -71,8 +71,8 @@
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "team.contains(employee) & " +
-                        "employee.firstname == 'emp1First'",
+        /*WHERE*/       "team.contains(e) & " +
+                        "e.firstname == 'emp1First'",
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/DistinctCandidateInstances.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/DistinctCandidateInstances.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/DistinctCandidateInstances.java
(original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/DistinctCandidateInstances.java
Mon Dec 26 13:35:41 2005
@@ -62,7 +62,7 @@
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
-        /*VARIABLES*/   "Project project",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -76,7 +76,7 @@
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
-        /*VARIABLES*/   "Project project",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/NPEInResultExpr.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/NPEInResultExpr.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/NPEInResultExpr.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/NPEInResultExpr.java Mon
Dec 26 13:35:41 2005
@@ -66,12 +66,12 @@
         /*TO*/          null),
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "employee.manager.lastname",
+        /*RESULT*/      "e.manager.lastname",
         /*INTO*/        null, 
         /*FROM*/        Department.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "employees.contains(employee)",
-        /*VARIABLES*/   "Employee employee",
+        /*WHERE*/       "employees.contains(e)",
+        /*VARIABLES*/   "Employee e",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/ResultExpressions.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/ResultExpressions.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/ResultExpressions.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/ResultExpressions.java Mon
Dec 26 13:35:41 2005
@@ -83,12 +83,12 @@
         // variable.field
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "project.projid",
+        /*RESULT*/      "p.projid",
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "projects.contains(project) && personid == 1",
-        /*VARIABLES*/   "Project project",
+        /*WHERE*/       "projects.contains(p) && personid == 1",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -99,12 +99,12 @@
         // variable
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "project",
+        /*RESULT*/      "p",
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "projects.contains(project) && personid == 1",
-        /*VARIABLES*/   "Project project",
+        /*WHERE*/       "projects.contains(p) && personid == 1",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -131,12 +131,12 @@
         // COUNT(variable)
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "COUNT(project)",
+        /*RESULT*/      "COUNT(p)",
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "projects.contains(project) && personid == 1",
-        /*VARIABLES*/   "Project project",
+        /*WHERE*/       "projects.contains(p) && personid == 1",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -243,12 +243,12 @@
         // navigational expression variable
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "project.projid",
+        /*RESULT*/      "p.projid",
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "projects.contains(project) && personid == 1",
-        /*VARIABLES*/   "Project project",
+        /*WHERE*/       "projects.contains(p) && personid == 1",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -259,13 +259,13 @@
         // navigational expression parameter
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "project.projid",
+        /*RESULT*/      "p.projid",
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       "personid == 1",
         /*VARIABLES*/   null,
-        /*PARAMETERS*/  "Project project",
+        /*PARAMETERS*/  "Project p",
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
         /*ORDER BY*/    null,
@@ -291,13 +291,13 @@
         // parameter
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "project",
+        /*RESULT*/      "p",
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       "personid == 1",
         /*VARIABLES*/   null,
-        /*PARAMETERS*/  "Project project",
+        /*PARAMETERS*/  "Project p",
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
         /*ORDER BY*/    null,

Modified: db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/VariableInResult.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/VariableInResult.java?rev=359104&r1=359103&r2=359104&view=diff
==============================================================================
--- db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/VariableInResult.java (original)
+++ db/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/result/VariableInResult.java Mon
Dec 26 13:35:41 2005
@@ -52,12 +52,12 @@
     private static final QueryElementHolder[] VALID_QUERIES = {
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "project",
+        /*RESULT*/      "p",
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "projects.contains(project) & project.name == 'orange'",
-        /*VARIABLES*/   "Project project",
+        /*WHERE*/       "projects.contains(p) & p.name == 'orange'",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
@@ -66,12 +66,12 @@
         /*TO*/          null),
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "project.projid, project.name",
+        /*RESULT*/      "p.projid, p.name",
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "projects.contains(project) & project.name == 'orange'",
-        /*VARIABLES*/   "Project project",
+        /*WHERE*/       "projects.contains(p) & p.name == 'orange'",
+        /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,



Mime
View raw message