You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by mp...@apache.org on 2007/02/09 04:49:24 UTC

svn commit: r505160 [2/3] - in /incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence: models/ models/abstract-super/ models/basic/ models/fetchlazy/ models/idclass/ models/joined/ models/propertyaccess/ models/s...

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Person.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Person.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Person.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Person.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.fetchlazy;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="LAZ_Person")
+@Table(name="LAZ_Person") // OPENJPA-121
+@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
+public abstract class Person implements IPerson {
+    private static long idCounter = System.currentTimeMillis();
+
+    @Id
+    private long id = idCounter++;
+
+    @Basic(fetch=FetchType.LAZY)
+    private String firstName;
+
+    @Basic(fetch=FetchType.LAZY)
+    private String lastName;
+
+    @OneToOne(fetch=FetchType.LAZY)
+    private Address homeAddress;
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getFirstName() {
+        return this.firstName;
+    }
+
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public String getLastName() {
+        return this.lastName;
+    }
+
+
+    public void setHomeAddress(IAddress homeAddress) {
+        this.homeAddress = (Address) homeAddress;
+    }
+
+    public IAddress getHomeAddress() {
+        return this.homeAddress;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Person.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Product.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Product.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Product.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Product.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.fetchlazy;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="LAZ_Product")
+@Table(name="LAZ_Product") // OPENJPA-121
+public final class Product implements IProduct {
+    private static long idCounter = System.currentTimeMillis();
+
+    @Id
+    private long id = idCounter++;
+
+    @Basic(fetch=FetchType.LAZY)
+    private String name;
+
+    @Basic(fetch=FetchType.LAZY)
+    private byte[] image;
+
+    @Basic(fetch=FetchType.LAZY)
+    private float price;
+
+    @ManyToMany(fetch=FetchType.LAZY)
+    private Set<Company> distributors = new HashSet<Company>();
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+
+    public void setImage(byte[] image) {
+        this.image = image;
+    }
+
+    public byte[] getImage() {
+        return this.image;
+    }
+
+
+    public void setPrice(float price) {
+        this.price = price;
+    }
+
+    public float getPrice() {
+        return this.price;
+    }
+
+
+    public void setDistributors(Set<? extends ICompany> distributors) {
+        this.distributors = (Set<Company>) distributors;
+    }
+
+    public Set<Company> getDistributors() {
+        return this.distributors;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/Product.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/ProductOrder.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/ProductOrder.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/ProductOrder.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/ProductOrder.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.fetchlazy;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="LAZ_ProductOrder")
+@Table(name="LAZ_ProductOrder") // OPENJPA-121
+public final class ProductOrder implements IProductOrder {
+    private static long idCounter = System.currentTimeMillis();
+
+    @Id
+    private long id = idCounter++;
+
+    @OneToMany(fetch=FetchType.LAZY)
+    private List<LineItem> items = new LinkedList<LineItem>();
+
+    @Basic(fetch=FetchType.LAZY)
+    private Date orderDate;
+
+    @Basic(fetch=FetchType.LAZY)
+    private Date shippedDate;
+
+    @OneToOne(fetch=FetchType.LAZY)
+    private Customer customer;
+
+    public void setItems(List<? extends ILineItem> items) {
+        this.items = (List<LineItem>) items;
+    }
+
+    public List<LineItem> getItems() {
+        return this.items;
+    }
+
+
+    public void setOrderDate(Date orderDate) {
+        this.orderDate = orderDate;
+    }
+
+    public Date getOrderDate() {
+        return this.orderDate;
+    }
+
+
+    public void setShippedDate(Date shippedDate) {
+        this.shippedDate = shippedDate;
+    }
+
+    public Date getShippedDate() {
+        return this.shippedDate;
+    }
+
+
+    public void setCustomer(ICustomer customer) {
+        this.customer = (Customer) customer;
+    }
+
+    public ICustomer getCustomer() {
+        return this.customer;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/ProductOrder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/TestLazyCompanyModel.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/TestLazyCompanyModel.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/TestLazyCompanyModel.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/TestLazyCompanyModel.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.fetchlazy;
+
+import org.apache.openjpa.persistence.models.company.*;
+
+public class TestLazyCompanyModel extends CompanyModelTest {
+}
+

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/fetchlazy/TestLazyCompanyModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Address.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Address.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Address.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Address.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_Address")
+@Table(name="IDC_Address") // OPENJPA-121
+public final class Address implements IAddress {
+    private static int ids = 1;
+
+    @Id
+    private int id = ++ids;
+
+    @Basic
+    private String streetAddress;
+
+    @Basic
+    private String city;
+
+    @Basic
+    private String state;
+
+    @Basic
+    private String postalCode;
+
+    @Basic
+    private String phoneNumber;
+
+    public void setStreetAddress(String streetAddress) {
+        this.streetAddress = streetAddress;
+    }
+
+    public String getStreetAddress() {
+        return this.streetAddress;
+    }
+
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getCity() {
+        return this.city;
+    }
+
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getState() {
+        return this.state;
+    }
+
+
+    public void setPostalCode(String postalCode) {
+        this.postalCode = postalCode;
+    }
+
+    public String getPostalCode() {
+        return this.postalCode;
+    }
+
+
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+
+    public String getPhoneNumber() {
+        return this.phoneNumber;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Address.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Company.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Company.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Company.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Company.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_Company")
+@Table(name="IDC_Company") // OPENJPA-121
+public final class Company implements ICompany {
+    private static int ids = 1;
+
+    @Id
+    private int id = ++ids;
+
+    @Basic
+    private String name;
+
+    @OneToOne
+    private Address address;
+
+    @OneToMany(mappedBy="company")
+    private Set<Employee> employees = new HashSet<Employee>();
+
+    @ManyToMany(mappedBy="distributors")
+    private Set<Product> products = new HashSet<Product>();
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+
+    public void setAddress(IAddress address) {
+        this.address = (Address) address;
+    }
+
+    public IAddress getAddress() {
+        return this.address;
+    }
+
+
+    public void setEmployees(Set<? extends IEmployee> employees) {
+        this.employees = (Set<Employee>) employees;
+    }
+
+    public Set<Employee> getEmployees() {
+        return this.employees;
+    }
+
+
+    public void setProducts(Set<? extends IProduct> products) {
+        this.products = (Set<Product>) products;
+    }
+
+    public Set<Product> getProducts() {
+        return this.products;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Company.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Customer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Customer.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Customer.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Customer.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_Customer")
+public final class Customer extends Person implements ICustomer {
+
+    @OneToMany(mappedBy="customer")
+    private Collection<ProductOrder> orders = new ArrayList<ProductOrder>();
+
+    @OneToOne
+    private Address shippingAddress;
+
+    @OneToOne
+    private Address billingAddress;
+
+    public void setOrders(Collection<? extends IProductOrder> orders) {
+        this.orders = (Collection<ProductOrder>) orders;
+    }
+
+    public Collection<ProductOrder> getOrders() {
+        return this.orders;
+    }
+
+
+    public void setShippingAddress(IAddress shippingAddress) {
+        this.shippingAddress = (Address) shippingAddress;
+    }
+
+    public IAddress getShippingAddress() {
+        return this.shippingAddress;
+    }
+
+
+    public void setBillingAddress(IAddress billingAddress) {
+        this.billingAddress = (Address) billingAddress;
+    }
+
+    public IAddress getBillingAddress() {
+        return this.billingAddress;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Customer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Employee.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Employee.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Employee.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Employee.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_Employee")
+public abstract class Employee extends Person implements IEmployee {
+
+    @OneToOne
+    private FullTimeEmployee manager;
+
+    @OneToOne
+    private Company company;
+
+    @Basic
+    private String title;
+
+    @Basic
+    private Date hireDate;
+
+    public void setManager(IFullTimeEmployee manager) {
+        this.manager = (FullTimeEmployee) manager;
+    }
+
+    public IFullTimeEmployee getManager() {
+        return this.manager;
+    }
+
+
+    public void setCompany(ICompany company) {
+        this.company = (Company) company;
+    }
+
+    public ICompany getCompany() {
+        return this.company;
+    }
+
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getTitle() {
+        return this.title;
+    }
+
+
+    public void setHireDate(Date hireDate) {
+        this.hireDate = hireDate;
+    }
+
+    public Date getHireDate() {
+        return this.hireDate;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Employee.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/FullTimeEmployee.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/FullTimeEmployee.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/FullTimeEmployee.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/FullTimeEmployee.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_FullTimeEmployee")
+public final class FullTimeEmployee extends Employee
+    implements IFullTimeEmployee {
+
+    @Basic
+    private float salary;
+
+    public void setSalary(float salary) {
+        this.salary = salary;
+    }
+
+    public float getSalary() {
+        return this.salary;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/FullTimeEmployee.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/LineItem.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/LineItem.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/LineItem.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/LineItem.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_LineItem")
+@Table(name="IDC_LineItem") // OPENJPA-121
+public final class LineItem implements ILineItem {
+    private static int ids = 1;
+
+    @Id
+    private int id = ++ids;
+
+    @Basic
+    private int quantity;
+
+    @OneToOne
+    private Product product;
+
+    public void setQuantity(int quantity) {
+        this.quantity = quantity;
+    }
+
+    public int getQuantity() {
+        return this.quantity;
+    }
+
+
+    public void setProduct(IProduct product) {
+        this.product = (Product) product;
+    }
+
+    public IProduct getProduct() {
+        return this.product;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/LineItem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/PartTimeEmployee.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/PartTimeEmployee.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/PartTimeEmployee.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/PartTimeEmployee.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_PartTimeEmployee")
+public final class PartTimeEmployee extends Employee
+    implements IPartTimeEmployee {
+    @Basic
+    private float wage;
+
+    @Basic
+    private int weeklyHours;
+
+    public void setWage(float wage) {
+        this.wage = wage;
+    }
+
+    public float getWage() {
+        return this.wage;
+    }
+
+
+    public void setWeeklyHours(int weeklyHours) {
+        this.weeklyHours = weeklyHours;
+    }
+
+    public int getWeeklyHours() {
+        return this.weeklyHours;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/PartTimeEmployee.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Person.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Person.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Person.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Person.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_Person")
+@Table(name="IDC_Person") // OPENJPA-121
+@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
+public abstract class Person implements IPerson {
+    private static int ids = 1;
+
+    @Id
+    private int id = ++ids;
+
+    @Basic
+    private String firstName;
+
+    @Basic
+    private String lastName;
+
+    @OneToOne
+    private Address homeAddress;
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getFirstName() {
+        return this.firstName;
+    }
+
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public String getLastName() {
+        return this.lastName;
+    }
+
+
+    public void setHomeAddress(IAddress homeAddress) {
+        this.homeAddress = (Address) homeAddress;
+    }
+
+    public IAddress getHomeAddress() {
+        return this.homeAddress;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Person.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Product.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Product.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Product.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Product.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_Product")
+@Table(name="IDC_Product") // OPENJPA-121
+public final class Product implements IProduct {
+    private static int ids = 1;
+
+    @Id
+    private int id = ++ids;
+
+    @Basic
+    private String name;
+
+    @Basic
+    private byte[] image;
+
+    @Basic
+    private float price;
+
+    @ManyToMany
+    private Set<Company> distributors = new HashSet<Company>();
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+
+    public void setImage(byte[] image) {
+        this.image = image;
+    }
+
+    public byte[] getImage() {
+        return this.image;
+    }
+
+
+    public void setPrice(float price) {
+        this.price = price;
+    }
+
+    public float getPrice() {
+        return this.price;
+    }
+
+
+    public void setDistributors(Set<? extends ICompany> distributors) {
+        this.distributors = (Set<Company>) distributors;
+    }
+
+    public Set<Company> getDistributors() {
+        return this.distributors;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/Product.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/ProductOrder.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/ProductOrder.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/ProductOrder.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/ProductOrder.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="IDC_ProductOrder")
+@Table(name="IDC_ProductOrder") // OPENJPA-121
+public final class ProductOrder implements IProductOrder {
+    private static int ids = 1;
+
+    @Id
+    private int id = ++ids;
+
+    @OneToMany
+    private List<LineItem> items = new LinkedList<LineItem>();
+
+    @Basic
+    private Date orderDate;
+
+    @Basic
+    private Date shippedDate;
+
+    @OneToOne
+    private Customer customer;
+
+    public void setItems(List<? extends ILineItem> items) {
+        this.items = (List<LineItem>) items;
+    }
+
+    public List<LineItem> getItems() {
+        return this.items;
+    }
+
+
+    public void setOrderDate(Date orderDate) {
+        this.orderDate = orderDate;
+    }
+
+    public Date getOrderDate() {
+        return this.orderDate;
+    }
+
+
+    public void setShippedDate(Date shippedDate) {
+        this.shippedDate = shippedDate;
+    }
+
+    public Date getShippedDate() {
+        return this.shippedDate;
+    }
+
+
+    public void setCustomer(ICustomer customer) {
+        this.customer = (Customer) customer;
+    }
+
+    public ICustomer getCustomer() {
+        return this.customer;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/ProductOrder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/TestIdClassCompanyModel.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/TestIdClassCompanyModel.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/TestIdClassCompanyModel.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/TestIdClassCompanyModel.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.idclass;
+
+import org.apache.openjpa.persistence.models.company.*;
+
+public class TestIdClassCompanyModel extends CompanyModelTest {
+}
+

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/idclass/TestIdClassCompanyModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Address.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Address.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Address.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Address.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_Address")
+@Table(name="JI_Address") // OPENJPA-121
+public final class Address implements IAddress {
+    private static long idCounter = System.currentTimeMillis();
+
+    @Id
+    private long id = idCounter++;
+
+    @Basic
+    private String streetAddress;
+
+    @Basic
+    private String city;
+
+    @Basic
+    private String state;
+
+    @Basic
+    private String postalCode;
+
+    @Basic
+    private String phoneNumber;
+
+    public void setStreetAddress(String streetAddress) {
+        this.streetAddress = streetAddress;
+    }
+
+    public String getStreetAddress() {
+        return this.streetAddress;
+    }
+
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getCity() {
+        return this.city;
+    }
+
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public String getState() {
+        return this.state;
+    }
+
+
+    public void setPostalCode(String postalCode) {
+        this.postalCode = postalCode;
+    }
+
+    public String getPostalCode() {
+        return this.postalCode;
+    }
+
+
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+
+    public String getPhoneNumber() {
+        return this.phoneNumber;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Address.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Company.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Company.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Company.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Company.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_Company")
+@Table(name="JI_Company") // OPENJPA-121
+public final class Company implements ICompany {
+    private static long idCounter = System.currentTimeMillis();
+
+    @Id
+    private long id = idCounter++;
+
+    @Basic
+    private String name;
+
+    @OneToOne
+    private Address address;
+
+    @OneToMany(mappedBy="company")
+    private Set<Employee> employees = new HashSet<Employee>();
+
+    @ManyToMany(mappedBy="distributors")
+    private Set<Product> products = new HashSet<Product>();
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+
+    public void setAddress(IAddress address) {
+        this.address = (Address) address;
+    }
+
+    public IAddress getAddress() {
+        return this.address;
+    }
+
+
+    public void setEmployees(Set<? extends IEmployee> employees) {
+        this.employees = (Set<Employee>) employees;
+    }
+
+    public Set<Employee> getEmployees() {
+        return this.employees;
+    }
+
+
+    public void setProducts(Set<? extends IProduct> products) {
+        this.products = (Set<Product>) products;
+    }
+
+    public Set<Product> getProducts() {
+        return this.products;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Company.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Customer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Customer.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Customer.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Customer.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_Customer")
+@Table(name="JI_Customer") // OPENJPA-121
+@Inheritance(strategy=InheritanceType.JOINED)
+public final class Customer extends Person implements ICustomer {
+    @OneToMany(mappedBy="customer")
+    private Collection<ProductOrder> orders = new ArrayList<ProductOrder>();
+
+    @OneToOne
+    private Address shippingAddress;
+
+    @OneToOne
+    private Address billingAddress;
+
+    public void setOrders(Collection<? extends IProductOrder> orders) {
+        this.orders = (Collection<ProductOrder>) orders;
+    }
+
+    public Collection<ProductOrder> getOrders() {
+        return this.orders;
+    }
+
+
+    public void setShippingAddress(IAddress shippingAddress) {
+        this.shippingAddress = (Address) shippingAddress;
+    }
+
+    public IAddress getShippingAddress() {
+        return this.shippingAddress;
+    }
+
+
+    public void setBillingAddress(IAddress billingAddress) {
+        this.billingAddress = (Address) billingAddress;
+    }
+
+    public IAddress getBillingAddress() {
+        return this.billingAddress;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Customer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Employee.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Employee.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Employee.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Employee.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_Employee")
+@Table(name="JI_Employee") // OPENJPA-121
+@Inheritance(strategy=InheritanceType.JOINED)
+public abstract class Employee extends Person implements IEmployee {
+    @OneToOne
+    private FullTimeEmployee manager;
+
+    @OneToOne
+    private Company company;
+
+    @Basic
+    private String title;
+
+    @Basic
+    private Date hireDate;
+
+    public void setManager(IFullTimeEmployee manager) {
+        this.manager = (FullTimeEmployee) manager;
+    }
+
+    public IFullTimeEmployee getManager() {
+        return this.manager;
+    }
+
+
+    public void setCompany(ICompany company) {
+        this.company = (Company) company;
+    }
+
+    public ICompany getCompany() {
+        return this.company;
+    }
+
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getTitle() {
+        return this.title;
+    }
+
+
+    public void setHireDate(Date hireDate) {
+        this.hireDate = hireDate;
+    }
+
+    public Date getHireDate() {
+        return this.hireDate;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Employee.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/FullTimeEmployee.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/FullTimeEmployee.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/FullTimeEmployee.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/FullTimeEmployee.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_FullTimeEmployee")
+@Table(name="JI_FullTimeEmployee") // OPENJPA-121
+@Inheritance(strategy=InheritanceType.JOINED)
+public final class FullTimeEmployee extends Employee
+    implements IFullTimeEmployee {
+    @Basic
+    private float salary;
+
+    public void setSalary(float salary) {
+        this.salary = salary;
+    }
+
+    public float getSalary() {
+        return this.salary;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/FullTimeEmployee.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/LineItem.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/LineItem.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/LineItem.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/LineItem.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_LineItem")
+@Table(name="JI_LineItem") // OPENJPA-121
+public final class LineItem implements ILineItem {
+    private static long idCounter = System.currentTimeMillis();
+
+    @Id
+    private long id = idCounter++;
+
+    @Basic
+    private int quantity;
+
+    @OneToOne
+    private Product product;
+
+    public void setQuantity(int quantity) {
+        this.quantity = quantity;
+    }
+
+    public int getQuantity() {
+        return this.quantity;
+    }
+
+
+    public void setProduct(IProduct product) {
+        this.product = (Product) product;
+    }
+
+    public IProduct getProduct() {
+        return this.product;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/LineItem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/PartTimeEmployee.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/PartTimeEmployee.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/PartTimeEmployee.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/PartTimeEmployee.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_PartTimeEmployee")
+@Table(name="JI_PartTimeEmployee") // OPENJPA-121
+@Inheritance(strategy=InheritanceType.JOINED)
+public final class PartTimeEmployee extends Employee
+    implements IPartTimeEmployee {
+    @Basic
+    private float wage;
+
+    @Basic
+    private int weeklyHours;
+
+    public void setWage(float wage) {
+        this.wage = wage;
+    }
+
+    public float getWage() {
+        return this.wage;
+    }
+
+
+    public void setWeeklyHours(int weeklyHours) {
+        this.weeklyHours = weeklyHours;
+    }
+
+    public int getWeeklyHours() {
+        return this.weeklyHours;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/PartTimeEmployee.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Person.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Person.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Person.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Person.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_Person")
+@Table(name="JI_Person") // OPENJPA-121
+@Inheritance(strategy=InheritanceType.JOINED)
+public abstract class Person implements IPerson {
+    private static long idCounter = System.currentTimeMillis();
+
+    @Id
+    private long id = idCounter++;
+
+    @Basic
+    private String firstName;
+
+    @Basic
+    private String lastName;
+
+    @OneToOne
+    private Address homeAddress;
+
+    public void setFirstName(String firstName) {
+        this.firstName = firstName;
+    }
+
+    public String getFirstName() {
+        return this.firstName;
+    }
+
+
+    public void setLastName(String lastName) {
+        this.lastName = lastName;
+    }
+
+    public String getLastName() {
+        return this.lastName;
+    }
+
+
+    public void setHomeAddress(IAddress homeAddress) {
+        this.homeAddress = (Address) homeAddress;
+    }
+
+    public IAddress getHomeAddress() {
+        return this.homeAddress;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Person.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Product.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Product.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Product.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Product.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_Product")
+@Table(name="JI_Product") // OPENJPA-121
+public final class Product implements IProduct {
+    private static long idCounter = System.currentTimeMillis();
+
+    @Id
+    private long id = idCounter++;
+
+    @Basic
+    private String name;
+
+    @Basic
+    private byte[] image;
+
+    @Basic
+    private float price;
+
+    @ManyToMany
+    private Set<Company> distributors = new HashSet<Company>();
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+
+    public void setImage(byte[] image) {
+        this.image = image;
+    }
+
+    public byte[] getImage() {
+        return this.image;
+    }
+
+
+    public void setPrice(float price) {
+        this.price = price;
+    }
+
+    public float getPrice() {
+        return this.price;
+    }
+
+
+    public void setDistributors(Set<? extends ICompany> distributors) {
+        this.distributors = (Set<Company>) distributors;
+    }
+
+    public Set<Company> getDistributors() {
+        return this.distributors;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/Product.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/ProductOrder.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/ProductOrder.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/ProductOrder.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/ProductOrder.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="JI_ProductOrder")
+@Table(name="JI_ProductOrder") // OPENJPA-121
+public final class ProductOrder implements IProductOrder {
+    private static long idCounter = System.currentTimeMillis();
+
+    @Id
+    private long id = idCounter++;
+
+    @OneToMany
+    private List<LineItem> items = new LinkedList<LineItem>();
+
+    @Basic
+    private Date orderDate;
+
+    @Basic
+    private Date shippedDate;
+
+    @OneToOne
+    private Customer customer;
+
+    public void setItems(List<? extends ILineItem> items) {
+        this.items = (List<LineItem>) items;
+    }
+
+    public List<LineItem> getItems() {
+        return this.items;
+    }
+
+
+    public void setOrderDate(Date orderDate) {
+        this.orderDate = orderDate;
+    }
+
+    public Date getOrderDate() {
+        return this.orderDate;
+    }
+
+
+    public void setShippedDate(Date shippedDate) {
+        this.shippedDate = shippedDate;
+    }
+
+    public Date getShippedDate() {
+        return this.shippedDate;
+    }
+
+
+    public void setCustomer(ICustomer customer) {
+        this.customer = (Customer) customer;
+    }
+
+    public ICustomer getCustomer() {
+        return this.customer;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/ProductOrder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/TestJoinedCompanyModel.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/TestJoinedCompanyModel.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/TestJoinedCompanyModel.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/TestJoinedCompanyModel.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.joined;
+
+import org.apache.openjpa.persistence.models.company.*;
+
+public class TestJoinedCompanyModel extends CompanyModelTest {
+}
+

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/joined/TestJoinedCompanyModel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Address.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Address.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Address.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Address.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.propertyaccess;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="PRP_Address")
+@Table(name="PRP_Address") // OPENJPA-121
+public final class Address implements IAddress {
+    private static long idCounter = System.currentTimeMillis();
+
+    private long id = idCounter++;
+
+    private String streetAddress;
+    private String city;
+    private String state;
+    private String postalCode;
+    private String phoneNumber;
+
+    public void setStreetAddress(String streetAddress) {
+        this.streetAddress = streetAddress;
+    }
+
+    @Basic
+    public String getStreetAddress() {
+        return this.streetAddress;
+    }
+
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    @Basic
+    public String getCity() {
+        return this.city;
+    }
+
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    @Basic
+    public String getState() {
+        return this.state;
+    }
+
+
+    public void setPostalCode(String postalCode) {
+        this.postalCode = postalCode;
+    }
+
+    @Basic
+    public String getPostalCode() {
+        return this.postalCode;
+    }
+
+
+    public void setPhoneNumber(String phoneNumber) {
+        this.phoneNumber = phoneNumber;
+    }
+
+    @Basic
+    public String getPhoneNumber() {
+        return this.phoneNumber;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    @Id
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Address.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Company.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Company.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Company.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Company.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.propertyaccess;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="PRP_Company")
+@Table(name="PRP_Company") // OPENJPA-121
+public final class Company implements ICompany {
+    private static long idCounter = System.currentTimeMillis();
+
+    private long id = idCounter++;
+
+    private String name;
+    private Address address;
+    private Set<Employee> employees = new HashSet<Employee>();
+    private Set<Product> products = new HashSet<Product>();
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Basic
+    public String getName() {
+        return this.name;
+    }
+
+
+    public void setAddress(IAddress address) {
+        setAddress((Address) address);
+    }
+
+    public void setAddress(Address address) {
+        this.address = address;
+    }
+
+    @OneToOne
+    public Address getAddress() {
+        return this.address;
+    }
+
+
+    public void setEmployees(Set<? extends IEmployee> employees) {
+        this.employees = (Set<Employee>) employees;
+    }
+
+    @OneToMany(mappedBy="company")
+    public Set<Employee> getEmployees() {
+        return this.employees;
+    }
+
+
+    public void setProducts(Set<? extends IProduct> products) {
+        this.products = (Set<Product>) products;
+    }
+
+    @ManyToMany(mappedBy="distributors")
+    public Set<Product> getProducts() {
+        return this.products;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    @Id
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Company.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Customer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Customer.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Customer.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Customer.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.propertyaccess;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="PRP_Customer")
+public final class Customer extends Person implements ICustomer {
+    private Collection<ProductOrder> orders = new ArrayList<ProductOrder>();
+    private Address shippingAddress;
+    private Address billingAddress;
+
+    public void setOrders(Collection<? extends IProductOrder> orders) {
+        this.orders = (Collection<ProductOrder>) orders;
+    }
+
+    @OneToMany(mappedBy="customer")
+    public Collection<ProductOrder> getOrders() {
+        return this.orders;
+    }
+
+
+    public void setShippingAddress(IAddress shippingAddress) {
+        setShippingAddress((Address) shippingAddress);
+    }
+
+    public void setShippingAddress(Address shippingAddress) {
+        this.shippingAddress = shippingAddress;
+    }
+
+    @OneToOne
+    public Address getShippingAddress() {
+        return this.shippingAddress;
+    }
+
+
+    public void setBillingAddress(IAddress billingAddress) {
+        setBillingAddress((Address) billingAddress);
+    }
+
+    public void setBillingAddress(Address billingAddress) {
+        this.billingAddress = billingAddress;
+    }
+
+    @OneToOne
+    public Address getBillingAddress() {
+        return this.billingAddress;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Customer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Employee.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Employee.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Employee.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Employee.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.propertyaccess;
+
+import java.util.*;
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="PRP_Employee")
+public abstract class Employee extends Person implements IEmployee {
+    private FullTimeEmployee manager;
+    private Company company;
+    private String title;
+    private Date hireDate;
+
+    public void setManager(IFullTimeEmployee manager) {
+        setManager((FullTimeEmployee) manager);
+    }
+
+    public void setManager(FullTimeEmployee manager) {
+        this.manager = manager;
+    }
+
+    @OneToOne
+    public FullTimeEmployee getManager() {
+        return this.manager;
+    }
+
+
+    public void setCompany(ICompany company) {
+        setCompany((Company) company);
+    }
+
+    public void setCompany(Company company) {
+        this.company = company;
+    }
+
+    @OneToOne
+    public Company getCompany() {
+        return this.company;
+    }
+
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    @Basic
+    public String getTitle() {
+        return this.title;
+    }
+
+
+    public void setHireDate(Date hireDate) {
+        this.hireDate = hireDate;
+    }
+
+    @Basic
+    public Date getHireDate() {
+        return this.hireDate;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/Employee.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/FullTimeEmployee.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/FullTimeEmployee.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/FullTimeEmployee.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/FullTimeEmployee.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.propertyaccess;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="PRP_FullTimeEmployee")
+public final class FullTimeEmployee extends Employee
+    implements IFullTimeEmployee {
+    private float salary;
+
+    public void setSalary(float salary) {
+        this.salary = salary;
+    }
+
+    @Basic
+    public float getSalary() {
+        return this.salary;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/FullTimeEmployee.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/LineItem.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/LineItem.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/LineItem.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/LineItem.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.propertyaccess;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="PRP_LineItem")
+@Table(name="PRP_LineItem") // OPENJPA-121
+public final class LineItem implements ILineItem {
+    private static long idCounter = System.currentTimeMillis();
+
+    private long id = idCounter++;
+
+    private int quantity;
+    private Product product;
+
+    public void setQuantity(int quantity) {
+        this.quantity = quantity;
+    }
+
+    @Basic
+    public int getQuantity() {
+        return this.quantity;
+    }
+
+
+    public void setProduct(IProduct product) {
+        setProduct((Product) product);
+    }
+
+    public void setProduct(Product product) {
+        this.product = product;
+    }
+
+    @OneToOne
+    public Product getProduct() {
+        return this.product;
+    }
+
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    @Id
+    public long getId() {
+        return this.id;
+    }
+
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/LineItem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/PartTimeEmployee.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/PartTimeEmployee.java?view=auto&rev=505160
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/PartTimeEmployee.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/PartTimeEmployee.java Thu Feb  8 19:49:22 2007
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.openjpa.persistence.models.company.propertyaccess;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.models.company.*;
+
+@Entity(name="PRP_PartTimeEmployee")
+public final class PartTimeEmployee extends Employee
+    implements IPartTimeEmployee {
+    private float wage;
+    private int weeklyHours;
+
+    public void setWage(float wage) {
+        this.wage = wage;
+    }
+
+    @Basic
+    public float getWage() {
+        return this.wage;
+    }
+
+
+    public void setWeeklyHours(int weeklyHours) {
+        this.weeklyHours = weeklyHours;
+    }
+
+    @Basic
+    public int getWeeklyHours() {
+        return this.weeklyHours;
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/models/propertyaccess/PartTimeEmployee.java
------------------------------------------------------------------------------
    svn:eol-style = native