Index: tck/src/conf/jdoql.conf
===================================================================
--- tck/src/conf/jdoql.conf (revision 1756544)
+++ tck/src/conf/jdoql.conf (working copy)
@@ -36,6 +36,7 @@
org.apache.jdo.tck.query.jdoql.MultipleActiveQueryInstanceInSamePersistenceManager \
org.apache.jdo.tck.query.jdoql.MultipleIdenticalImports \
org.apache.jdo.tck.query.jdoql.NamespaceOfIdentifiers \
+org.apache.jdo.tck.query.jdoql.NavigationComparisonWithNull \
org.apache.jdo.tck.query.jdoql.NavigationThroughACollectionField \
org.apache.jdo.tck.query.jdoql.NavigationThroughANullValuedField \
org.apache.jdo.tck.query.jdoql.NavigationThroughReferencesUsesDotOperator \
Index: tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java
===================================================================
--- tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java (revision 0)
+++ tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java (working copy)
@@ -0,0 +1,433 @@
+/*
+ * 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.
+ */
+
+package org.apache.jdo.tck.query.jdoql;
+
+import org.apache.jdo.tck.JDO_Test;
+import org.apache.jdo.tck.pc.company.CompanyModelReader;
+import org.apache.jdo.tck.pc.company.Employee;
+import org.apache.jdo.tck.pc.company.FullTimeEmployee;
+import org.apache.jdo.tck.pc.company.MedicalInsurance;
+import org.apache.jdo.tck.query.QueryElementHolder;
+import org.apache.jdo.tck.query.QueryTest;
+import org.apache.jdo.tck.util.BatchTestRunner;
+
+import javax.jdo.PersistenceManager;
+import javax.jdo.Transaction;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Locale;
+import java.util.TimeZone;
+
+/**
+ *Title: Navigation Through a Reference and comparing a Relationship with null
+ *
+ *Keywords: query
+ *
+ *Assertion ID: A14.6.2-13.
+ *
+ *Assertion Description:
+ * Navigation through single-valued fields is specified by the Java language
+ * syntax of field_name.field_name....field_name.
+ */
+
+public class NavigationComparisonWithNull extends QueryTest {
+
+ /** */
+ private static final String ASSERTION_FAILED =
+ "Assertion A14.6.2-13 (NavigationComparisonWithNull) failed: ";
+
+ /** */
+ public static final String NAVIGATION_TEST_COMPANY_TESTDATA =
+ "org/apache/jdo/tck/pc/company/companyForNavigationTests.xml";
+
+ /**
+ * Returns the name of the company test data resource.
+ * @return name of the company test data resource.
+ */
+ protected String getCompanyTestDataResource() {
+ return NAVIGATION_TEST_COMPANY_TESTDATA;
+ }
+
+ /**
+ * The array of valid queries which may be executed as
+ * single string queries and as API queries.
+ */
+ private static final QueryElementHolder[] VALID_QUERIES = {
+ // 0: simple manager check being nill
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ Employee.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.manager == null",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 1: simple manager check being not null
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ Employee.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.manager != null",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 2: simple manager check being not null using not operator
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ Employee.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "!(this.manager == null)",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 3: manager's manager check
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ Employee.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.manager.manager == null",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 4: manager's manager check with extra check on first level manager
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ Employee.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.manager != null && this.manager.manager == null",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 5 : manager's manager check not being null
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ Employee.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.manager.manager != null",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 6 : manager's manager check not being null using not operator
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ Employee.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "!(this.manager.manager == null)",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 7 : multiple relationships
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ MedicalInsurance.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.employee.manager.manager == null",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 8 : multiple relationships
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ MedicalInsurance.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.employee != null && this.employee.manager != null && this.employee.manager.manager == null",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 9 : multiple relationships
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ MedicalInsurance.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.employee.manager.manager != null",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // 10 : multiple relationships
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ MedicalInsurance.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "!(this.employee.manager.manager == null)",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null)
+ };
+
+ /**
+ * Manager relationship:
+ * emp0
+ * emp1
+ * emp2
+ * emp3
+ * emp10
+ * emp4
+ * emp5
+ * emp6
+ * emp7
+ * emp8
+ * emp9
+ */
+
+ /**
+ * The expected results of valid queries.
+ */
+ private Object[] expectedResult = {
+ // 0 : this.manager == null
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "emp0", "emp4", "emp7"}),
+ // 1 : this.manager != null
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "emp1", "emp2", "emp3", "emp5", "emp6", "emp8", "emp9", "emp10"}),
+ // 2 : !(this.manager == null)
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "emp1", "emp2", "emp3", "emp5", "emp6", "emp8", "emp9", "emp10"}),
+
+ // 3 : this.manager.manager == null
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "emp0", "emp1", "emp4", "emp5", "emp6", "emp7", "emp8", "emp9"}),
+ // 4: this.manager != null && this.manager.manager == null
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "emp1", "emp5", "emp6", "emp8", "emp9"}),
+ // 5 : this.manager.manager != null
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "emp2", "emp3", "emp10"}),
+ // 6 : !(this.manager.manager == null)
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "emp2", "emp3", "emp10"}),
+
+ // 7 : this.employee.manager.manager == null
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "medicalIns1", "medicalIns4", "medicalIns5", "medicalIns98"}),
+ // 8 : this.employee != null && this.employee.manager != null && this.employee.manager.manager == null
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "medicalIns1", "medicalIns5"}),
+ // 9 : this.employee.manager.manager != null
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "medicalIns2", "medicalIns3"}),
+ // 10 : !(this.employee.manager.manager == null)
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "medicalIns2", "medicalIns3"})
+ };
+
+ /**
+ * The main is called when the class
+ * is directly executed from the command line.
+ * @param args The arguments passed to the program.
+ */
+ public static void main(String[] args) {
+ BatchTestRunner.run(NavigationThroughReferencesUsesDotOperator.class);
+ }
+
+ /**
+ * this.manager == null
+ */
+ public void testPositive0() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[0],
+ expectedResult[0]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[0],
+ expectedResult[0]);
+ }
+
+ /**
+ * this.manager != null
+ */
+ public void testPositive1() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[1],
+ expectedResult[1]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[1],
+ expectedResult[1]);
+ }
+
+ /**
+ * !(this.manager == null)
+ */
+ public void testPositive2() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[2],
+ expectedResult[2]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[2],
+ expectedResult[2]);
+ }
+
+ /**
+ * this.manager.manager == null
+ * Disabled, because it currently fails on the RI.
+ */
+ public void testPositive3() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[3],
+ expectedResult[3]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[3],
+ expectedResult[3]);
+ }
+
+ /**
+ * this.manager != null && this.manager.manager == null
+ */
+ public void testPositive4() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[4],
+ expectedResult[4]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[4],
+ expectedResult[4]);
+ }
+
+ /**
+ * this.manager.manager != null
+ */
+ public void testPositive5() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[5],
+ expectedResult[5]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[5],
+ expectedResult[5]);
+ }
+
+ /**
+ * !(this.manager.manager == null)
+ */
+ public void testPositive6() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[6],
+ expectedResult[6]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[6],
+ expectedResult[6]);
+ }
+
+ /**
+ * this.employee.manager.manager == null
+ * Disabled, because it currently fails on the RI.
+ */
+ public void testPositive7() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[7],
+ expectedResult[7]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[7],
+ expectedResult[7]);
+ }
+
+ /**
+ * this.employee != null && this.employee.manager != null && this.employee.manager.manager == null
+ */
+ public void testPositive8() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[8],
+ expectedResult[8]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[8],
+ expectedResult[8]);
+ }
+
+ /**
+ * this.employee.manager.manager != null
+ */
+ public void testPositive9() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[9],
+ expectedResult[9]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[9],
+ expectedResult[9]);
+ }
+
+ /**
+ * !(this.employee.manager.manager == null)
+ */
+ public void testPositive10() {
+ executeAPIQuery(ASSERTION_FAILED, VALID_QUERIES[10],
+ expectedResult[10]);
+ executeSingleStringQuery(ASSERTION_FAILED, VALID_QUERIES[10],
+ expectedResult[10]);
+ }
+
+ /**
+ * @see JDO_Test#localSetUp()
+ */
+ protected void localSetUp() {
+ addTearDownClass(CompanyModelReader.getTearDownClasses());
+ loadAndPersistCompanyModel(getPM());
+ }
+}
Index: tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughACollectionField.java
===================================================================
--- tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughACollectionField.java (revision 1756544)
+++ tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughACollectionField.java (working copy)
@@ -43,6 +43,18 @@
private static final String ASSERTION_FAILED =
"Assertion A14.6.2-10 (NavigationThroughACollectionField) failed: ";
+ /** */
+ public static final String NAVIGATION_TEST_COMPANY_TESTDATA =
+ "org/apache/jdo/tck/pc/company/companyForNavigationTests.xml";
+
+ /**
+ * Returns the name of the company test data resource.
+ * @return name of the company test data resource.
+ */
+ protected String getCompanyTestDataResource() {
+ return NAVIGATION_TEST_COMPANY_TESTDATA;
+ }
+
/**
* The array of valid queries which may be executed as
* single string queries and as API queries.
Index: tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java
===================================================================
--- tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java (revision 1756544)
+++ tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java (working copy)
@@ -46,13 +46,25 @@
private static final String ASSERTION_FAILED =
"Assertion A14.6.2-9 (NavigationThroughANullValuedField) failed: ";
+ /** */
+ public static final String NAVIGATION_TEST_COMPANY_TESTDATA =
+ "org/apache/jdo/tck/pc/company/companyForNavigationTests.xml";
+
+ /**
+ * Returns the name of the company test data resource.
+ * @return name of the company test data resource.
+ */
+ protected String getCompanyTestDataResource() {
+ return NAVIGATION_TEST_COMPANY_TESTDATA;
+ }
+
/**
* The array of valid queries which may be executed as
* single string queries and as API queries.
*/
private static final QueryElementHolder[] VALID_QUERIES = {
// navigation through reference relationship field
- // the relationship medicalInsurence is not set for emp2 and emp3 =>
+ // the relationship medicalInsurance is not set for emp2 and emp3 =>
// they should not be part of the result
new QueryElementHolder(
/*UNIQUE*/ null,
@@ -60,7 +72,7 @@
/*INTO*/ null,
/*FROM*/ Employee.class,
/*EXCLUDE*/ null,
- /*WHERE*/ "medicalInsurance.carrier == \"Carrier1\"",
+ /*WHERE*/ "this.medicalInsurance.carrier == \"Carrier1\"",
/*VARIABLES*/ null,
/*PARAMETERS*/ null,
/*IMPORTS*/ null,
@@ -68,8 +80,42 @@
/*ORDER BY*/ null,
/*FROM*/ null,
/*TO*/ null),
+
+ // navigation through reference relationship field
+ // emp5 and emp6 have have emp4 as manager
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ Employee.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.manager.lastname == \"emp4Last\"",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
+ // multiple navigation through reference relationship field
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ Employee.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.manager.manager.lastname == \"emp0Last\"",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+
// navigation through collection relationship field
- // employees emp2 and emp3 do not have a medicalInsurence, but emp1
+ // employees emp2 and emp3 do not have a medicalInsurance, but emp1
// matches the filter such that dept1 qualifies for inclusion in the
// result set.
new QueryElementHolder(
@@ -93,11 +139,16 @@
*/
private Object[] expectedResult = {
// navigation through reference relationship field
- // the relationship medicalInsurence is not set for emp2 and emp3 =>
+ // the relationship medicalInsurance is not set for emp2 and emp3 =>
// they should not be part of the result
getTransientCompanyModelInstancesAsList(new String[]{"emp1"}),
+ // navigation through reference relationship field
+ // emp5 and emp6 have have emp4 as manager
+ getTransientCompanyModelInstancesAsList(new String[]{"emp5", "emp6"}),
+ // multiple navigation through reference relationship field
+ getTransientCompanyModelInstancesAsList(new String[]{"emp2", "emp3", "emp10"}),
// navigation through collection relationship field
- // employees emp2 and emp3 do not have a medicalInsurence, but emp1
+ // employees emp2 and emp3 do not have a medicalInsurance, but emp1
// matches the filter such that dept1 qualifies for inclusion in the
// result set.
getTransientCompanyModelInstancesAsList(new String[]{"dept1"})
Index: tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughReferencesUsesDotOperator.java
===================================================================
--- tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughReferencesUsesDotOperator.java (revision 1756544)
+++ tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughReferencesUsesDotOperator.java (working copy)
@@ -42,7 +42,19 @@
/** */
private static final String ASSERTION_FAILED =
"Assertion A14.6.2-13 (NavigationThroughReferencesUsesDotOperator) failed: ";
-
+
+ /** */
+ public static final String NAVIGATION_TEST_COMPANY_TESTDATA =
+ "org/apache/jdo/tck/pc/company/companyForNavigationTests.xml";
+
+ /**
+ * Returns the name of the company test data resource.
+ * @return name of the company test data resource.
+ */
+ protected String getCompanyTestDataResource() {
+ return NAVIGATION_TEST_COMPANY_TESTDATA;
+ }
+
/**
* The array of valid queries which may be executed as
* single string queries and as API queries.
@@ -77,6 +89,36 @@
/*GROUP BY*/ null,
/*ORDER BY*/ null,
/*FROM*/ null,
+ /*TO*/ null),
+ // navigation through a self referencing relationship
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ MedicalInsurance.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.employee.manager.firstname == \"emp1First\"",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
+ /*TO*/ null),
+ // navigation through a self referencing relationship multiple times
+ new QueryElementHolder(
+ /*UNIQUE*/ null,
+ /*RESULT*/ null,
+ /*INTO*/ null,
+ /*FROM*/ MedicalInsurance.class,
+ /*EXCLUDE*/ null,
+ /*WHERE*/ "this.employee.manager.manager.firstname == \"emp0First\"",
+ /*VARIABLES*/ null,
+ /*PARAMETERS*/ null,
+ /*IMPORTS*/ null,
+ /*GROUP BY*/ null,
+ /*ORDER BY*/ null,
+ /*FROM*/ null,
/*TO*/ null)
};
@@ -88,9 +130,13 @@
getTransientCompanyModelInstancesAsList(new String[]{"emp1"}),
// navigation through multiple relationships
getTransientCompanyModelInstancesAsList(new String[]{
- "medicalIns1", "medicalIns2", "medicalIns3"})
+ "medicalIns1", "medicalIns2", "medicalIns3", "medicalIns4", "medicalIns5"}),
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "medicalIns2", "medicalIns3"}),
+ getTransientCompanyModelInstancesAsList(new String[]{
+ "medicalIns2", "medicalIns3"})
};
-
+
/**
* The main is called when the class
* is directly executed from the command line.
@@ -109,7 +155,7 @@
expectedResult[i]);
}
}
-
+
/**
* @see JDO_Test#localSetUp()
*/
Index: tck/src/testdata/org/apache/jdo/tck/pc/company/companyForNavigationTests.xml
===================================================================
--- tck/src/testdata/org/apache/jdo/tck/pc/company/companyForNavigationTests.xml (revision 0)
+++ tck/src/testdata/org/apache/jdo/tck/pc/company/companyForNavigationTests.xml (working copy)
@@ -0,0 +1,560 @@
+
+
+
+
+
+ Company instances for navigation query testing
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ Sun Microsystems, Inc.
+ 11/Apr/1952
+
+
+
+
+
+
+
+
+
+
+ 1
+ Comfy Room
+
+
+ 2
+ Large Discussion Room
+
+
+ 3
+ Conference Room
+
+
+
+ 1
+ Development
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+ Human Resources
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ emp0First
+ emp0Last
+ emp0Middle
+ 10/Jul/1962
+
+ 1/Jan/1997
+ 50000
+ 40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ emp1First
+ emp1Last
+ emp1Middle
+ 10/Jun/1970
+
+ 1/Jan/1999
+ 20000
+ 40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+ emp2First
+ emp2Last
+ emp2Middle
+ 22/Dec/1975
+
+ 1/Jul/2003
+ 10000
+ 40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3
+ emp3First
+ emp3Last
+ emp3Middle
+ 5/Sep/1972
+
+ 15/Aug/2002
+ 15
+ 19
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 4
+ emp4First
+ emp4Last
+ emp4Middle
+ 6/Sep/1973
+
+ 15/Apr/2001
+ 25000
+ 40
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 5
+ emp5First
+ emp5Last
+ emp5Middle
+ 5/Jul/1962
+
+ 1/Nov/2002
+ 18000
+ 35
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 6
+ emp6First
+ emp6Last
+ emp6Middle
+ 10/Jun/1969
+
+ 1/Jun/2002
+ 22000
+ 40
+
+
+
+
+
+
+ 7
+ emp7First
+ emp7Last
+ emp7Middle
+ 10/Jun/1970
+
+ 1/Jan/2000
+ 40000
+ 40
+
+
+
+
+
+
+
+
+
+
+
+ 8
+ emp8First
+ emp8Last
+ emp8Middle
+ 22/Dec/1975
+
+ 1/Aug/2003
+ 10000
+ 15
+
+
+
+
+
+
+ 9
+ emp9First
+ emp9Last
+ emp9Middle
+ 5/Sep/1972
+
+ 1/May/2002
+ 12000
+ 20
+
+
+
+
+
+
+ 10
+ emp10First
+ emp10Last
+ emp10Middle
+ 5/Sep/1972
+
+ 1/Oct/2002
+ 24000
+ 40
+
+
+
+
+
+
+ 1
+ Unter den Linden 1
+ Berlin
+
+ 12345
+ Germany
+
+
+ 2
+ Broadway 1
+ New York
+ NY
+ 10000
+ USA
+
+
+ 3
+ Market St.
+ San Francisco
+ CA
+ 94102
+ USA
+
+
+
+ 1
+ Carrier1
+ PPO
+
+
+
+
+ 2
+ Carrier2
+ HMO
+
+
+
+
+ 3
+ Carrier3
+ HMO
+
+
+
+
+ 4
+ Carrier4
+ HMO
+
+
+
+
+ 5
+ Carrier5
+ HMO
+
+
+
+
+ 98
+ Carrier98
+ HMO
+
+
+
+
+ 11
+ Carrier1
+ 99.995
+
+
+
+
+ 12
+ Carrier2
+ 99.996
+
+
+
+
+ 13
+ Carrier3
+ 99.997
+
+
+
+
+ 14
+ Carrier4
+ 99.998
+
+
+
+
+ 15
+ Carrier5
+ 99.999
+
+
+
+
+ 99
+ Carrier99
+
+
+
+
+
+ 1
+ orange
+ 2500000.99
+
+
+
+
+
+
+
+
+
+ 2
+ blue
+ 50000.00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 3
+ green
+ 2000.99
+
+
+
+
+
+
+
+
+
+
+
+
+
+