db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1759676 - in /db/jdo/trunk/tck/src: conf/ java/org/apache/jdo/tck/query/jdoql/ testdata/org/apache/jdo/tck/pc/company/
Date Wed, 07 Sep 2016 19:34:46 GMT
Author: mbo
Date: Wed Sep  7 19:34:46 2016
New Revision: 1759676

URL: http://svn.apache.org/viewvc?rev=1759676&view=rev
Log:
JDO-755: Add more TCK query test cases with navigation and comparison with null

Added:
    db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java
    db/jdo/trunk/tck/src/testdata/org/apache/jdo/tck/pc/company/companyForNavigationTests.xml
Modified:
    db/jdo/trunk/tck/src/conf/jdoql.conf
    db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughACollectionField.java
    db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java
    db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughReferencesUsesDotOperator.java

Modified: db/jdo/trunk/tck/src/conf/jdoql.conf
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/conf/jdoql.conf?rev=1759676&r1=1759675&r2=1759676&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/conf/jdoql.conf (original)
+++ db/jdo/trunk/tck/src/conf/jdoql.conf Wed Sep  7 19:34:46 2016
@@ -36,6 +36,7 @@ org.apache.jdo.tck.query.jdoql.IgnoreCac
 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 \

Added: db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java?rev=1759676&view=auto
==============================================================================
--- db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java (added)
+++ db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationComparisonWithNull.java Wed Sep  7 19:34:46 2016
@@ -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;
+
+/**
+ *<B>Title:</B> Navigation Through a Reference and comparing a Relationship with null
+ *<BR>
+ *<B>Keywords:</B> query
+ *<BR>
+ *<B>Assertion ID:</B> A14.6.2-13.
+ *<BR>
+ *<B>Assertion Description: </B>
+ * Navigation through single-valued fields is specified by the Java language
+ * syntax of <code>field_name.field_name....field_name</code>.
+ */
+
+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 <code>main</code> 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());
+    }
+}

Modified: db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughACollectionField.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughACollectionField.java?rev=1759676&r1=1759675&r2=1759676&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughACollectionField.java (original)
+++ db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughACollectionField.java Wed Sep  7 19:34:46 2016
@@ -43,6 +43,18 @@ public class NavigationThroughACollectio
     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.

Modified: db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java?rev=1759676&r1=1759675&r2=1759676&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java (original)
+++ db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughANullValuedField.java Wed Sep  7 19:34:46 2016
@@ -46,13 +46,25 @@ public class NavigationThroughANullValue
     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,24 @@ public class NavigationThroughANullValue
         /*INTO*/        null, 
         /*FROM*/        Employee.class,
         /*EXCLUDE*/     null,
-        /*WHERE*/       "medicalInsurance.carrier == \"Carrier1\"",
+        /*WHERE*/       "this.medicalInsurance.carrier == \"Carrier1\"",
+        /*VARIABLES*/   null,
+        /*PARAMETERS*/  null,
+        /*IMPORTS*/     null,
+        /*GROUP BY*/    null,
+        /*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,
@@ -68,8 +97,25 @@ public class NavigationThroughANullValue
         /*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 @@ public class NavigationThroughANullValue
      */
     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"})

Modified: db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughReferencesUsesDotOperator.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughReferencesUsesDotOperator.java?rev=1759676&r1=1759675&r2=1759676&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughReferencesUsesDotOperator.java (original)
+++ db/jdo/trunk/tck/src/java/org/apache/jdo/tck/query/jdoql/NavigationThroughReferencesUsesDotOperator.java Wed Sep  7 19:34:46 2016
@@ -42,7 +42,19 @@ public class NavigationThroughReferences
     /** */
     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 @@ public class NavigationThroughReferences
         /*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 @@ public class NavigationThroughReferences
         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 <code>main</code> is called when the class
      * is directly executed from the command line.
@@ -109,7 +155,7 @@ public class NavigationThroughReferences
                     expectedResult[i]);
         }
     }
-    
+
     /**
      * @see JDO_Test#localSetUp()
      */

Added: db/jdo/trunk/tck/src/testdata/org/apache/jdo/tck/pc/company/companyForNavigationTests.xml
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/testdata/org/apache/jdo/tck/pc/company/companyForNavigationTests.xml?rev=1759676&view=auto
==============================================================================
--- db/jdo/trunk/tck/src/testdata/org/apache/jdo/tck/pc/company/companyForNavigationTests.xml (added)
+++ db/jdo/trunk/tck/src/testdata/org/apache/jdo/tck/pc/company/companyForNavigationTests.xml Wed Sep  7 19:34:46 2016
@@ -0,0 +1,560 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<beans>
+    <description>Company instances for navigation query testing</description>
+
+    <bean id="root" class="java.util.ArrayList">
+        <constructor-arg index="0">
+            <list>
+                <ref local="company1"/>
+                <ref local="medicalIns98"/>
+                <ref local="dentalIns99"/>
+            </list>
+        </constructor-arg>
+    </bean>
+
+    <bean id="company1" factory-bean="companyFactory" factory-method="newCompany">
+        <constructor-arg index="0" type="long"><value>1</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Sun Microsystems, Inc.</value></constructor-arg>
+        <constructor-arg index="2" type="java.util.Date"><value>11/Apr/1952</value></constructor-arg>
+        <constructor-arg index="3" type="org.apache.jdo.tck.pc.company.IAddress"><ref local="addr1"/></constructor-arg>
+        <property name="departments">
+            <set>
+                <ref local="dept1"/>
+                <ref local="dept2"/>
+            </set>
+        </property>
+    </bean>
+
+    <bean id="room1" factory-bean="companyFactory" factory-method="newMeetingRoom">
+        <constructor-arg index="0" type="long"><value>1</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Comfy Room</value></constructor-arg>
+    </bean>
+    <bean id="room2" factory-bean="companyFactory" factory-method="newMeetingRoom">
+        <constructor-arg index="0" type="long"><value>2</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Large Discussion Room</value></constructor-arg>
+    </bean>
+    <bean id="room3" factory-bean="companyFactory" factory-method="newMeetingRoom">
+        <constructor-arg index="0" type="long"><value>3</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Conference Room</value></constructor-arg>
+    </bean>
+
+    <bean id="dept1" factory-bean="companyFactory" factory-method="newDepartment">
+        <constructor-arg index="0" type="long"><value>1</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String" ><value>Development</value></constructor-arg>
+        <property name="company"><ref bean="company1"/></property>
+        <property name="employees">
+            <set>
+                <ref bean="emp1"/>
+                <ref bean="emp2"/>
+                <ref bean="emp3"/>
+                <ref bean="emp4"/>
+                <ref bean="emp5"/>
+                <ref bean="emp6"/>
+            </set>
+        </property>
+    </bean>
+
+    <bean id="dept2" factory-bean="companyFactory" factory-method="newDepartment">
+        <constructor-arg index="0" type="long"><value>2</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String" ><value>Human Resources</value></constructor-arg>
+        <property name="company"><ref bean="company1"/></property>
+        <property name="employees">
+            <set>
+                <ref bean="emp7"/>
+                <ref bean="emp8"/>
+                <ref bean="emp9"/>
+                <ref bean="emp10"/>
+            </set>
+        </property>
+    </bean>
+
+    <bean id="emp0" factory-bean="companyFactory" factory-method="newFullTimeEmployee">
+        <constructor-arg index="0" type="long"><value>0</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp0First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp0Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp0Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>10/Jul/1962</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr1"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>1/Jan/1997</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>50000</value></constructor-arg>
+        <property name="weeklyhours"><value>40</value></property>
+        <property name="medicalInsurance"><null/></property>
+        <property name="dentalInsurance"><null/></property>
+        <property name="phoneNumbers">
+	        <map>
+                <entry key="home"><value>3232</value></entry>
+                <entry key="work"><value>223311-1</value></entry>
+            </map>
+	</property>
+        <property name="department"><ref bean="dept1"/></property>
+        <property name="fundingDept"><ref bean="dept2"/></property>
+        <property name="manager"><null/></property>
+        <property name="team">
+            <set>
+                <ref bean="emp1"/>
+            </set>
+        </property>
+        <property name="mentor"><null/></property>
+        <property name="protege"><null/></property>
+        <property name="hradvisor"><ref bean="emp5"/></property>
+        <property name="reviewedProjects">
+            <set>
+                <ref bean="proj3"/>
+            </set>
+        </property>
+        <property name="projects">
+            <set>
+                <ref bean="proj1"/>
+            </set>
+        </property>
+    </bean>
+
+    <bean id="emp1" factory-bean="companyFactory" factory-method="newFullTimeEmployee">
+        <constructor-arg index="0" type="long"><value>1</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp1First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp1Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp1Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>10/Jun/1970</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr1"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>1/Jan/1999</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>20000</value></constructor-arg>
+        <property name="weeklyhours"><value>40</value></property>
+        <property name="medicalInsurance"><ref bean="medicalIns1"/></property>
+        <property name="dentalInsurance"><ref bean="dentalIns1"/></property>
+        <property name="phoneNumbers">
+	        <map>
+                <entry key="home"><value>1111</value></entry>
+                <entry key="work"><value>123456-1</value></entry>
+            </map>
+	</property>
+        <property name="department"><ref bean="dept1"/></property>
+        <property name="fundingDept"><ref bean="dept2"/></property>
+        <property name="manager"><ref bean="emp0"/></property>
+        <property name="team">
+            <set>
+                <ref bean="emp2"/>
+                <ref bean="emp3"/>
+                <ref bean="emp10"/>
+            </set>
+        </property>
+        <property name="mentor"><ref bean="emp2"/></property>
+        <property name="protege"><ref bean="emp5"/></property>
+        <property name="hradvisor"><ref bean="emp5"/></property>
+        <property name="reviewedProjects">
+            <set>
+                <ref bean="proj3"/>
+            </set>
+        </property>
+        <property name="projects">
+            <set>
+                <ref bean="proj1"/>
+            </set>
+        </property>
+    </bean>
+    
+    <bean id="emp2" factory-bean="companyFactory" factory-method="newFullTimeEmployee">
+        <constructor-arg index="0" type="long"><value>2</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp2First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp2Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp2Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>22/Dec/1975</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr2"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>1/Jul/2003</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>10000</value></constructor-arg>
+        <property name="weeklyhours"><value>40</value></property>
+        <property name="medicalInsurance"><ref bean="medicalIns2"/></property>
+        <property name="dentalInsurance"><ref bean="dentalIns2"/></property>
+        <property name="phoneNumbers">
+	        <map>
+                <entry key="home"><value>2222</value></entry>
+                <entry key="work"><value>123456-2</value></entry>
+            </map>
+        </property>
+        <property name="department"><ref bean="dept1"/></property>
+        <property name="fundingDept"><ref bean="dept1"/></property>
+        <property name="manager"><ref bean="emp1"/></property>
+        <property name="team"><set/></property>
+        <property name="mentor"><ref bean="emp3"/></property>
+        <property name="protege"><ref bean="emp1"/></property>
+        <property name="hradvisor"><ref bean="emp5"/></property>
+        <property name="projects">
+            <set>
+                <ref bean="proj1"/>
+                <ref bean="proj2"/>
+            </set>
+        </property>
+    </bean>
+    
+    <bean id="emp3" factory-bean="companyFactory" factory-method="newPartTimeEmployee">
+        <constructor-arg index="0" type="long"><value>3</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp3First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp3Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp3Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>5/Sep/1972</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr3"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>15/Aug/2002</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>15</value></constructor-arg>
+        <property name="weeklyhours"><value>19</value></property>
+        <property name="medicalInsurance"><ref bean="medicalIns3"/></property>
+        <property name="dentalInsurance"><ref bean="dentalIns3"/></property>
+        <property name="phoneNumbers">
+	        <map>
+                <entry key="home"><value>3333</value></entry>
+                <entry key="work"><value>123456-3</value></entry>
+            </map>
+	</property>
+        <property name="department"><ref bean="dept1"/></property>
+        <property name="fundingDept"><ref bean="dept1"/></property>
+        <property name="manager"><ref bean="emp1"/></property>
+        <property name="team"><set/></property>
+	<property name="mentor"><ref bean="emp4"/></property>
+        <property name="protege"><ref bean="emp2"/></property>
+        <property name="hradvisor"><ref bean="emp5"/></property>
+        <property name="projects">
+            <set>
+                <ref bean="proj1"/>
+                <ref bean="proj2"/>
+            </set>
+        </property>
+    </bean>
+
+    <bean id="emp4" factory-bean="companyFactory" factory-method="newFullTimeEmployee">
+        <constructor-arg index="0" type="long"><value>4</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp4First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp4Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp4Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>6/Sep/1973</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr2"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>15/Apr/2001</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>25000</value></constructor-arg>
+        <property name="weeklyhours"><value>40</value></property>
+        <property name="medicalInsurance"><ref bean="medicalIns4"/></property>
+        <property name="dentalInsurance"><ref bean="dentalIns4"/></property>
+        <property name="phoneNumbers">
+	        <map>
+                <entry key="home"><value>3343</value></entry>
+                <entry key="work"><value>124456-3</value></entry>
+            </map>
+        </property>
+        <property name="department"><ref bean="dept1"/></property>
+        <property name="fundingDept"><ref bean="dept2"/></property>
+        <property name="manager"><null/></property>
+        <property name="team">
+            <set>
+                <ref bean="emp5"/>
+                <ref bean="emp6"/>
+            </set>
+        </property>
+        <property name="mentor"><ref bean="emp5"/></property>
+        <property name="protege"><ref bean="emp3"/></property>
+        <property name="hradvisor"><ref bean="emp5"/></property>
+        <property name="projects">
+            <set>
+                <ref bean="proj3"/>
+            </set>
+        </property>
+        <property name="reviewedProjects">
+            <set>
+                <ref bean="proj2"/>
+            </set>
+        </property>
+    </bean>
+
+    <bean id="emp5" factory-bean="companyFactory" factory-method="newPartTimeEmployee">
+        <constructor-arg index="0" type="long"><value>5</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp5First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp5Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp5Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>5/Jul/1962</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr2"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>1/Nov/2002</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>18000</value></constructor-arg>
+        <property name="weeklyhours"><value>35</value></property>
+        <property name="medicalInsurance"><ref bean="medicalIns5"/></property>
+        <property name="dentalInsurance"><ref bean="dentalIns5"/></property>
+        <property name="phoneNumbers">
+	        <map>
+                <entry key="home"><value>3363</value></entry>
+                <entry key="work"><value>126456-3</value></entry>
+            </map>
+        </property>
+        <property name="department"><ref bean="dept1"/></property>
+        <property name="fundingDept"><ref bean="dept2"/></property>
+        <property name="manager"><ref bean="emp4"/></property>
+        <property name="team"><set/></property>
+       <property name="mentor"><ref bean="emp1"/></property>
+        <property name="protege"><ref bean="emp4"/></property>
+        <property name="projects">
+            <set>
+                <ref bean="proj3"/>
+            </set>
+        </property>
+        <property name="reviewedProjects">
+            <set>
+                <ref bean="proj2"/>
+            </set>
+        </property>
+        <property name="hradvisees">
+            <set>
+                <ref bean="emp1"/>
+                <ref bean="emp2"/>
+                <ref bean="emp3"/>
+                <ref bean="emp4"/>
+            </set>
+        </property>
+    </bean>
+
+    <bean id="emp6" factory-bean="companyFactory" factory-method="newFullTimeEmployee">
+        <constructor-arg index="0" type="long"><value>6</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp6First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp6Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp6Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>10/Jun/1969</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr3"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>1/Jun/2002</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>22000</value></constructor-arg>
+        <property name="weeklyhours"><value>40</value></property>
+        <property name="department"><ref bean="dept1"/></property>
+        <property name="manager"><ref bean="emp4"/></property>
+        <property name="team"><set/></property>
+    </bean>
+
+    <bean id="emp7" factory-bean="companyFactory" factory-method="newFullTimeEmployee">
+        <constructor-arg index="0" type="long"><value>7</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp7First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp7Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp7Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>10/Jun/1970</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr1"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>1/Jan/2000</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>40000</value></constructor-arg>
+        <property name="weeklyhours"><value>40</value></property>
+        <property name="department"><ref bean="dept2"/></property>
+        <property name="manager"><null/></property>
+        <property name="team">
+            <set>
+                <ref bean="emp8"/>
+                <ref bean="emp9"/>
+            </set>
+        </property>
+    </bean>
+
+    <bean id="emp8" factory-bean="companyFactory" factory-method="newPartTimeEmployee">
+        <constructor-arg index="0" type="long"><value>8</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp8First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp8Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp8Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>22/Dec/1975</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr2"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>1/Aug/2003</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>10000</value></constructor-arg>
+        <property name="weeklyhours"><value>15</value></property>
+        <property name="department"><ref bean="dept2"/></property>
+        <property name="manager"><ref bean="emp7"/></property>
+        <property name="team"><set/></property>
+    </bean>
+    
+    <bean id="emp9" factory-bean="companyFactory" factory-method="newPartTimeEmployee">
+        <constructor-arg index="0" type="long"><value>9</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp9First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp9Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp9Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>5/Sep/1972</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr3"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>1/May/2002</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>12000</value></constructor-arg>
+        <property name="weeklyhours"><value>20</value></property>
+        <property name="department"><ref bean="dept2"/></property>
+        <property name="manager"><ref bean="emp7"/></property>
+        <property name="team"><set/></property>
+    </bean>
+
+    <bean id="emp10" factory-bean="companyFactory" factory-method="newFullTimeEmployee">
+        <constructor-arg index="0" type="long"><value>10</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>emp10First</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>emp10Last</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>emp10Middle</value></constructor-arg>
+        <constructor-arg index="4" type="java.util.Date"><value>5/Sep/1972</value></constructor-arg>
+        <constructor-arg index="5" type="org.apache.jdo.tck.pc.company.IAddress"><ref bean="addr3"/></constructor-arg>
+        <constructor-arg index="6" type="java.util.Date"><value>1/Oct/2002</value></constructor-arg>
+        <constructor-arg index="7" type="double"><value>24000</value></constructor-arg>
+        <property name="weeklyhours"><value>40</value></property>
+        <property name="department"><ref bean="dept2"/></property>
+        <property name="manager"><ref bean="emp1"/></property>
+        <property name="team"><set/></property>
+    </bean>
+
+    <bean id="addr1" factory-bean="companyFactory" factory-method="newAddress">
+        <constructor-arg index="0" type="long"><value>1</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Unter den Linden 1</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>Berlin</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>  </value></constructor-arg>
+        <constructor-arg index="4" type="java.lang.String"><value>12345</value></constructor-arg>
+        <constructor-arg index="5" type="java.lang.String"><value>Germany</value></constructor-arg>
+    </bean>
+    <bean id="addr2" factory-bean="companyFactory" factory-method="newAddress">
+        <constructor-arg index="0" type="long"><value>2</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Broadway 1</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>New York</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>NY</value></constructor-arg>
+        <constructor-arg index="4" type="java.lang.String"><value>10000</value></constructor-arg>
+        <constructor-arg index="5" type="java.lang.String"><value>USA</value></constructor-arg>
+    </bean>
+    <bean id="addr3" factory-bean="companyFactory" factory-method="newAddress">
+        <constructor-arg index="0" type="long"><value>3</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Market St.</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>San Francisco</value></constructor-arg>
+        <constructor-arg index="3" type="java.lang.String"><value>CA</value></constructor-arg>
+        <constructor-arg index="4" type="java.lang.String"><value>94102</value></constructor-arg>
+        <constructor-arg index="5" type="java.lang.String"><value>USA</value></constructor-arg>
+    </bean>
+
+    <bean id="medicalIns1" factory-bean="companyFactory" factory-method="newMedicalInsurance">
+        <constructor-arg index="0" type="long"><value>1</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier1</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>PPO</value></constructor-arg>
+        <property name="employee"><ref bean="emp1"/></property>
+    </bean>
+
+    <bean id="medicalIns2" factory-bean="companyFactory" factory-method="newMedicalInsurance">
+        <constructor-arg index="0" type="long"><value>2</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier2</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>HMO</value></constructor-arg>
+        <property name="employee"><ref bean="emp2"/></property>
+    </bean>
+
+    <bean id="medicalIns3" factory-bean="companyFactory" factory-method="newMedicalInsurance">
+        <constructor-arg index="0" type="long"><value>3</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier3</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>HMO</value></constructor-arg>
+        <property name="employee"><ref bean="emp3"/></property>
+    </bean>
+
+    <bean id="medicalIns4" factory-bean="companyFactory" factory-method="newMedicalInsurance">
+        <constructor-arg index="0" type="long"><value>4</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier4</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>HMO</value></constructor-arg>
+        <property name="employee"><ref bean="emp4"/></property>
+    </bean>
+
+    <bean id="medicalIns5" factory-bean="companyFactory" factory-method="newMedicalInsurance">
+        <constructor-arg index="0" type="long"><value>5</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier5</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>HMO</value></constructor-arg>
+        <property name="employee"><ref bean="emp5"/></property>
+    </bean>
+
+    <bean id="medicalIns98" factory-bean="companyFactory" factory-method="newMedicalInsurance">
+        <constructor-arg index="0" type="long"><value>98</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier98</value></constructor-arg>
+        <constructor-arg index="2" type="java.lang.String"><value>HMO</value></constructor-arg>
+        <property name="employee"><null/></property>
+    </bean>
+
+    <bean id="dentalIns1" factory-bean="companyFactory" factory-method="newDentalInsurance">
+        <constructor-arg index="0" type="long"><value>11</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier1</value></constructor-arg>
+        <constructor-arg index="2" type="java.math.BigDecimal"><value>99.995</value></constructor-arg>
+        <property name="employee"><ref bean="emp1"/></property>
+    </bean>
+
+    <bean id="dentalIns2" factory-bean="companyFactory" factory-method="newDentalInsurance">
+        <constructor-arg index="0" type="long"><value>12</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier2</value></constructor-arg>
+        <constructor-arg index="2" type="java.math.BigDecimal"><value>99.996</value></constructor-arg>
+        <property name="employee"><ref bean="emp2"/></property>
+    </bean>
+
+    <bean id="dentalIns3" factory-bean="companyFactory" factory-method="newDentalInsurance">
+        <constructor-arg index="0" type="long"><value>13</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier3</value></constructor-arg>
+        <constructor-arg index="2" type="java.math.BigDecimal"><value>99.997</value></constructor-arg>
+        <property name="employee"><ref bean="emp3"/></property>
+    </bean>
+
+    <bean id="dentalIns4" factory-bean="companyFactory" factory-method="newDentalInsurance">
+        <constructor-arg index="0" type="long"><value>14</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier4</value></constructor-arg>
+        <constructor-arg index="2" type="java.math.BigDecimal"><value>99.998</value></constructor-arg>
+        <property name="employee"><ref bean="emp4"/></property>
+    </bean>
+
+    <bean id="dentalIns5" factory-bean="companyFactory" factory-method="newDentalInsurance">
+        <constructor-arg index="0" type="long"><value>15</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier5</value></constructor-arg>
+        <constructor-arg index="2" type="java.math.BigDecimal"><value>99.999</value></constructor-arg>
+        <property name="employee"><ref bean="emp5"/></property>
+    </bean>
+
+    <bean id="dentalIns99" factory-bean="companyFactory" factory-method="newDentalInsurance">
+        <constructor-arg index="0" type="long"><value>99</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>Carrier99</value></constructor-arg>
+        <constructor-arg index="2" type="java.math.BigDecimal"><null/></constructor-arg>
+        <property name="employee"><null/></property>
+    </bean>
+
+    <bean id="proj1" factory-bean="companyFactory" factory-method="newProject">
+        <constructor-arg index="0" type="long"><value>1</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>orange</value></constructor-arg>
+        <constructor-arg index="2" type="java.math.BigDecimal"><value>2500000.99</value></constructor-arg>
+        <property name="members">
+            <set>
+                <ref bean="emp1"/>
+                <ref bean="emp2"/>
+                <ref bean="emp3"/>
+            </set>
+        </property>
+    </bean>
+    <bean id="proj2" factory-bean="companyFactory" factory-method="newProject">
+        <constructor-arg index="0" type="long"><value>2</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>blue</value></constructor-arg>
+        <constructor-arg index="2" type="java.math.BigDecimal"><value>50000.00</value></constructor-arg>
+        <property name="reviewers">
+            <set>
+                <ref bean="emp4"/>
+                <ref bean="emp5"/>
+            </set>
+        </property>
+        <property name="members">
+            <set>
+                <ref bean="emp2"/>
+                <ref bean="emp3"/>
+            </set>
+        </property>
+    </bean>
+    <bean id="proj3" factory-bean="companyFactory" factory-method="newProject">
+        <constructor-arg index="0" type="long"><value>3</value></constructor-arg>
+        <constructor-arg index="1" type="java.lang.String"><value>green</value></constructor-arg>
+        <constructor-arg index="2" type="java.math.BigDecimal"><value>2000.99</value></constructor-arg>
+        <property name="reviewers">
+            <set>
+                <ref bean="emp1"/>
+            </set>
+        </property>
+        <property name="members">
+            <set>
+                <ref bean="emp4"/>
+                <ref bean="emp5"/>
+            </set>
+        </property>
+    </bean>
+
+</beans>



Mime
View raw message