db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r383192 - in /db/jdo/trunk/tck20/src/java/org/apache/jdo/tck: pc/company/Department.java query/jdoql/IdentifiersEqualFieldNames.java
Date Sat, 04 Mar 2006 20:00:08 GMT
Author: mbo
Date: Sat Mar  4 12:00:06 2006
New Revision: 383192

URL: http://svn.apache.org/viewcvs?rev=383192&view=rev
Log:
JDO-321: Add test queries accessing a public static final field declared in a company model
class

Modified:
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/Department.java
    db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/IdentifiersEqualFieldNames.java

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/Department.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/Department.java?rev=383192&r1=383191&r2=383192&view=diff
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/Department.java (original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/pc/company/Department.java Sat Mar  4 12:00:06
2006
@@ -34,6 +34,8 @@
 public class Department
     implements IDepartment, Serializable, Comparable, Comparator, DeepEquality {
 
+    public static final int RECOMMENDED_NO_OF_EMPS = 2;
+    
     private long    deptid;
     private String  name;
     private Company company;

Modified: db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/IdentifiersEqualFieldNames.java
URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/IdentifiersEqualFieldNames.java?rev=383192&r1=383191&r2=383192&view=diff
==============================================================================
--- db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/IdentifiersEqualFieldNames.java
(original)
+++ db/jdo/trunk/tck20/src/java/org/apache/jdo/tck/query/jdoql/IdentifiersEqualFieldNames.java
Sat Mar  4 12:00:06 2006
@@ -18,6 +18,7 @@
 
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
+import org.apache.jdo.tck.pc.company.Department;
 import org.apache.jdo.tck.pc.company.Person;
 import org.apache.jdo.tck.query.QueryElementHolder;
 import org.apache.jdo.tck.query.QueryTest;
@@ -73,6 +74,48 @@
         /*GROUP BY*/    null,
         /*ORDER BY*/    null,
         /*FROM*/        null,
+        /*TO*/          null),
+        new QueryElementHolder(
+        /*UNIQUE*/      null,
+        /*RESULT*/      null, 
+        /*INTO*/        null, 
+        /*FROM*/        Department.class,
+        /*EXCLUDE*/     null,
+        /*WHERE*/       "employees.size() > org.apache.jdo.tck.pc.company.Department.RECOMMENDED_NO_OF_EMPS",
+        /*VARIABLES*/   null,
+        /*PARAMETERS*/  null,
+        /*IMPORTS*/     null,
+        /*GROUP BY*/    null,
+        /*ORDER BY*/    null,
+        /*FROM*/        null,
+        /*TO*/          null),
+        new QueryElementHolder(
+        /*UNIQUE*/      null,
+        /*RESULT*/      null, 
+        /*INTO*/        null, 
+        /*FROM*/        Department.class,
+        /*EXCLUDE*/     null,
+        /*WHERE*/       "employees.size() > Department.RECOMMENDED_NO_OF_EMPS",
+        /*VARIABLES*/   null,
+        /*PARAMETERS*/  null,
+        /*IMPORTS*/     null,
+        /*GROUP BY*/    null,
+        /*ORDER BY*/    null,
+        /*FROM*/        null,
+        /*TO*/          null),
+        new QueryElementHolder(
+        /*UNIQUE*/      null,
+        /*RESULT*/      null, 
+        /*INTO*/        null, 
+        /*FROM*/        Department.class,
+        /*EXCLUDE*/     null,
+        /*WHERE*/       "employees.size() > RECOMMENDED_NO_OF_EMPS",
+        /*VARIABLES*/   null,
+        /*PARAMETERS*/  null,
+        /*IMPORTS*/     null,
+        /*GROUP BY*/    null,
+        /*ORDER BY*/    null,
+        /*FROM*/        null,
         /*TO*/          null)
     };
     
@@ -82,7 +125,10 @@
     private Object[] expectedResult = {
         getTransientCompanyModelInstancesAsList(new String[]{"emp1"}),
         getTransientCompanyModelInstancesAsList(new String[]{
-                "emp1", "emp2", "emp3", "emp4", "emp5"})
+                "emp1", "emp2", "emp3", "emp4", "emp5"}),
+        getTransientCompanyModelInstancesAsList(new String[]{"dept1"}),
+        getTransientCompanyModelInstancesAsList(new String[]{"dept1"}),
+        getTransientCompanyModelInstancesAsList(new String[]{"dept1"})
     };
             
     /**



Mime
View raw message