db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r374812 - /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java
Date Sat, 04 Feb 2006 01:36:50 GMT
Author: clr
Date: Fri Feb  3 17:36:49 2006
New Revision: 374812

URL: http://svn.apache.org/viewcvs?rev=374812&view=rev
Log:
JDO-194 added query with implicitly defined variable name the same as a class name modulo
capitalization

Modified:
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java?rev=374812&r1=374811&r2=374812&view=diff
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java
(original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/variables/VariablesAndFields.java
Fri Feb  3 17:36:49 2006
@@ -34,10 +34,16 @@
  *<B>Assertion ID:</B> A14.6.5-4.
  *<BR>
  *<B>Assertion Description: </B>
- * Names are treated as variable names if they are explicitly declared 
- * via declareVariables. Otherwise, names are treated as field names 
- * if they are members of the candidate class. 
- * Finally, names are treated as implicitly defined variable names.
+ * Names in the filter are treated as parameters if they are explicitly 
+ * declared via declareParameters or if they begin with ":".
+ * Names are treated as variable names if they are explicitly declared
+ * via declareVariables.
+ * Names are treated as field or property names if they are fields or 
+ * properties of the candidate class.
+ * Names are treated as class names if they exist in the package of the 
+ * candidate class, have been imported, or if they are in the java.lang
+ * package. e.g. Integer.
+ * Otherwise, names are treated as implicitly defined variable names.
  */
 public class VariablesAndFields extends QueryTest {
 
@@ -123,6 +129,23 @@
         /*GROUP BY*/    null,
         /*ORDER BY*/    null,
         /*FROM*/        null,
+        /*TO*/          null),
+        new QueryElementHolder(
+                /* Note: the variable name is the same as the class
+                 * name except for capitalization. This is legal. */
+        /*UNIQUE*/      null,
+        /*RESULT*/      null, 
+        /*INTO*/        null, 
+        /*FROM*/        Employee.class,
+        /*EXCLUDE*/     null,
+        /*WHERE*/       "team.contains(employee) & " +
+                        "employee.firstname == 'emp1First'",
+        /*VARIABLES*/   null,
+        /*PARAMETERS*/  null,
+        /*IMPORTS*/     null,
+        /*GROUP BY*/    null,
+        /*ORDER BY*/    null,
+        /*FROM*/        null,
         /*TO*/          null)
     };
     
@@ -134,7 +157,8 @@
         getTransientCompanyModelInstancesAsList(new String[]{"emp2"}),
         getTransientCompanyModelInstancesAsList(new String[]{"emp1"}),
         getTransientCompanyModelInstancesAsList(new String[]{"emp2"}),
-        new LinkedList()
+        new LinkedList(),
+        getTransientCompanyModelInstancesAsList(new String[]{"emp2"})
     };
             
     /**



Mime
View raw message