db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject [db-jdo] 30/43: JDO-411: merged changes from trunk into branch 2.0.1
Date Fri, 07 May 2021 23:12:12 GMT
This is an automated email from the ASF dual-hosted git repository.

clr pushed a commit to branch origin/2.0.1
in repository https://gitbox.apache.org/repos/asf/db-jdo.git

commit 6780c8cd13baf5ae1408f556d502ce8dcd90839b
Author: Michael Bouschen <mbo@apache.org>
AuthorDate: Tue Oct 3 21:54:39 2006 +0000

    JDO-411: merged changes from trunk into branch 2.0.1
---
 .../jdo/tck/query/delete/DeletePersistentAll.java  | 28 +++++++--------
 .../jdo/tck/query/delete/DeleteQueryElements.java  | 41 +++++++++++-----------
 2 files changed, 35 insertions(+), 34 deletions(-)

diff --git a/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java b/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java
index d6daaa0..c2644f2 100644
--- a/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java
+++ b/tck20/src/java/org/apache/jdo/tck/query/delete/DeletePersistentAll.java
@@ -21,7 +21,7 @@ import java.util.Map;
 
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
-import org.apache.jdo.tck.pc.company.Person;
+import org.apache.jdo.tck.pc.company.Insurance;
 import org.apache.jdo.tck.query.QueryElementHolder;
 import org.apache.jdo.tck.query.QueryTest;
 import org.apache.jdo.tck.util.BatchTestRunner;
@@ -58,7 +58,7 @@ public class DeletePersistentAll extends QueryTest {
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -72,9 +72,9 @@ public class DeletePersistentAll extends QueryTest {
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "firstname == param",
+        /*WHERE*/       "carrier == param",
         /*VARIABLES*/   null,
         /*PARAMETERS*/  "String param",
         /*IMPORTS*/     null,
@@ -96,43 +96,43 @@ public class DeletePersistentAll extends QueryTest {
     /** */
     public void testNoParametersAPI() {
         deletePersistentAllByAPIQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[0], null, 5);
+                VALID_QUERIES[0], null, 10);
     }
     
     /** */
     public void testNoParametersSingleString() {
         deletePersistentAllBySingleStringQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[0], null, 5);
+                VALID_QUERIES[0], null, 10);
     }
     
     /** */
     public void testObjectArrayParametersAPI() {
-        Object[] parameters = new Object[] {"emp1First"};
+        Object[] parameters = new Object[] {"Carrier1"};
         deletePersistentAllByAPIQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[1], parameters, 1);
+                VALID_QUERIES[1], parameters, 2);
     }
     
     /** */
     public void testObjectArrayParametersSingleString() {
-        Object[] parameters = new Object[] {"emp1First"};
+        Object[] parameters = new Object[] {"Carrier1"};
         deletePersistentAllBySingleStringQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[1], parameters, 1);
+                VALID_QUERIES[1], parameters, 2);
     }
     
     /** */
     public void testMapParametersAPI() {
         Map parameters = new HashMap();
-        parameters.put("param", "emp1First");
+        parameters.put("param", "Carrier1");
         deletePersistentAllByAPIQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[1], parameters, 1);
+                VALID_QUERIES[1], parameters, 2);
     }
     
     /** */
     public void testMapParametersSingleString() {
         Map parameters = new HashMap();
-        parameters.put("param", "emp1First");
+        parameters.put("param", "Carrier1");
         deletePersistentAllBySingleStringQuery(ASSERTION_FAILED, 
-                VALID_QUERIES[1], parameters, 1);
+                VALID_QUERIES[1], parameters, 2);
     }
     
     /**
diff --git a/tck20/src/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java b/tck20/src/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java
index b90d378..440c2e8 100644
--- a/tck20/src/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java
+++ b/tck20/src/java/org/apache/jdo/tck/query/delete/DeleteQueryElements.java
@@ -20,8 +20,9 @@ import java.math.BigDecimal;
 
 import org.apache.jdo.tck.JDO_Test;
 import org.apache.jdo.tck.pc.company.CompanyModelReader;
+import org.apache.jdo.tck.pc.company.DentalInsurance;
 import org.apache.jdo.tck.pc.company.FullTimeEmployee;
-import org.apache.jdo.tck.pc.company.Person;
+import org.apache.jdo.tck.pc.company.Insurance;
 import org.apache.jdo.tck.query.QueryElementHolder;
 import org.apache.jdo.tck.query.QueryTest;
 import org.apache.jdo.tck.query.result.classes.FullName;
@@ -57,10 +58,10 @@ public class DeleteQueryElements extends QueryTest {
         /*UNIQUE*/      Boolean.TRUE,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        FullTimeEmployee.class,
+        /*FROM*/        DentalInsurance.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "salary > 10000 & projects.contains(p) & " +
-                        "p.budget > limit",
+        /*WHERE*/       "((FullTimeEmployee)employee).salary > 10000 & " +
+                        "employee.projects.contains(p) & p.budget > limit",
         /*VARIABLES*/   "Project p",
         /*PARAMETERS*/  "BigDecimal limit",
         /*IMPORTS*/     "import org.apache.jdo.tck.pc.company.Project; " +
@@ -79,9 +80,9 @@ public class DeleteQueryElements extends QueryTest {
         // The query is invalid because it defines a result clause.
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "firstname, lastname", 
+        /*RESULT*/      "carrier", 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -95,8 +96,8 @@ public class DeleteQueryElements extends QueryTest {
         new QueryElementHolder(
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
-        /*INTO*/        FullName.class, 
-        /*FROM*/        Person.class,
+        /*INTO*/        String.class, 
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -110,9 +111,9 @@ public class DeleteQueryElements extends QueryTest {
         // and a result class.
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "firstname, lastname", 
-        /*INTO*/        FullName.class, 
-        /*FROM*/        Person.class,
+        /*RESULT*/      "carrier", 
+        /*INTO*/        String.class, 
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -127,13 +128,13 @@ public class DeleteQueryElements extends QueryTest {
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
-        /*GROUP BY*/    "lastname",
+        /*GROUP BY*/    "carrier",
         /*ORDER BY*/    null,
         /*FROM*/        null,
         /*TO*/          null),
@@ -141,15 +142,15 @@ public class DeleteQueryElements extends QueryTest {
         // and a grouping clause
         new QueryElementHolder(
         /*UNIQUE*/      null,
-        /*RESULT*/      "lastname", 
+        /*RESULT*/      "carrier", 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
-        /*GROUP BY*/    "lastname",
+        /*GROUP BY*/    "carrier",
         /*ORDER BY*/    null,
         /*FROM*/        null,
         /*TO*/          null),
@@ -158,14 +159,14 @@ public class DeleteQueryElements extends QueryTest {
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
         /*PARAMETERS*/  null,
         /*IMPORTS*/     null,
         /*GROUP BY*/    null,
-        /*ORDER BY*/    "lastname",
+        /*ORDER BY*/    "carrier",
         /*FROM*/        null,
         /*TO*/          null),
         // The query is invalid because it defines a range clause.
@@ -173,7 +174,7 @@ public class DeleteQueryElements extends QueryTest {
         /*UNIQUE*/      null,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,
@@ -190,7 +191,7 @@ public class DeleteQueryElements extends QueryTest {
         /*UNIQUE*/      Boolean.TRUE,
         /*RESULT*/      null, 
         /*INTO*/        null, 
-        /*FROM*/        Person.class,
+        /*FROM*/        Insurance.class,
         /*EXCLUDE*/     null,
         /*WHERE*/       null,
         /*VARIABLES*/   null,

Mime
View raw message