From 19045b71b2cf1fd4cfa51ec3b31f0974b020a2db Mon Sep 17 00:00:00 2001 From: Eike Stepper Date: Fri, 31 Jul 2009 11:16:31 +0000 Subject: [284834] [Releng] Migrate Net4j and CDO builds to Athena/Hudson https://bugs.eclipse.org/bugs/show_bug.cgi?id=284834 --- .../eclipse/emf/cdo/examples/company/Address.java | 117 ++ .../eclipse/emf/cdo/examples/company/Category.java | 98 ++ .../eclipse/emf/cdo/examples/company/Company.java | 121 ++ .../emf/cdo/examples/company/CompanyFactory.java | 134 ++ .../emf/cdo/examples/company/CompanyPackage.java | 1445 ++++++++++++++++++++ .../eclipse/emf/cdo/examples/company/Customer.java | 55 + .../eclipse/emf/cdo/examples/company/Order.java | 56 + .../emf/cdo/examples/company/OrderAddress.java | 62 + .../emf/cdo/examples/company/OrderDetail.java | 123 ++ .../eclipse/emf/cdo/examples/company/Product.java | 141 ++ .../emf/cdo/examples/company/PurchaseOrder.java | 94 ++ .../emf/cdo/examples/company/SalesOrder.java | 91 ++ .../eclipse/emf/cdo/examples/company/Supplier.java | 84 ++ .../org/eclipse/emf/cdo/examples/company/VAT.java | 254 ++++ .../emf/cdo/examples/company/impl/AddressImpl.java | 134 ++ .../cdo/examples/company/impl/CategoryImpl.java | 118 ++ .../examples/company/impl/CompanyFactoryImpl.java | 322 +++++ .../emf/cdo/examples/company/impl/CompanyImpl.java | 124 ++ .../examples/company/impl/CompanyPackageImpl.java | 837 ++++++++++++ .../cdo/examples/company/impl/CustomerImpl.java | 72 + .../examples/company/impl/OrderAddressImpl.java | 228 +++ .../cdo/examples/company/impl/OrderDetailImpl.java | 136 ++ .../emf/cdo/examples/company/impl/OrderImpl.java | 85 ++ .../emf/cdo/examples/company/impl/ProductImpl.java | 149 ++ .../examples/company/impl/PurchaseOrderImpl.java | 103 ++ .../cdo/examples/company/impl/SalesOrderImpl.java | 101 ++ .../cdo/examples/company/impl/SupplierImpl.java | 93 ++ .../company/util/CompanyAdapterFactory.java | 349 +++++ .../cdo/examples/company/util/CompanySwitch.java | 440 ++++++ .../company/validation/AddressValidator.java | 30 + .../company/validation/CategoryValidator.java | 35 + .../company/validation/CompanyValidator.java | 42 + .../company/validation/CustomerValidator.java | 32 + .../company/validation/OrderAddressValidator.java | 24 + .../company/validation/OrderDetailValidator.java | 33 + .../company/validation/OrderValidator.java | 30 + .../company/validation/ProductValidator.java | 35 + .../company/validation/PurchaseOrderValidator.java | 32 + .../company/validation/SalesOrderValidator.java | 30 + .../company/validation/SupplierValidator.java | 34 + 40 files changed, 6523 insertions(+) create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Address.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Company.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyFactory.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyPackage.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Customer.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Order.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/OrderAddress.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/OrderDetail.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/PurchaseOrder.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/SalesOrder.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Supplier.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/VAT.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/AddressImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CategoryImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyFactoryImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyPackageImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CustomerImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/OrderAddressImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/OrderDetailImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/OrderImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/ProductImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/PurchaseOrderImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/SalesOrderImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/SupplierImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanyAdapterFactory.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanySwitch.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/AddressValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CategoryValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CompanyValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CustomerValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/OrderAddressValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/OrderDetailValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/OrderValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/ProductValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/PurchaseOrderValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/SalesOrderValidator.java create mode 100644 plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/SupplierValidator.java (limited to 'plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo') diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Address.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Address.java new file mode 100644 index 0000000000..38987a89bc --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Address.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.examples.company; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Address'. + *
+ * The following features are supported: + *
+ * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... + *
+ * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getAddress_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Address#getName Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Street' attribute. + *+ * If the meaning of the 'Street' attribute isn't clear, there really should be more of a description here... + *
+ * + * + * @return the value of the 'Street' attribute. + * @see #setStreet(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getAddress_Street() + * @model + * @generated + */ + String getStreet(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Address#getStreet Street}' attribute. + * + * @param value + * the new value of the 'Street' attribute. + * @see #getStreet() + * @generated + */ + void setStreet(String value); + + /** + * Returns the value of the 'City' attribute. + *+ * If the meaning of the 'City' attribute isn't clear, there really should be more of a description here... + *
+ * + * + * @return the value of the 'City' attribute. + * @see #setCity(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getAddress_City() + * @model + * @generated + */ + String getCity(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Address#getCity City}' attribute. + * + * @param value + * the new value of the 'City' attribute. + * @see #getCity() + * @generated + */ + void setCity(String value); + +} // Address diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java new file mode 100644 index 0000000000..6cfab4b58e --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.examples.company; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Category'. + *+ * The following features are supported: + *
+ * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... + *
+ * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCategory_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Category#getName Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Categories' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.Category}. + *+ * If the meaning of the 'Categories' containment reference list isn't clear, there really should be more of + * a description here... + *
+ * + * + * @return the value of the 'Categories' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCategory_Categories() + * @model containment="true" + * @generated + */ + EList+ * If the meaning of the 'Products' containment reference list isn't clear, there really should be more of a + * description here... + *
+ * + * + * @return the value of the 'Products' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCategory_Products() + * @model containment="true" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'Categories' containment reference list isn't clear, there really should be more of + * a description here... + *
+ * + * + * @return the value of the 'Categories' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_Categories() + * @model containment="true" + * @generated + */ + EList+ * If the meaning of the 'Suppliers' containment reference list isn't clear, there really should be more of a + * description here... + *
+ * + * + * @return the value of the 'Suppliers' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_Suppliers() + * @model containment="true" + * @generated + */ + EList+ * If the meaning of the 'Purchase Orders' containment reference list isn't clear, there really should be + * more of a description here... + *
+ * + * + * @return the value of the 'Purchase Orders' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_PurchaseOrders() + * @model containment="true" + * @generated + */ + EList+ * If the meaning of the 'Customers' containment reference list isn't clear, there really should be more of a + * description here... + *
+ * + * + * @return the value of the 'Customers' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_Customers() + * @model containment="true" + * @generated + */ + EList+ * If the meaning of the 'Sales Orders' containment reference list isn't clear, there really should be more + * of a description here... + *
+ * + * + * @return the value of the 'Sales Orders' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_SalesOrders() + * @model containment="true" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'Sales Orders' reference list isn't clear, there really should be more of a + * description here... + *
+ * + * + * @return the value of the 'Sales Orders' reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCustomer_SalesOrders() + * @see org.eclipse.emf.cdo.examples.company.SalesOrder#getCustomer + * @model opposite="customer" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'Order Details' containment reference list isn't clear, there really should be more + * of a description here... + *
+ * + * + * @return the value of the 'Order Details' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getOrder_OrderDetails() + * @see org.eclipse.emf.cdo.examples.company.OrderDetail#getOrder + * @model opposite="order" containment="true" + * @generated + */ + EList+ * The following features are supported: + *
+ * If the meaning of the 'Test Attribute' attribute isn't clear, there really should be more of a description + * here... + *
+ * + * + * @return the value of the 'Test Attribute' attribute. + * @see #setTestAttribute(boolean) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getOrderAddress_TestAttribute() + * @model + * @generated + */ + boolean isTestAttribute(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.OrderAddress#isTestAttribute + * Test Attribute}' attribute. + * + * @param value + * the new value of the 'Test Attribute' attribute. + * @see #isTestAttribute() + * @generated + */ + void setTestAttribute(boolean value); + +} // OrderAddress diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/OrderDetail.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/OrderDetail.java new file mode 100644 index 0000000000..532b3bf6dd --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/OrderDetail.java @@ -0,0 +1,123 @@ +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.examples.company; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Order Detail'. + *+ * The following features are supported: + *
+ * If the meaning of the 'Order' container reference isn't clear, there really should be more of a + * description here... + *
+ * + * + * @return the value of the 'Order' container reference. + * @see #setOrder(Order) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getOrderDetail_Order() + * @see org.eclipse.emf.cdo.examples.company.Order#getOrderDetails + * @model opposite="orderDetails" required="true" transient="false" + * @generated + */ + Order getOrder(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.OrderDetail#getOrder Order}' container + * reference. + * + * @param value + * the new value of the 'Order' container reference. + * @see #getOrder() + * @generated + */ + void setOrder(Order value); + + /** + * Returns the value of the 'Product' reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.Product#getOrderDetails Order Details}'. + *+ * If the meaning of the 'Product' reference isn't clear, there really should be more of a description + * here... + *
+ * + * + * @return the value of the 'Product' reference. + * @see #setProduct(Product) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getOrderDetail_Product() + * @see org.eclipse.emf.cdo.examples.company.Product#getOrderDetails + * @model opposite="orderDetails" + * @generated + */ + Product getProduct(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.OrderDetail#getProduct Product}' reference. + * + * + * @param value + * the new value of the 'Product' reference. + * @see #getProduct() + * @generated + */ + void setProduct(Product value); + + /** + * Returns the value of the 'Price' attribute. + *+ * If the meaning of the 'Price' attribute isn't clear, there really should be more of a description here... + *
+ * + * + * @return the value of the 'Price' attribute. + * @see #setPrice(float) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getOrderDetail_Price() + * @model + * @generated + */ + float getPrice(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.OrderDetail#getPrice Price}' attribute. + * + * + * @param value + * the new value of the 'Price' attribute. + * @see #getPrice() + * @generated + */ + void setPrice(float value); + +} // OrderDetail diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java new file mode 100644 index 0000000000..2c935fd518 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java @@ -0,0 +1,141 @@ +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.examples.company; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Product'. + *+ * The following features are supported: + *
+ * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... + *
+ * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_Name() + * @model annotation="teneo.jpa value='@Id'" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Product#getName Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Order Details' reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.OrderDetail}. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.OrderDetail#getProduct Product}'. + *+ * If the meaning of the 'Order Details' reference list isn't clear, there really should be more of a + * description here... + *
+ * + * + * @return the value of the 'Order Details' reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_OrderDetails() + * @see org.eclipse.emf.cdo.examples.company.OrderDetail#getProduct + * @model opposite="product" + * @generated + */ + EList"vat15"
. The literals
+ * are from the enumeration {@link org.eclipse.emf.cdo.examples.company.VAT}.
+ * + * If the meaning of the 'Vat' attribute isn't clear, there really should be more of a description here... + *
+ * + * + * @return the value of the 'Vat' attribute. + * @see org.eclipse.emf.cdo.examples.company.VAT + * @see #setVat(VAT) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_Vat() + * @model default="vat15" + * @generated + */ + VAT getVat(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Product#getVat Vat}' attribute. + * + * @param value + * the new value of the 'Vat' attribute. + * @see org.eclipse.emf.cdo.examples.company.VAT + * @see #getVat() + * @generated + */ + void setVat(VAT value); + + /** + * Returns the value of the 'Description' attribute. + *+ * If the meaning of the 'Description' attribute isn't clear, there really should be more of a description + * here... + *
+ * + * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_Description() + * @model transient="true" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Product#getDescription Description}' + * attribute. + * + * @param value + * the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + +} // Product diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/PurchaseOrder.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/PurchaseOrder.java new file mode 100644 index 0000000000..cfc7cb1628 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/PurchaseOrder.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.examples.company; + +import java.util.Date; + +/** + * A representation of the model object 'Purchase Order'. + *+ * The following features are supported: + *
+ * If the meaning of the 'Date' attribute isn't clear, there really should be more of a description here... + *
+ * + * + * @return the value of the 'Date' attribute. + * @see #setDate(Date) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getPurchaseOrder_Date() + * @model + * @generated + */ + Date getDate(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.PurchaseOrder#getDate Date}' attribute. + * + * + * @param value + * the new value of the 'Date' attribute. + * @see #getDate() + * @generated + */ + void setDate(Date value); + + /** + * Returns the value of the 'Supplier' reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.Supplier#getPurchaseOrders Purchase Orders}'. + *+ * If the meaning of the 'Supplier' reference isn't clear, there really should be more of a description + * here... + *
+ * + * + * @return the value of the 'Supplier' reference. + * @see #setSupplier(Supplier) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getPurchaseOrder_Supplier() + * @see org.eclipse.emf.cdo.examples.company.Supplier#getPurchaseOrders + * @model opposite="purchaseOrders" required="true" + * @generated + */ + Supplier getSupplier(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.PurchaseOrder#getSupplier Supplier}' + * reference. + * + * @param value + * the new value of the 'Supplier' reference. + * @see #getSupplier() + * @generated + */ + void setSupplier(Supplier value); + +} // PurchaseOrder diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/SalesOrder.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/SalesOrder.java new file mode 100644 index 0000000000..ed26ddf951 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/SalesOrder.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.examples.company; + +/** + * A representation of the model object 'Sales Order'. + *+ * The following features are supported: + *
+ * If the meaning of the 'Id' attribute isn't clear, there really should be more of a description here... + *
+ * + * + * @return the value of the 'Id' attribute. + * @see #setId(int) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getSalesOrder_Id() + * @model + * @generated + */ + int getId(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.SalesOrder#getId Id}' attribute. + * + * @param value + * the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(int value); + + /** + * Returns the value of the 'Customer' reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.Customer#getSalesOrders Sales Orders}'. + *+ * If the meaning of the 'Customer' reference isn't clear, there really should be more of a description + * here... + *
+ * + * + * @return the value of the 'Customer' reference. + * @see #setCustomer(Customer) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getSalesOrder_Customer() + * @see org.eclipse.emf.cdo.examples.company.Customer#getSalesOrders + * @model opposite="salesOrders" required="true" + * @generated + */ + Customer getCustomer(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.SalesOrder#getCustomer Customer}' + * reference. + * + * @param value + * the new value of the 'Customer' reference. + * @see #getCustomer() + * @generated + */ + void setCustomer(Customer value); + +} // SalesOrder diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Supplier.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Supplier.java new file mode 100644 index 0000000000..8e7b794ccd --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Supplier.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.examples.company; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Supplier'. + *+ * The following features are supported: + *
+ * If the meaning of the 'Purchase Orders' reference list isn't clear, there really should be more of a + * description here... + *
+ * + * + * @return the value of the 'Purchase Orders' reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getSupplier_PurchaseOrders() + * @see org.eclipse.emf.cdo.examples.company.PurchaseOrder#getSupplier + * @model opposite="supplier" + * @generated + */ + EList"true"
.
+ * + * If the meaning of the 'Preferred' attribute isn't clear, there really should be more of a description + * here... + *
+ * + * + * @return the value of the 'Preferred' attribute. + * @see #setPreferred(boolean) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getSupplier_Preferred() + * @model default="true" + * @generated + */ + boolean isPreferred(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Supplier#isPreferred Preferred}' attribute. + * + * + * @param value + * the new value of the 'Preferred' attribute. + * @see #isPreferred() + * @generated + */ + void setPreferred(boolean value); + +} // Supplier diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/VAT.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/VAT.java new file mode 100644 index 0000000000..bc16721b43 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/VAT.java @@ -0,0 +1,254 @@ +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.examples.company; + +import org.eclipse.emf.common.util.Enumerator; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * A representation of the literals of the enumeration 'VAT', and utility + * methods for working with them. + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getVAT() + * @model + * @generated + */ +public enum VAT implements Enumerator +{ + /** + * The 'Vat0' literal object. + * + * @see #VAT0_VALUE + * @generated + * @ordered + */ + VAT0(0, "vat0", "vat0"), + + /** + * The 'Vat7' literal object. + * + * @see #VAT7_VALUE + * @generated + * @ordered + */ + VAT7(7, "vat7", "vat7"), + + /** + * The 'Vat15' literal object. + * + * @see #VAT15_VALUE + * @generated + * @ordered + */ + VAT15(15, "vat15", "vat15"); + + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The 'Vat0' literal value. + *+ * If the meaning of 'Vat0' literal object isn't clear, there really should be more of a description + * here... + *
+ * + * + * @see #VAT0 + * @model name="vat0" + * @generated + * @ordered + */ + public static final int VAT0_VALUE = 0; + + /** + * The 'Vat7' literal value. + *+ * If the meaning of 'Vat7' literal object isn't clear, there really should be more of a description + * here... + *
+ * + * + * @see #VAT7 + * @model name="vat7" + * @generated + * @ordered + */ + public static final int VAT7_VALUE = 7; + + /** + * The 'Vat15' literal value. + *+ * If the meaning of 'Vat15' literal object isn't clear, there really should be more of a description + * here... + *
+ * + * + * @see #VAT15 + * @model name="vat15" + * @generated + * @ordered + */ + public static final int VAT15_VALUE = 15; + + /** + * An array of all the 'VAT' enumerators. + * + * @generated + */ + private static final VAT[] VALUES_ARRAY = new VAT[] { VAT0, VAT7, VAT15, }; + + /** + * A public read-only list of all the 'VAT' enumerators. + * + * @generated + */ + public static final List+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also + * performs initialization of the package, or returns the registered package, if one already exists. + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#eNS_URI + * @see #init() + * @generated + */ + private CompanyPackageImpl() + { + super(eNS_URI, CompanyFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + *
+ * This method is used to initialize {@link CompanyPackage#eINSTANCE} when that field is accessed. Clients should not + * invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CompanyPackage init() + { + if (isInited) + { + return (CompanyPackage)EPackage.Registry.INSTANCE.getEPackage(CompanyPackage.eNS_URI); + } + + // Obtain or create and register package + CompanyPackageImpl theCompanyPackage = (CompanyPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CompanyPackageImpl ? EPackage.Registry.INSTANCE + .get(eNS_URI) + : new CompanyPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theCompanyPackage.createPackageContents(); + + // Initialize created meta-data + theCompanyPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCompanyPackage.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CompanyPackage.eNS_URI, theCompanyPackage); + return theCompanyPackage; + } + + /** + * + * + * @generated + */ + public EClass getAddress() + { + return addressEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getAddress_Name() + { + return (EAttribute)addressEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getAddress_Street() + { + return (EAttribute)addressEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getAddress_City() + { + return (EAttribute)addressEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getSupplier() + { + return supplierEClass; + } + + /** + * + * + * @generated + */ + public EReference getSupplier_PurchaseOrders() + { + return (EReference)supplierEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getSupplier_Preferred() + { + return (EAttribute)supplierEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getPurchaseOrder() + { + return purchaseOrderEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getPurchaseOrder_Date() + { + return (EAttribute)purchaseOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getPurchaseOrder_Supplier() + { + return (EReference)purchaseOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getOrderDetail() + { + return orderDetailEClass; + } + + /** + * + * + * @generated + */ + public EReference getOrderDetail_Order() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getOrderDetail_Product() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getOrderDetail_Price() + { + return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getOrderAddress() + { + return orderAddressEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getOrderAddress_TestAttribute() + { + return (EAttribute)orderAddressEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EEnum getVAT() + { + return vatEEnum; + } + + /** + * + * + * @generated + */ + public EClass getCategory() + { + return categoryEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCategory_Name() + { + return (EAttribute)categoryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCategory_Categories() + { + return (EReference)categoryEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getCategory_Products() + { + return (EReference)categoryEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getProduct() + { + return productEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getCompany_Name() + { + return (EAttribute)productEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCompany_OrderDetails() + { + return (EReference)productEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getCompany_Vat() + { + return (EAttribute)productEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getCompany_Description() + { + return (EAttribute)productEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getCompany() + { + return companyEClass; + } + + /** + * + * + * @generated + */ + public EReference getCompany_Categories() + { + return (EReference)companyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getCompany_Suppliers() + { + return (EReference)companyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getCompany_PurchaseOrders() + { + return (EReference)companyEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getCompany_Customers() + { + return (EReference)companyEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getCompany_SalesOrders() + { + return (EReference)companyEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getCustomer() + { + return customerEClass; + } + + /** + * + * + * @generated + */ + public EReference getCustomer_SalesOrders() + { + return (EReference)customerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getOrder() + { + return orderEClass; + } + + /** + * + * + * @generated + */ + public EReference getOrder_OrderDetails() + { + return (EReference)orderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getSalesOrder() + { + return salesOrderEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getSalesOrder_Id() + { + return (EAttribute)salesOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getSalesOrder_Customer() + { + return (EReference)salesOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public CompanyFactory getCompanyFactory() + { + return (CompanyFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its + * first. + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) + { + return; + } + isCreated = true; + + // Create classes and their features + addressEClass = createEClass(ADDRESS); + createEAttribute(addressEClass, ADDRESS__NAME); + createEAttribute(addressEClass, ADDRESS__STREET); + createEAttribute(addressEClass, ADDRESS__CITY); + + companyEClass = createEClass(COMPANY); + createEReference(companyEClass, COMPANY__CATEGORIES); + createEReference(companyEClass, COMPANY__SUPPLIERS); + createEReference(companyEClass, COMPANY__CUSTOMERS); + createEReference(companyEClass, COMPANY__PURCHASE_ORDERS); + createEReference(companyEClass, COMPANY__SALES_ORDERS); + + supplierEClass = createEClass(SUPPLIER); + createEReference(supplierEClass, SUPPLIER__PURCHASE_ORDERS); + createEAttribute(supplierEClass, SUPPLIER__PREFERRED); + + customerEClass = createEClass(CUSTOMER); + createEReference(customerEClass, CUSTOMER__SALES_ORDERS); + + orderEClass = createEClass(ORDER); + createEReference(orderEClass, ORDER__ORDER_DETAILS); + + orderDetailEClass = createEClass(ORDER_DETAIL); + createEReference(orderDetailEClass, ORDER_DETAIL__ORDER); + createEReference(orderDetailEClass, ORDER_DETAIL__PRODUCT); + createEAttribute(orderDetailEClass, ORDER_DETAIL__PRICE); + + purchaseOrderEClass = createEClass(PURCHASE_ORDER); + createEAttribute(purchaseOrderEClass, PURCHASE_ORDER__DATE); + createEReference(purchaseOrderEClass, PURCHASE_ORDER__SUPPLIER); + + salesOrderEClass = createEClass(SALES_ORDER); + createEAttribute(salesOrderEClass, SALES_ORDER__ID); + createEReference(salesOrderEClass, SALES_ORDER__CUSTOMER); + + categoryEClass = createEClass(CATEGORY); + createEAttribute(categoryEClass, CATEGORY__NAME); + createEReference(categoryEClass, CATEGORY__CATEGORIES); + createEReference(categoryEClass, CATEGORY__PRODUCTS); + + productEClass = createEClass(PRODUCT1); + createEAttribute(productEClass, PRODUCT1__NAME); + createEReference(productEClass, PRODUCT1__ORDER_DETAILS); + createEAttribute(productEClass, PRODUCT1__VAT); + createEAttribute(productEClass, PRODUCT1__DESCRIPTION); + + orderAddressEClass = createEClass(ORDER_ADDRESS); + createEAttribute(orderAddressEClass, ORDER_ADDRESS__TEST_ATTRIBUTE); + + // Create enums + vatEEnum = createEEnum(VAT); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any + * invocation but its first. + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) + { + return; + } + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + companyEClass.getESuperTypes().add(getAddress()); + supplierEClass.getESuperTypes().add(getAddress()); + customerEClass.getESuperTypes().add(getAddress()); + purchaseOrderEClass.getESuperTypes().add(getOrder()); + salesOrderEClass.getESuperTypes().add(getOrder()); + orderAddressEClass.getESuperTypes().add(getAddress()); + orderAddressEClass.getESuperTypes().add(getOrder()); + orderAddressEClass.getESuperTypes().add(getOrderDetail()); + + // Initialize classes and features; add operations and parameters + initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAddress_Name(), ecorePackage.getEString(), "name", null, 0, 1, Address.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAddress_Street(), ecorePackage.getEString(), "street", null, 0, 1, Address.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAddress_City(), ecorePackage.getEString(), "city", null, 0, 1, Address.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(companyEClass, Company.class, "Company", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompany_Categories(), getCategory(), null, "categories", null, 0, -1, Company.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getCompany_Suppliers(), getSupplier(), null, "suppliers", null, 0, -1, Company.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getCompany_Customers(), getCustomer(), null, "customers", null, 0, -1, Company.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getCompany_PurchaseOrders(), getPurchaseOrder(), null, "purchaseOrders", null, 0, -1, Company.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getCompany_SalesOrders(), getSalesOrder(), null, "salesOrders", null, 0, -1, Company.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + initEClass(supplierEClass, Supplier.class, "Supplier", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSupplier_PurchaseOrders(), getPurchaseOrder(), getPurchaseOrder_Supplier(), "purchaseOrders", + null, 0, -1, Supplier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSupplier_Preferred(), ecorePackage.getEBoolean(), "preferred", "true", 0, 1, Supplier.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(customerEClass, Customer.class, "Customer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCustomer_SalesOrders(), getSalesOrder(), getSalesOrder_Customer(), "salesOrders", null, 0, -1, + Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(orderEClass, Order.class, "Order", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getOrder_OrderDetails(), getOrderDetail(), getOrderDetail_Order(), "orderDetails", null, 0, -1, + Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(orderDetailEClass, OrderDetail.class, "OrderDetail", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getOrderDetail_Order(), getOrder(), getOrder_OrderDetails(), "order", null, 1, 1, OrderDetail.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getOrderDetail_Product(), getCompany(), getCompany_OrderDetails(), "product", null, 0, 1, + OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getOrderDetail_Price(), ecorePackage.getEFloat(), "price", null, 0, 1, OrderDetail.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(purchaseOrderEClass, PurchaseOrder.class, "PurchaseOrder", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPurchaseOrder_Date(), ecorePackage.getEDate(), "date", null, 0, 1, PurchaseOrder.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPurchaseOrder_Supplier(), getSupplier(), getSupplier_PurchaseOrders(), "supplier", null, 1, 1, + PurchaseOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(salesOrderEClass, SalesOrder.class, "SalesOrder", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSalesOrder_Id(), ecorePackage.getEInt(), "id", null, 0, 1, SalesOrder.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSalesOrder_Customer(), getCustomer(), getCustomer_SalesOrders(), "customer", null, 1, 1, + SalesOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(categoryEClass, Category.class, "Category", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCategory_Name(), ecorePackage.getEString(), "name", null, 0, 1, Category.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCategory_Categories(), getCategory(), null, "categories", null, 0, -1, Category.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getCategory_Products(), getCompany(), null, "products", null, 0, -1, Category.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEClass(productEClass, Product.class, "Product", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCompany_Name(), ecorePackage.getEString(), "name", null, 0, 1, Product.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCompany_OrderDetails(), getOrderDetail(), getOrderDetail_Product(), "orderDetails", null, 0, -1, + Product.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCompany_Vat(), getVAT(), "vat", "vat15", 0, 1, Product.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getCompany_Description(), ecorePackage.getEString(), "description", null, 0, 1, Product.class, + IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(orderAddressEClass, OrderAddress.class, "OrderAddress", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getOrderAddress_TestAttribute(), ecorePackage.getEBoolean(), "testAttribute", null, 0, 1, + OrderAddress.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(vatEEnum, org.eclipse.emf.cdo.examples.company.VAT.class, "VAT"); + addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.examples.company.VAT.VAT0); + addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.examples.company.VAT.VAT7); + addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.examples.company.VAT.VAT15); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // teneo.jpa + createTeneoAnnotations(); + } + + /** + * Initializes the annotations for teneo.jpa. + * + * @generated + */ + protected void createTeneoAnnotations() + { + String source = "teneo.jpa"; + addAnnotation(orderEClass, source, new String[] { "value", "@Entity(name=\"BaseOrder\")" }); + addAnnotation(getCompany_Name(), source, new String[] { "value", "@Id" }); + addAnnotation(orderAddressEClass, source, new String[] { "value", + "@AssociationOverride(name=\"orderDetails\", joinColumns=@JoinColumn(name=\"orderdetails_orderaddressid\"))" }); + } + +} // CompanyPackageImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CustomerImpl.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CustomerImpl.java new file mode 100644 index 0000000000..c73bcf6bb0 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CustomerImpl.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.examples.company.impl; + +import org.eclipse.emf.cdo.examples.company.CompanyPackage; +import org.eclipse.emf.cdo.examples.company.Customer; +import org.eclipse.emf.cdo.examples.company.SalesOrder; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Customer'. + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
+ * The following features are implemented: + *
createXXX
+ * method for each class of the model.
+ *
+ * @see org.eclipse.emf.cdo.examples.company.CompanyPackage
+ * @generated
+ */
+public class CompanyAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ *
+ *
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation";
+
+ /**
+ * The cached model package.
+ *
+ * @generated
+ */
+ protected static CompanyPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ *
+ * @generated
+ */
+ public CompanyAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = CompanyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object. This implementation
+ * returns true
if the object is either the model's package or is an instance object of the model.
+ *
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the createXXX
methods.
+ *
+ * @generated
+ */
+ protected CompanySwitchtarget
.
+ *
+ * @param target
+ * the object to adapt.
+ * @return the adapter for the target
.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target)
+ {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.Address Address}
+ * '. This default implementation returns null so that we can easily ignore cases; it's useful
+ * to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.Address
+ * @generated
+ */
+ public Adapter createAddressAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.Supplier
+ * Supplier}'. This default implementation returns null so that we can easily ignore
+ * cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.Supplier
+ * @generated
+ */
+ public Adapter createSupplierAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.PurchaseOrder
+ * Purchase Order}'. This default implementation returns null so that we can easily
+ * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.PurchaseOrder
+ * @generated
+ */
+ public Adapter createPurchaseOrderAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.OrderDetail
+ * Order Detail}'. This default implementation returns null so that we can easily
+ * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.OrderDetail
+ * @generated
+ */
+ public Adapter createOrderDetailAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.OrderAddress
+ * Order Address}'. This default implementation returns null so that we can easily
+ * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.OrderAddress
+ * @generated
+ */
+ public Adapter createOrderAddressAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.Category
+ * Category}'. This default implementation returns null so that we can easily ignore
+ * cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.Category
+ * @generated
+ */
+ public Adapter createCategoryAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.Product Product}
+ * '. This default implementation returns null so that we can easily ignore cases; it's useful
+ * to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.Product
+ * @generated
+ */
+ public Adapter createProductAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.Company Company}
+ * '. This default implementation returns null so that we can easily ignore cases; it's useful
+ * to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.Company
+ * @generated
+ */
+ public Adapter createCompanyAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.Customer
+ * Customer}'. This default implementation returns null so that we can easily ignore
+ * cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.Customer
+ * @generated
+ */
+ public Adapter createCustomerAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.Order Order}'.
+ * This default implementation returns null so that we can easily ignore cases; it's useful to
+ * ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.Order
+ * @generated
+ */
+ public Adapter createOrderAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.SalesOrder
+ * Sales Order}'. This default implementation returns null so that we can easily
+ * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.examples.company.SalesOrder
+ * @generated
+ */
+ public Adapter createSalesOrderAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case. This default implementation returns null.
+ *
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} // CompanyAdapterFactory
diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanySwitch.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanySwitch.java
new file mode 100644
index 0000000000..24ddbaf315
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanySwitch.java
@@ -0,0 +1,440 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.examples.company.util;
+
+import org.eclipse.emf.cdo.examples.company.Address;
+import org.eclipse.emf.cdo.examples.company.Category;
+import org.eclipse.emf.cdo.examples.company.Company;
+import org.eclipse.emf.cdo.examples.company.CompanyPackage;
+import org.eclipse.emf.cdo.examples.company.Customer;
+import org.eclipse.emf.cdo.examples.company.Order;
+import org.eclipse.emf.cdo.examples.company.OrderAddress;
+import org.eclipse.emf.cdo.examples.company.OrderDetail;
+import org.eclipse.emf.cdo.examples.company.Product;
+import org.eclipse.emf.cdo.examples.company.PurchaseOrder;
+import org.eclipse.emf.cdo.examples.company.SalesOrder;
+import org.eclipse.emf.cdo.examples.company.Supplier;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import java.util.List;
+
+/**
+ * The Switch for the model's inheritance hierarchy. It supports the call
+ * {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX
method for each class of the model,
+ * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is
+ * returned, which is the result of the switch.
+ *
+ * @see org.eclipse.emf.cdo.examples.company.CompanyPackage
+ * @generated
+ */
+public class CompanySwitchcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject)
+ {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls caseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject)
+ {
+ if (theEClass.eContainer() == modelPackage)
+ {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else
+ {
+ ListcaseXXX
for each class of the model until one returns a non null result; it yields that result.
+ *
+ *
+ * @return the first non-null result returned by a caseXXX
call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case CompanyPackage.ADDRESS:
+ {
+ Address address = (Address)theEObject;
+ T result = caseAddress(address);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.COMPANY:
+ {
+ Company company = (Company)theEObject;
+ T result = caseCompany(company);
+ if (result == null)
+ {
+ result = caseAddress(company);
+ }
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.SUPPLIER:
+ {
+ Supplier supplier = (Supplier)theEObject;
+ T result = caseSupplier(supplier);
+ if (result == null)
+ {
+ result = caseAddress(supplier);
+ }
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.CUSTOMER:
+ {
+ Customer customer = (Customer)theEObject;
+ T result = caseCustomer(customer);
+ if (result == null)
+ {
+ result = caseAddress(customer);
+ }
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.ORDER:
+ {
+ Order order = (Order)theEObject;
+ T result = caseOrder(order);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.ORDER_DETAIL:
+ {
+ OrderDetail orderDetail = (OrderDetail)theEObject;
+ T result = caseOrderDetail(orderDetail);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.PURCHASE_ORDER:
+ {
+ PurchaseOrder purchaseOrder = (PurchaseOrder)theEObject;
+ T result = casePurchaseOrder(purchaseOrder);
+ if (result == null)
+ {
+ result = caseOrder(purchaseOrder);
+ }
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.SALES_ORDER:
+ {
+ SalesOrder salesOrder = (SalesOrder)theEObject;
+ T result = caseSalesOrder(salesOrder);
+ if (result == null)
+ {
+ result = caseOrder(salesOrder);
+ }
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.CATEGORY:
+ {
+ Category category = (Category)theEObject;
+ T result = caseCategory(category);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.PRODUCT1:
+ {
+ Product product = (Product)theEObject;
+ T result = caseProduct(product);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case CompanyPackage.ORDER_ADDRESS:
+ {
+ OrderAddress orderAddress = (OrderAddress)theEObject;
+ T result = caseOrderAddress(orderAddress);
+ if (result == null)
+ {
+ result = caseAddress(orderAddress);
+ }
+ if (result == null)
+ {
+ result = caseOrder(orderAddress);
+ }
+ if (result == null)
+ {
+ result = caseOrderDetail(orderAddress);
+ }
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Address'. This
+ * implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Address'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAddress(Address object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Supplier'. This
+ * implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Supplier'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSupplier(Supplier object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Purchase Order'.
+ * This implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Purchase Order'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePurchaseOrder(PurchaseOrder object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Order Detail'.
+ * This implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Order Detail'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOrderDetail(OrderDetail object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Order Address'.
+ * This implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Order Address'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOrderAddress(OrderAddress object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Category'. This
+ * implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Category'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCategory(Category object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Product'. This
+ * implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Product'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProduct(Product object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Company'. This
+ * implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Company'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCompany(Company object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Customer'. This
+ * implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Customer'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCustomer(Customer object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Order'. This
+ * implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Order'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseOrder(Order object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Sales Order'.
+ * This implementation returns null; returning a non-null result will terminate the switch.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Sales Order'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSalesOrder(SalesOrder object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'EObject'. This
+ * implementation returns null; returning a non-null result will terminate the switch, but this is the last case
+ * anyway.
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of 'EObject'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} // CompanySwitch
diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/AddressValidator.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/AddressValidator.java
new file mode 100644
index 0000000000..cd2f5fd232
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/AddressValidator.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.examples.company.validation;
+
+/**
+ * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.Address}. This doesn't really do anything,
+ * and it's not a real EMF artifact. It was generated by the org.eclipse.emf.examples.generator.validator plug-in to
+ * illustrate how EMF's code generator can be extended. This can be disabled with -vmargs
+ * -Dorg.eclipse.emf.examples.generator.validator=false.
+ *
+ * @since 2.0
+ */
+public interface AddressValidator
+{
+ boolean validate();
+
+ boolean validateName(String value);
+
+ boolean validateStreet(String value);
+
+ boolean validateCity(String value);
+}
diff --git a/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CategoryValidator.java b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CategoryValidator.java
new file mode 100644
index 0000000000..9821f8c985
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CategoryValidator.java
@@ -0,0 +1,35 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.examples.company.validation;
+
+import org.eclipse.emf.cdo.examples.company.Category;
+import org.eclipse.emf.cdo.examples.company.Product;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.Category}. This doesn't really do anything,
+ * and it's not a real EMF artifact. It was generated by the org.eclipse.emf.examples.generator.validator plug-in to
+ * illustrate how EMF's code generator can be extended. This can be disabled with -vmargs
+ * -Dorg.eclipse.emf.examples.generator.validator=false.
+ *
+ * @since 2.0
+ */
+public interface CategoryValidator
+{
+ boolean validate();
+
+ boolean validateName(String value);
+
+ boolean validateCategories(EList