diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse')
36 files changed, 5808 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Addressable.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Addressable.java new file mode 100644 index 0000000000..64c0fcbbf8 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Addressable.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Addressable</b></em>'. + * + * @since 4.0 <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.Addressable#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Addressable#getStreet <em>Street</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Addressable#getCity <em>City</em>}</li> + * </ul> + * </p> + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getAddressable() + * @model abstract="true" + * @generated + */ +public interface Addressable extends EObject +{ + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getAddressable_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Addressable#getName <em>Name</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Street</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Street</em>' attribute. + * @see #setStreet(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getAddressable_Street() + * @model + * @generated + */ + String getStreet(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Addressable#getStreet <em>Street</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Street</em>' attribute. + * @see #getStreet() + * @generated + */ + void setStreet(String value); + + /** + * Returns the value of the '<em><b>City</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>City</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>City</em>' attribute. + * @see #setCity(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getAddressable_City() + * @model + * @generated + */ + String getCity(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Addressable#getCity <em>City</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>City</em>' attribute. + * @see #getCity() + * @generated + */ + void setCity(String value); + +} // Addressable diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java new file mode 100644 index 0000000000..60e181ca3a --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Category.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Category</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.Category#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Category#getCategories <em>Categories</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Category#getProducts <em>Products</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCategory() + * @model + * @generated + */ +public interface Category extends EObject +{ + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCategory_Name() + * @model annotation="teneo.jpa value='@Id @GeneratedValue(generator=\"system-uuid\")'" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Category#getName <em>Name</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Categories</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.Category}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Categories</em>' containment reference list isn't clear, there really should be more of + * a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Categories</em>' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCategory_Categories() + * @model containment="true" + * @generated + */ + EList<Category> getCategories(); + + /** + * Returns the value of the '<em><b>Products</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.Product}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Products</em>' containment reference list isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Products</em>' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCategory_Products() + * @model containment="true" + * @generated + */ + EList<Product> getProducts(); + +} // Category diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Company.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Company.java new file mode 100644 index 0000000000..78b86a8aa6 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Company.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Company</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.Company#getCategories <em>Categories</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Company#getSuppliers <em>Suppliers</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Company#getCustomers <em>Customers</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Company#getPurchaseOrders <em>Purchase Orders</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Company#getSalesOrders <em>Sales Orders</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany() + * @model + * @generated + */ +public interface Company extends Addressable +{ + /** + * Returns the value of the '<em><b>Categories</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.Category}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Categories</em>' containment reference list isn't clear, there really should be more of + * a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Categories</em>' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_Categories() + * @model containment="true" + * @generated + */ + EList<Category> getCategories(); + + /** + * Returns the value of the '<em><b>Suppliers</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.Supplier}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Suppliers</em>' containment reference list isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Suppliers</em>' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_Suppliers() + * @model containment="true" + * @generated + */ + EList<Supplier> getSuppliers(); + + /** + * Returns the value of the '<em><b>Purchase Orders</b></em>' containment reference list. The list contents are of + * type {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Purchase Orders</em>' containment reference list isn't clear, there really should be + * more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Purchase Orders</em>' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_PurchaseOrders() + * @model containment="true" + * @generated + */ + EList<PurchaseOrder> getPurchaseOrders(); + + /** + * Returns the value of the '<em><b>Customers</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.Customer}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Customers</em>' containment reference list isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Customers</em>' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_Customers() + * @model containment="true" + * @generated + */ + EList<Customer> getCustomers(); + + /** + * Returns the value of the '<em><b>Sales Orders</b></em>' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.SalesOrder}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Sales Orders</em>' containment reference list isn't clear, there really should be more + * of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Sales Orders</em>' containment reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCompany_SalesOrders() + * @model containment="true" + * @generated + */ + EList<SalesOrder> getSalesOrders(); + +} // Company diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyFactory.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyFactory.java new file mode 100644 index 0000000000..3826e09c27 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyFactory.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2004 - 2012 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.EFactory; + +/** + * <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a create method for each non-abstract class of + * the model. <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage + * @generated + */ +public interface CompanyFactory extends EFactory +{ + /** + * The singleton instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + CompanyFactory eINSTANCE = org.eclipse.emf.cdo.examples.company.impl.CompanyFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Supplier</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Supplier</em>'. + * @generated + */ + Supplier createSupplier(); + + /** + * Returns a new object of class '<em>Purchase Order</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Purchase Order</em>'. + * @generated + */ + PurchaseOrder createPurchaseOrder(); + + /** + * Returns a new object of class '<em>Order Detail</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Order Detail</em>'. + * @generated + */ + OrderDetail createOrderDetail(); + + /** + * Returns a new object of class '<em>Category</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Category</em>'. + * @generated + */ + Category createCategory(); + + /** + * Returns a new object of class '<em>Product</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Product</em>'. + * @generated + */ + Product createProduct(); + + /** + * Returns a new object of class '<em>Company</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Company</em>'. + * @generated + */ + Company createCompany(); + + /** + * Returns a new object of class '<em>Customer</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Customer</em>'. + * @generated + */ + Customer createCustomer(); + + /** + * Returns a new object of class '<em>Order</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Order</em>'. + * @generated + */ + Order createOrder(); + + /** + * Returns a new object of class '<em>Sales Order</em>'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return a new object of class '<em>Sales Order</em>'. + * @generated + */ + SalesOrder createSalesOrder(); + + /** + * Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the package supported by this factory. + * @generated + */ + CompanyPackage getCompanyPackage(); + +} // CompanyFactory diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyPackage.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyPackage.java new file mode 100644 index 0000000000..36cee1f303 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/CompanyPackage.java @@ -0,0 +1,1355 @@ +/* + * Copyright (c) 2004 - 2012 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.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * <!-- begin-user-doc --> The <b>Package</b> for the model. It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyFactory + * @model kind="package" annotation="teneo.jpa value='@hbGenericGenerators( {@GenericGenerator(name=\"system-uuid\", + * strategy = + * \"org.eclipse.emf.cdo.examples.hibernate.server.CDOExampleUUIDHexGenerator\")})'" + * @generated + */ +public interface CompanyPackage extends EPackage +{ + /** + * The package name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNAME = "company"; + + /** + * The package namespace URI. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/emf/CDO/examples/company/1.0.0"; + + /** + * The package namespace name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + String eNS_PREFIX = "company"; + + /** + * The singleton instance of the package. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + CompanyPackage eINSTANCE = org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.AddressableImpl <em>Addressable</em>}' + * class. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @see org.eclipse.emf.cdo.examples.company.impl.AddressableImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getAddressable() + * @generated + */ + int ADDRESSABLE = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated + * @ordered + */ + int ADDRESSABLE__NAME = 0; + + /** + * The feature id for the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @generated + * @ordered + */ + int ADDRESSABLE__STREET = 1; + + /** + * The feature id for the '<em><b>City</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @generated + * @ordered + */ + int ADDRESSABLE__CITY = 2; + + /** + * The number of structural features of the '<em>Addressable</em>' class. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @generated + * @ordered + */ + int ADDRESSABLE_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.SupplierImpl <em>Supplier</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.SupplierImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getSupplier() + * @generated + */ + int SUPPLIER = 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.PurchaseOrderImpl + * <em>Purchase Order</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.PurchaseOrderImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getPurchaseOrder() + * @generated + */ + int PURCHASE_ORDER = 6; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.OrderDetailImpl <em>Order Detail</em>} + * ' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.OrderDetailImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getOrderDetail() + * @generated + */ + int ORDER_DETAIL = 5; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.CategoryImpl <em>Category</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.CategoryImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getCategory() + * @generated + */ + int CATEGORY = 8; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.CompanyImpl <em>Company</em>}' class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getCompany() + * @generated + */ + int COMPANY = 1; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int COMPANY__NAME = ADDRESSABLE__NAME; + + /** + * The feature id for the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int COMPANY__STREET = ADDRESSABLE__STREET; + + /** + * The feature id for the '<em><b>City</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int COMPANY__CITY = ADDRESSABLE__CITY; + + /** + * The feature id for the '<em><b>Categories</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int COMPANY__CATEGORIES = ADDRESSABLE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Suppliers</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int COMPANY__SUPPLIERS = ADDRESSABLE_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Customers</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int COMPANY__CUSTOMERS = ADDRESSABLE_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Purchase Orders</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int COMPANY__PURCHASE_ORDERS = ADDRESSABLE_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Sales Orders</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int COMPANY__SALES_ORDERS = ADDRESSABLE_FEATURE_COUNT + 4; + + /** + * The number of structural features of the '<em>Company</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int COMPANY_FEATURE_COUNT = ADDRESSABLE_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int SUPPLIER__NAME = ADDRESSABLE__NAME; + + /** + * The feature id for the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int SUPPLIER__STREET = ADDRESSABLE__STREET; + + /** + * The feature id for the '<em><b>City</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int SUPPLIER__CITY = ADDRESSABLE__CITY; + + /** + * The feature id for the '<em><b>Purchase Orders</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int SUPPLIER__PURCHASE_ORDERS = ADDRESSABLE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Preferred</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int SUPPLIER__PREFERRED = ADDRESSABLE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Supplier</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int SUPPLIER_FEATURE_COUNT = ADDRESSABLE_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.CustomerImpl <em>Customer</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.CustomerImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getCustomer() + * @generated + */ + int CUSTOMER = 3; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CUSTOMER__NAME = ADDRESSABLE__NAME; + + /** + * The feature id for the '<em><b>Street</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CUSTOMER__STREET = ADDRESSABLE__STREET; + + /** + * The feature id for the '<em><b>City</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CUSTOMER__CITY = ADDRESSABLE__CITY; + + /** + * The feature id for the '<em><b>Sales Orders</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CUSTOMER__SALES_ORDERS = ADDRESSABLE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Customer</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CUSTOMER_FEATURE_COUNT = ADDRESSABLE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.OrderImpl <em>Order</em>}' class. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.OrderImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getOrder() + * @generated + */ + int ORDER = 4; + + /** + * The feature id for the '<em><b>Order Details</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER__ORDER_DETAILS = 0; + + /** + * The number of structural features of the '<em>Order</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_FEATURE_COUNT = 1; + + /** + * The feature id for the '<em><b>Order</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL__ORDER = 0; + + /** + * The feature id for the '<em><b>Product</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL__PRODUCT = 1; + + /** + * The feature id for the '<em><b>Price</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL__PRICE = 2; + + /** + * The number of structural features of the '<em>Order Detail</em>' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int ORDER_DETAIL_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.SalesOrderImpl <em>Sales Order</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.SalesOrderImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getSalesOrder() + * @generated + */ + int SALES_ORDER = 7; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.impl.ProductImpl <em>Product</em>}' class. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.ProductImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getProduct() + * @generated + */ + int PRODUCT = 9; + + /** + * The feature id for the '<em><b>Order Details</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int PURCHASE_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; + + /** + * The feature id for the '<em><b>Date</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PURCHASE_ORDER__DATE = ORDER_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Supplier</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PURCHASE_ORDER__SUPPLIER = ORDER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Purchase Order</em>' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int PURCHASE_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Order Details</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int SALES_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; + + /** + * The feature id for the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int SALES_ORDER__ID = ORDER_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Customer</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int SALES_ORDER__CUSTOMER = ORDER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Sales Order</em>' class. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int SALES_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CATEGORY__NAME = 0; + + /** + * The feature id for the '<em><b>Categories</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int CATEGORY__CATEGORIES = 1; + + /** + * The feature id for the '<em><b>Products</b></em>' containment reference list. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + * @ordered + */ + int CATEGORY__PRODUCTS = 2; + + /** + * The number of structural features of the '<em>Category</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int CATEGORY_FEATURE_COUNT = 3; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PRODUCT__NAME = 0; + + /** + * The feature id for the '<em><b>Order Details</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + * @ordered + */ + int PRODUCT__ORDER_DETAILS = 1; + + /** + * The feature id for the '<em><b>Vat</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PRODUCT__VAT = 2; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PRODUCT__DESCRIPTION = 3; + + /** + * The feature id for the '<em><b>Price</b></em>' attribute. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @generated + * @ordered + */ + int PRODUCT__PRICE = 4; + + /** + * The number of structural features of the '<em>Product</em>' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + * @ordered + */ + int PRODUCT_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.examples.company.VAT <em>VAT</em>}' enum. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.VAT + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getVAT() + * @generated + */ + int VAT = 10; + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.Addressable <em>Addressable</em>}'. + * <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @return the meta object for class '<em>Addressable</em>'. + * @see org.eclipse.emf.cdo.examples.company.Addressable + * @generated + */ + EClass getAddressable(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.Addressable#getName + * <em>Name</em>}'. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.emf.cdo.examples.company.Addressable#getName() + * @see #getAddressable() + * @generated + */ + EAttribute getAddressable_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.Addressable#getStreet + * <em>Street</em>}'. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @return the meta object for the attribute '<em>Street</em>'. + * @see org.eclipse.emf.cdo.examples.company.Addressable#getStreet() + * @see #getAddressable() + * @generated + */ + EAttribute getAddressable_Street(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.Addressable#getCity + * <em>City</em>}'. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @return the meta object for the attribute '<em>City</em>'. + * @see org.eclipse.emf.cdo.examples.company.Addressable#getCity() + * @see #getAddressable() + * @generated + */ + EAttribute getAddressable_City(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.Supplier <em>Supplier</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Supplier</em>'. + * @see org.eclipse.emf.cdo.examples.company.Supplier + * @generated + */ + EClass getSupplier(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Supplier#getPurchaseOrders <em>Purchase Orders</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Purchase Orders</em>'. + * @see org.eclipse.emf.cdo.examples.company.Supplier#getPurchaseOrders() + * @see #getSupplier() + * @generated + */ + EReference getSupplier_PurchaseOrders(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.Supplier#isPreferred + * <em>Preferred</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Preferred</em>'. + * @see org.eclipse.emf.cdo.examples.company.Supplier#isPreferred() + * @see #getSupplier() + * @generated + */ + EAttribute getSupplier_Preferred(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.PurchaseOrder + * <em>Purchase Order</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Purchase Order</em>'. + * @see org.eclipse.emf.cdo.examples.company.PurchaseOrder + * @generated + */ + EClass getPurchaseOrder(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.PurchaseOrder#getDate + * <em>Date</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Date</em>'. + * @see org.eclipse.emf.cdo.examples.company.PurchaseOrder#getDate() + * @see #getPurchaseOrder() + * @generated + */ + EAttribute getPurchaseOrder_Date(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.examples.company.PurchaseOrder#getSupplier + * <em>Supplier</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Supplier</em>'. + * @see org.eclipse.emf.cdo.examples.company.PurchaseOrder#getSupplier() + * @see #getPurchaseOrder() + * @generated + */ + EReference getPurchaseOrder_Supplier(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.OrderDetail <em>Order Detail</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Order Detail</em>'. + * @see org.eclipse.emf.cdo.examples.company.OrderDetail + * @generated + */ + EClass getOrderDetail(); + + /** + * Returns the meta object for the container reference ' + * {@link org.eclipse.emf.cdo.examples.company.OrderDetail#getOrder <em>Order</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the container reference '<em>Order</em>'. + * @see org.eclipse.emf.cdo.examples.company.OrderDetail#getOrder() + * @see #getOrderDetail() + * @generated + */ + EReference getOrderDetail_Order(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.examples.company.OrderDetail#getProduct + * <em>Product</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Product</em>'. + * @see org.eclipse.emf.cdo.examples.company.OrderDetail#getProduct() + * @see #getOrderDetail() + * @generated + */ + EReference getOrderDetail_Product(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.OrderDetail#getPrice + * <em>Price</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Price</em>'. + * @see org.eclipse.emf.cdo.examples.company.OrderDetail#getPrice() + * @see #getOrderDetail() + * @generated + */ + EAttribute getOrderDetail_Price(); + + /** + * Returns the meta object for enum '{@link org.eclipse.emf.cdo.examples.company.VAT <em>VAT</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for enum '<em>VAT</em>'. + * @see org.eclipse.emf.cdo.examples.company.VAT + * @generated + */ + EEnum getVAT(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.Category <em>Category</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Category</em>'. + * @see org.eclipse.emf.cdo.examples.company.Category + * @generated + */ + EClass getCategory(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.Category#getName + * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.emf.cdo.examples.company.Category#getName() + * @see #getCategory() + * @generated + */ + EAttribute getCategory_Name(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Category#getCategories <em>Categories</em>}'. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Categories</em>'. + * @see org.eclipse.emf.cdo.examples.company.Category#getCategories() + * @see #getCategory() + * @generated + */ + EReference getCategory_Categories(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Category#getProducts <em>Products</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Products</em>'. + * @see org.eclipse.emf.cdo.examples.company.Category#getProducts() + * @see #getCategory() + * @generated + */ + EReference getCategory_Products(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.Product <em>Product</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Product</em>'. + * @see org.eclipse.emf.cdo.examples.company.Product + * @generated + */ + EClass getProduct(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.Product#getName + * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Name</em>'. + * @see org.eclipse.emf.cdo.examples.company.Product#getName() + * @see #getProduct() + * @generated + */ + EAttribute getProduct_Name(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Product#getOrderDetails <em>Order Details</em>}'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Order Details</em>'. + * @see org.eclipse.emf.cdo.examples.company.Product#getOrderDetails() + * @see #getProduct() + * @generated + */ + EReference getProduct_OrderDetails(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.Product#getVat <em>Vat</em>} + * '. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Vat</em>'. + * @see org.eclipse.emf.cdo.examples.company.Product#getVat() + * @see #getProduct() + * @generated + */ + EAttribute getProduct_Vat(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.Product#getDescription + * <em>Description</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Description</em>'. + * @see org.eclipse.emf.cdo.examples.company.Product#getDescription() + * @see #getProduct() + * @generated + */ + EAttribute getProduct_Description(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.Product#getPrice + * <em>Price</em>}'. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @return the meta object for the attribute '<em>Price</em>'. + * @see org.eclipse.emf.cdo.examples.company.Product#getPrice() + * @see #getProduct() + * @generated + */ + EAttribute getProduct_Price(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.Company <em>Company</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Company</em>'. + * @see org.eclipse.emf.cdo.examples.company.Company + * @generated + */ + EClass getCompany(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Company#getCategories <em>Categories</em>}'. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Categories</em>'. + * @see org.eclipse.emf.cdo.examples.company.Company#getCategories() + * @see #getCompany() + * @generated + */ + EReference getCompany_Categories(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Company#getSuppliers <em>Suppliers</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Suppliers</em>'. + * @see org.eclipse.emf.cdo.examples.company.Company#getSuppliers() + * @see #getCompany() + * @generated + */ + EReference getCompany_Suppliers(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Company#getPurchaseOrders <em>Purchase Orders</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Purchase Orders</em>'. + * @see org.eclipse.emf.cdo.examples.company.Company#getPurchaseOrders() + * @see #getCompany() + * @generated + */ + EReference getCompany_PurchaseOrders(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Company#getCustomers <em>Customers</em>}'. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Customers</em>'. + * @see org.eclipse.emf.cdo.examples.company.Company#getCustomers() + * @see #getCompany() + * @generated + */ + EReference getCompany_Customers(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Company#getSalesOrders <em>Sales Orders</em>}'. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Sales Orders</em>'. + * @see org.eclipse.emf.cdo.examples.company.Company#getSalesOrders() + * @see #getCompany() + * @generated + */ + EReference getCompany_SalesOrders(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.Customer <em>Customer</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Customer</em>'. + * @see org.eclipse.emf.cdo.examples.company.Customer + * @generated + */ + EClass getCustomer(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Customer#getSalesOrders <em>Sales Orders</em>}'. <!-- begin-user-doc + * --> <!-- end-user-doc --> + * + * @return the meta object for the reference list '<em>Sales Orders</em>'. + * @see org.eclipse.emf.cdo.examples.company.Customer#getSalesOrders() + * @see #getCustomer() + * @generated + */ + EReference getCustomer_SalesOrders(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.Order <em>Order</em>}'. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Order</em>'. + * @see org.eclipse.emf.cdo.examples.company.Order + * @generated + */ + EClass getOrder(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.examples.company.Order#getOrderDetails <em>Order Details</em>}'. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @return the meta object for the containment reference list '<em>Order Details</em>'. + * @see org.eclipse.emf.cdo.examples.company.Order#getOrderDetails() + * @see #getOrder() + * @generated + */ + EReference getOrder_OrderDetails(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.examples.company.SalesOrder <em>Sales Order</em>}'. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for class '<em>Sales Order</em>'. + * @see org.eclipse.emf.cdo.examples.company.SalesOrder + * @generated + */ + EClass getSalesOrder(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.examples.company.SalesOrder#getId + * <em>Id</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the attribute '<em>Id</em>'. + * @see org.eclipse.emf.cdo.examples.company.SalesOrder#getId() + * @see #getSalesOrder() + * @generated + */ + EAttribute getSalesOrder_Id(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.examples.company.SalesOrder#getCustomer + * <em>Customer</em>}'. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the meta object for the reference '<em>Customer</em>'. + * @see org.eclipse.emf.cdo.examples.company.SalesOrder#getCustomer() + * @see #getSalesOrder() + * @generated + */ + EReference getSalesOrder_Customer(); + + /** + * Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the factory that creates the instances of the model. + * @generated + */ + CompanyFactory getCompanyFactory(); + + /** + * <!-- begin-user-doc --> Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * + * @generated + */ + interface Literals + { + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.AddressableImpl + * <em>Addressable</em>}' class. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @see org.eclipse.emf.cdo.examples.company.impl.AddressableImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getAddressable() + * @generated + */ + EClass ADDRESSABLE = eINSTANCE.getAddressable(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @generated + */ + EAttribute ADDRESSABLE__NAME = eINSTANCE.getAddressable_Name(); + + /** + * The meta object literal for the '<em><b>Street</b></em>' attribute feature. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @generated + */ + EAttribute ADDRESSABLE__STREET = eINSTANCE.getAddressable_Street(); + + /** + * The meta object literal for the '<em><b>City</b></em>' attribute feature. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @generated + */ + EAttribute ADDRESSABLE__CITY = eINSTANCE.getAddressable_City(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.SupplierImpl <em>Supplier</em>} + * ' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.SupplierImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getSupplier() + * @generated + */ + EClass SUPPLIER = eINSTANCE.getSupplier(); + + /** + * The meta object literal for the '<em><b>Purchase Orders</b></em>' reference list feature. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference SUPPLIER__PURCHASE_ORDERS = eINSTANCE.getSupplier_PurchaseOrders(); + + /** + * The meta object literal for the '<em><b>Preferred</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute SUPPLIER__PREFERRED = eINSTANCE.getSupplier_Preferred(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.PurchaseOrderImpl + * <em>Purchase Order</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.PurchaseOrderImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getPurchaseOrder() + * @generated + */ + EClass PURCHASE_ORDER = eINSTANCE.getPurchaseOrder(); + + /** + * The meta object literal for the '<em><b>Date</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute PURCHASE_ORDER__DATE = eINSTANCE.getPurchaseOrder_Date(); + + /** + * The meta object literal for the '<em><b>Supplier</b></em>' reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference PURCHASE_ORDER__SUPPLIER = eINSTANCE.getPurchaseOrder_Supplier(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.OrderDetailImpl + * <em>Order Detail</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.OrderDetailImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getOrderDetail() + * @generated + */ + EClass ORDER_DETAIL = eINSTANCE.getOrderDetail(); + + /** + * The meta object literal for the '<em><b>Order</b></em>' container reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference ORDER_DETAIL__ORDER = eINSTANCE.getOrderDetail_Order(); + + /** + * The meta object literal for the '<em><b>Product</b></em>' reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference ORDER_DETAIL__PRODUCT = eINSTANCE.getOrderDetail_Product(); + + /** + * The meta object literal for the '<em><b>Price</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute ORDER_DETAIL__PRICE = eINSTANCE.getOrderDetail_Price(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.VAT <em>VAT</em>}' enum. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.VAT + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getVAT() + * @generated + */ + EEnum VAT = eINSTANCE.getVAT(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.CategoryImpl <em>Category</em>} + * ' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.CategoryImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getCategory() + * @generated + */ + EClass CATEGORY = eINSTANCE.getCategory(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute CATEGORY__NAME = eINSTANCE.getCategory_Name(); + + /** + * The meta object literal for the '<em><b>Categories</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference CATEGORY__CATEGORIES = eINSTANCE.getCategory_Categories(); + + /** + * The meta object literal for the '<em><b>Products</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference CATEGORY__PRODUCTS = eINSTANCE.getCategory_Products(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.ProductImpl <em>Product</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.ProductImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getProduct() + * @generated + */ + EClass PRODUCT = eINSTANCE.getProduct(); + + /** + * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute PRODUCT__NAME = eINSTANCE.getProduct_Name(); + + /** + * The meta object literal for the '<em><b>Order Details</b></em>' reference list feature. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference PRODUCT__ORDER_DETAILS = eINSTANCE.getProduct_OrderDetails(); + + /** + * The meta object literal for the '<em><b>Vat</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute PRODUCT__VAT = eINSTANCE.getProduct_Vat(); + + /** + * The meta object literal for the '<em><b>Description</b></em>' attribute feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EAttribute PRODUCT__DESCRIPTION = eINSTANCE.getProduct_Description(); + + /** + * The meta object literal for the '<em><b>Price</b></em>' attribute feature. <!-- begin-user-doc --> + * + * @since 4.0<!-- end-user-doc --> + * @generated + */ + EAttribute PRODUCT__PRICE = eINSTANCE.getProduct_Price(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.CompanyImpl <em>Company</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getCompany() + * @generated + */ + EClass COMPANY = eINSTANCE.getCompany(); + + /** + * The meta object literal for the '<em><b>Categories</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference COMPANY__CATEGORIES = eINSTANCE.getCompany_Categories(); + + /** + * The meta object literal for the '<em><b>Suppliers</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference COMPANY__SUPPLIERS = eINSTANCE.getCompany_Suppliers(); + + /** + * The meta object literal for the '<em><b>Purchase Orders</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference COMPANY__PURCHASE_ORDERS = eINSTANCE.getCompany_PurchaseOrders(); + + /** + * The meta object literal for the '<em><b>Customers</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference COMPANY__CUSTOMERS = eINSTANCE.getCompany_Customers(); + + /** + * The meta object literal for the '<em><b>Sales Orders</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference COMPANY__SALES_ORDERS = eINSTANCE.getCompany_SalesOrders(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.CustomerImpl <em>Customer</em>} + * ' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.CustomerImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getCustomer() + * @generated + */ + EClass CUSTOMER = eINSTANCE.getCustomer(); + + /** + * The meta object literal for the '<em><b>Sales Orders</b></em>' reference list feature. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @generated + */ + EReference CUSTOMER__SALES_ORDERS = eINSTANCE.getCustomer_SalesOrders(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.OrderImpl <em>Order</em>}' + * class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.OrderImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getOrder() + * @generated + */ + EClass ORDER = eINSTANCE.getOrder(); + + /** + * The meta object literal for the '<em><b>Order Details</b></em>' containment reference list feature. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + EReference ORDER__ORDER_DETAILS = eINSTANCE.getOrder_OrderDetails(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.examples.company.impl.SalesOrderImpl + * <em>Sales Order</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.impl.SalesOrderImpl + * @see org.eclipse.emf.cdo.examples.company.impl.CompanyPackageImpl#getSalesOrder() + * @generated + */ + EClass SALES_ORDER = eINSTANCE.getSalesOrder(); + + /** + * The meta object literal for the '<em><b>Id</b></em>' attribute feature. <!-- begin-user-doc --> <!-- end-user-doc + * --> + * + * @generated + */ + EAttribute SALES_ORDER__ID = eINSTANCE.getSalesOrder_Id(); + + /** + * The meta object literal for the '<em><b>Customer</b></em>' reference feature. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + EReference SALES_ORDER__CUSTOMER = eINSTANCE.getSalesOrder_Customer(); + + } + +} // CompanyPackage diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Customer.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Customer.java new file mode 100644 index 0000000000..32fc1a006c --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Customer.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Customer</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.Customer#getSalesOrders <em>Sales Orders</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getCustomer() + * @model + * @generated + */ +public interface Customer extends Addressable +{ + /** + * Returns the value of the '<em><b>Sales Orders</b></em>' reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.SalesOrder}. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.SalesOrder#getCustomer <em>Customer</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Sales Orders</em>' reference list isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Sales Orders</em>' 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<SalesOrder> getSalesOrders(); + +} // Customer diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Order.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Order.java new file mode 100644 index 0000000000..33a340aae5 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Order.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Order</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.Order#getOrderDetails <em>Order Details</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getOrder() + * @model annotation="teneo.jpa value='@Entity(name=\"BaseOrder\")'" + * @generated + */ +public interface Order extends EObject +{ + /** + * Returns the value of the '<em><b>Order Details</b></em>' containment 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#getOrder <em>Order</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Order Details</em>' containment reference list isn't clear, there really should be more + * of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Order Details</em>' 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<OrderDetail> getOrderDetails(); + +} // Order diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/OrderDetail.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/OrderDetail.java new file mode 100644 index 0000000000..efd499c6bb --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/OrderDetail.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Order Detail</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.OrderDetail#getOrder <em>Order</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.OrderDetail#getProduct <em>Product</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.OrderDetail#getPrice <em>Price</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getOrderDetail() + * @model + * @generated + */ +public interface OrderDetail extends EObject +{ + /** + * Returns the value of the '<em><b>Order</b></em>' container reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.Order#getOrderDetails <em>Order Details</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Order</em>' container reference isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Order</em>' 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 <em>Order</em>}' container + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Order</em>' container reference. + * @see #getOrder() + * @generated + */ + void setOrder(Order value); + + /** + * Returns the value of the '<em><b>Product</b></em>' reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.Product#getOrderDetails <em>Order Details</em>}'. <!-- begin-user-doc + * --> + * <p> + * If the meaning of the '<em>Product</em>' reference isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Product</em>' 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 <em>Product</em>}' + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Product</em>' reference. + * @see #getProduct() + * @generated + */ + void setProduct(Product value); + + /** + * Returns the value of the '<em><b>Price</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Price</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Price</em>' 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 <em>Price</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Price</em>' attribute. + * @see #getPrice() + * @generated + */ + void setPrice(float value); + +} // OrderDetail diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java new file mode 100644 index 0000000000..b5207437b4 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Product.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Product</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.Product#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Product#getOrderDetails <em>Order Details</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Product#getVat <em>Vat</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Product#getDescription <em>Description</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Product#getPrice <em>Price</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getProduct() + * @model + * @generated + */ +public interface Product extends EObject +{ + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Name</em>' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getProduct_Name() + * @model annotation="teneo.jpa value='@Id'" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Product#getName <em>Name</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Order Details</b></em>' 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 <em>Product</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Order Details</em>' reference list isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Order Details</em>' reference list. + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getProduct_OrderDetails() + * @see org.eclipse.emf.cdo.examples.company.OrderDetail#getProduct + * @model opposite="product" + * @generated + */ + EList<OrderDetail> getOrderDetails(); + + /** + * Returns the value of the '<em><b>Vat</b></em>' attribute. The default value is <code>"vat15"</code>. The literals + * are from the enumeration {@link org.eclipse.emf.cdo.examples.company.VAT}. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Vat</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Vat</em>' attribute. + * @see org.eclipse.emf.cdo.examples.company.VAT + * @see #setVat(VAT) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getProduct_Vat() + * @model default="vat15" annotation="teneo.jpa value='@Basic(optional=false)\n@Column(nullable=false)'" + * @generated + */ + VAT getVat(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Product#getVat <em>Vat</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Vat</em>' attribute. + * @see org.eclipse.emf.cdo.examples.company.VAT + * @see #getVat() + * @generated + */ + void setVat(VAT value); + + /** + * Returns the value of the '<em><b>Description</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Description</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Description</em>' attribute. + * @see #setDescription(String) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getProduct_Description() + * @model transient="true" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Product#getDescription <em>Description</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Description</em>' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the '<em><b>Price</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Price</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * + * @since 4.0 <!-- end-user-doc --> + * @return the value of the '<em>Price</em>' attribute. + * @see #setPrice(float) + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getProduct_Price() + * @model + * @generated + */ + float getPrice(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.examples.company.Product#getPrice <em>Price</em>}' attribute. + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @param value + * the new value of the '<em>Price</em>' attribute. + * @see #getPrice() + * @generated + */ + void setPrice(float value); + +} // Product diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/PurchaseOrder.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/PurchaseOrder.java new file mode 100644 index 0000000000..47b13b42e8 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/PurchaseOrder.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Purchase Order</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.PurchaseOrder#getDate <em>Date</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.PurchaseOrder#getSupplier <em>Supplier</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getPurchaseOrder() + * @model + * @generated + */ +public interface PurchaseOrder extends Order +{ + /** + * Returns the value of the '<em><b>Date</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Date</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Date</em>' 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 <em>Date</em>}' attribute. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Date</em>' attribute. + * @see #getDate() + * @generated + */ + void setDate(Date value); + + /** + * Returns the value of the '<em><b>Supplier</b></em>' reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.Supplier#getPurchaseOrders <em>Purchase Orders</em>}'. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Supplier</em>' reference isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Supplier</em>' 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 <em>Supplier</em>}' + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Supplier</em>' reference. + * @see #getSupplier() + * @generated + */ + void setSupplier(Supplier value); + +} // PurchaseOrder diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/SalesOrder.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/SalesOrder.java new file mode 100644 index 0000000000..e4695f733d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/SalesOrder.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Sales Order</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.SalesOrder#getId <em>Id</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.SalesOrder#getCustomer <em>Customer</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getSalesOrder() + * @model + * @generated + */ +public interface SalesOrder extends Order +{ + /** + * Returns the value of the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Id</em>' attribute isn't clear, there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Id</em>' 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 <em>Id</em>}' attribute. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Id</em>' attribute. + * @see #getId() + * @generated + */ + void setId(int value); + + /** + * Returns the value of the '<em><b>Customer</b></em>' reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.Customer#getSalesOrders <em>Sales Orders</em>}'. <!-- begin-user-doc + * --> + * <p> + * If the meaning of the '<em>Customer</em>' reference isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Customer</em>' 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 <em>Customer</em>}' + * reference. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Customer</em>' reference. + * @see #getCustomer() + * @generated + */ + void setCustomer(Customer value); + +} // SalesOrder diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Supplier.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Supplier.java new file mode 100644 index 0000000000..0d863e602d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/Supplier.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the model object '<em><b>Supplier</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.Supplier#getPurchaseOrders <em>Purchase Orders</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.Supplier#isPreferred <em>Preferred</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getSupplier() + * @model + * @generated + */ +public interface Supplier extends Addressable +{ + /** + * Returns the value of the '<em><b>Purchase Orders</b></em>' reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder}. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder#getSupplier <em>Supplier</em>}'. <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Purchase Orders</em>' reference list isn't clear, there really should be more of a + * description here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Purchase Orders</em>' 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<PurchaseOrder> getPurchaseOrders(); + + /** + * Returns the value of the '<em><b>Preferred</b></em>' attribute. The default value is <code>"true"</code>. <!-- + * begin-user-doc --> + * <p> + * If the meaning of the '<em>Preferred</em>' attribute isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @return the value of the '<em>Preferred</em>' 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 <em>Preferred</em>}' + * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param value + * the new value of the '<em>Preferred</em>' attribute. + * @see #isPreferred() + * @generated + */ + void setPreferred(boolean value); + +} // Supplier diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/VAT.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/VAT.java new file mode 100644 index 0000000000..76819dbd60 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/VAT.java @@ -0,0 +1,247 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> A representation of the literals of the enumeration '<em><b>VAT</b></em>', and utility + * methods for working with them. <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage#getVAT() + * @model + * @generated + */ +public enum VAT implements Enumerator +{ + /** + * The '<em><b>Vat0</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #VAT0_VALUE + * @generated + * @ordered + */ + VAT0(0, "vat0", "vat0"), + + /** + * The '<em><b>Vat7</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #VAT7_VALUE + * @generated + * @ordered + */ + VAT7(7, "vat7", "vat7"), + + /** + * The '<em><b>Vat15</b></em>' literal object. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @see #VAT15_VALUE + * @generated + * @ordered + */ + VAT15(15, "vat15", "vat15"); + + /** + * The '<em><b>Vat0</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Vat0</b></em>' literal object isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @see #VAT0 + * @model name="vat0" + * @generated + * @ordered + */ + public static final int VAT0_VALUE = 0; + + /** + * The '<em><b>Vat7</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Vat7</b></em>' literal object isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @see #VAT7 + * @model name="vat7" + * @generated + * @ordered + */ + public static final int VAT7_VALUE = 7; + + /** + * The '<em><b>Vat15</b></em>' literal value. <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>Vat15</b></em>' literal object isn't clear, there really should be more of a description + * here... + * </p> + * <!-- end-user-doc --> + * + * @see #VAT15 + * @model name="vat15" + * @generated + * @ordered + */ + public static final int VAT15_VALUE = 15; + + /** + * An array of all the '<em><b>VAT</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static final VAT[] VALUES_ARRAY = new VAT[] { VAT0, VAT7, VAT15, }; + + /** + * A public read-only list of all the '<em><b>VAT</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static final List<VAT> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>VAT</b></em>' literal with the specified literal value. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static VAT get(String literal) + { + for (int i = 0; i < VALUES_ARRAY.length; ++i) + { + VAT result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) + { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>VAT</b></em>' literal with the specified name. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static VAT getByName(String name) + { + for (int i = 0; i < VALUES_ARRAY.length; ++i) + { + VAT result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) + { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>VAT</b></em>' literal with the specified integer value. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + public static VAT get(int value) + { + switch (value) + { + case VAT0_VALUE: + return VAT0; + case VAT7_VALUE: + return VAT7; + case VAT15_VALUE: + return VAT15; + } + return null; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private VAT(int value, String name, String literal) + { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public int getValue() + { + return value; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getLiteral() + { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. <!-- begin-user-doc --> <!-- + * end-user-doc --> + * + * @generated + */ + @Override + public String toString() + { + return literal; + } + +} // VAT diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/AddressableImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/AddressableImpl.java new file mode 100644 index 0000000000..a1a072d4b5 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/AddressableImpl.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2004 - 2012 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.Addressable; +import org.eclipse.emf.cdo.examples.company.CompanyPackage; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Addressable</b></em>'. + * + * @since 4.0 <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.AddressableImpl#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.AddressableImpl#getStreet <em>Street</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.AddressableImpl#getCity <em>City</em>}</li> + * </ul> + * </p> + * @generated + */ +public abstract class AddressableImpl extends CDOObjectImpl implements Addressable +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected AddressableImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.ADDRESSABLE; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getName() + { + return (String)eGet(CompanyPackage.Literals.ADDRESSABLE__NAME, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setName(String newName) + { + eSet(CompanyPackage.Literals.ADDRESSABLE__NAME, newName); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getStreet() + { + return (String)eGet(CompanyPackage.Literals.ADDRESSABLE__STREET, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setStreet(String newStreet) + { + eSet(CompanyPackage.Literals.ADDRESSABLE__STREET, newStreet); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getCity() + { + return (String)eGet(CompanyPackage.Literals.ADDRESSABLE__CITY, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setCity(String newCity) + { + eSet(CompanyPackage.Literals.ADDRESSABLE__CITY, newCity); + } + +} // AddressableImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CategoryImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CategoryImpl.java new file mode 100644 index 0000000000..0cf89a4cd5 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CategoryImpl.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2004 - 2012 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.Category; +import org.eclipse.emf.cdo.examples.company.CompanyPackage; +import org.eclipse.emf.cdo.examples.company.Product; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Category</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.CategoryImpl#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.CategoryImpl#getCategories <em>Categories</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.CategoryImpl#getProducts <em>Products</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CategoryImpl extends CDOObjectImpl implements Category +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CategoryImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.CATEGORY; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getName() + { + return (String)eGet(CompanyPackage.Literals.CATEGORY__NAME, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setName(String newName) + { + eSet(CompanyPackage.Literals.CATEGORY__NAME, newName); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<Category> getCategories() + { + return (EList<Category>)eGet(CompanyPackage.Literals.CATEGORY__CATEGORIES, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<Product> getProducts() + { + return (EList<Product>)eGet(CompanyPackage.Literals.CATEGORY__PRODUCTS, true); + } + +} // CategoryImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyFactoryImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyFactoryImpl.java new file mode 100644 index 0000000000..9f12bf805c --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyFactoryImpl.java @@ -0,0 +1,285 @@ +/* + * Copyright (c) 2004 - 2012 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.Category; +import org.eclipse.emf.cdo.examples.company.Company; +import org.eclipse.emf.cdo.examples.company.CompanyFactory; +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.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.cdo.examples.company.VAT; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc --> + * + * @generated + */ +public class CompanyFactoryImpl extends EFactoryImpl implements CompanyFactory +{ + /** + * Creates the default factory implementation. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public static CompanyFactory init() + { + try + { + CompanyFactory theCompanyFactory = (CompanyFactory)EPackage.Registry.INSTANCE + .getEFactory("http://www.eclipse.org/emf/CDO/examples/company/1.0.0"); + if (theCompanyFactory != null) + { + return theCompanyFactory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new CompanyFactoryImpl(); + } + + /** + * Creates an instance of the factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CompanyFactoryImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case CompanyPackage.COMPANY: + return createCompany(); + case CompanyPackage.SUPPLIER: + return createSupplier(); + case CompanyPackage.CUSTOMER: + return createCustomer(); + case CompanyPackage.ORDER: + return createOrder(); + case CompanyPackage.ORDER_DETAIL: + return createOrderDetail(); + case CompanyPackage.PURCHASE_ORDER: + return createPurchaseOrder(); + case CompanyPackage.SALES_ORDER: + return createSalesOrder(); + case CompanyPackage.CATEGORY: + return createCategory(); + case CompanyPackage.PRODUCT: + return createProduct(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) + { + switch (eDataType.getClassifierID()) + { + case CompanyPackage.VAT: + return createVATFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) + { + switch (eDataType.getClassifierID()) + { + case CompanyPackage.VAT: + return convertVATToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Supplier createSupplier() + { + SupplierImpl supplier = new SupplierImpl(); + return supplier; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public PurchaseOrder createPurchaseOrder() + { + PurchaseOrderImpl purchaseOrder = new PurchaseOrderImpl(); + return purchaseOrder; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public OrderDetail createOrderDetail() + { + OrderDetailImpl orderDetail = new OrderDetailImpl(); + return orderDetail; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public VAT createVATFromString(EDataType eDataType, String initialValue) + { + VAT result = VAT.get(initialValue); + if (result == null) + throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + + eDataType.getName() + "'"); + return result; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String convertVATToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Category createCategory() + { + CategoryImpl category = new CategoryImpl(); + return category; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Product createProduct() + { + ProductImpl product = new ProductImpl(); + return product; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Company createCompany() + { + CompanyImpl company = new CompanyImpl(); + return company; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Customer createCustomer() + { + CustomerImpl customer = new CustomerImpl(); + return customer; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Order createOrder() + { + OrderImpl order = new OrderImpl(); + return order; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public SalesOrder createSalesOrder() + { + SalesOrderImpl salesOrder = new SalesOrderImpl(); + return salesOrder; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CompanyPackage getCompanyPackage() + { + return (CompanyPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @deprecated + * @generated + */ + @Deprecated + public static CompanyPackage getPackage() + { + return CompanyPackage.eINSTANCE; + } + +} // CompanyFactoryImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyImpl.java new file mode 100644 index 0000000000..3936780d02 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyImpl.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2004 - 2012 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.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.PurchaseOrder; +import org.eclipse.emf.cdo.examples.company.SalesOrder; +import org.eclipse.emf.cdo.examples.company.Supplier; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Company</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.CompanyImpl#getCategories <em>Categories</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.CompanyImpl#getSuppliers <em>Suppliers</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.CompanyImpl#getCustomers <em>Customers</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.CompanyImpl#getPurchaseOrders <em>Purchase Orders</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.CompanyImpl#getSalesOrders <em>Sales Orders</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CompanyImpl extends AddressableImpl implements Company +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CompanyImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.COMPANY; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<Category> getCategories() + { + return (EList<Category>)eGet(CompanyPackage.Literals.COMPANY__CATEGORIES, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<Supplier> getSuppliers() + { + return (EList<Supplier>)eGet(CompanyPackage.Literals.COMPANY__SUPPLIERS, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<PurchaseOrder> getPurchaseOrders() + { + return (EList<PurchaseOrder>)eGet(CompanyPackage.Literals.COMPANY__PURCHASE_ORDERS, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<Customer> getCustomers() + { + return (EList<Customer>)eGet(CompanyPackage.Literals.COMPANY__CUSTOMERS, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<SalesOrder> getSalesOrders() + { + return (EList<SalesOrder>)eGet(CompanyPackage.Literals.COMPANY__SALES_ORDERS, true); + } + +} // CompanyImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyPackageImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyPackageImpl.java new file mode 100644 index 0000000000..97e3176938 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CompanyPackageImpl.java @@ -0,0 +1,809 @@ +/* + * Copyright (c) 2004 - 2012 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.Addressable; +import org.eclipse.emf.cdo.examples.company.Category; +import org.eclipse.emf.cdo.examples.company.Company; +import org.eclipse.emf.cdo.examples.company.CompanyFactory; +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.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.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc --> + * + * @generated + */ +public class CompanyPackageImpl extends EPackageImpl implements CompanyPackage +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass addressableEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass supplierEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass purchaseOrderEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass orderDetailEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EEnum vatEEnum = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass categoryEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass productEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass companyEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass customerEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass orderEClass = null; + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private EClass salesOrderEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry + * EPackage.Registry} by the package package URI value. + * <p> + * 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. <!-- + * begin-user-doc --> <!-- end-user-doc --> + * + * @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); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * <p> + * 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. <!-- begin-user-doc --> + * <!-- end-user-doc --> + * + * @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; + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated + */ + public EClass getAddressable() + { + return addressableEClass; + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated + */ + public EAttribute getAddressable_Name() + { + return (EAttribute)addressableEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated + */ + public EAttribute getAddressable_Street() + { + return (EAttribute)addressableEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated + */ + public EAttribute getAddressable_City() + { + return (EAttribute)addressableEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getSupplier() + { + return supplierEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getSupplier_PurchaseOrders() + { + return (EReference)supplierEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getSupplier_Preferred() + { + return (EAttribute)supplierEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getPurchaseOrder() + { + return purchaseOrderEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getPurchaseOrder_Date() + { + return (EAttribute)purchaseOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getPurchaseOrder_Supplier() + { + return (EReference)purchaseOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getOrderDetail() + { + return orderDetailEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getOrderDetail_Order() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getOrderDetail_Product() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getOrderDetail_Price() + { + return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EEnum getVAT() + { + return vatEEnum; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getCategory() + { + return categoryEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getCategory_Name() + { + return (EAttribute)categoryEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getCategory_Categories() + { + return (EReference)categoryEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getCategory_Products() + { + return (EReference)categoryEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getProduct() + { + return productEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getProduct_Name() + { + return (EAttribute)productEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getProduct_OrderDetails() + { + return (EReference)productEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getProduct_Vat() + { + return (EAttribute)productEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getProduct_Description() + { + return (EAttribute)productEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated + */ + public EAttribute getProduct_Price() + { + return (EAttribute)productEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getCompany() + { + return companyEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getCompany_Categories() + { + return (EReference)companyEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getCompany_Suppliers() + { + return (EReference)companyEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getCompany_PurchaseOrders() + { + return (EReference)companyEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getCompany_Customers() + { + return (EReference)companyEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getCompany_SalesOrders() + { + return (EReference)companyEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getCustomer() + { + return customerEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getCustomer_SalesOrders() + { + return (EReference)customerEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getOrder() + { + return orderEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getOrder_OrderDetails() + { + return (EReference)orderEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EClass getSalesOrder() + { + return salesOrderEClass; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EAttribute getSalesOrder_Id() + { + return (EAttribute)salesOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public EReference getSalesOrder_Customer() + { + return (EReference)salesOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CompanyFactory getCompanyFactory() + { + return (CompanyFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @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. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + addressableEClass = createEClass(ADDRESSABLE); + createEAttribute(addressableEClass, ADDRESSABLE__NAME); + createEAttribute(addressableEClass, ADDRESSABLE__STREET); + createEAttribute(addressableEClass, ADDRESSABLE__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(PRODUCT); + createEAttribute(productEClass, PRODUCT__NAME); + createEReference(productEClass, PRODUCT__ORDER_DETAILS); + createEAttribute(productEClass, PRODUCT__VAT); + createEAttribute(productEClass, PRODUCT__DESCRIPTION); + createEAttribute(productEClass, PRODUCT__PRICE); + + // Create enums + vatEEnum = createEEnum(VAT); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @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. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @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(this.getAddressable()); + supplierEClass.getESuperTypes().add(this.getAddressable()); + customerEClass.getESuperTypes().add(this.getAddressable()); + purchaseOrderEClass.getESuperTypes().add(this.getOrder()); + salesOrderEClass.getESuperTypes().add(this.getOrder()); + + // Initialize classes and features; add operations and parameters + initEClass(addressableEClass, Addressable.class, "Addressable", IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAddressable_Name(), ecorePackage.getEString(), "name", null, 0, 1, Addressable.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAddressable_Street(), ecorePackage.getEString(), "street", null, 0, 1, Addressable.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAddressable_City(), ecorePackage.getEString(), "city", null, 0, 1, Addressable.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(), this.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(), this.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(), this.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(), this.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(), this.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(), this.getPurchaseOrder(), this.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(), this.getSalesOrder(), this.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(), this.getOrderDetail(), this.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(), this.getOrder(), this.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(), this.getProduct(), this.getProduct_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(), this.getSupplier(), this.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(), this.getCustomer(), this.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(), this.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(), this.getProduct(), 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(getProduct_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(getProduct_OrderDetails(), this.getOrderDetail(), this.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(getProduct_Vat(), this.getVAT(), "vat", "vat15", 0, 1, Product.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProduct_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); + initEAttribute(getProduct_Price(), ecorePackage.getEFloat(), "price", null, 0, 1, Product.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 <b>teneo.jpa</b>. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected void createTeneoAnnotations() + { + String source = "teneo.jpa"; + addAnnotation( + this, + source, + new String[] { + "value", + "@hbGenericGenerators({@GenericGenerator(name=\"system-uuid\", strategy = \"org.eclipse.emf.cdo.examples.hibernate.server.CDOExampleUUIDHexGenerator\")})" }); + addAnnotation(orderEClass, source, new String[] { "value", "@Entity(name=\"BaseOrder\")" }); + addAnnotation(getCategory_Name(), source, + new String[] { "value", "@Id @GeneratedValue(generator=\"system-uuid\")" }); + addAnnotation(getProduct_Name(), source, new String[] { "value", "@Id" }); + addAnnotation(getProduct_Vat(), source, new String[] { "value", "@Basic(optional=false)\n@Column(nullable=false)" }); + } + +} // CompanyPackageImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CustomerImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CustomerImpl.java new file mode 100644 index 0000000000..deb324b294 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/CustomerImpl.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2004 - 2012 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; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Customer</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.CustomerImpl#getSalesOrders <em>Sales Orders</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class CustomerImpl extends AddressableImpl implements Customer +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CustomerImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.CUSTOMER; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<SalesOrder> getSalesOrders() + { + return (EList<SalesOrder>)eGet(CompanyPackage.Literals.CUSTOMER__SALES_ORDERS, true); + } + +} // CustomerImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/OrderDetailImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/OrderDetailImpl.java new file mode 100644 index 0000000000..5900b1e80f --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/OrderDetailImpl.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2004 - 2012 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.Order; +import org.eclipse.emf.cdo.examples.company.OrderDetail; +import org.eclipse.emf.cdo.examples.company.Product; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Order Detail</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.OrderDetailImpl#getOrder <em>Order</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.OrderDetailImpl#getProduct <em>Product</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.OrderDetailImpl#getPrice <em>Price</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected OrderDetailImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.ORDER_DETAIL; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Order getOrder() + { + return (Order)eGet(CompanyPackage.Literals.ORDER_DETAIL__ORDER, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setOrder(Order newOrder) + { + eSet(CompanyPackage.Literals.ORDER_DETAIL__ORDER, newOrder); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Product getProduct() + { + return (Product)eGet(CompanyPackage.Literals.ORDER_DETAIL__PRODUCT, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setProduct(Product newProduct) + { + eSet(CompanyPackage.Literals.ORDER_DETAIL__PRODUCT, newProduct); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public float getPrice() + { + return (Float)eGet(CompanyPackage.Literals.ORDER_DETAIL__PRICE, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setPrice(float newPrice) + { + eSet(CompanyPackage.Literals.ORDER_DETAIL__PRICE, newPrice); + } + +} // OrderDetailImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/OrderImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/OrderImpl.java new file mode 100644 index 0000000000..e172fa77a7 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/OrderImpl.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2004 - 2012 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.Order; +import org.eclipse.emf.cdo.examples.company.OrderDetail; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Order</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.OrderImpl#getOrderDetails <em>Order Details</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class OrderImpl extends CDOObjectImpl implements Order +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected OrderImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.ORDER; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<OrderDetail> getOrderDetails() + { + return (EList<OrderDetail>)eGet(CompanyPackage.Literals.ORDER__ORDER_DETAILS, true); + } + +} // OrderImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/ProductImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/ProductImpl.java new file mode 100644 index 0000000000..50f4f68907 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/ProductImpl.java @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2004 - 2012 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.OrderDetail; +import org.eclipse.emf.cdo.examples.company.Product; +import org.eclipse.emf.cdo.examples.company.VAT; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Product</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.ProductImpl#getName <em>Name</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.ProductImpl#getOrderDetails <em>Order Details</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.ProductImpl#getVat <em>Vat</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.ProductImpl#getDescription <em>Description</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.ProductImpl#getPrice <em>Price</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ProductImpl extends CDOObjectImpl implements Product +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected ProductImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.PRODUCT; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getName() + { + return (String)eGet(CompanyPackage.Literals.PRODUCT__NAME, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setName(String newName) + { + eSet(CompanyPackage.Literals.PRODUCT__NAME, newName); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<OrderDetail> getOrderDetails() + { + return (EList<OrderDetail>)eGet(CompanyPackage.Literals.PRODUCT__ORDER_DETAILS, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public VAT getVat() + { + return (VAT)eGet(CompanyPackage.Literals.PRODUCT__VAT, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setVat(VAT newVat) + { + eSet(CompanyPackage.Literals.PRODUCT__VAT, newVat); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public String getDescription() + { + return (String)eGet(CompanyPackage.Literals.PRODUCT__DESCRIPTION, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setDescription(String newDescription) + { + eSet(CompanyPackage.Literals.PRODUCT__DESCRIPTION, newDescription); + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated + */ + public float getPrice() + { + return (Float)eGet(CompanyPackage.Literals.PRODUCT__PRICE, true); + } + + /** + * <!-- begin-user-doc --> + * + * @since 4.0 <!-- end-user-doc --> + * @generated + */ + public void setPrice(float newPrice) + { + eSet(CompanyPackage.Literals.PRODUCT__PRICE, newPrice); + } + +} // ProductImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/PurchaseOrderImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/PurchaseOrderImpl.java new file mode 100644 index 0000000000..bb055dd03d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/PurchaseOrderImpl.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2004 - 2012 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.PurchaseOrder; +import org.eclipse.emf.cdo.examples.company.Supplier; + +import org.eclipse.emf.ecore.EClass; + +import java.util.Date; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Purchase Order</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.PurchaseOrderImpl#getDate <em>Date</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.PurchaseOrderImpl#getSupplier <em>Supplier</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected PurchaseOrderImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.PURCHASE_ORDER; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Date getDate() + { + return (Date)eGet(CompanyPackage.Literals.PURCHASE_ORDER__DATE, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setDate(Date newDate) + { + eSet(CompanyPackage.Literals.PURCHASE_ORDER__DATE, newDate); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Supplier getSupplier() + { + return (Supplier)eGet(CompanyPackage.Literals.PURCHASE_ORDER__SUPPLIER, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setSupplier(Supplier newSupplier) + { + eSet(CompanyPackage.Literals.PURCHASE_ORDER__SUPPLIER, newSupplier); + } + +} // PurchaseOrderImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/SalesOrderImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/SalesOrderImpl.java new file mode 100644 index 0000000000..22e3347aca --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/SalesOrderImpl.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2004 - 2012 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.ecore.EClass; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Sales Order</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.SalesOrderImpl#getId <em>Id</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.SalesOrderImpl#getCustomer <em>Customer</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class SalesOrderImpl extends OrderImpl implements SalesOrder +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected SalesOrderImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.SALES_ORDER; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public int getId() + { + return (Integer)eGet(CompanyPackage.Literals.SALES_ORDER__ID, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setId(int newId) + { + eSet(CompanyPackage.Literals.SALES_ORDER__ID, newId); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public Customer getCustomer() + { + return (Customer)eGet(CompanyPackage.Literals.SALES_ORDER__CUSTOMER, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setCustomer(Customer newCustomer) + { + eSet(CompanyPackage.Literals.SALES_ORDER__CUSTOMER, newCustomer); + } + +} // SalesOrderImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/SupplierImpl.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/SupplierImpl.java new file mode 100644 index 0000000000..3e1de10937 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/impl/SupplierImpl.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2004 - 2012 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.PurchaseOrder; +import org.eclipse.emf.cdo.examples.company.Supplier; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> An implementation of the model object '<em><b>Supplier</b></em>'. <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.SupplierImpl#getPurchaseOrders <em>Purchase Orders</em>}</li> + * <li>{@link org.eclipse.emf.cdo.examples.company.impl.SupplierImpl#isPreferred <em>Preferred</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class SupplierImpl extends AddressableImpl implements Supplier +{ + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected SupplierImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return CompanyPackage.Literals.SUPPLIER; + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList<PurchaseOrder> getPurchaseOrders() + { + return (EList<PurchaseOrder>)eGet(CompanyPackage.Literals.SUPPLIER__PURCHASE_ORDERS, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public boolean isPreferred() + { + return (Boolean)eGet(CompanyPackage.Literals.SUPPLIER__PREFERRED, true); + } + + /** + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public void setPreferred(boolean newPreferred) + { + eSet(CompanyPackage.Literals.SUPPLIER__PREFERRED, newPreferred); + } + +} // SupplierImpl diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanyAdapterFactory.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanyAdapterFactory.java new file mode 100644 index 0000000000..7bdbb10b1b --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanyAdapterFactory.java @@ -0,0 +1,322 @@ +/* + * Copyright (c) 2004 - 2012 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.Addressable; +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.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.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> The <b>Adapter Factory</b> for the model. It provides an adapter <code>createXXX</code> + * method for each class of the model. <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage + * @generated + */ +public class CompanyAdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static CompanyPackage modelPackage; + + /** + * Creates an instance of the adapter factory. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CompanyAdapterFactory() + { + if (modelPackage == null) + { + modelPackage = CompanyPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. <!-- begin-user-doc --> This implementation + * returns <code>true</code> if the object is either the model's package or is an instance object of the model. <!-- + * end-user-doc --> + * + * @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 <code>createXXX</code> methods. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected CompanySwitch<Adapter> modelSwitch = new CompanySwitch<Adapter>() + { + @Override + public Adapter caseAddressable(Addressable object) + { + return createAddressableAdapter(); + } + + @Override + public Adapter caseCompany(Company object) + { + return createCompanyAdapter(); + } + + @Override + public Adapter caseSupplier(Supplier object) + { + return createSupplierAdapter(); + } + + @Override + public Adapter caseCustomer(Customer object) + { + return createCustomerAdapter(); + } + + @Override + public Adapter caseOrder(Order object) + { + return createOrderAdapter(); + } + + @Override + public Adapter caseOrderDetail(OrderDetail object) + { + return createOrderDetailAdapter(); + } + + @Override + public Adapter casePurchaseOrder(PurchaseOrder object) + { + return createPurchaseOrderAdapter(); + } + + @Override + public Adapter caseSalesOrder(SalesOrder object) + { + return createSalesOrderAdapter(); + } + + @Override + public Adapter caseCategory(Category object) + { + return createCategoryAdapter(); + } + + @Override + public Adapter caseProduct(Product object) + { + return createProductAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) + { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the <code>target</code>. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @param target + * the object to adapt. + * @return the adapter for the <code>target</code>. + * @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.Addressable + * <em>Addressable</em>}'. <!-- begin-user-doc --> 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. + * + * @since 4.0 <!-- end-user-doc --> + * @return the new adapter. + * @see org.eclipse.emf.cdo.examples.company.Addressable + * @generated + */ + public Adapter createAddressableAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.examples.company.Supplier + * <em>Supplier</em>}'. <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * + * @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 + * <em>Purchase Order</em>}'. <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * + * @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 + * <em>Order Detail</em>}'. <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * + * @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.Category + * <em>Category</em>}'. <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * + * @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 <em>Product</em>} + * '. <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * + * @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 <em>Company</em>} + * '. <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * + * @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 + * <em>Customer</em>}'. <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * + * @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 <em>Order</em>}'. + * <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * + * @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 + * <em>Sales Order</em>}'. <!-- begin-user-doc --> 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. <!-- end-user-doc --> + * + * @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. <!-- begin-user-doc --> This default implementation returns null. <!-- + * end-user-doc --> + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() + { + return null; + } + +} // CompanyAdapterFactory diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanySwitch.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanySwitch.java new file mode 100644 index 0000000000..81bce6bb7d --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/util/CompanySwitch.java @@ -0,0 +1,366 @@ +/* + * Copyright (c) 2004 - 2012 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.Addressable; +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.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; + +/** + * <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call + * {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> 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. <!-- end-user-doc --> + * + * @see org.eclipse.emf.cdo.examples.company.CompanyPackage + * @generated + */ +public class CompanySwitch<T> +{ + /** + * The cached model package <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + protected static CompanyPackage modelPackage; + + /** + * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @generated + */ + public CompanySwitch() + { + if (modelPackage == null) + { + modelPackage = CompanyPackage.eINSTANCE; + } + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + public T doSwitch(EObject theEObject) + { + return doSwitch(theEObject.eClass(), theEObject); + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + protected T doSwitch(EClass theEClass, EObject theEObject) + { + if (theEClass.eContainer() == modelPackage) + { + return doSwitch(theEClass.getClassifierID(), theEObject); + } + else + { + List<EClass> eSuperTypes = theEClass.getESuperTypes(); + return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); + } + } + + /** + * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * + * @return the first non-null result returned by a <code>caseXXX</code> call. + * @generated + */ + protected T doSwitch(int classifierID, EObject theEObject) + { + switch (classifierID) + { + case CompanyPackage.ADDRESSABLE: + { + Addressable addressable = (Addressable)theEObject; + T result = caseAddressable(addressable); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CompanyPackage.COMPANY: + { + Company company = (Company)theEObject; + T result = caseCompany(company); + if (result == null) + result = caseAddressable(company); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CompanyPackage.SUPPLIER: + { + Supplier supplier = (Supplier)theEObject; + T result = caseSupplier(supplier); + if (result == null) + result = caseAddressable(supplier); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case CompanyPackage.CUSTOMER: + { + Customer customer = (Customer)theEObject; + T result = caseCustomer(customer); + if (result == null) + result = caseAddressable(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.PRODUCT: + { + Product product = (Product)theEObject; + T result = caseProduct(product); + if (result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Addressable</em>'. <!-- begin-user-doc --> + * This implementation returns null; returning a non-null result will terminate the switch. + * + * @since 4.0 <!-- end-user-doc --> + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Addressable</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAddressable(Addressable object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Supplier</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Supplier</em>'. + * @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 '<em>Purchase Order</em>'. <!-- begin-user-doc --> + * This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Purchase Order</em>'. + * @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 '<em>Order Detail</em>'. <!-- begin-user-doc --> + * This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Order Detail</em>'. + * @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 '<em>Category</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Category</em>'. + * @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 '<em>Product</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Product</em>'. + * @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 '<em>Company</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Company</em>'. + * @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 '<em>Customer</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Customer</em>'. + * @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 '<em>Order</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Order</em>'. + * @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 '<em>Sales Order</em>'. <!-- begin-user-doc --> + * This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Sales Order</em>'. + * @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 '<em>EObject</em>'. <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch, but this is the last case + * anyway. <!-- end-user-doc --> + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @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.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CategoryValidator.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CategoryValidator.java new file mode 100644 index 0000000000..790cfcb3bf --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CategoryValidator.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2004 - 2012 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<Category> value); + + boolean validateProducts(EList<Product> value); +} diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CompanyValidator.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CompanyValidator.java new file mode 100644 index 0000000000..391c311362 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CompanyValidator.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2004 - 2012 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.Customer; +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.common.util.EList; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.Company}. 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 CompanyValidator +{ + boolean validate(); + + boolean validateCategories(EList<Category> value); + + boolean validateSuppliers(EList<Supplier> value); + + boolean validatePurchaseOrders(EList<PurchaseOrder> value); + + boolean validateCustomers(EList<Customer> value); + + boolean validateSalesOrders(EList<SalesOrder> value); +} diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CustomerValidator.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CustomerValidator.java new file mode 100644 index 0000000000..26f64f7fc6 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/CustomerValidator.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2004 - 2012 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.SalesOrder; + +import org.eclipse.emf.common.util.EList; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.Customer}. 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 CustomerValidator +{ + boolean validate(); + + boolean validateName(String value); + + boolean validateSalesOrders(EList<SalesOrder> value); +} diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/OrderDetailValidator.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/OrderDetailValidator.java new file mode 100644 index 0000000000..38c75b3ec5 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/OrderDetailValidator.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2004 - 2012 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.Order; +import org.eclipse.emf.cdo.examples.company.Product; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.OrderDetail}. 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 OrderDetailValidator +{ + boolean validate(); + + boolean validateOrder(Order value); + + boolean validateProduct(Product value); + + boolean validatePrice(float value); +} diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/OrderValidator.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/OrderValidator.java new file mode 100644 index 0000000000..a1f8166d55 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/OrderValidator.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2004 - 2012 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.OrderDetail; + +import org.eclipse.emf.common.util.EList; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.Order}. 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 OrderValidator +{ + boolean validate(); + + boolean validateOrderDetails(EList<OrderDetail> value); +} diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/ProductValidator.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/ProductValidator.java new file mode 100644 index 0000000000..676d710ca5 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/ProductValidator.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2004 - 2012 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.OrderDetail; +import org.eclipse.emf.cdo.examples.company.VAT; + +import org.eclipse.emf.common.util.EList; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.Product}. 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. + */ +public interface ProductValidator +{ + boolean validate(); + + boolean validateName(String value); + + boolean validateOrderDetails(EList<OrderDetail> value); + + boolean validateVat(VAT value); + + boolean validateDescription(String value); +} diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/PurchaseOrderValidator.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/PurchaseOrderValidator.java new file mode 100644 index 0000000000..ab9f29de22 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/PurchaseOrderValidator.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2004 - 2012 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.Supplier; + +import java.util.Date; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.PurchaseOrder}. 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 PurchaseOrderValidator +{ + boolean validate(); + + boolean validateDate(Date value); + + boolean validateSupplier(Supplier value); +} diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/SalesOrderValidator.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/SalesOrderValidator.java new file mode 100644 index 0000000000..d7ba32ac64 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/SalesOrderValidator.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2004 - 2012 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.Customer; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.SalesOrder}. 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 SalesOrderValidator +{ + boolean validate(); + + boolean validateId(int value); + + boolean validateCustomer(Customer value); +} diff --git a/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/SupplierValidator.java b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/SupplierValidator.java new file mode 100644 index 0000000000..d01ea16674 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.installer/examples/org.eclipse.emf.cdo.examples.company/src/org/eclipse/emf/cdo/examples/company/validation/SupplierValidator.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2004 - 2012 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.PurchaseOrder; + +import org.eclipse.emf.common.util.EList; + +/** + * A sample validator interface for {@link org.eclipse.emf.cdo.examples.company.Supplier}. 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 SupplierValidator +{ + boolean validate(); + + boolean validatePurchaseOrders(EList<PurchaseOrder> value); + + boolean validatePreferred(boolean value); + + boolean validateName(String value); +} |