db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r552622 [3/5] - in /db/jdo/trunk/tck2: ./ src/conf/ src/java/org/apache/jdo/tck/pc/company/ src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/ src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/
Date Mon, 02 Jul 2007 23:09:48 GMT
Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/FCProject.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/FCProject.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/FCProject.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/FCProject.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,386 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+import java.io.Serializable;
+import java.io.ObjectInputStream;
+import java.io.IOException;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Set;
+import java.util.HashSet;
+import java.math.BigDecimal;
+
+import org.apache.jdo.tck.pc.company.IProject;
+import org.apache.jdo.tck.util.DeepEquality;
+import org.apache.jdo.tck.util.EqualityHelper;
+
+/**
+ * This class represents a project, a budgeted task with one or more
+ * employees working on it.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+@Implements ("org.apache.jdo.tck.pc.company.IProject")
+@Table(table="projects")
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@Discriminator(strategy=DiscriminatorStrategy.CLASS_NAME,
+        column="DISCRIMINATOR")
+public class FCProject 
+    implements IProject, Serializable, Comparable, Comparator, DeepEquality  {
+
+    @Field(primaryKey="true")
+    @Column(name="PROJID")
+    private long projid;
+    @Column(name="NAME")
+    private String     name;
+    @Column(name="BUDGET", jdbcType="DECIMAL", length=11, scale=2)
+    private BigDecimal budget;
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.FCEmployee.class,
+            column="REVIEWER")
+    @Join(column="PROJID", table="proj_reviewer")
+    //@Join(column="PROJID", foreignKey=@ForeignKey(name="PR_PROJ_FK"))
+    private transient Set reviewers = new HashSet();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.FCEmployee.class,
+            column="MEMBER")
+    //@Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.FCEmployee.class,
+    //    foreignKey=@ForeignKey(name="PR_REV_FK"))
+    @Join(column="PROJID", table="proj_member")
+    private transient Set members = new HashSet();
+    
+    /** This is the JDO-required no-args constructor. The TCK relies on
+     * this constructor for testing PersistenceManager.newInstance(PCClass).
+     */
+    public FCProject() {}
+
+    /**
+     * Initialize a project.
+     * @param projid The project identifier.
+     * @param name The name of the project.
+     * @param budget The budget for the project.
+     */
+    public FCProject(long projid, String name, BigDecimal budget) {
+        this.projid = projid;
+        this.name = name;
+        this.budget = budget;
+    }
+
+    /**
+     * Set the id associated with this object.
+     * @param id the id.
+     */
+    public void setProjid(long id) {
+        if (this.projid != 0)
+            throw new IllegalStateException("Id is already set.");
+        this.projid = id;
+    }
+
+    /**
+     * Get the project ID.
+     * @return The project ID.
+     */
+    public long getProjid() {
+        return projid;
+    }
+
+    /**
+     * Get the name of the project.
+     * @return The name of the project.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Set the name of the project.
+     * @param name The name of the project.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * Get the project's budget.
+     * @return The project's budget.
+     */
+    public BigDecimal getBudget() {
+        return budget;
+    }
+
+    /**
+     * Set the project's budget.
+     * @param budget The project's budget.
+     */
+    public void setBudget(BigDecimal budget) {
+        this.budget = budget;
+    }
+
+    /**
+     * Get the reviewers associated with this project.
+     */
+    public Set getReviewers() {
+        return Collections.unmodifiableSet(reviewers);
+    }
+
+    /**
+     * Add a reviewer to the project.
+     * @param emp The employee to add as a reviewer.
+     */
+    public void addReviewer(FCEmployee emp) {
+        reviewers.add(emp);
+    }
+
+    /**
+     * Remove a reviewer from the project.
+     * @param emp The employee to remove as a reviewer of this project.
+     */
+    public void removeReviewer(FCEmployee emp) {
+        reviewers.remove(emp);
+    }
+
+    /**
+     * Set the reviewers associated with this project.
+     * @param reviewers The set of reviewers to associate with this project.
+     */
+    public void setReviewers(Set reviewers) {
+        // workaround: create a new HashSet, because fostore does not
+        // support LinkedHashSet
+        this.reviewers = (reviewers != null) ? new HashSet(reviewers) : null;
+    }
+
+    /**
+     * Get the project members.
+     * @return The members of the project is returned as an unmodifiable
+     * set of <code>FCEmployee</code>s. 
+     */
+    public Set getMembers() {
+        return Collections.unmodifiableSet(members);
+    }
+
+    /**
+     * Add a new member to the project.
+     * @param emp The employee to add to the project.
+     */
+    public void addMember(FCEmployee emp) {
+        members.add(emp);
+    }
+
+    /**
+     * Remove a member from the project.
+     * @param emp The employee to remove from the project.
+     */
+    public void removeMember(FCEmployee emp) {
+        members.remove(emp);
+    }
+
+    /**
+     * Set the members of the project.
+     * @param employees The set of employees to be the members of this
+     * project. 
+     */
+    public void setMembers(Set employees) {
+        // workaround: create a new HashSet, because fostore does not
+        // support LinkedHashSet
+        this.members = (members != null) ? new HashSet(employees) : null;
+    }
+
+    /** Serialization support: initialize transient fields. */
+    private void readObject(ObjectInputStream in)
+        throws IOException, ClassNotFoundException {
+        in.defaultReadObject();
+        reviewers = new HashSet();
+        members = new HashSet();
+    }
+
+    /**
+     * Returns a String representation of a <code>FCProject</code> object.
+     * @return a String representation of a <code>FCProject</code> object.
+     */
+    public String toString() {
+        return "FCProject(" + getFieldRepr() + ")";
+    }
+    
+    /**
+     * Returns a String representation of the non-relationship fields.
+     * @return a String representation of the non-relationship fields.
+     */
+    protected String getFieldRepr() {
+        StringBuffer rc = new StringBuffer();
+        rc.append(projid);
+        rc.append(", name ").append(name);
+        rc.append(", budget ").append(budget);
+        return rc.toString();
+    }
+
+    /** 
+     * Returns <code>true</code> if all the fields of this instance are
+     * deep equal to the coresponding fields of the specified Person.
+     * @param other the object with which to compare.
+     * @param helper EqualityHelper to keep track of instances that have
+     * already been processed. 
+     * @return <code>true</code> if all the fields are deep equal;
+     * <code>false</code> otherwise.  
+     * @throws ClassCastException if the specified instances' type prevents
+     * it from being compared to this instance. 
+     */
+    public boolean deepCompareFields(Object other, 
+                                     EqualityHelper helper) {
+        IProject otherProject = (IProject)other;
+        String where = "FCProject<" + projid + ">";
+        return 
+            helper.equals(projid, otherProject.getProjid(), where + ".projid") &
+            helper.equals(name, otherProject.getName(), where + ".name") &
+            helper.equals(budget, otherProject.getBudget(), where + ".budget") &
+            helper.deepEquals(reviewers, otherProject.getReviewers(), where + ".reviewers") &
+            helper.deepEquals(members, otherProject.getMembers(), where + ".members");
+    }
+    
+    /** 
+     * Compares this object with the specified object for order. Returns a
+     * negative integer, zero, or a positive integer as this object is less
+     * than, equal to, or greater than the specified object. 
+     * @param o The Object to be compared. 
+     * @return a negative integer, zero, or a positive integer as this 
+     * object is less than, equal to, or greater than the specified object. 
+     * @throws ClassCastException - if the specified object's type prevents
+     * it from being compared to this Object. 
+     */
+    public int compareTo(Object o) {
+        return compareTo((IProject)o);
+    }
+
+    /** 
+     * Compare two instances. This is a method in Comparator.
+     */
+    public int compare(Object o1, Object o2) {
+        return compare((IProject)o1, (IProject)o2);
+    }
+
+    /** 
+     * Compares this object with the specified FCProject object for
+     * order. Returns a negative integer, zero, or a positive integer as
+     * this object is less than, equal to, or greater than the specified
+     * object.  
+     * @param other The FCProject object to be compared. 
+     * @return a negative integer, zero, or a positive integer as this
+     * object is less than, equal to, or greater than the specified FCProject
+     * object. 
+     */
+    public int compareTo(IProject other) {
+        return compare(this, other);
+    }
+
+    /**
+     * Compares its two IProject arguments for order. Returns a negative
+     * integer, zero, or a positive integer as the first argument is less
+     * than, equal to, or greater than the second. 
+     * @param o1 the first IProject object to be compared. 
+     * @param o2 the second IProject object to be compared. 
+     * @return a negative integer, zero, or a positive integer as the first
+     * object is less than, equal to, or greater than the second object. 
+     */
+    public static int compare(IProject o1, IProject o2) {
+        return EqualityHelper.compare(o1.getProjid(), o2.getProjid());
+    }
+
+    /** 
+     * Indicates whether some other object is "equal to" this one.
+     * @param obj the object with which to compare.
+     * @return <code>true</code> if this object is the same as the obj
+     * argument; <code>false</code> otherwise. 
+     */
+    public boolean equals(Object obj) {
+        if (obj instanceof IProject) {
+            return compareTo((IProject)obj) == 0;
+        }
+        return false;
+    }
+        
+    /**
+     * Returns a hash code value for the object. 
+     * @return a hash code value for this object.
+     */
+    public int hashCode() {
+        return (int)projid;
+    }
+
+    /**
+     * This class is used to represent the application identity
+     * for the <code>FCProject</code> class.
+     */
+    public static class Oid implements Serializable, Comparable {
+
+        /**
+         * This field represents the identifier for the
+         * <code>FCProject</code> class. It must match a field in the
+         * <code>FCProject</code> class in both name and type. 
+         */
+        public long projid;
+
+        /**
+         * The required public no-arg constructor.
+         */
+        public Oid() { }
+
+        /**
+         * Initialize the application identifier with a project ID.
+         * @param projid The id of the project.
+         */
+        public Oid(long projid) {
+            this.projid = projid;
+        }
+        
+        public Oid(String s) { projid = Long.parseLong(justTheId(s)); }
+
+        public String toString() { return this.getClass().getName() + ": "  + projid;}
+
+        /** */
+        public boolean equals(java.lang.Object obj) {
+            if( obj==null || !this.getClass().equals(obj.getClass()) )
+                return( false );
+            Oid o = (Oid) obj;
+            if( this.projid != o.projid ) return( false );
+            return( true );
+        }
+
+        /** */
+        public int hashCode() {
+            return( (int) projid );
+        }
+        
+        protected static String justTheId(String str) {
+            return str.substring(str.indexOf(':') + 1);
+        }
+
+        /** */
+        public int compareTo(Object obj) {
+            // may throw ClassCastException which the user must handle
+            Oid other = (Oid) obj;
+            if( projid < other.projid ) return -1;
+            if( projid > other.projid ) return 1;
+            return 0;
+        }
+
+    }
+
+}
+

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/FCProject.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIAddress.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIAddress.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIAddress.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIAddress.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,44 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+/**
+ * This interface represents the persistent state of Address.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(embeddedOnly="true", requiresExtent="false")
+public interface PIAddress {
+
+    @Field(primaryKey="true")
+    long getAddrid();
+    String getStreet();
+    String getCity();
+    String getState();
+    String getZipcode();
+    String getCountry();
+    
+    void setAddrid(long addrid);
+    void setStreet(String street);
+    void setCity(String city);
+    void setState(String state);
+    void setZipcode(String zipcode);
+    void setCountry(String country);
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIAddress.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PICompany.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PICompany.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PICompany.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PICompany.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,64 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+import java.util.Date;
+import java.util.Set;
+
+/**
+ * This interface represents the persistent state of Company.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+@Table(table="companies")
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@Discriminator(strategy=DiscriminatorStrategy.CLASS_NAME,
+        column="DISCRIMINATOR")
+public interface PICompany {
+    
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Embedded(nullIndicatorColumn="COUNTRY",
+        fields={
+            @Field(embeddedFieldName="addrid", columns=@Column(name="ADDRID")),
+            @Field(embeddedFieldName="street", columns=@Column(name="STREET")),
+            @Field(embeddedFieldName="city", columns=@Column(name="CITY")),
+            @Field(embeddedFieldName="state", columns=@Column(name="STATE")),
+            @Field(embeddedFieldName="zipcode", columns=@Column(name="ZIPCODE")),
+            @Field(embeddedFieldName="country", columns=@Column(name="COUNTRY"))
+    })
+    PIAddress getAddress();
+    @Field(primaryKey="true")
+    @Column(name="ID")
+    long getCompanyid();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.PIDepartment.class)
+    Set getDepartments();
+    @Column(name="FOUNDEDDATE")
+    Date getFounded();
+    @Column(name="NAME", jdbcType="VARCHAR")
+    String getName();
+    
+    void setAddress(PIAddress a);
+    void setCompanyid(long id);
+    void setDepartments(Set depts);
+    void setFounded(Date date);
+    void setName(String string);
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PICompany.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDentalInsurance.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDentalInsurance.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDentalInsurance.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDentalInsurance.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,35 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+import java.math.BigDecimal;
+
+/**
+ * This interface represents the persistent state of DentalInsurance.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+public interface PIDentalInsurance extends PIInsurance {
+
+    @Column(name="LIFETIME_ORTHO_BENEFIT")
+    BigDecimal getLifetimeOrthoBenefit();
+    void setLifetimeOrthoBenefit(BigDecimal lifetimeOrthoBenefit);
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDentalInsurance.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDepartment.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDepartment.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDepartment.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDepartment.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,62 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+import java.util.Set;
+
+/**
+ * This interface represents the persistent state of Department.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+@Implements ("org.apache.jdo.tck.pc.company.IDepartment")
+@Table(table="departments")
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@Discriminator(strategy=DiscriminatorStrategy.CLASS_NAME,
+        column="DISCRIMINATOR")
+public interface PIDepartment {
+
+    @Field(primaryKey="true")
+    @Column(name="ID")
+    long getDeptid();
+    @Column(name="NAME")
+    String getName();
+    @Column(name="COMPANYID")
+    PICompany getCompany();
+    @Column(name="EMP_OF_THE_MONTH")
+    PIEmployee getEmployeeOfTheMonth();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT, 
+            mappedBy="department")
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.PIEmployee.class)
+    Set getEmployees();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT,
+            mappedBy="fundingDept")
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.PIEmployee.class)
+    Set getFundedEmps();
+    
+    void setDeptid(long deptid);
+    void setName(String name);
+    void setCompany(PICompany company);
+    void setEmployeeOfTheMonth(PIEmployee employeeOfTheMonth);
+    void setEmployees(Set employees);
+    void setFundedEmps(Set employees);
+
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIDepartment.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIEmployee.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIEmployee.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIEmployee.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIEmployee.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,85 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+import java.util.Date;
+import java.util.Set;
+
+/**
+ * This interface represents the persistent state of Employee.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+@Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
+public interface PIEmployee extends PIPerson {
+
+    @Column(name="HIREDATE")
+    Date getHiredate();
+    @Column(name="WEEKLYHOURS")
+    double getWeeklyhours();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT,
+            mappedBy="reviewers")
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.PIProject.class)
+    Set getReviewedProjects();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT,
+            mappedBy="members")
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.PIProject.class)
+    Set getProjects();
+    @Field(mappedBy="employee")
+    PIDentalInsurance getDentalInsurance();
+    @Field(mappedBy="employee")
+    PIMedicalInsurance getMedicalInsurance();
+    @Column(name="DEPARTMENT")
+    PIDepartment getDepartment();
+    @Column(name="FUNDINGDEPT")
+    PIDepartment getFundingDept();
+    @Column(name="MANAGER")
+    PIEmployee getManager();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT,
+            mappedBy="manager")
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.PIEmployee.class)
+    Set getTeam();
+    @Column(name="MENTOR")
+    PIEmployee getMentor();
+    @Field(mappedBy="mentor")
+    PIEmployee getProtege();
+    @Column(name="HRADVISOR")
+    PIEmployee getHradvisor();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.PIEmployee.class)
+    Set getHradvisees();
+    
+    void setHiredate(Date hiredate);
+    void setWeeklyhours(double weeklyhours);
+    void setReviewedProjects(Set reviewedProjects);
+    void setProjects(Set projects);
+    void setDentalInsurance(PIDentalInsurance dentalInsurance);
+    void setMedicalInsurance(PIMedicalInsurance medicalInsurance);
+    void setDepartment(PIDepartment department);
+    void setFundingDept(PIDepartment department);
+    void setManager(PIEmployee manager);
+    void setTeam(Set team);
+    void setMentor(PIEmployee mentor);
+    void setProtege(PIEmployee protege);
+    void setHradvisor(PIEmployee hradvisor);
+    void setHradvisees(Set hradvisees);
+    
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIEmployee.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIFullTimeEmployee.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIFullTimeEmployee.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIFullTimeEmployee.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIFullTimeEmployee.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,34 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+/**
+ * This interface represents the persistent state of FullTimeEmployee.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+@Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
+public interface PIFullTimeEmployee extends PIEmployee {
+
+    @Column(name="SALARY")
+    double getSalary();
+    void setSalary(double salary);
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIFullTimeEmployee.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIInsurance.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIInsurance.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIInsurance.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIInsurance.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,47 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+/**
+ * This interface represents the persistent state of Insurance.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+@Table(table="insuranceplans")
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@Discriminator(strategy=DiscriminatorStrategy.CLASS_NAME,
+        column="DISCRIMINATOR", indexed="true")
+@Index(name="INS_DISCRIMINATOR_INDEX", unique="false",
+        columns=@Column(name="DISCRIMINATOR"))
+    public interface PIInsurance {
+
+    @Field(primaryKey="true")
+    @Column(name="INSID")
+    long getInsid();
+    @Column(name="CARRIER")
+    String getCarrier();
+    @Column(name="EMPLOYEE")
+    PIEmployee getEmployee();
+
+    void setInsid(long insid);
+    void setCarrier(String carrier);
+    void setEmployee(PIEmployee employee);
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIInsurance.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIMedicalInsurance.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIMedicalInsurance.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIMedicalInsurance.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIMedicalInsurance.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,33 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+/**
+ * This interface represents the persistent state of MedicalInsurance.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+public interface PIMedicalInsurance extends PIInsurance{
+
+    @Column(name="PLANTYPE")
+    String getPlanType();
+    void setPlanType(String planType);
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIMedicalInsurance.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPartTimeEmployee.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPartTimeEmployee.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPartTimeEmployee.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPartTimeEmployee.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,34 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+/**
+ * This interface represents the persistent state of PartTimeEmployee.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+@Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
+public interface PIPartTimeEmployee extends PIEmployee {
+
+    @Column(name="WAGE")
+    double getWage();
+    void setWage(double wage);
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPartTimeEmployee.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPerson.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPerson.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPerson.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPerson.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,74 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * This interface represents the persistent state of Person.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+@Table(table="persons")
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@Discriminator(strategy=DiscriminatorStrategy.CLASS_NAME,
+        column="DISCRIMINATOR", indexed="true")
+public interface PIPerson {
+
+    @Field(primaryKey="true")
+    @Column(name="PERSONID")
+    long getPersonid();
+    @Column(name="LASTNAME")
+    String getLastname();
+    @Column(name="FIRSTNAME")
+    String getFirstname();
+    @Field(defaultFetchGroup="false")
+    @Column(name="MIDDLENAME", allowsNull="true")
+    String getMiddlename();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Embedded(nullIndicatorColumn="COUNTRY",
+        fields={
+            @Field(embeddedFieldName="addrid", columns=@Column(name="ADDRID")),
+            @Field(embeddedFieldName="street", columns=@Column(name="STREET")),
+            @Field(embeddedFieldName="city", columns=@Column(name="CITY")),
+            @Field(embeddedFieldName="state", columns=@Column(name="STATE")),
+            @Field(embeddedFieldName="zipcode", columns=@Column(name="ZIPCODE")),
+            @Field(embeddedFieldName="country", columns=@Column(name="COUNTRY"))
+    })
+    PIAddress getAddress();
+    Date getBirthdate();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Join(column="EMPID")
+    @JoinTable(table="employee_phoneno_type")
+    @Key(types=java.lang.String.class)
+    @Value(types=java.lang.String.class)
+    Map getPhoneNumbers();
+    
+    void setPersonid(long personid);
+    void setLastname(String lastname);
+    void setFirstname(String firstname);
+    void setMiddlename(String middlename);
+    void setAddress(PIAddress address);
+    void setBirthdate(Date birthdate);
+    void setPhoneNumbers(Map phoneNumbers);
+
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIPerson.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIProject.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIProject.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIProject.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIProject.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,67 @@
+/*
+ * 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.pc.companyAnnotatedApp;
+
+import javax.jdo.annotations.*;
+
+import java.math.BigDecimal;
+import java.util.Set;
+
+/**
+ * This interface represents the persistent state of Project.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+@PersistenceCapable(identityType=IdentityType.APPLICATION)
+@Table(table="projects")
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@Discriminator(strategy=DiscriminatorStrategy.CLASS_NAME,
+        column="DISCRIMINATOR")
+public interface PIProject {
+
+    @Field(primaryKey="true")
+    @Column(name="PROJID")
+    long getProjid();
+    @Column(name="NAME")
+    String getName();
+    @Column(name="BUDGET", jdbcType="DECIMAL", length=11, scale=2)
+    BigDecimal getBudget();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.FCEmployee.class,
+            column="REVIEWER")
+    @Join(column="PROJID", table="proj_reviewer")
+    //@Join(column="PROJID", foreignKey=@ForeignKey(name="PR_PROJ_FK"))
+    Set getReviewers();
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.FCEmployee.class,
+            column="MEMBER")
+    //@Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.FCEmployee.class,
+    //    foreignKey=@ForeignKey(name="PR_REV_FK"))
+    @Join(column="PROJID", table="proj_member")
+    Set getMembers();
+    
+    void setProjid(long projid);
+    void setName(String name);
+    void setBudget(BigDecimal budget);
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.PIEmployee.class)
+    void setReviewers(Set reviewers);
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedApp.PIEmployee.class)
+    void setMembers(Set employees);
+    
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedApp/PIProject.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCAddress.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCAddress.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCAddress.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCAddress.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,344 @@
+/*
+ * 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.pc.companyAnnotatedDS;
+
+import java.io.Serializable;
+import java.util.Comparator;
+
+import javax.jdo.annotations.*;
+
+import org.apache.jdo.tck.pc.company.IAddress;
+import org.apache.jdo.tck.util.DeepEquality;
+import org.apache.jdo.tck.util.EqualityHelper;
+
+/**
+ * This class represents a postal address.
+ */
+@PersistenceCapable(embeddedOnly="true", requiresExtent="false")
+@Implements ("org.apache.jdo.tck.pc.company.IAddress")
+public class FCAddress 
+    implements IAddress, Serializable, Comparable, Comparator, DeepEquality {
+
+    private long    addrid;
+    private String  street;
+    private String  city;
+    private String  state;
+    private String  zipcode;
+    private String  country;
+
+    /** This is the JDO-required no-args constructor. The TCK relies on
+     * this constructor for testing PersistenceManager.newInstance(PCClass).
+     */
+    public FCAddress() {}
+
+    /**
+     * This constructor initializes the <code>FCAddress</code> components.
+     * @param addrid The address ID.
+     * @param street The street address.
+     * @param city The city.
+     * @param state The state.
+     * @param zipcode The zip code.
+     * @param country The zip country.
+     */
+    public FCAddress(long addrid, String street, String city, 
+                   String state, String zipcode, String country)
+    {
+        this.addrid = addrid;
+        this.street = street;
+        this.city = city;
+        this.state = state;
+        this.zipcode = zipcode;
+        this.country = country;
+    }
+
+    /**
+     * Get the addrid associated with this object.
+     * @return the addrid.
+     */
+    public long getAddrid() {
+        return addrid;
+    }
+
+    /**
+     * Set the id associated with this object.
+     * @param id the id.
+     */
+    public void setAddrid(long id) {
+        if (this.addrid != 0)
+            throw new IllegalStateException("Id is already set.");
+        this.addrid = id;
+    }
+
+    /** 
+     * Get the street component of the address.
+     * @return The street component of the address.
+     */
+    public String getStreet() {
+        return street;
+    }
+
+    /**
+     * Set the street component of the address.
+     * @param street The street component.
+     */
+    public void setStreet(String street) {
+        this.street = street;
+    }
+
+    /**
+     * Get the city.
+     * @return The city component of the address.
+     */
+    public String getCity() {
+        return city;
+    }
+
+    /**
+     * Set the city component of the address.
+     * @param city The city.
+     */
+    public void setCity(String city) {
+        this.city = city;
+    }
+    
+    /**
+     * Get the state component of the address.
+     * @return The state.
+     */
+    public String getState() {
+        return state;
+    }
+
+    /**
+     * Set the state component of the address.
+     * @param state The state.
+     */
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    /**
+     * Get the zipcode component of the address.
+     * @return The zipcode.
+     */
+    public String getZipcode() {
+        return zipcode;
+    }
+
+    /**
+     * Set the zip code component of the address.
+     * @param zipcode The zipcode.
+     */
+    public void setZipcode(String zipcode) {
+        this.zipcode = zipcode;
+    }
+
+    /**
+     * Get the country component of the address.
+     * @return The country.
+     */
+    public String getCountry() {
+        return country;
+    }
+
+    /**
+     * Set the country component of the address.
+     * @param country The country.
+     */
+    public void setCountry(String country) {
+        this.country = country;
+    }
+
+    /**
+     * Returns a String representation of a <code>Address</code> object.
+     * @return a String representation of a <code>Address</code> object.
+     */
+    public String toString() {
+        return "Address(" + getFieldRepr() + ")";
+    }
+    
+    /**
+     * Returns a String representation of the non-relationship fields.
+     * @return a String representation of the non-relationship fields.
+     */
+    protected String getFieldRepr() {
+        StringBuffer rc = new StringBuffer();
+        rc.append(addrid);
+        rc.append(", street ").append(street);
+        rc.append(", city ").append(city);
+        rc.append(", state ").append(state);
+        rc.append(", zipcode ").append(zipcode);
+        rc.append(", country ").append(country);
+        return rc.toString();
+    }
+
+    /** 
+     * Returns <code>true</code> if all the fields of this instance are
+     * deep equal to the coresponding fields of the specified Person.
+     * @param other the object with which to compare.
+     * @param helper EqualityHelper to keep track of instances that have
+     * already been processed. 
+     * @return <code>true</code> if all the fields are deep equal;
+     * <code>false</code> otherwise.  
+     * @throws ClassCastException if the specified instances' type prevents
+     * it from being compared to this instance. 
+     */
+    public boolean deepCompareFields(Object other, 
+                                     EqualityHelper helper) {
+        IAddress otherAddress = (IAddress)other;
+        String where = "Address<" + addrid + ">";
+        return
+            helper.equals(addrid, otherAddress.getAddrid(), where + ".addrid") &
+            helper.equals(street, otherAddress.getStreet(), where + ".street") &
+            helper.equals(city, otherAddress.getCity(), where + ".city") &
+            helper.equals(state, otherAddress.getState(), where + ".state") &
+            helper.equals(zipcode, otherAddress.getZipcode(), where + ".zipcode") &
+            helper.equals(country, otherAddress.getCountry(), where + ".country");
+    }
+    
+    /** 
+     * Compares this object with the specified object for order. Returns a
+     * negative integer, zero, or a positive integer as this object is less
+     * than, equal to, or greater than the specified object. 
+     * @param o The Object to be compared. 
+     * @return a negative integer, zero, or a positive integer as this 
+     * object is less than, equal to, or greater than the specified object. 
+     * @throws ClassCastException - if the specified object's type prevents
+     * it from being compared to this Object. 
+     */
+    public int compareTo(Object o) {
+        return compareTo((IAddress)o);
+    }
+
+    /** 
+     * Compare two instances. This is a method in Comparator.
+     */
+    public int compare(Object o1, Object o2) {
+        return compare((IAddress)o1, (IAddress)o2);
+    }
+
+    /** 
+     * Compares this object with the specified Address object for
+     * order. Returns a negative integer, zero, or a positive integer as
+     * this object is less than, equal to, or greater than the specified
+     * object.  
+     * @param other The Address object to be compared. 
+     * @return a negative integer, zero, or a positive integer as this
+     * object is less than, equal to, or greater than the specified Address
+     * object. 
+     */
+    public int compareTo(IAddress other) {
+        return compare(this, other);
+    }
+    
+    /**
+     * Compares its two IAddress arguments for order. Returns a negative
+     * integer, zero, or a positive integer as the first argument is less
+     * than, equal to, or greater than the second. 
+     * @param o1 the first IAddress object to be compared. 
+     * @param o2 the second IAddress object to be compared. 
+     * @return a negative integer, zero, or a positive integer as the first
+     * object is less than, equal to, or greater than the second object. 
+     */
+    public static int compare(IAddress o1, IAddress o2) {
+        return EqualityHelper.compare(o1.getAddrid(), o2.getAddrid());
+    }
+
+    /** 
+     * Indicates whether some other object is "equal to" this one.
+     * @param obj the object with which to compare.
+     * @return <code>true</code> if this object is the same as the obj
+     * argument; <code>false</code> otherwise. 
+     */
+    public boolean equals(Object obj) {
+        if (obj instanceof IAddress) {
+            return compareTo((IAddress)obj) == 0;
+        }
+        return false;
+    }
+
+    /**
+     * Returns a hash code value for the object. 
+     * @return a hash code value for this object.
+     */
+    public int hashCode() {
+        return (int)addrid;
+    }
+    
+    /**
+     * This class is used to represent the application identifier 
+     * for the <code>Address</code> class.
+     */
+    public static class Oid implements Serializable, Comparable {
+
+        /**
+         * This is the identifier field for <code>Address</code> and must
+         * correspond in type and name to the field in
+         * <code>Address</code>. 
+         */
+        public long addrid;
+        
+        /** The required public, no-arg constructor. */
+        public Oid()
+        {
+            addrid = 0;
+        }
+
+        /**
+         * A constructor to initialize the identifier field.
+         * @param addrid the id of the Address.
+         */
+        public Oid(long addrid) {
+            this.addrid = addrid;
+        }
+        
+        public Oid(String s) { addrid = Long.parseLong(justTheId(s)); }
+
+        public String toString() { return this.getClass().getName() + ": "  + addrid;}
+
+
+        /** */
+        public boolean equals(java.lang.Object obj) {
+            if( obj==null || !this.getClass().equals(obj.getClass()) )
+                return( false );
+            Oid o = (Oid) obj;
+            if( this.addrid != o.addrid ) return( false );
+            return( true );
+        }
+
+        /** */
+        public int hashCode() {
+            return( (int) addrid );
+        }
+        
+        protected static String justTheId(String str) {
+            return str.substring(str.indexOf(':') + 1);
+        }
+
+        /** */
+        public int compareTo(Object obj) {
+            // may throw ClassCastException which the user must handle
+            Oid other = (Oid) obj;
+            if( addrid < other.addrid ) return -1;
+            if( addrid > other.addrid ) return 1;
+            return 0;
+        }
+
+    }
+
+}

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCAddress.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCCompany.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCCompany.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCCompany.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCCompany.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,390 @@
+/*
+ * 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.pc.companyAnnotatedDS;
+
+import javax.jdo.annotations.*;
+
+import java.io.Serializable;
+import java.io.ObjectInputStream;
+import java.io.IOException;
+
+import java.text.SimpleDateFormat;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Date;
+
+//import org.apache.jdo.tck.pc.company.*;
+import org.apache.jdo.tck.pc.company.ICompany;
+import org.apache.jdo.tck.pc.company.IAddress;
+import org.apache.jdo.tck.util.DeepEquality;
+import org.apache.jdo.tck.util.EqualityHelper;
+
+/**
+ * This class represents information about a company.
+ */
+@PersistenceCapable
+@Implements ("org.apache.jdo.tck.pc.company.ICompany")
+@Table(table="companies")
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@Discriminator(strategy=DiscriminatorStrategy.CLASS_NAME,
+        column="DISCRIMINATOR")
+@DatastoreIdentity(strategy=IdGeneratorStrategy.IDENTITY, column="DATASTORE_IDENTITY")
+public class FCCompany 
+    implements ICompany, Serializable, Comparable, Comparator, DeepEquality {
+
+    @Column(name="ID")
+    private long        companyid;
+    @Column(name="NAME", jdbcType="VARCHAR")
+    private String      name;
+    @Column(name="FOUNDEDDATE")
+    private Date        founded;
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT)
+    @Embedded(nullIndicatorColumn="COUNTRY",
+        fields={
+            @Field(embeddedFieldName="addrid", columns=@Column(name="ADDRID")),
+            @Field(embeddedFieldName="street", columns=@Column(name="STREET")),
+            @Field(embeddedFieldName="city", columns=@Column(name="CITY")),
+            @Field(embeddedFieldName="state", columns=@Column(name="STATE")),
+            @Field(embeddedFieldName="zipcode", columns=@Column(name="ZIPCODE")),
+            @Field(embeddedFieldName="country", columns=@Column(name="COUNTRY"))
+    })
+    private FCAddress     address;
+    @Field(persistenceModifier=FieldPersistenceModifier.PERSISTENT,
+            mappedBy="company")
+    @Element(types=org.apache.jdo.tck.pc.companyAnnotatedDS.FCDepartment.class)
+    private transient Set departments = new HashSet();
+
+    protected static SimpleDateFormat formatter =
+        new SimpleDateFormat("d/MMM/yyyy");
+
+    /** This is the JDO-required no-args constructor. The TCK relies on
+     * this constructor for testing PersistenceManager.newInstance(PCClass).
+     */
+    public FCCompany() {}
+
+    /** 
+     * Initialize the <code>FCCompany</code> instance.
+     * @param companyid The company id.
+     * @param name The company name.
+     * @param founded The date the company was founded.
+     */
+    public FCCompany(long companyid, String name, Date founded) {
+        this.companyid = companyid;
+        this.name = name;
+        this.founded = founded;
+    }
+
+    /** 
+     * Initialize the <code>Company</code> instance.
+     * @param companyid The company id.
+     * @param name The company name.
+     * @param founded The date the company was founded.
+     * @param addr The company's address.
+     */
+    public FCCompany(long companyid, String name, Date founded, IAddress addr) {
+        this(companyid, name, founded);
+        this.address = (FCAddress)addr;
+    }
+
+    /**
+     * Get the company id.
+     * @return The company id.
+     */
+    public long getCompanyid() {
+        return companyid;
+    }
+    
+    /** 
+     * Set the id associated with this object.
+     * @param id the id.
+     */
+    public void setCompanyid(long id) {
+        if (this.companyid != 0)
+            throw new IllegalStateException("Id is already set.");
+        this.companyid = id;
+    }
+
+    /**
+     * Get the name of the company.
+     * @return The name of the company.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Set the  name of the company.
+     * @param name The value to use for the name of the company.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * Get the date that the company was founded.
+     * @return The date the company was founded.
+     */
+    public Date getFounded() {
+        return founded;
+    }
+
+    /**
+     * Set the date that the company was founded.
+     * @param founded The date to set that the company was founded.
+     */
+    public void setFounded(Date founded) {
+        this.founded = founded;
+    }
+
+    /**
+     * Get the address of the company.
+     * @return The primary address of the company.
+     */
+    public IAddress getAddress() {
+        return address;
+    }
+    
+    /**
+     * Set the primary address for the company.
+     * @param address The address to set for the company.
+     */
+    public void setAddress(IAddress address) {
+        this.address = (FCAddress)address;
+    }
+
+    /**
+     * Get the departments contained in the company.
+     * @return An unmodifiable <code>Set</code> that contains all the
+     * <code>FCDepartment</code>s of the company.
+     */
+    public Set getDepartments() {
+        return Collections.unmodifiableSet(departments);
+    }
+
+    /**
+     * Add a <code>FCDepartment</code> instance to the company.
+     * @param dept The <code>FCDepartment</code> instance to add.
+     */
+    public void addDepartment(FCDepartment dept) {
+        departments.add(dept);
+    }
+
+    /**
+     * Remove a <code>FCDepartment</code> instance from the company.
+     * @param dept The <code>FCDepartment</code> instance to remove.
+     */
+    public void removeDepartment(FCDepartment dept) {
+        departments.remove(dept);
+    }
+
+    /**
+     * Initialize the set of <code>FCDepartment</code>s in the company to the 
+     * parameter. 
+     * @param departments The set of <code>FCDepartment</code>s for the
+     * company. 
+     */
+    public void setDepartments(Set departments) {
+        // workaround: create a new HashSet, because fostore does not
+        // support LinkedHashSet
+        this.departments = 
+            (departments != null) ? new HashSet(departments) : null;
+    }
+    
+    /** Serialization support: initialize transient fields. */
+    private void readObject(ObjectInputStream in)
+        throws IOException, ClassNotFoundException {
+        in.defaultReadObject();
+        departments = new HashSet();
+    }
+
+    /**
+     * Returns a String representation of a <code>Company</code> object.
+     * @return a String representation of a <code>Company</code> object.
+     */
+    public String toString() {
+        return "Company(" + getFieldRepr()+ ")";
+    }
+    
+    /**
+     * Returns a String representation of the non-relationship fields.
+     * @return a String representation of the non-relationship fields.
+     */
+    protected String getFieldRepr() {
+        StringBuffer rc = new StringBuffer();
+        rc.append(companyid);
+        rc.append(", name ").append(name);
+        rc.append(", founded ").append(formatter.format(founded));
+        return rc.toString();
+    }
+
+    /** 
+     * Returns <code>true</code> if all the fields of this instance are
+     * deep equal to the coresponding fields of the specified Person.
+     * @param other the object with which to compare.
+     * @param helper EqualityHelper to keep track of instances that have
+     * already been processed. 
+     * @return <code>true</code> if all the fields are deep equal;
+     * <code>false</code> otherwise.  
+     * @throws ClassCastException if the specified instances' type prevents
+     * it from being compared to this instance. 
+     */
+    public boolean deepCompareFields(Object other, 
+                                     EqualityHelper helper) {
+        ICompany otherCompany = (ICompany)other;
+        String where = "Company<" + companyid + ">";
+        return 
+            helper.equals(companyid, otherCompany.getCompanyid(), where + ".companyid") &
+            helper.equals(name, otherCompany.getName(), where + ".name") &
+            helper.equals(founded, otherCompany.getFounded(), where + ".founded") &
+            helper.deepEquals(address, otherCompany.getAddress(), where + ".address") &
+            helper.deepEquals(departments, otherCompany.getDepartments(), where + ".departments");
+    }
+    
+    /** 
+     * Compares this object with the specified object for order. Returns a
+     * negative integer, zero, or a positive integer as this object is less
+     * than, equal to, or greater than the specified object. 
+     * @param o The Object to be compared. 
+     * @return a negative integer, zero, or a positive integer as this 
+     * object is less than, equal to, or greater than the specified object. 
+     * @throws ClassCastException - if the specified object's type prevents
+     * it from being compared to this Object. 
+     */
+    public int compareTo(Object o) {
+        return compareTo((ICompany)o);
+    }
+
+    /** 
+     * Compare two instances. This is a method in Comparator.
+     */
+    public int compare(Object o1, Object o2) {
+        return compare((ICompany)o1, (ICompany)o2);
+    }
+
+    /** 
+     * Compares this object with the specified Company object for
+     * order. Returns a negative integer, zero, or a positive integer as
+     * this object is less than, equal to, or greater than the specified
+     * object.  
+     * @param other The Company object to be compared. 
+     * @return a negative integer, zero, or a positive integer as this
+     * object is less than, equal to, or greater than the specified Company
+     * object. 
+     */
+    public int compareTo(ICompany other) {
+        return compare(this, other);
+    }
+
+    /**
+     * Compares its two ICompany arguments for order. Returns a negative
+     * integer, zero, or a positive integer as the first argument is less
+     * than, equal to, or greater than the second. 
+     * @param o1 the first ICompany object to be compared. 
+     * @param o2 the second ICompany object to be compared. 
+     * @return a negative integer, zero, or a positive integer as the first
+     * object is less than, equal to, or greater than the second object. 
+     */
+    public static int compare(ICompany o1, ICompany o2) {
+        return EqualityHelper.compare(o1.getCompanyid(), o2.getCompanyid());
+    }
+    
+    /** 
+     * Indicates whether some other object is "equal to" this one.
+     * @param obj the object with which to compare.
+     * @return <code>true</code> if this object is the same as the obj
+     * argument; <code>false</code> otherwise. 
+     */
+    public boolean equals(Object obj) {
+        if (obj instanceof ICompany) {
+            return compareTo((ICompany)obj) == 0;
+        }
+        return false;
+    }
+        
+    /**
+     * Returns a hash code value for the object. 
+     * @return a hash code value for this object.
+     */
+    public int hashCode() {
+        return (int)companyid;
+    }
+    
+    /**
+     * The class to be used as the application identifier
+     * for the <code>Company</code> class. It consists of both the company 
+     * name and the date that the company was founded.
+     */
+    public static class Oid implements Serializable, Comparable {
+
+        /**
+         * This field is part of the identifier and should match in name
+         * and type with a field in the <code>Company</code> class.
+         */
+        public long companyid;
+
+        /** The required public no-arg constructor. */
+        public Oid() { }
+
+        /**
+         * Initialize the identifier.
+         * @param companyid The id of the company.
+         */
+        public Oid(long companyid) {
+            this.companyid = companyid;
+        }
+        
+        public Oid(String s) { companyid = Long.parseLong(justTheId(s)); }
+
+        public String toString() { return this.getClass().getName() + ": "  + companyid;}
+
+        
+        /** */
+        public boolean equals(Object obj) {
+            if (obj==null || !this.getClass().equals(obj.getClass())) 
+                return false;
+            Oid o = (Oid) obj;
+            if (this.companyid != o.companyid) 
+                return false;
+            return true;
+        }
+
+        /** */
+        public int hashCode() {
+            return (int)companyid;
+        }
+        
+        protected static String justTheId(String str) {
+            return str.substring(str.indexOf(':') + 1);
+        }
+
+        /** */
+        public int compareTo(Object obj) {
+            // may throw ClassCastException which the user must handle
+            Oid other = (Oid) obj;
+            if( companyid < other.companyid ) return -1;
+            if( companyid > other.companyid ) return 1;
+            return 0;
+        }
+        
+    }
+
+}
+

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCCompany.java
------------------------------------------------------------------------------
    svn:eol-style = LF

Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCDentalInsurance.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCDentalInsurance.java?view=auto&rev=552622
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCDentalInsurance.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCDentalInsurance.java Mon Jul  2 16:09:43 2007
@@ -0,0 +1,129 @@
+/*
+ * 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.pc.companyAnnotatedDS;
+
+import javax.jdo.annotations.*;
+
+import java.math.BigDecimal;
+
+import org.apache.jdo.tck.pc.company.IDentalInsurance;
+import org.apache.jdo.tck.pc.company.IEmployee;
+import org.apache.jdo.tck.util.DeepEquality;
+import org.apache.jdo.tck.util.EqualityHelper;
+
+/**
+ * This class represents a dental insurance carrier selection for a
+ * particular <code>Employee</code>.
+ */
+@PersistenceCapable
+@Implements ("org.apache.jdo.tck.pc.company.IDentalInsurance")
+@DatastoreIdentity(strategy=IdGeneratorStrategy.IDENTITY, column="DATASTORE_IDENTITY")
+public class FCDentalInsurance extends FCInsurance implements IDentalInsurance {
+
+    @Column(name="LIFETIME_ORTHO_BENEFIT")
+    private BigDecimal lifetimeOrthoBenefit;
+
+    /** This is the JDO-required no-args constructor. The TCK relies on
+     * this constructor for testing PersistenceManager.newInstance(PCClass).
+     */
+    public FCDentalInsurance() {}
+
+    /**
+     * Construct a <code>DentalInsurance</code> instance.
+     * @param insid The insurance instance identifier.
+     * @param carrier The insurance carrier.
+     * @param lifetimeOrthoBenefit The lifetimeOrthoBenefit.
+     */
+    public FCDentalInsurance(long insid, String carrier, 
+                           BigDecimal lifetimeOrthoBenefit) {
+        super(insid, carrier);
+        this.lifetimeOrthoBenefit = lifetimeOrthoBenefit;
+    }
+
+    /**
+     * Construct a <code>FCDentalInsurance</code> instance.
+     * @param insid The insurance instance identifier.
+     * @param carrier The insurance carrier.
+     * @param employee The employee associated with this insurance.
+     * @param lifetimeOrthoBenefit The lifetimeOrthoBenefit.
+     */
+    public FCDentalInsurance(long insid, String carrier, IEmployee employee,
+                           BigDecimal lifetimeOrthoBenefit) {
+        super(insid, carrier, employee);
+        this.lifetimeOrthoBenefit = lifetimeOrthoBenefit;
+    }
+
+    /**
+     * Get the insurance lifetimeOrthoBenefit.
+     * @return The insurance lifetimeOrthoBenefit.
+     */
+    public BigDecimal getLifetimeOrthoBenefit() {
+        return lifetimeOrthoBenefit;
+    }
+
+    /**
+     * Set the insurance lifetimeOrthoBenefit.
+     * @param lifetimeOrthoBenefit The insurance lifetimeOrthoBenefit.
+     */
+    public void setLifetimeOrthoBenefit(BigDecimal lifetimeOrthoBenefit) {
+        this.lifetimeOrthoBenefit = lifetimeOrthoBenefit;
+    }
+
+    /**
+     * Returns a String representation of a <code>FCDentalInsurance</code>
+     * object.
+     * @return a String representation of a <code>FCDentalInsurance</code>
+     * object.
+     */
+    public String toString() {
+        return "FCDentalInsurance(" + getFieldRepr()+ ")";
+    }
+
+    /**
+     * Returns a String representation of the non-relationship fields.
+     * @return a String representation of the non-relationship fields.
+     */
+    protected String getFieldRepr() {
+        StringBuffer rc = new StringBuffer();
+        rc.append(super.getFieldRepr());
+        rc.append(", lifetimeOrthoBenefit ").append(lifetimeOrthoBenefit);
+        return rc.toString();
+    }
+
+    /** 
+     * Returns <code>true</code> if all the fields of this instance are
+     * deep equal to the coresponding fields of the other Object.
+     * @param other the object with which to compare.
+     * @param helper EqualityHelper to keep track of instances that have
+     * already been processed. 
+     * @return <code>true</code> if all the fields are deep equal;
+     * <code>false</code> otherwise.  
+     * @throws ClassCastException if the specified instances' type prevents
+     * it from being compared to this instance. 
+     */
+    public boolean deepCompareFields(Object other, 
+                                     EqualityHelper helper) {
+        IDentalInsurance otherIns = (IDentalInsurance)other;
+        String where = "FCDentalInsurance<" + getInsid() + ">";
+        return super.deepCompareFields(otherIns, helper) &
+            helper.equals(lifetimeOrthoBenefit, 
+                          otherIns.getLifetimeOrthoBenefit(), where + ".lifetimeOrthoBenefit");
+    }
+
+}
+

Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/companyAnnotatedDS/FCDentalInsurance.java
------------------------------------------------------------------------------
    svn:eol-style = LF



Mime
View raw message