From 5f360965ae87478e0681899bf310a210cafc2c44 Mon Sep 17 00:00:00 2001 From: Eike Stepper Date: Wed, 18 Jul 2012 18:24:53 +0200 Subject: [376610] ClassCastException on removeAll on Enum attribute https://bugs.eclipse.org/bugs/show_bug.cgi?id=376610 --- .../META-INF/MANIFEST.MF | 14 +- .../model/model1.ecore | 193 +- .../emf/cdo/tests/legacy/model1/Model1Factory.java | 268 ++- .../emf/cdo/tests/legacy/model1/Model1Package.java | 2339 ++++++++++---------- .../cdo/tests/legacy/model1/impl/AddressImpl.java | 584 +++-- .../cdo/tests/legacy/model1/impl/CategoryImpl.java | 561 +++-- .../cdo/tests/legacy/model1/impl/CompanyImpl.java | 651 +++--- .../cdo/tests/legacy/model1/impl/CustomerImpl.java | 465 ++-- .../legacy/model1/impl/Model1FactoryImpl.java | 622 +++--- .../legacy/model1/impl/Model1PackageImpl.java | 1768 +++++++-------- .../tests/legacy/model1/impl/OrderAddressImpl.java | 1145 +++++----- .../tests/legacy/model1/impl/OrderDetailImpl.java | 798 ++++--- .../cdo/tests/legacy/model1/impl/OrderImpl.java | 378 ++-- .../cdo/tests/legacy/model1/impl/Product1Impl.java | 780 +++---- .../legacy/model1/impl/ProductToOrderImpl.java | 663 +++--- .../legacy/model1/impl/PurchaseOrderImpl.java | 642 +++--- .../tests/legacy/model1/impl/SalesOrderImpl.java | 632 +++--- .../cdo/tests/legacy/model1/impl/SupplierImpl.java | 521 +++-- .../org/eclipse/emf/cdo/tests/model1/Address.java | 228 +- .../org/eclipse/emf/cdo/tests/model1/Category.java | 190 +- .../org/eclipse/emf/cdo/tests/model1/Company.java | 236 +- .../org/eclipse/emf/cdo/tests/model1/Customer.java | 143 +- .../emf/cdo/tests/model1/Model1Factory.java | 244 +- .../emf/cdo/tests/model1/Model1Package.java | 2326 ++++++++++--------- .../org/eclipse/emf/cdo/tests/model1/Order.java | 107 +- .../eclipse/emf/cdo/tests/model1/OrderAddress.java | 117 +- .../eclipse/emf/cdo/tests/model1/OrderDetail.java | 234 +- .../org/eclipse/emf/cdo/tests/model1/Product1.java | 294 +-- .../emf/cdo/tests/model1/PurchaseOrder.java | 178 +- .../eclipse/emf/cdo/tests/model1/SalesOrder.java | 174 +- .../org/eclipse/emf/cdo/tests/model1/Supplier.java | 160 +- .../src/org/eclipse/emf/cdo/tests/model1/VAT.java | 494 ++--- .../emf/cdo/tests/model1/impl/AddressImpl.java | 252 +-- .../emf/cdo/tests/model1/impl/CategoryImpl.java | 222 +- .../emf/cdo/tests/model1/impl/CompanyImpl.java | 234 +- .../emf/cdo/tests/model1/impl/CustomerImpl.java | 161 +- .../cdo/tests/model1/impl/Model1FactoryImpl.java | 616 +++--- .../cdo/tests/model1/impl/Model1PackageImpl.java | 1749 +++++++-------- .../cdo/tests/model1/impl/OrderAddressImpl.java | 436 ++-- .../emf/cdo/tests/model1/impl/OrderDetailImpl.java | 256 +-- .../emf/cdo/tests/model1/impl/OrderImpl.java | 159 +- .../emf/cdo/tests/model1/impl/Product1Impl.java | 293 ++- .../cdo/tests/model1/impl/ProductToOrderImpl.java | 386 ++-- .../cdo/tests/model1/impl/PurchaseOrderImpl.java | 193 +- .../emf/cdo/tests/model1/impl/SalesOrderImpl.java | 189 +- .../emf/cdo/tests/model1/impl/SupplierImpl.java | 174 +- .../tests/model1/util/Model1AdapterFactory.java | 723 +++--- .../emf/cdo/tests/model1/util/Model1Switch.java | 816 ++++--- .../cdo/tests/bugzilla/Bugzilla_376610_Test.java | 69 + .../emf/internal/cdo/object/CDOLegacyAdapter.java | 30 +- 50 files changed, 12249 insertions(+), 12858 deletions(-) create mode 100644 plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_376610_Test.java diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.model1/META-INF/MANIFEST.MF index 251679210a..0a1c2efd33 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.tests.model1/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.emf.cdo.tests.model1; singleton:=true -Bundle-Version: 3.0.200.qualifier +Bundle-Version: 3.0.300.qualifier Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -9,9 +9,9 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ClassPath: . Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)", org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport -Export-Package: org.eclipse.emf.cdo.tests.legacy.model1;version="3.0.200", - org.eclipse.emf.cdo.tests.legacy.model1.impl;version="3.0.200", - org.eclipse.emf.cdo.tests.model1;version="3.0.200", - org.eclipse.emf.cdo.tests.model1.impl;version="3.0.200", - org.eclipse.emf.cdo.tests.model1.util;version="3.0.200", - org.eclipse.emf.cdo.tests.model1.validation;version="3.0.200" +Export-Package: org.eclipse.emf.cdo.tests.legacy.model1;version="3.0.300", + org.eclipse.emf.cdo.tests.legacy.model1.impl;version="3.0.300", + org.eclipse.emf.cdo.tests.model1;version="3.0.300", + org.eclipse.emf.cdo.tests.model1.impl;version="3.0.300", + org.eclipse.emf.cdo.tests.model1.util;version="3.0.300", + org.eclipse.emf.cdo.tests.model1.validation;version="3.0.300" diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore index 7f95aaeca0..fc6c469837 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore +++ b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore @@ -1,96 +1,97 @@ - - - -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - -
- - - - - - - - + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + + + + diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/Model1Factory.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/Model1Factory.java index 918e91efde..a4901c00ea 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/Model1Factory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/Model1Factory.java @@ -1,135 +1,133 @@ -/* - * 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.tests.legacy.model1; - -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Company; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.OrderAddress; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; - -/** - * The Factory for the model. It provides a create method for each non-abstract class of - * the model. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.Model1Package - * @generated - */ -public interface Model1Factory extends org.eclipse.emf.cdo.tests.model1.Model1Factory -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The singleton instance of the factory. - * - * @generated - */ - Model1Factory eINSTANCE = org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1FactoryImpl.init(); - - /** - * Returns a new object of class 'Address'. - * - * @return a new object of class 'Address'. - * @generated - */ - Address createAddress(); - - /** - * Returns a new object of class 'Company'. - * - * @return a new object of class 'Company'. - * @generated - */ - Company createCompany(); - - /** - * Returns a new object of class 'Supplier'. - * - * @return a new object of class 'Supplier'. - * @generated - */ - Supplier createSupplier(); - - /** - * Returns a new object of class 'Customer'. - * - * @return a new object of class 'Customer'. - * @generated - */ - Customer createCustomer(); - - /** - * Returns a new object of class 'Order Detail'. - * - * @return a new object of class 'Order Detail'. - * @generated - */ - OrderDetail createOrderDetail(); - - /** - * Returns a new object of class 'Purchase Order'. - * - * @return a new object of class 'Purchase Order'. - * @generated - */ - PurchaseOrder createPurchaseOrder(); - - /** - * Returns a new object of class 'Sales Order'. - * - * @return a new object of class 'Sales Order'. - * @generated - */ - SalesOrder createSalesOrder(); - - /** - * Returns a new object of class 'Category'. - * - * @return a new object of class 'Category'. - * @generated - */ - Category createCategory(); - - /** - * Returns a new object of class 'Product1'. - * - * @return a new object of class 'Product1'. - * @generated - */ - Product1 createProduct1(); - - /** - * Returns a new object of class 'Order Address'. - * - * @return a new object of class 'Order Address'. - * @generated - */ - OrderAddress createOrderAddress(); - - /** - * Returns the package supported by this factory. - * - * @return the package supported by this factory. - * @generated - */ - Model1Package getModel1Package(); - -} // Model1Factory +/* + * 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.tests.legacy.model1; + +import org.eclipse.emf.cdo.tests.model1.Address; +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Company; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.OrderAddress; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; + +/** + * The Factory for the model. It provides a create method for each non-abstract class of + * the model. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Model1Package + * @generated + */ +public interface Model1Factory extends org.eclipse.emf.cdo.tests.model1.Model1Factory +{ + /** + * + * @generated + */ + String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The singleton instance of the factory. + * + * @generated + */ + Model1Factory eINSTANCE = org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1FactoryImpl.init(); + + /** + * Returns a new object of class 'Address'. + * + * @return a new object of class 'Address'. + * @generated + */ + Address createAddress(); + + /** + * Returns a new object of class 'Company'. + * + * @return a new object of class 'Company'. + * @generated + */ + Company createCompany(); + + /** + * Returns a new object of class 'Supplier'. + * + * @return a new object of class 'Supplier'. + * @generated + */ + Supplier createSupplier(); + + /** + * Returns a new object of class 'Customer'. + * + * @return a new object of class 'Customer'. + * @generated + */ + Customer createCustomer(); + + /** + * Returns a new object of class 'Order Detail'. + * + * @return a new object of class 'Order Detail'. + * @generated + */ + OrderDetail createOrderDetail(); + + /** + * Returns a new object of class 'Purchase Order'. + * + * @return a new object of class 'Purchase Order'. + * @generated + */ + PurchaseOrder createPurchaseOrder(); + + /** + * Returns a new object of class 'Sales Order'. + * + * @return a new object of class 'Sales Order'. + * @generated + */ + SalesOrder createSalesOrder(); + + /** + * Returns a new object of class 'Category'. + * + * @return a new object of class 'Category'. + * @generated + */ + Category createCategory(); + + /** + * Returns a new object of class 'Product1'. + * + * @return a new object of class 'Product1'. + * @generated + */ + Product1 createProduct1(); + + /** + * Returns a new object of class 'Order Address'. + * + * @return a new object of class 'Order Address'. + * @generated + */ + OrderAddress createOrderAddress(); + + /** + * Returns the package supported by this factory. + * + * @return the package supported by this factory. + * @generated + */ + Model1Package getModel1Package(); + +} // Model1Factory diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/Model1Package.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/Model1Package.java index 6a52688b5f..0a2dc323f9 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/Model1Package.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/Model1Package.java @@ -1,1183 +1,1156 @@ -/* - * 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.tests.legacy.model1; - -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EReference; - -/** - * The Package for the model. It contains accessors for the meta objects to represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.Model1Factory - * @model kind="package" annotation="teneo.jpa value='@hbGenericGenerators( {@GenericGenerator(name=\"system-uuid\", - * strategy = - * \"org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOUUIDHexGenerator\")})'" - * @generated - */ -public interface Model1Package extends org.eclipse.emf.cdo.tests.model1.Model1Package -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The package name. - * - * @generated - */ - String eNAME = "model1"; - - /** - * The package namespace URI. - * - * @generated NOT - */ - String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/legacy/model1/1.0.0"; - - /** - * The package namespace name. - * - * @generated - */ - String eNS_PREFIX = "model1"; - - /** - * The singleton instance of the package. - * - * @generated - */ - Model1Package eINSTANCE = org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl.init(); - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl Address}' - * class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getAddress() - * @generated - */ - int ADDRESS = 0; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int ADDRESS__NAME = 0; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int ADDRESS__STREET = 1; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int ADDRESS__CITY = 2; - - /** - * The number of structural features of the 'Address' class. - * - * @generated - * @ordered - */ - int ADDRESS_FEATURE_COUNT = 3; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl Company}' - * class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getCompany() - * @generated - */ - int COMPANY = 1; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int COMPANY__NAME = ADDRESS__NAME; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int COMPANY__STREET = ADDRESS__STREET; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int COMPANY__CITY = ADDRESS__CITY; - - /** - * The feature id for the 'Categories' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__CATEGORIES = ADDRESS_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Suppliers' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__SUPPLIERS = ADDRESS_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Customers' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__CUSTOMERS = ADDRESS_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Purchase Orders' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Sales Orders' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 4; - - /** - * The number of structural features of the 'Company' class. - * - * @generated - * @ordered - */ - int COMPANY_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SupplierImpl Supplier}' - * class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.SupplierImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getSupplier() - * @generated - */ - int SUPPLIER = 2; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int SUPPLIER__NAME = ADDRESS__NAME; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int SUPPLIER__STREET = ADDRESS__STREET; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int SUPPLIER__CITY = ADDRESS__CITY; - - /** - * The feature id for the 'Purchase Orders' reference list. - * - * @generated - * @ordered - */ - int SUPPLIER__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Preferred' attribute. - * - * @generated - * @ordered - */ - int SUPPLIER__PREFERRED = ADDRESS_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Supplier' class. - * - * @generated - * @ordered - */ - int SUPPLIER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CustomerImpl Customer}' - * class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.CustomerImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getCustomer() - * @generated - */ - int CUSTOMER = 3; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int CUSTOMER__NAME = ADDRESS__NAME; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int CUSTOMER__STREET = ADDRESS__STREET; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int CUSTOMER__CITY = ADDRESS__CITY; - - /** - * The feature id for the 'Sales Orders' reference list. - * - * @generated - * @ordered - */ - int CUSTOMER__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Order By Product' map. - * - * @generated - * @ordered - */ - int CUSTOMER__ORDER_BY_PRODUCT = ADDRESS_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Customer' class. - * - * @generated - * @ordered - */ - int CUSTOMER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderImpl Order}' class. - * - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getOrder() - * @generated - */ - int ORDER = 4; - - /** - * The feature id for the 'Order Details' containment reference list. - * - * @generated - * @ordered - */ - int ORDER__ORDER_DETAILS = 0; - - /** - * The number of structural features of the 'Order' class. - * - * @generated - * @ordered - */ - int ORDER_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl - * Order Detail}' class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getOrderDetail() - * @generated - */ - int ORDER_DETAIL = 5; - - /** - * The feature id for the 'Order' container reference. - * - * @generated - * @ordered - */ - int ORDER_DETAIL__ORDER = 0; - - /** - * The feature id for the 'Product' reference. - * - * @generated - * @ordered - */ - int ORDER_DETAIL__PRODUCT = 1; - - /** - * The feature id for the 'Price' attribute. - * - * @generated - * @ordered - */ - int ORDER_DETAIL__PRICE = 2; - - /** - * The number of structural features of the 'Order Detail' class. - * - * @generated - * @ordered - */ - int ORDER_DETAIL_FEATURE_COUNT = 3; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.PurchaseOrderImpl - * Purchase Order}' class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.PurchaseOrderImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getPurchaseOrder() - * @generated - */ - int PURCHASE_ORDER = 6; - - /** - * The feature id for the 'Order Details' containment reference list. - * - * @generated - * @ordered - */ - int PURCHASE_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; - - /** - * The feature id for the 'Date' attribute. - * - * @generated - * @ordered - */ - int PURCHASE_ORDER__DATE = ORDER_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Supplier' reference. - * - * @generated - * @ordered - */ - int PURCHASE_ORDER__SUPPLIER = ORDER_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Purchase Order' class. - * - * @generated - * @ordered - */ - int PURCHASE_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SalesOrderImpl - * Sales Order}' class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.SalesOrderImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getSalesOrder() - * @generated - */ - int SALES_ORDER = 7; - - /** - * The feature id for the 'Order Details' containment reference list. - * - * @generated - * @ordered - */ - int SALES_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; - - /** - * The feature id for the 'Id' attribute. - * - * @generated - * @ordered - */ - int SALES_ORDER__ID = ORDER_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Customer' reference. - * - * @generated - * @ordered - */ - int SALES_ORDER__CUSTOMER = ORDER_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Sales Order' class. - * - * @generated - * @ordered - */ - int SALES_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl Category}' - * class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getCategory() - * @generated - */ - int CATEGORY = 8; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int CATEGORY__NAME = 0; - - /** - * The feature id for the 'Categories' containment reference list. - * - * @generated - * @ordered - */ - int CATEGORY__CATEGORIES = 1; - - /** - * The feature id for the 'Products' containment reference list. - * - * @generated - * @ordered - */ - int CATEGORY__PRODUCTS = 2; - - /** - * The number of structural features of the 'Category' class. - * - * @generated - * @ordered - */ - int CATEGORY_FEATURE_COUNT = 3; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl Product1}' - * class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getProduct1() - * @generated - */ - int PRODUCT1 = 9; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int PRODUCT1__NAME = 0; - - /** - * The feature id for the 'Order Details' reference list. - * - * @generated - * @ordered - */ - int PRODUCT1__ORDER_DETAILS = 1; - - /** - * The feature id for the 'Vat' attribute. - * - * @generated - * @ordered - */ - int PRODUCT1__VAT = 2; - - /** - * The feature id for the 'Description' attribute. - * - * @generated - * @ordered - */ - int PRODUCT1__DESCRIPTION = 3; - - /** - * The number of structural features of the 'Product1' class. - * - * @generated - * @ordered - */ - int PRODUCT1_FEATURE_COUNT = 4; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl - * Order Address}' class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getOrderAddress() - * @generated - */ - int ORDER_ADDRESS = 10; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__NAME = ADDRESS__NAME; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__STREET = ADDRESS__STREET; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__CITY = ADDRESS__CITY; - - /** - * The feature id for the 'Order Details' containment reference list. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__ORDER_DETAILS = ADDRESS_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Order' container reference. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__ORDER = ADDRESS_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Product' reference. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__PRODUCT = ADDRESS_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Price' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__PRICE = ADDRESS_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Test Attribute' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__TEST_ATTRIBUTE = ADDRESS_FEATURE_COUNT + 4; - - /** - * The number of structural features of the 'Order Address' class. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.ProductToOrderImpl - * Product To Order}' class. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.ProductToOrderImpl - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getProductToOrder() - * @generated - */ - int PRODUCT_TO_ORDER = 11; - - /** - * The feature id for the 'Key' reference. - * - * @generated - * @ordered - */ - int PRODUCT_TO_ORDER__KEY = 0; - - /** - * The feature id for the 'Value' reference. - * - * @generated - * @ordered - */ - int PRODUCT_TO_ORDER__VALUE = 1; - - /** - * The number of structural features of the 'Product To Order' class. - * - * @generated - * @ordered - */ - int PRODUCT_TO_ORDER_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.VAT VAT}' enum. - * - * @see org.eclipse.emf.cdo.tests.legacy.model1.VAT - * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getVAT() - * @generated - */ - int VAT = 12; - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Address Address}'. - * - * @return the meta object for class 'Address'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Address - * @generated - */ - EClass getAddress(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Address#getName - * Name}'. - * - * @return the meta object for the attribute 'Name'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Address#getName() - * @see #getAddress() - * @generated - */ - EAttribute getAddress_Name(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Address#getStreet - * Street}'. - * - * @return the meta object for the attribute 'Street'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Address#getStreet() - * @see #getAddress() - * @generated - */ - EAttribute getAddress_Street(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Address#getCity - * City}'. - * - * @return the meta object for the attribute 'City'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Address#getCity() - * @see #getAddress() - * @generated - */ - EAttribute getAddress_City(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Company Company}'. - * - * @return the meta object for class 'Company'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Company - * @generated - */ - EClass getCompany(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getCategories Categories}'. - * - * - * @return the meta object for the containment reference list 'Categories'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getCategories() - * @see #getCompany() - * @generated - */ - EReference getCompany_Categories(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getSuppliers Suppliers}'. - * - * - * @return the meta object for the containment reference list 'Suppliers'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getSuppliers() - * @see #getCompany() - * @generated - */ - EReference getCompany_Suppliers(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getCustomers Customers}'. - * - * - * @return the meta object for the containment reference list 'Customers'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getCustomers() - * @see #getCompany() - * @generated - */ - EReference getCompany_Customers(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getPurchaseOrders Purchase Orders}'. - * - * @return the meta object for the containment reference list 'Purchase Orders'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getPurchaseOrders() - * @see #getCompany() - * @generated - */ - EReference getCompany_PurchaseOrders(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getSalesOrders Sales Orders}'. - * - * @return the meta object for the containment reference list 'Sales Orders'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getSalesOrders() - * @see #getCompany() - * @generated - */ - EReference getCompany_SalesOrders(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Supplier Supplier}'. - * - * - * @return the meta object for class 'Supplier'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Supplier - * @generated - */ - EClass getSupplier(); - - /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Supplier#getPurchaseOrders Purchase Orders}'. - * - * @return the meta object for the reference list 'Purchase Orders'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Supplier#getPurchaseOrders() - * @see #getSupplier() - * @generated - */ - EReference getSupplier_PurchaseOrders(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Supplier#isPreferred - * Preferred}'. - * - * @return the meta object for the attribute 'Preferred'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Supplier#isPreferred() - * @see #getSupplier() - * @generated - */ - EAttribute getSupplier_Preferred(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Customer Customer}'. - * - * - * @return the meta object for class 'Customer'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Customer - * @generated - */ - EClass getCustomer(); - - /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Customer#getSalesOrders Sales Orders}'. - * - * @return the meta object for the reference list 'Sales Orders'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Customer#getSalesOrders() - * @see #getCustomer() - * @generated - */ - EReference getCustomer_SalesOrders(); - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.cdo.tests.legacy.model1.Customer#getOrderByProduct - * Order By Product}'. - * - * @return the meta object for the map 'Order By Product'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Customer#getOrderByProduct() - * @see #getCustomer() - * @generated - */ - EReference getCustomer_OrderByProduct(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Order Order}'. - * - * @return the meta object for class 'Order'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Order - * @generated - */ - EClass getOrder(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Order#getOrderDetails Order Details}'. - * - * @return the meta object for the containment reference list 'Order Details'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Order#getOrderDetails() - * @see #getOrder() - * @generated - */ - EReference getOrder_OrderDetails(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail - * Order Detail}'. - * - * @return the meta object for class 'Order Detail'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail - * @generated - */ - EClass getOrderDetail(); - - /** - * Returns the meta object for the container reference ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getOrder Order}'. - * - * @return the meta object for the container reference 'Order'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getOrder() - * @see #getOrderDetail() - * @generated - */ - EReference getOrderDetail_Order(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getProduct - * Product}'. - * - * @return the meta object for the reference 'Product'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getProduct() - * @see #getOrderDetail() - * @generated - */ - EReference getOrderDetail_Product(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getPrice - * Price}'. - * - * @return the meta object for the attribute 'Price'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getPrice() - * @see #getOrderDetail() - * @generated - */ - EAttribute getOrderDetail_Price(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder - * Purchase Order}'. - * - * @return the meta object for class 'Purchase Order'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder - * @generated - */ - EClass getPurchaseOrder(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder#getDate - * Date}'. - * - * @return the meta object for the attribute 'Date'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder#getDate() - * @see #getPurchaseOrder() - * @generated - */ - EAttribute getPurchaseOrder_Date(); - - /** - * Returns the meta object for the reference ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder#getSupplier Supplier}'. - * - * @return the meta object for the reference 'Supplier'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder#getSupplier() - * @see #getPurchaseOrder() - * @generated - */ - EReference getPurchaseOrder_Supplier(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder Sales Order} - * '. - * - * @return the meta object for class 'Sales Order'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder - * @generated - */ - EClass getSalesOrder(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder#getId - * Id}'. - * - * @return the meta object for the attribute 'Id'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder#getId() - * @see #getSalesOrder() - * @generated - */ - EAttribute getSalesOrder_Id(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder#getCustomer - * Customer}'. - * - * @return the meta object for the reference 'Customer'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder#getCustomer() - * @see #getSalesOrder() - * @generated - */ - EReference getSalesOrder_Customer(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Category Category}'. - * - * - * @return the meta object for class 'Category'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Category - * @generated - */ - EClass getCategory(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Category#getName - * Name}'. - * - * @return the meta object for the attribute 'Name'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Category#getName() - * @see #getCategory() - * @generated - */ - EAttribute getCategory_Name(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Category#getCategories Categories}'. - * - * @return the meta object for the containment reference list 'Categories'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Category#getCategories() - * @see #getCategory() - * @generated - */ - EReference getCategory_Categories(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Category#getProducts Products}'. - * - * - * @return the meta object for the containment reference list 'Products'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Category#getProducts() - * @see #getCategory() - * @generated - */ - EReference getCategory_Products(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Product1 Product1}'. - * - * - * @return the meta object for class 'Product1'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1 - * @generated - */ - EClass getProduct1(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Product1#getName - * Name}'. - * - * @return the meta object for the attribute 'Name'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1#getName() - * @see #getProduct1() - * @generated - */ - EAttribute getProduct1_Name(); - - /** - * Returns the meta object for the reference list ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.Product1#getOrderDetails Order Details}'. - * - * @return the meta object for the reference list 'Order Details'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1#getOrderDetails() - * @see #getProduct1() - * @generated - */ - EReference getProduct1_OrderDetails(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Product1#getVat - * Vat}'. - * - * @return the meta object for the attribute 'Vat'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1#getVat() - * @see #getProduct1() - * @generated - */ - EAttribute getProduct1_Vat(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Product1#getDescription - * Description}'. - * - * @return the meta object for the attribute 'Description'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1#getDescription() - * @see #getProduct1() - * @generated - */ - EAttribute getProduct1_Description(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.OrderAddress - * Order Address}'. - * - * @return the meta object for class 'Order Address'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderAddress - * @generated - */ - EClass getOrderAddress(); - - /** - * Returns the meta object for the attribute ' - * {@link org.eclipse.emf.cdo.tests.legacy.model1.OrderAddress#isTestAttribute Test Attribute}'. - * - * @return the meta object for the attribute 'Test Attribute'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderAddress#isTestAttribute() - * @see #getOrderAddress() - * @generated - */ - EAttribute getOrderAddress_TestAttribute(); - - /** - * Returns the meta object for class '{@link java.util.Map.Entry Product To Order}'. - * - * - * @return the meta object for class 'Product To Order'. - * @see java.util.Map.Entry - * @model keyType="org.eclipse.emf.cdo.tests.legacy.model1.Product1" - * valueType="org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder" - * @generated - */ - EClass getProductToOrder(); - - /** - * Returns the meta object for the reference '{@link java.util.Map.Entry Key}'. - * - * @return the meta object for the reference 'Key'. - * @see java.util.Map.Entry - * @see #getProductToOrder() - * @generated - */ - EReference getProductToOrder_Key(); - - /** - * Returns the meta object for the reference '{@link java.util.Map.Entry Value}'. - * - * - * @return the meta object for the reference 'Value'. - * @see java.util.Map.Entry - * @see #getProductToOrder() - * @generated - */ - EReference getProductToOrder_Value(); - - /** - * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.legacy.model1.VAT VAT}'. - * - * @return the meta object for enum 'VAT'. - * @see org.eclipse.emf.cdo.tests.legacy.model1.VAT - * @generated - */ - EEnum getVAT(); - - /** - * Returns the factory that creates the instances of the model. - * - * @return the factory that creates the instances of the model. - * @generated - */ - Model1Factory getModel1Factory(); - -} // Model1Package +/* + * 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.tests.legacy.model1; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EReference; + +/** + * The Package for the model. It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.emf.cdo.tests.legacy.model1.Model1Factory + * @model kind="package" + * annotation="teneo.jpa value='@hbGenericGenerators({@GenericGenerator(name=\"system-uuid\", strategy = \"org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOUUIDHexGenerator\")})'" + * @generated + */ +public interface Model1Package extends org.eclipse.emf.cdo.tests.model1.Model1Package +{ + /** + * + * @generated + */ + String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The package name. + * + * @generated + */ + String eNAME = "model1"; + + /** + * The package namespace URI. + * + * @generated NOT + */ + String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/legacy/model1/1.0.0"; + + /** + * The package namespace name. + * + * @generated + */ + String eNS_PREFIX = "model1"; + + /** + * The singleton instance of the package. + * + * @generated + */ + Model1Package eINSTANCE = org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl Address}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getAddress() + * @generated + */ + int ADDRESS = 0; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int ADDRESS__NAME = 0; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int ADDRESS__STREET = 1; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int ADDRESS__CITY = 2; + + /** + * The number of structural features of the 'Address' class. + * + * @generated + * @ordered + */ + int ADDRESS_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl Company}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getCompany() + * @generated + */ + int COMPANY = 1; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int COMPANY__NAME = ADDRESS__NAME; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int COMPANY__STREET = ADDRESS__STREET; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int COMPANY__CITY = ADDRESS__CITY; + + /** + * The feature id for the 'Categories' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__CATEGORIES = ADDRESS_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Suppliers' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__SUPPLIERS = ADDRESS_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Customers' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__CUSTOMERS = ADDRESS_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Purchase Orders' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Sales Orders' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Company' class. + * + * @generated + * @ordered + */ + int COMPANY_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SupplierImpl Supplier}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.SupplierImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getSupplier() + * @generated + */ + int SUPPLIER = 2; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int SUPPLIER__NAME = ADDRESS__NAME; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int SUPPLIER__STREET = ADDRESS__STREET; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int SUPPLIER__CITY = ADDRESS__CITY; + + /** + * The feature id for the 'Purchase Orders' reference list. + * + * @generated + * @ordered + */ + int SUPPLIER__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Preferred' attribute. + * + * @generated + * @ordered + */ + int SUPPLIER__PREFERRED = ADDRESS_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Supplier' class. + * + * @generated + * @ordered + */ + int SUPPLIER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CustomerImpl Customer}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.CustomerImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getCustomer() + * @generated + */ + int CUSTOMER = 3; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int CUSTOMER__NAME = ADDRESS__NAME; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int CUSTOMER__STREET = ADDRESS__STREET; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int CUSTOMER__CITY = ADDRESS__CITY; + + /** + * The feature id for the 'Sales Orders' reference list. + * + * @generated + * @ordered + */ + int CUSTOMER__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Order By Product' map. + * + * @generated + * @ordered + */ + int CUSTOMER__ORDER_BY_PRODUCT = ADDRESS_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Customer' class. + * + * @generated + * @ordered + */ + int CUSTOMER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderImpl Order}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getOrder() + * @generated + */ + int ORDER = 4; + + /** + * The feature id for the 'Order Details' containment reference list. + * + * @generated + * @ordered + */ + int ORDER__ORDER_DETAILS = 0; + + /** + * The number of structural features of the 'Order' class. + * + * @generated + * @ordered + */ + int ORDER_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl Order Detail}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getOrderDetail() + * @generated + */ + int ORDER_DETAIL = 5; + + /** + * The feature id for the 'Order' container reference. + * + * @generated + * @ordered + */ + int ORDER_DETAIL__ORDER = 0; + + /** + * The feature id for the 'Product' reference. + * + * @generated + * @ordered + */ + int ORDER_DETAIL__PRODUCT = 1; + + /** + * The feature id for the 'Price' attribute. + * + * @generated + * @ordered + */ + int ORDER_DETAIL__PRICE = 2; + + /** + * The number of structural features of the 'Order Detail' class. + * + * @generated + * @ordered + */ + int ORDER_DETAIL_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.PurchaseOrderImpl Purchase Order}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.PurchaseOrderImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getPurchaseOrder() + * @generated + */ + int PURCHASE_ORDER = 6; + + /** + * The feature id for the 'Order Details' containment reference list. + * + * @generated + * @ordered + */ + int PURCHASE_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; + + /** + * The feature id for the 'Date' attribute. + * + * @generated + * @ordered + */ + int PURCHASE_ORDER__DATE = ORDER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Supplier' reference. + * + * @generated + * @ordered + */ + int PURCHASE_ORDER__SUPPLIER = ORDER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Purchase Order' class. + * + * @generated + * @ordered + */ + int PURCHASE_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SalesOrderImpl Sales Order}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.SalesOrderImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getSalesOrder() + * @generated + */ + int SALES_ORDER = 7; + + /** + * The feature id for the 'Order Details' containment reference list. + * + * @generated + * @ordered + */ + int SALES_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; + + /** + * The feature id for the 'Id' attribute. + * + * @generated + * @ordered + */ + int SALES_ORDER__ID = ORDER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Customer' reference. + * + * @generated + * @ordered + */ + int SALES_ORDER__CUSTOMER = ORDER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Sales Order' class. + * + * @generated + * @ordered + */ + int SALES_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl Category}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getCategory() + * @generated + */ + int CATEGORY = 8; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int CATEGORY__NAME = 0; + + /** + * The feature id for the 'Categories' containment reference list. + * + * @generated + * @ordered + */ + int CATEGORY__CATEGORIES = 1; + + /** + * The feature id for the 'Products' containment reference list. + * + * @generated + * @ordered + */ + int CATEGORY__PRODUCTS = 2; + + /** + * The number of structural features of the 'Category' class. + * + * @generated + * @ordered + */ + int CATEGORY_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl Product1}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getProduct1() + * @generated + */ + int PRODUCT1 = 9; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int PRODUCT1__NAME = 0; + + /** + * The feature id for the 'Order Details' reference list. + * + * @generated + * @ordered + */ + int PRODUCT1__ORDER_DETAILS = 1; + + /** + * The feature id for the 'Vat' attribute. + * + * @generated + * @ordered + */ + int PRODUCT1__VAT = 2; + + /** + * The feature id for the 'Other VA Ts' attribute list. + * + * + * @generated + * @ordered + */ + int PRODUCT1__OTHER_VA_TS = 3; + + /** + * The feature id for the 'Description' attribute. + * + * @generated + * @ordered + */ + int PRODUCT1__DESCRIPTION = 4; + + /** + * The number of structural features of the 'Product1' class. + * + * @generated + * @ordered + */ + int PRODUCT1_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl Order Address}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getOrderAddress() + * @generated + */ + int ORDER_ADDRESS = 10; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__NAME = ADDRESS__NAME; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__STREET = ADDRESS__STREET; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__CITY = ADDRESS__CITY; + + /** + * The feature id for the 'Order Details' containment reference list. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__ORDER_DETAILS = ADDRESS_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Order' container reference. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__ORDER = ADDRESS_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Product' reference. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__PRODUCT = ADDRESS_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Price' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__PRICE = ADDRESS_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Test Attribute' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__TEST_ATTRIBUTE = ADDRESS_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Order Address' class. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.ProductToOrderImpl Product To Order}' class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.ProductToOrderImpl + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getProductToOrder() + * @generated + */ + int PRODUCT_TO_ORDER = 11; + + /** + * The feature id for the 'Key' reference. + * + * @generated + * @ordered + */ + int PRODUCT_TO_ORDER__KEY = 0; + + /** + * The feature id for the 'Value' reference. + * + * @generated + * @ordered + */ + int PRODUCT_TO_ORDER__VALUE = 1; + + /** + * The number of structural features of the 'Product To Order' class. + * + * @generated + * @ordered + */ + int PRODUCT_TO_ORDER_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model1.VAT VAT}' enum. + * + * @see org.eclipse.emf.cdo.tests.legacy.model1.VAT + * @see org.eclipse.emf.cdo.tests.legacy.model1.impl.Model1PackageImpl#getVAT() + * @generated + */ + int VAT = 12; + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Address Address}'. + * + * @return the meta object for class 'Address'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Address + * @generated + */ + EClass getAddress(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Address#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Address#getName() + * @see #getAddress() + * @generated + */ + EAttribute getAddress_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Address#getStreet Street}'. + * + * @return the meta object for the attribute 'Street'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Address#getStreet() + * @see #getAddress() + * @generated + */ + EAttribute getAddress_Street(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Address#getCity City}'. + * + * @return the meta object for the attribute 'City'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Address#getCity() + * @see #getAddress() + * @generated + */ + EAttribute getAddress_City(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Company Company}'. + * + * @return the meta object for class 'Company'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Company + * @generated + */ + EClass getCompany(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getCategories Categories}'. + * + * + * @return the meta object for the containment reference list 'Categories'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getCategories() + * @see #getCompany() + * @generated + */ + EReference getCompany_Categories(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getSuppliers Suppliers}'. + * + * + * @return the meta object for the containment reference list 'Suppliers'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getSuppliers() + * @see #getCompany() + * @generated + */ + EReference getCompany_Suppliers(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getCustomers Customers}'. + * + * + * @return the meta object for the containment reference list 'Customers'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getCustomers() + * @see #getCompany() + * @generated + */ + EReference getCompany_Customers(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getPurchaseOrders Purchase Orders}'. + * + * @return the meta object for the containment reference list 'Purchase Orders'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getPurchaseOrders() + * @see #getCompany() + * @generated + */ + EReference getCompany_PurchaseOrders(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.legacy.model1.Company#getSalesOrders Sales Orders}'. + * + * @return the meta object for the containment reference list 'Sales Orders'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Company#getSalesOrders() + * @see #getCompany() + * @generated + */ + EReference getCompany_SalesOrders(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Supplier Supplier}'. + * + * @return the meta object for class 'Supplier'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Supplier + * @generated + */ + EClass getSupplier(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.emf.cdo.tests.legacy.model1.Supplier#getPurchaseOrders Purchase Orders}'. + * + * @return the meta object for the reference list 'Purchase Orders'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Supplier#getPurchaseOrders() + * @see #getSupplier() + * @generated + */ + EReference getSupplier_PurchaseOrders(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Supplier#isPreferred Preferred}'. + * + * @return the meta object for the attribute 'Preferred'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Supplier#isPreferred() + * @see #getSupplier() + * @generated + */ + EAttribute getSupplier_Preferred(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Customer Customer}'. + * + * @return the meta object for class 'Customer'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Customer + * @generated + */ + EClass getCustomer(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model1.Customer#getSalesOrders Sales Orders}'. + * + * @return the meta object for the reference list 'Sales Orders'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Customer#getSalesOrders() + * @see #getCustomer() + * @generated + */ + EReference getCustomer_SalesOrders(); + + /** + * Returns the meta object for the map '{@link org.eclipse.emf.cdo.tests.legacy.model1.Customer#getOrderByProduct Order By Product}'. + * + * @return the meta object for the map 'Order By Product'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Customer#getOrderByProduct() + * @see #getCustomer() + * @generated + */ + EReference getCustomer_OrderByProduct(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Order Order}'. + * + * @return the meta object for class 'Order'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Order + * @generated + */ + EClass getOrder(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.legacy.model1.Order#getOrderDetails Order Details}'. + * + * @return the meta object for the containment reference list 'Order Details'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Order#getOrderDetails() + * @see #getOrder() + * @generated + */ + EReference getOrder_OrderDetails(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail Order Detail}'. + * + * @return the meta object for class 'Order Detail'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail + * @generated + */ + EClass getOrderDetail(); + + /** + * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getOrder Order}'. + * + * @return the meta object for the container reference 'Order'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getOrder() + * @see #getOrderDetail() + * @generated + */ + EReference getOrderDetail_Order(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getProduct Product}'. + * + * @return the meta object for the reference 'Product'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getProduct() + * @see #getOrderDetail() + * @generated + */ + EReference getOrderDetail_Product(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getPrice Price}'. + * + * @return the meta object for the attribute 'Price'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderDetail#getPrice() + * @see #getOrderDetail() + * @generated + */ + EAttribute getOrderDetail_Price(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder Purchase Order}'. + * + * @return the meta object for class 'Purchase Order'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder + * @generated + */ + EClass getPurchaseOrder(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder#getDate Date}'. + * + * @return the meta object for the attribute 'Date'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder#getDate() + * @see #getPurchaseOrder() + * @generated + */ + EAttribute getPurchaseOrder_Date(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder#getSupplier Supplier}'. + * + * @return the meta object for the reference 'Supplier'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.PurchaseOrder#getSupplier() + * @see #getPurchaseOrder() + * @generated + */ + EReference getPurchaseOrder_Supplier(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder Sales Order}'. + * + * @return the meta object for class 'Sales Order'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder + * @generated + */ + EClass getSalesOrder(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder#getId Id}'. + * + * @return the meta object for the attribute 'Id'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder#getId() + * @see #getSalesOrder() + * @generated + */ + EAttribute getSalesOrder_Id(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder#getCustomer Customer}'. + * + * @return the meta object for the reference 'Customer'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder#getCustomer() + * @see #getSalesOrder() + * @generated + */ + EReference getSalesOrder_Customer(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Category Category}'. + * + * @return the meta object for class 'Category'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Category + * @generated + */ + EClass getCategory(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Category#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Category#getName() + * @see #getCategory() + * @generated + */ + EAttribute getCategory_Name(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.legacy.model1.Category#getCategories Categories}'. + * + * @return the meta object for the containment reference list 'Categories'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Category#getCategories() + * @see #getCategory() + * @generated + */ + EReference getCategory_Categories(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.legacy.model1.Category#getProducts Products}'. + * + * + * @return the meta object for the containment reference list 'Products'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Category#getProducts() + * @see #getCategory() + * @generated + */ + EReference getCategory_Products(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Product1 Product1}'. + * + * @return the meta object for class 'Product1'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1 + * @generated + */ + EClass getProduct1(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Product1#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1#getName() + * @see #getProduct1() + * @generated + */ + EAttribute getProduct1_Name(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.emf.cdo.tests.legacy.model1.Product1#getOrderDetails Order Details}'. + * + * @return the meta object for the reference list 'Order Details'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1#getOrderDetails() + * @see #getProduct1() + * @generated + */ + EReference getProduct1_OrderDetails(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Product1#getVat Vat}'. + * + * @return the meta object for the attribute 'Vat'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1#getVat() + * @see #getProduct1() + * @generated + */ + EAttribute getProduct1_Vat(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.tests.legacy.model1.Product1#getOtherVATs Other VA Ts}'. + * + * + * @return the meta object for the attribute list 'Other VA Ts'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1#getOtherVATs() + * @see #getProduct1() + * @generated + */ + EAttribute getProduct1_OtherVATs(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model1.Product1#getDescription Description}'. + * + * @return the meta object for the attribute 'Description'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.Product1#getDescription() + * @see #getProduct1() + * @generated + */ + EAttribute getProduct1_Description(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model1.OrderAddress Order Address}'. + * + * @return the meta object for class 'Order Address'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderAddress + * @generated + */ + EClass getOrderAddress(); + + /** + * Returns the meta object for the attribute ' + * {@link org.eclipse.emf.cdo.tests.legacy.model1.OrderAddress#isTestAttribute Test Attribute}'. + * + * @return the meta object for the attribute 'Test Attribute'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.OrderAddress#isTestAttribute() + * @see #getOrderAddress() + * @generated + */ + EAttribute getOrderAddress_TestAttribute(); + + /** + * Returns the meta object for class '{@link java.util.Map.Entry Product To Order}'. + * + * + * @return the meta object for class 'Product To Order'. + * @see java.util.Map.Entry + * @model keyType="org.eclipse.emf.cdo.tests.legacy.model1.Product1" + * valueType="org.eclipse.emf.cdo.tests.legacy.model1.SalesOrder" + * @generated + */ + EClass getProductToOrder(); + + /** + * Returns the meta object for the reference '{@link java.util.Map.Entry Key}'. + * + * @return the meta object for the reference 'Key'. + * @see java.util.Map.Entry + * @see #getProductToOrder() + * @generated + */ + EReference getProductToOrder_Key(); + + /** + * Returns the meta object for the reference '{@link java.util.Map.Entry Value}'. + * + * + * @return the meta object for the reference 'Value'. + * @see java.util.Map.Entry + * @see #getProductToOrder() + * @generated + */ + EReference getProductToOrder_Value(); + + /** + * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.legacy.model1.VAT VAT}'. + * + * @return the meta object for enum 'VAT'. + * @see org.eclipse.emf.cdo.tests.legacy.model1.VAT + * @generated + */ + EEnum getVAT(); + + /** + * Returns the factory that creates the instances of the model. + * + * @return the factory that creates the instances of the model. + * @generated + */ + Model1Factory getModel1Factory(); + +} // Model1Package diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/AddressImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/AddressImpl.java index 882a4c82e4..dc41e00a26 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/AddressImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/AddressImpl.java @@ -1,299 +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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Address; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -/** - * An implementation of the model object 'Address'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl#getName Name}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl#getStreet Street}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl#getCity City}
  • - *
- *

- * - * @generated - */ -public class AddressImpl extends EObjectImpl implements Address -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getStreet() Street}' attribute. - * - * @see #getStreet() - * @generated - * @ordered - */ - protected static final String STREET_EDEFAULT = null; - - /** - * The cached value of the '{@link #getStreet() Street}' attribute. - * - * @see #getStreet() - * @generated - * @ordered - */ - protected String street = STREET_EDEFAULT; - - /** - * The default value of the '{@link #getCity() City}' attribute. - * - * @see #getCity() - * @generated - * @ordered - */ - protected static final String CITY_EDEFAULT = null; - - /** - * The cached value of the '{@link #getCity() City}' attribute. - * - * @see #getCity() - * @generated - * @ordered - */ - protected String city = CITY_EDEFAULT; - - /** - * - * - * @generated - */ - protected AddressImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getAddress(); - } - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ADDRESS__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public String getStreet() - { - return street; - } - - /** - * - * - * @generated - */ - public void setStreet(String newStreet) - { - String oldStreet = street; - street = newStreet; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ADDRESS__STREET, oldStreet, street)); - } - - /** - * - * - * @generated - */ - public String getCity() - { - return city; - } - - /** - * - * - * @generated - */ - public void setCity(String newCity) - { - String oldCity = city; - city = newCity; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ADDRESS__CITY, oldCity, city)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.ADDRESS__NAME: - return getName(); - case Model1Package.ADDRESS__STREET: - return getStreet(); - case Model1Package.ADDRESS__CITY: - return getCity(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.ADDRESS__NAME: - setName((String)newValue); - return; - case Model1Package.ADDRESS__STREET: - setStreet((String)newValue); - return; - case Model1Package.ADDRESS__CITY: - setCity((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.ADDRESS__NAME: - setName(NAME_EDEFAULT); - return; - case Model1Package.ADDRESS__STREET: - setStreet(STREET_EDEFAULT); - return; - case Model1Package.ADDRESS__CITY: - setCity(CITY_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.ADDRESS__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case Model1Package.ADDRESS__STREET: - return STREET_EDEFAULT == null ? street != null : !STREET_EDEFAULT.equals(street); - case Model1Package.ADDRESS__CITY: - return CITY_EDEFAULT == null ? city != null : !CITY_EDEFAULT.equals(city); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(", street: "); - result.append(street); - result.append(", city: "); - result.append(city); - result.append(')'); - return result.toString(); - } - -} // AddressImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Address; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * An implementation of the model object 'Address'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl#getStreet Street}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.AddressImpl#getCity City}
  • + *
+ *

+ * + * @generated + */ +public class AddressImpl extends EObjectImpl implements Address +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getStreet() Street}' attribute. + * + * @see #getStreet() + * @generated + * @ordered + */ + protected static final String STREET_EDEFAULT = null; + + /** + * The cached value of the '{@link #getStreet() Street}' attribute. + * + * @see #getStreet() + * @generated + * @ordered + */ + protected String street = STREET_EDEFAULT; + + /** + * The default value of the '{@link #getCity() City}' attribute. + * + * @see #getCity() + * @generated + * @ordered + */ + protected static final String CITY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCity() City}' attribute. + * + * @see #getCity() + * @generated + * @ordered + */ + protected String city = CITY_EDEFAULT; + + /** + * + * @generated + */ + protected AddressImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getAddress(); + } + + /** + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ADDRESS__NAME, oldName, name)); + } + + /** + * + * @generated + */ + public String getStreet() + { + return street; + } + + /** + * + * @generated + */ + public void setStreet(String newStreet) + { + String oldStreet = street; + street = newStreet; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ADDRESS__STREET, oldStreet, street)); + } + + /** + * + * @generated + */ + public String getCity() + { + return city; + } + + /** + * + * @generated + */ + public void setCity(String newCity) + { + String oldCity = city; + city = newCity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ADDRESS__CITY, oldCity, city)); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.ADDRESS__NAME: + return getName(); + case Model1Package.ADDRESS__STREET: + return getStreet(); + case Model1Package.ADDRESS__CITY: + return getCity(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.ADDRESS__NAME: + setName((String)newValue); + return; + case Model1Package.ADDRESS__STREET: + setStreet((String)newValue); + return; + case Model1Package.ADDRESS__CITY: + setCity((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.ADDRESS__NAME: + setName(NAME_EDEFAULT); + return; + case Model1Package.ADDRESS__STREET: + setStreet(STREET_EDEFAULT); + return; + case Model1Package.ADDRESS__CITY: + setCity(CITY_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.ADDRESS__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case Model1Package.ADDRESS__STREET: + return STREET_EDEFAULT == null ? street != null : !STREET_EDEFAULT.equals(street); + case Model1Package.ADDRESS__CITY: + return CITY_EDEFAULT == null ? city != null : !CITY_EDEFAULT.equals(city); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", street: "); + result.append(street); + result.append(", city: "); + result.append(city); + result.append(')'); + return result.toString(); + } + +} // AddressImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CategoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CategoryImpl.java index 032d132766..d4b2edcb03 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CategoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CategoryImpl.java @@ -1,287 +1,274 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Product1; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import java.util.Collection; - -/** - * An implementation of the model object 'Category'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl#getName Name}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl#getCategories Categories}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl#getProducts Products}
  • - *
- *

- * - * @generated - */ -public class CategoryImpl extends EObjectImpl implements Category -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getCategories() Categories}' containment reference list. - * - * @see #getCategories() - * @generated - * @ordered - */ - protected EList categories; - - /** - * The cached value of the '{@link #getProducts() Products}' containment reference list. - * - * @see #getProducts() - * @generated - * @ordered - */ - protected EList products; - - /** - * - * - * @generated - */ - protected CategoryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getCategory(); - } - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.CATEGORY__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public EList getCategories() - { - if (categories == null) - { - categories = new EObjectContainmentEList(Category.class, this, Model1Package.CATEGORY__CATEGORIES); - } - return categories; - } - - /** - * - * - * @generated - */ - public EList getProducts() - { - if (products == null) - { - products = new EObjectContainmentEList(Product1.class, this, Model1Package.CATEGORY__PRODUCTS); - } - return products; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.CATEGORY__CATEGORIES: - return ((InternalEList)getCategories()).basicRemove(otherEnd, msgs); - case Model1Package.CATEGORY__PRODUCTS: - return ((InternalEList)getProducts()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.CATEGORY__NAME: - return getName(); - case Model1Package.CATEGORY__CATEGORIES: - return getCategories(); - case Model1Package.CATEGORY__PRODUCTS: - return getProducts(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.CATEGORY__NAME: - setName((String)newValue); - return; - case Model1Package.CATEGORY__CATEGORIES: - getCategories().clear(); - getCategories().addAll((Collection)newValue); - return; - case Model1Package.CATEGORY__PRODUCTS: - getProducts().clear(); - getProducts().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.CATEGORY__NAME: - setName(NAME_EDEFAULT); - return; - case Model1Package.CATEGORY__CATEGORIES: - getCategories().clear(); - return; - case Model1Package.CATEGORY__PRODUCTS: - getProducts().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.CATEGORY__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case Model1Package.CATEGORY__CATEGORIES: - return categories != null && !categories.isEmpty(); - case Model1Package.CATEGORY__PRODUCTS: - return products != null && !products.isEmpty(); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} // CategoryImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Product1; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Category'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl#getCategories Categories}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CategoryImpl#getProducts Products}
  • + *
+ *

+ * + * @generated + */ +public class CategoryImpl extends EObjectImpl implements Category +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getCategories() Categories}' containment reference list. + * + * @see #getCategories() + * @generated + * @ordered + */ + protected EList categories; + + /** + * The cached value of the '{@link #getProducts() Products}' containment reference list. + * + * @see #getProducts() + * @generated + * @ordered + */ + protected EList products; + + /** + * + * @generated + */ + protected CategoryImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getCategory(); + } + + /** + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.CATEGORY__NAME, oldName, name)); + } + + /** + * + * @generated + */ + public EList getCategories() + { + if (categories == null) + { + categories = new EObjectContainmentEList(Category.class, this, Model1Package.CATEGORY__CATEGORIES); + } + return categories; + } + + /** + * + * @generated + */ + public EList getProducts() + { + if (products == null) + { + products = new EObjectContainmentEList(Product1.class, this, Model1Package.CATEGORY__PRODUCTS); + } + return products; + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.CATEGORY__CATEGORIES: + return ((InternalEList)getCategories()).basicRemove(otherEnd, msgs); + case Model1Package.CATEGORY__PRODUCTS: + return ((InternalEList)getProducts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.CATEGORY__NAME: + return getName(); + case Model1Package.CATEGORY__CATEGORIES: + return getCategories(); + case Model1Package.CATEGORY__PRODUCTS: + return getProducts(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.CATEGORY__NAME: + setName((String)newValue); + return; + case Model1Package.CATEGORY__CATEGORIES: + getCategories().clear(); + getCategories().addAll((Collection)newValue); + return; + case Model1Package.CATEGORY__PRODUCTS: + getProducts().clear(); + getProducts().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.CATEGORY__NAME: + setName(NAME_EDEFAULT); + return; + case Model1Package.CATEGORY__CATEGORIES: + getCategories().clear(); + return; + case Model1Package.CATEGORY__PRODUCTS: + getProducts().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.CATEGORY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case Model1Package.CATEGORY__CATEGORIES: + return categories != null && !categories.isEmpty(); + case Model1Package.CATEGORY__PRODUCTS: + return products != null && !products.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} // CategoryImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CompanyImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CompanyImpl.java index 085973cda1..1a2677d157 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CompanyImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CompanyImpl.java @@ -1,332 +1,319 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Company; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import java.util.Collection; - -/** - * An implementation of the model object 'Company'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getCategories Categories}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getSuppliers Suppliers}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getCustomers Customers}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getPurchaseOrders Purchase Orders}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getSalesOrders Sales Orders}
  • - *
- *

- * - * @generated - */ -public class CompanyImpl extends AddressImpl implements Company -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The cached value of the '{@link #getCategories() Categories}' containment reference list. - * - * @see #getCategories() - * @generated - * @ordered - */ - protected EList categories; - - /** - * The cached value of the '{@link #getSuppliers() Suppliers}' containment reference list. - * - * @see #getSuppliers() - * @generated - * @ordered - */ - protected EList suppliers; - - /** - * The cached value of the '{@link #getCustomers() Customers}' containment reference list. - * - * @see #getCustomers() - * @generated - * @ordered - */ - protected EList customers; - - /** - * The cached value of the '{@link #getPurchaseOrders() Purchase Orders}' containment reference list. - * - * @see #getPurchaseOrders() - * @generated - * @ordered - */ - protected EList purchaseOrders; - - /** - * The cached value of the '{@link #getSalesOrders() Sales Orders}' containment reference list. - * - * @see #getSalesOrders() - * @generated - * @ordered - */ - protected EList salesOrders; - - /** - * - * - * @generated - */ - protected CompanyImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getCompany(); - } - - /** - * - * - * @generated - */ - public EList getCategories() - { - if (categories == null) - { - categories = new EObjectContainmentEList(Category.class, this, Model1Package.COMPANY__CATEGORIES); - } - return categories; - } - - /** - * - * - * @generated - */ - public EList getSuppliers() - { - if (suppliers == null) - { - suppliers = new EObjectContainmentEList(Supplier.class, this, Model1Package.COMPANY__SUPPLIERS); - } - return suppliers; - } - - /** - * - * - * @generated - */ - public EList getCustomers() - { - if (customers == null) - { - customers = new EObjectContainmentEList(Customer.class, this, Model1Package.COMPANY__CUSTOMERS); - } - return customers; - } - - /** - * - * - * @generated - */ - public EList getPurchaseOrders() - { - if (purchaseOrders == null) - { - purchaseOrders = new EObjectContainmentEList(PurchaseOrder.class, this, - Model1Package.COMPANY__PURCHASE_ORDERS); - } - return purchaseOrders; - } - - /** - * - * - * @generated - */ - public EList getSalesOrders() - { - if (salesOrders == null) - { - salesOrders = new EObjectContainmentEList(SalesOrder.class, this, Model1Package.COMPANY__SALES_ORDERS); - } - return salesOrders; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.COMPANY__CATEGORIES: - return ((InternalEList)getCategories()).basicRemove(otherEnd, msgs); - case Model1Package.COMPANY__SUPPLIERS: - return ((InternalEList)getSuppliers()).basicRemove(otherEnd, msgs); - case Model1Package.COMPANY__CUSTOMERS: - return ((InternalEList)getCustomers()).basicRemove(otherEnd, msgs); - case Model1Package.COMPANY__PURCHASE_ORDERS: - return ((InternalEList)getPurchaseOrders()).basicRemove(otherEnd, msgs); - case Model1Package.COMPANY__SALES_ORDERS: - return ((InternalEList)getSalesOrders()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.COMPANY__CATEGORIES: - return getCategories(); - case Model1Package.COMPANY__SUPPLIERS: - return getSuppliers(); - case Model1Package.COMPANY__CUSTOMERS: - return getCustomers(); - case Model1Package.COMPANY__PURCHASE_ORDERS: - return getPurchaseOrders(); - case Model1Package.COMPANY__SALES_ORDERS: - return getSalesOrders(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.COMPANY__CATEGORIES: - getCategories().clear(); - getCategories().addAll((Collection)newValue); - return; - case Model1Package.COMPANY__SUPPLIERS: - getSuppliers().clear(); - getSuppliers().addAll((Collection)newValue); - return; - case Model1Package.COMPANY__CUSTOMERS: - getCustomers().clear(); - getCustomers().addAll((Collection)newValue); - return; - case Model1Package.COMPANY__PURCHASE_ORDERS: - getPurchaseOrders().clear(); - getPurchaseOrders().addAll((Collection)newValue); - return; - case Model1Package.COMPANY__SALES_ORDERS: - getSalesOrders().clear(); - getSalesOrders().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.COMPANY__CATEGORIES: - getCategories().clear(); - return; - case Model1Package.COMPANY__SUPPLIERS: - getSuppliers().clear(); - return; - case Model1Package.COMPANY__CUSTOMERS: - getCustomers().clear(); - return; - case Model1Package.COMPANY__PURCHASE_ORDERS: - getPurchaseOrders().clear(); - return; - case Model1Package.COMPANY__SALES_ORDERS: - getSalesOrders().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.COMPANY__CATEGORIES: - return categories != null && !categories.isEmpty(); - case Model1Package.COMPANY__SUPPLIERS: - return suppliers != null && !suppliers.isEmpty(); - case Model1Package.COMPANY__CUSTOMERS: - return customers != null && !customers.isEmpty(); - case Model1Package.COMPANY__PURCHASE_ORDERS: - return purchaseOrders != null && !purchaseOrders.isEmpty(); - case Model1Package.COMPANY__SALES_ORDERS: - return salesOrders != null && !salesOrders.isEmpty(); - } - return super.eIsSet(featureID); - } - -} // CompanyImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Company; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Company'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getCategories Categories}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getSuppliers Suppliers}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getCustomers Customers}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getPurchaseOrders Purchase Orders}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CompanyImpl#getSalesOrders Sales Orders}
  • + *
+ *

+ * + * @generated + */ +public class CompanyImpl extends AddressImpl implements Company +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The cached value of the '{@link #getCategories() Categories}' containment reference list. + * + * @see #getCategories() + * @generated + * @ordered + */ + protected EList categories; + + /** + * The cached value of the '{@link #getSuppliers() Suppliers}' containment reference list. + * + * @see #getSuppliers() + * @generated + * @ordered + */ + protected EList suppliers; + + /** + * The cached value of the '{@link #getCustomers() Customers}' containment reference list. + * + * @see #getCustomers() + * @generated + * @ordered + */ + protected EList customers; + + /** + * The cached value of the '{@link #getPurchaseOrders() Purchase Orders}' containment reference list. + * + * @see #getPurchaseOrders() + * @generated + * @ordered + */ + protected EList purchaseOrders; + + /** + * The cached value of the '{@link #getSalesOrders() Sales Orders}' containment reference list. + * + * @see #getSalesOrders() + * @generated + * @ordered + */ + protected EList salesOrders; + + /** + * + * @generated + */ + protected CompanyImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getCompany(); + } + + /** + * + * @generated + */ + public EList getCategories() + { + if (categories == null) + { + categories = new EObjectContainmentEList(Category.class, this, Model1Package.COMPANY__CATEGORIES); + } + return categories; + } + + /** + * + * @generated + */ + public EList getSuppliers() + { + if (suppliers == null) + { + suppliers = new EObjectContainmentEList(Supplier.class, this, Model1Package.COMPANY__SUPPLIERS); + } + return suppliers; + } + + /** + * + * @generated + */ + public EList getCustomers() + { + if (customers == null) + { + customers = new EObjectContainmentEList(Customer.class, this, Model1Package.COMPANY__CUSTOMERS); + } + return customers; + } + + /** + * + * @generated + */ + public EList getPurchaseOrders() + { + if (purchaseOrders == null) + { + purchaseOrders = new EObjectContainmentEList(PurchaseOrder.class, this, + Model1Package.COMPANY__PURCHASE_ORDERS); + } + return purchaseOrders; + } + + /** + * + * @generated + */ + public EList getSalesOrders() + { + if (salesOrders == null) + { + salesOrders = new EObjectContainmentEList(SalesOrder.class, this, Model1Package.COMPANY__SALES_ORDERS); + } + return salesOrders; + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.COMPANY__CATEGORIES: + return ((InternalEList)getCategories()).basicRemove(otherEnd, msgs); + case Model1Package.COMPANY__SUPPLIERS: + return ((InternalEList)getSuppliers()).basicRemove(otherEnd, msgs); + case Model1Package.COMPANY__CUSTOMERS: + return ((InternalEList)getCustomers()).basicRemove(otherEnd, msgs); + case Model1Package.COMPANY__PURCHASE_ORDERS: + return ((InternalEList)getPurchaseOrders()).basicRemove(otherEnd, msgs); + case Model1Package.COMPANY__SALES_ORDERS: + return ((InternalEList)getSalesOrders()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.COMPANY__CATEGORIES: + return getCategories(); + case Model1Package.COMPANY__SUPPLIERS: + return getSuppliers(); + case Model1Package.COMPANY__CUSTOMERS: + return getCustomers(); + case Model1Package.COMPANY__PURCHASE_ORDERS: + return getPurchaseOrders(); + case Model1Package.COMPANY__SALES_ORDERS: + return getSalesOrders(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.COMPANY__CATEGORIES: + getCategories().clear(); + getCategories().addAll((Collection)newValue); + return; + case Model1Package.COMPANY__SUPPLIERS: + getSuppliers().clear(); + getSuppliers().addAll((Collection)newValue); + return; + case Model1Package.COMPANY__CUSTOMERS: + getCustomers().clear(); + getCustomers().addAll((Collection)newValue); + return; + case Model1Package.COMPANY__PURCHASE_ORDERS: + getPurchaseOrders().clear(); + getPurchaseOrders().addAll((Collection)newValue); + return; + case Model1Package.COMPANY__SALES_ORDERS: + getSalesOrders().clear(); + getSalesOrders().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.COMPANY__CATEGORIES: + getCategories().clear(); + return; + case Model1Package.COMPANY__SUPPLIERS: + getSuppliers().clear(); + return; + case Model1Package.COMPANY__CUSTOMERS: + getCustomers().clear(); + return; + case Model1Package.COMPANY__PURCHASE_ORDERS: + getPurchaseOrders().clear(); + return; + case Model1Package.COMPANY__SALES_ORDERS: + getSalesOrders().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.COMPANY__CATEGORIES: + return categories != null && !categories.isEmpty(); + case Model1Package.COMPANY__SUPPLIERS: + return suppliers != null && !suppliers.isEmpty(); + case Model1Package.COMPANY__CUSTOMERS: + return customers != null && !customers.isEmpty(); + case Model1Package.COMPANY__PURCHASE_ORDERS: + return purchaseOrders != null && !purchaseOrders.isEmpty(); + case Model1Package.COMPANY__SALES_ORDERS: + return salesOrders != null && !salesOrders.isEmpty(); + } + return super.eIsSet(featureID); + } + +} // CompanyImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CustomerImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CustomerImpl.java index 2556db8ec5..9d301ecb75 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CustomerImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/CustomerImpl.java @@ -1,238 +1,227 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.EcoreEMap; -import org.eclipse.emf.ecore.util.InternalEList; - -import java.util.Collection; - -/** - * An implementation of the model object 'Customer'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CustomerImpl#getSalesOrders Sales Orders}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CustomerImpl#getOrderByProduct Order By Product}
  • - *
- *

- * - * @generated - */ -public class CustomerImpl extends AddressImpl implements Customer -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The cached value of the '{@link #getSalesOrders() Sales Orders}' reference list. - * - * - * @see #getSalesOrders() - * @generated - * @ordered - */ - protected EList salesOrders; - - /** - * The cached value of the '{@link #getOrderByProduct() Order By Product}' map. - * - * @see #getOrderByProduct() - * @generated - * @ordered - */ - protected EMap orderByProduct; - - /** - * - * - * @generated - */ - protected CustomerImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getCustomer(); - } - - /** - * - * - * @generated - */ - public EList getSalesOrders() - { - if (salesOrders == null) - { - salesOrders = new EObjectWithInverseResolvingEList(SalesOrder.class, this, - Model1Package.CUSTOMER__SALES_ORDERS, Model1Package.SALES_ORDER__CUSTOMER); - } - return salesOrders; - } - - /** - * - * - * @generated - */ - public EMap getOrderByProduct() - { - if (orderByProduct == null) - { - orderByProduct = new EcoreEMap(Model1Package.eINSTANCE.getProductToOrder(), - ProductToOrderImpl.class, this, Model1Package.CUSTOMER__ORDER_BY_PRODUCT); - } - return orderByProduct; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.CUSTOMER__SALES_ORDERS: - return ((InternalEList)(InternalEList)getSalesOrders()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.CUSTOMER__SALES_ORDERS: - return ((InternalEList)getSalesOrders()).basicRemove(otherEnd, msgs); - case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: - return ((InternalEList)getOrderByProduct()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.CUSTOMER__SALES_ORDERS: - return getSalesOrders(); - case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: - if (coreType) - return getOrderByProduct(); - else - return getOrderByProduct().map(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.CUSTOMER__SALES_ORDERS: - getSalesOrders().clear(); - getSalesOrders().addAll((Collection)newValue); - return; - case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: - ((EStructuralFeature.Setting)getOrderByProduct()).set(newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.CUSTOMER__SALES_ORDERS: - getSalesOrders().clear(); - return; - case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: - getOrderByProduct().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.CUSTOMER__SALES_ORDERS: - return salesOrders != null && !salesOrders.isEmpty(); - case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: - return orderByProduct != null && !orderByProduct.isEmpty(); - } - return super.eIsSet(featureID); - } - -} // CustomerImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.EcoreEMap; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Customer'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CustomerImpl#getSalesOrders Sales Orders}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.CustomerImpl#getOrderByProduct Order By Product}
  • + *
+ *

+ * + * @generated + */ +public class CustomerImpl extends AddressImpl implements Customer +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The cached value of the '{@link #getSalesOrders() Sales Orders}' reference list. + * + * + * @see #getSalesOrders() + * @generated + * @ordered + */ + protected EList salesOrders; + + /** + * The cached value of the '{@link #getOrderByProduct() Order By Product}' map. + * + * @see #getOrderByProduct() + * @generated + * @ordered + */ + protected EMap orderByProduct; + + /** + * + * @generated + */ + protected CustomerImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getCustomer(); + } + + /** + * + * @generated + */ + public EList getSalesOrders() + { + if (salesOrders == null) + { + salesOrders = new EObjectWithInverseResolvingEList(SalesOrder.class, this, + Model1Package.CUSTOMER__SALES_ORDERS, Model1Package.SALES_ORDER__CUSTOMER); + } + return salesOrders; + } + + /** + * + * @generated + */ + public EMap getOrderByProduct() + { + if (orderByProduct == null) + { + orderByProduct = new EcoreEMap(Model1Package.eINSTANCE.getProductToOrder(), + ProductToOrderImpl.class, this, Model1Package.CUSTOMER__ORDER_BY_PRODUCT); + } + return orderByProduct; + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.CUSTOMER__SALES_ORDERS: + return ((InternalEList)(InternalEList)getSalesOrders()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.CUSTOMER__SALES_ORDERS: + return ((InternalEList)getSalesOrders()).basicRemove(otherEnd, msgs); + case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: + return ((InternalEList)getOrderByProduct()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.CUSTOMER__SALES_ORDERS: + return getSalesOrders(); + case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: + if (coreType) + return getOrderByProduct(); + else + return getOrderByProduct().map(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.CUSTOMER__SALES_ORDERS: + getSalesOrders().clear(); + getSalesOrders().addAll((Collection)newValue); + return; + case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: + ((EStructuralFeature.Setting)getOrderByProduct()).set(newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.CUSTOMER__SALES_ORDERS: + getSalesOrders().clear(); + return; + case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: + getOrderByProduct().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.CUSTOMER__SALES_ORDERS: + return salesOrders != null && !salesOrders.isEmpty(); + case Model1Package.CUSTOMER__ORDER_BY_PRODUCT: + return orderByProduct != null && !orderByProduct.isEmpty(); + } + return super.eIsSet(featureID); + } + +} // CustomerImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Model1FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Model1FactoryImpl.java index f744683741..000302f3f9 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Model1FactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Model1FactoryImpl.java @@ -1,321 +1,301 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Factory; -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Company; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.OrderAddress; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; -import org.eclipse.emf.cdo.tests.model1.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; - -import java.util.Map; - -/** - * An implementation of the model Factory. - * - * @generated - */ -public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Creates the default factory implementation. - * - * @generated NOT - */ - public static Model1Factory init() - { - try - { - Model1Factory theModel1Factory = (Model1Factory)EPackage.Registry.INSTANCE - .getEFactory("http://www.eclipse.org/emf/CDO/tests/legacy/model1/1.0.0"); - if (theModel1Factory != null) - { - return theModel1Factory; - } - } - catch (Exception exception) - { - EcorePlugin.INSTANCE.log(exception); - } - return new Model1FactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * @generated - */ - public Model1FactoryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) - { - switch (eClass.getClassifierID()) - { - case Model1Package.ADDRESS: - return createAddress(); - case Model1Package.COMPANY: - return createCompany(); - case Model1Package.SUPPLIER: - return createSupplier(); - case Model1Package.CUSTOMER: - return createCustomer(); - case Model1Package.ORDER_DETAIL: - return createOrderDetail(); - case Model1Package.PURCHASE_ORDER: - return createPurchaseOrder(); - case Model1Package.SALES_ORDER: - return createSalesOrder(); - case Model1Package.CATEGORY: - return createCategory(); - case Model1Package.PRODUCT1: - return createProduct1(); - case Model1Package.ORDER_ADDRESS: - return createOrderAddress(); - case Model1Package.PRODUCT_TO_ORDER: - return (EObject)createProductToOrder(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public Object createFromString(EDataType eDataType, String initialValue) - { - switch (eDataType.getClassifierID()) - { - case Model1Package.VAT: - return createVATFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public String convertToString(EDataType eDataType, Object instanceValue) - { - switch (eDataType.getClassifierID()) - { - case Model1Package.VAT: - return convertVATToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public Address createAddress() - { - AddressImpl address = new AddressImpl(); - return address; - } - - /** - * - * - * @generated - */ - public Company createCompany() - { - CompanyImpl company = new CompanyImpl(); - return company; - } - - /** - * - * - * @generated - */ - public Supplier createSupplier() - { - SupplierImpl supplier = new SupplierImpl(); - return supplier; - } - - /** - * - * - * @generated - */ - public Customer createCustomer() - { - CustomerImpl customer = new CustomerImpl(); - return customer; - } - - /** - * - * - * @generated - */ - public OrderDetail createOrderDetail() - { - OrderDetailImpl orderDetail = new OrderDetailImpl(); - return orderDetail; - } - - /** - * - * - * @generated - */ - public PurchaseOrder createPurchaseOrder() - { - PurchaseOrderImpl purchaseOrder = new PurchaseOrderImpl(); - return purchaseOrder; - } - - /** - * - * - * @generated - */ - public SalesOrder createSalesOrder() - { - SalesOrderImpl salesOrder = new SalesOrderImpl(); - return salesOrder; - } - - /** - * - * - * @generated - */ - public Category createCategory() - { - CategoryImpl category = new CategoryImpl(); - return category; - } - - /** - * - * - * @generated - */ - public Product1 createProduct1() - { - Product1Impl product1 = new Product1Impl(); - return product1; - } - - /** - * - * - * @generated - */ - public OrderAddress createOrderAddress() - { - OrderAddressImpl orderAddress = new OrderAddressImpl(); - return orderAddress; - } - - /** - * - * - * @generated - */ - public Map.Entry createProductToOrder() - { - ProductToOrderImpl productToOrder = new ProductToOrderImpl(); - return productToOrder; - } - - /** - * - * - * @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; - } - - /** - * - * - * @generated - */ - public String convertVATToString(EDataType eDataType, Object instanceValue) - { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * - * - * @generated - */ - public Model1Package getModel1Package() - { - return (Model1Package)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static Model1Package getPackage() - { - return Model1Package.eINSTANCE; - } - -} // Model1FactoryImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Factory; +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Address; +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Company; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.OrderAddress; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; +import org.eclipse.emf.cdo.tests.model1.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; + +import java.util.Map; + +/** + * An implementation of the model Factory. + * @generated + */ +public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * Creates the default factory implementation. + * + * @generated NOT + */ + public static Model1Factory init() + { + try + { + Model1Factory theModel1Factory = (Model1Factory)EPackage.Registry.INSTANCE + .getEFactory("http://www.eclipse.org/emf/CDO/tests/legacy/model1/1.0.0"); + if (theModel1Factory != null) + { + return theModel1Factory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new Model1FactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * @generated + */ + public Model1FactoryImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case Model1Package.ADDRESS: + return createAddress(); + case Model1Package.COMPANY: + return createCompany(); + case Model1Package.SUPPLIER: + return createSupplier(); + case Model1Package.CUSTOMER: + return createCustomer(); + case Model1Package.ORDER_DETAIL: + return createOrderDetail(); + case Model1Package.PURCHASE_ORDER: + return createPurchaseOrder(); + case Model1Package.SALES_ORDER: + return createSalesOrder(); + case Model1Package.CATEGORY: + return createCategory(); + case Model1Package.PRODUCT1: + return createProduct1(); + case Model1Package.ORDER_ADDRESS: + return createOrderAddress(); + case Model1Package.PRODUCT_TO_ORDER: + return (EObject)createProductToOrder(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) + { + switch (eDataType.getClassifierID()) + { + case Model1Package.VAT: + return createVATFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) + { + switch (eDataType.getClassifierID()) + { + case Model1Package.VAT: + return convertVATToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + public Address createAddress() + { + AddressImpl address = new AddressImpl(); + return address; + } + + /** + * + * @generated + */ + public Company createCompany() + { + CompanyImpl company = new CompanyImpl(); + return company; + } + + /** + * + * @generated + */ + public Supplier createSupplier() + { + SupplierImpl supplier = new SupplierImpl(); + return supplier; + } + + /** + * + * @generated + */ + public Customer createCustomer() + { + CustomerImpl customer = new CustomerImpl(); + return customer; + } + + /** + * + * @generated + */ + public OrderDetail createOrderDetail() + { + OrderDetailImpl orderDetail = new OrderDetailImpl(); + return orderDetail; + } + + /** + * + * @generated + */ + public PurchaseOrder createPurchaseOrder() + { + PurchaseOrderImpl purchaseOrder = new PurchaseOrderImpl(); + return purchaseOrder; + } + + /** + * + * @generated + */ + public SalesOrder createSalesOrder() + { + SalesOrderImpl salesOrder = new SalesOrderImpl(); + return salesOrder; + } + + /** + * + * @generated + */ + public Category createCategory() + { + CategoryImpl category = new CategoryImpl(); + return category; + } + + /** + * + * @generated + */ + public Product1 createProduct1() + { + Product1Impl product1 = new Product1Impl(); + return product1; + } + + /** + * + * @generated + */ + public OrderAddress createOrderAddress() + { + OrderAddressImpl orderAddress = new OrderAddressImpl(); + return orderAddress; + } + + /** + * + * @generated + */ + public Map.Entry createProductToOrder() + { + ProductToOrderImpl productToOrder = new ProductToOrderImpl(); + return productToOrder; + } + + /** + * + * @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; + } + + /** + * + * @generated + */ + public String convertVATToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * @generated + */ + public Model1Package getModel1Package() + { + return (Model1Package)getEPackage(); + } + + /** + * + * @deprecated + * @generated + */ + @Deprecated + public static Model1Package getPackage() + { + return Model1Package.eINSTANCE; + } + +} // Model1FactoryImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Model1PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Model1PackageImpl.java index e1e0e75241..d3059a3f7f 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Model1PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Model1PackageImpl.java @@ -1,908 +1,860 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Factory; -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Company; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderAddress; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; -import org.eclipse.emf.cdo.tests.model1.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; - -import java.util.Map; - -/** - * An implementation of the model Package. - * - * @generated - */ -public class Model1PackageImpl extends EPackageImpl implements Model1Package -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - private EClass addressEClass = null; - - /** - * - * - * @generated - */ - private EClass companyEClass = null; - - /** - * - * - * @generated - */ - private EClass supplierEClass = null; - - /** - * - * - * @generated - */ - private EClass customerEClass = null; - - /** - * - * - * @generated - */ - private EClass orderEClass = null; - - /** - * - * - * @generated - */ - private EClass orderDetailEClass = null; - - /** - * - * - * @generated - */ - private EClass purchaseOrderEClass = null; - - /** - * - * - * @generated - */ - private EClass salesOrderEClass = null; - - /** - * - * - * @generated - */ - private EClass categoryEClass = null; - - /** - * - * - * @generated - */ - private EClass product1EClass = null; - - /** - * - * - * @generated - */ - private EClass orderAddressEClass = null; - - /** - * - * - * @generated - */ - private EClass productToOrderEClass = null; - - /** - * - * - * @generated - */ - private EEnum vatEEnum = null; - - /** - * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry - * EPackage.Registry} by the package package URI value. - *

- * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also - * performs initialization of the package, or returns the registered package, if one already exists. - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.emf.cdo.tests.legacy.model1.Model1Package#eNS_URI - * @see #init() - * @generated - */ - private Model1PackageImpl() - { - super(eNS_URI, Model1Factory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - *

- * This method is used to initialize {@link Model1Package#eINSTANCE} when that field is accessed. Clients should not - * invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated NOT - */ - public static Model1Package init() - { - if (isInited) - { - return (Model1Package)EPackage.Registry.INSTANCE.getEPackage(Model1Package.eNS_URI); - } - - // Obtain or create and register package - Model1PackageImpl theModel1Package = (Model1PackageImpl)(EPackage.Registry.INSTANCE.get(Model1Package.eNS_URI) instanceof Model1PackageImpl ? EPackage.Registry.INSTANCE - .get(eNS_URI) : new Model1PackageImpl()); - - isInited = true; - - // Create package meta-data objects - theModel1Package.createPackageContents(); - - // Initialize created meta-data - theModel1Package.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theModel1Package.freeze(); - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(Model1Package.eNS_URI, theModel1Package); - return theModel1Package; - } - - /** - * - * - * @generated - */ - public EClass getAddress() - { - return addressEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getAddress_Name() - { - return (EAttribute)addressEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getAddress_Street() - { - return (EAttribute)addressEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getAddress_City() - { - return (EAttribute)addressEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getCompany() - { - return companyEClass; - } - - /** - * - * - * @generated - */ - public EReference getCompany_Categories() - { - return (EReference)companyEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getCompany_Suppliers() - { - return (EReference)companyEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getCompany_Customers() - { - return (EReference)companyEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getCompany_PurchaseOrders() - { - return (EReference)companyEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getCompany_SalesOrders() - { - return (EReference)companyEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EClass getSupplier() - { - return supplierEClass; - } - - /** - * - * - * @generated - */ - public EReference getSupplier_PurchaseOrders() - { - return (EReference)supplierEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getSupplier_Preferred() - { - return (EAttribute)supplierEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getCustomer() - { - return customerEClass; - } - - /** - * - * - * @generated - */ - public EReference getCustomer_SalesOrders() - { - return (EReference)customerEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getCustomer_OrderByProduct() - { - return (EReference)customerEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getOrder() - { - return orderEClass; - } - - /** - * - * - * @generated - */ - public EReference getOrder_OrderDetails() - { - return (EReference)orderEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getOrderDetail() - { - return orderDetailEClass; - } - - /** - * - * - * @generated - */ - public EReference getOrderDetail_Order() - { - return (EReference)orderDetailEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getOrderDetail_Product() - { - return (EReference)orderDetailEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getOrderDetail_Price() - { - return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getPurchaseOrder() - { - return purchaseOrderEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getPurchaseOrder_Date() - { - return (EAttribute)purchaseOrderEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getPurchaseOrder_Supplier() - { - return (EReference)purchaseOrderEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getSalesOrder() - { - return salesOrderEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getSalesOrder_Id() - { - return (EAttribute)salesOrderEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getSalesOrder_Customer() - { - return (EReference)salesOrderEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getCategory() - { - return categoryEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getCategory_Name() - { - return (EAttribute)categoryEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getCategory_Categories() - { - return (EReference)categoryEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getCategory_Products() - { - return (EReference)categoryEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getProduct1() - { - return product1EClass; - } - - /** - * - * - * @generated - */ - public EAttribute getProduct1_Name() - { - return (EAttribute)product1EClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getProduct1_OrderDetails() - { - return (EReference)product1EClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getProduct1_Vat() - { - return (EAttribute)product1EClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getProduct1_Description() - { - return (EAttribute)product1EClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getOrderAddress() - { - return orderAddressEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getOrderAddress_TestAttribute() - { - return (EAttribute)orderAddressEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getProductToOrder() - { - return productToOrderEClass; - } - - /** - * - * - * @generated - */ - public EReference getProductToOrder_Key() - { - return (EReference)productToOrderEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getProductToOrder_Value() - { - return (EReference)productToOrderEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EEnum getVAT() - { - return vatEEnum; - } - - /** - * - * - * @generated - */ - public Model1Factory getModel1Factory() - { - return (Model1Factory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its - * first. - * - * @generated - */ - public void createPackageContents() - { - if (isCreated) - { - return; - } - isCreated = true; - - // Create classes and their features - addressEClass = createEClass(ADDRESS); - createEAttribute(addressEClass, ADDRESS__NAME); - createEAttribute(addressEClass, ADDRESS__STREET); - createEAttribute(addressEClass, ADDRESS__CITY); - - companyEClass = createEClass(COMPANY); - createEReference(companyEClass, COMPANY__CATEGORIES); - createEReference(companyEClass, COMPANY__SUPPLIERS); - createEReference(companyEClass, COMPANY__CUSTOMERS); - createEReference(companyEClass, COMPANY__PURCHASE_ORDERS); - createEReference(companyEClass, COMPANY__SALES_ORDERS); - - supplierEClass = createEClass(SUPPLIER); - createEReference(supplierEClass, SUPPLIER__PURCHASE_ORDERS); - createEAttribute(supplierEClass, SUPPLIER__PREFERRED); - - customerEClass = createEClass(CUSTOMER); - createEReference(customerEClass, CUSTOMER__SALES_ORDERS); - createEReference(customerEClass, CUSTOMER__ORDER_BY_PRODUCT); - - 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); - - product1EClass = createEClass(PRODUCT1); - createEAttribute(product1EClass, PRODUCT1__NAME); - createEReference(product1EClass, PRODUCT1__ORDER_DETAILS); - createEAttribute(product1EClass, PRODUCT1__VAT); - createEAttribute(product1EClass, PRODUCT1__DESCRIPTION); - - orderAddressEClass = createEClass(ORDER_ADDRESS); - createEAttribute(orderAddressEClass, ORDER_ADDRESS__TEST_ATTRIBUTE); - - productToOrderEClass = createEClass(PRODUCT_TO_ORDER); - createEReference(productToOrderEClass, PRODUCT_TO_ORDER__KEY); - createEReference(productToOrderEClass, PRODUCT_TO_ORDER__VALUE); - - // Create enums - vatEEnum = createEEnum(VAT); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any - * invocation but its first. - * - * @generated - */ - public void initializePackageContents() - { - if (isInitialized) - { - return; - } - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - companyEClass.getESuperTypes().add(getAddress()); - supplierEClass.getESuperTypes().add(getAddress()); - customerEClass.getESuperTypes().add(getAddress()); - purchaseOrderEClass.getESuperTypes().add(getOrder()); - salesOrderEClass.getESuperTypes().add(getOrder()); - orderAddressEClass.getESuperTypes().add(getAddress()); - orderAddressEClass.getESuperTypes().add(getOrder()); - orderAddressEClass.getESuperTypes().add(getOrderDetail()); - - // Initialize classes and features; add operations and parameters - initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getAddress_Name(), ecorePackage.getEString(), "name", null, 0, 1, Address.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAddress_Street(), ecorePackage.getEString(), "street", null, 0, 1, Address.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAddress_City(), ecorePackage.getEString(), "city", null, 0, 1, Address.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(companyEClass, Company.class, "Company", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getCompany_Categories(), getCategory(), null, "categories", null, 0, -1, Company.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEReference(getCompany_Suppliers(), getSupplier(), null, "suppliers", null, 0, -1, Company.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - initEReference(getCompany_Customers(), getCustomer(), null, "customers", null, 0, -1, Company.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - initEReference(getCompany_PurchaseOrders(), getPurchaseOrder(), null, "purchaseOrders", null, 0, -1, Company.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEReference(getCompany_SalesOrders(), getSalesOrder(), null, "salesOrders", null, 0, -1, Company.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - - initEClass(supplierEClass, Supplier.class, "Supplier", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getSupplier_PurchaseOrders(), getPurchaseOrder(), getPurchaseOrder_Supplier(), "purchaseOrders", - null, 0, -1, Supplier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSupplier_Preferred(), ecorePackage.getEBoolean(), "preferred", "true", 0, 1, Supplier.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(customerEClass, Customer.class, "Customer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getCustomer_SalesOrders(), getSalesOrder(), getSalesOrder_Customer(), "salesOrders", null, 0, -1, - Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getCustomer_OrderByProduct(), getProductToOrder(), null, "orderByProduct", null, 0, -1, - Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(orderEClass, Order.class, "Order", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getOrder_OrderDetails(), getOrderDetail(), getOrderDetail_Order(), "orderDetails", null, 0, -1, - Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(orderDetailEClass, OrderDetail.class, "OrderDetail", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEReference(getOrderDetail_Order(), getOrder(), getOrder_OrderDetails(), "order", null, 1, 1, OrderDetail.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEReference(getOrderDetail_Product(), getProduct1(), getProduct1_OrderDetails(), "product", null, 0, 1, - OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getOrderDetail_Price(), ecorePackage.getEFloat(), "price", null, 0, 1, OrderDetail.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(purchaseOrderEClass, PurchaseOrder.class, "PurchaseOrder", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPurchaseOrder_Date(), ecorePackage.getEDate(), "date", null, 0, 1, PurchaseOrder.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getPurchaseOrder_Supplier(), getSupplier(), getSupplier_PurchaseOrders(), "supplier", null, 1, 1, - PurchaseOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(salesOrderEClass, SalesOrder.class, "SalesOrder", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getSalesOrder_Id(), ecorePackage.getEInt(), "id", null, 0, 1, SalesOrder.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSalesOrder_Customer(), getCustomer(), getCustomer_SalesOrders(), "customer", null, 1, 1, - SalesOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(categoryEClass, Category.class, "Category", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getCategory_Name(), ecorePackage.getEString(), "name", null, 0, 1, Category.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getCategory_Categories(), getCategory(), null, "categories", null, 0, -1, Category.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEReference(getCategory_Products(), getProduct1(), 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(product1EClass, Product1.class, "Product1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getProduct1_Name(), ecorePackage.getEString(), "name", null, 0, 1, Product1.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getProduct1_OrderDetails(), getOrderDetail(), getOrderDetail_Product(), "orderDetails", null, 0, -1, - Product1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProduct1_Vat(), getVAT(), "vat", "vat15", 0, 1, Product1.class, !IS_TRANSIENT, !IS_VOLATILE, - IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProduct1_Description(), ecorePackage.getEString(), "description", null, 0, 1, Product1.class, - IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(orderAddressEClass, OrderAddress.class, "OrderAddress", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getOrderAddress_TestAttribute(), ecorePackage.getEBoolean(), "testAttribute", null, 0, 1, - OrderAddress.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - - initEClass(productToOrderEClass, Map.Entry.class, "ProductToOrder", !IS_ABSTRACT, !IS_INTERFACE, - !IS_GENERATED_INSTANCE_CLASS); - initEReference(getProductToOrder_Key(), getProduct1(), null, "key", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - initEReference(getProductToOrder_Value(), getSalesOrder(), null, "value", null, 0, 1, Map.Entry.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - - // Initialize enums and add enum literals - initEEnum(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.class, "VAT"); - addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT0); - addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT7); - addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT15); - - // Create resource - createResource(eNS_URI); - - // Create annotations - // teneo.jpa - createTeneoAnnotations(); - } - - /** - * Initializes the annotations for teneo.jpa. - * - * @generated - */ - protected void createTeneoAnnotations() - { - String source = "teneo.jpa"; - addAnnotation( - this, - source, - new String[] { - "value", - "@hbGenericGenerators({@GenericGenerator(name=\"system-uuid\", strategy = \"org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOUUIDHexGenerator\")})" }); - addAnnotation(orderEClass, source, new String[] { "value", "@Entity(name=\"BaseOrder\")" }); - addAnnotation(getProduct1_Name(), source, new String[] { "value", "@Id" }); - addAnnotation(orderAddressEClass, source, new String[] { "value", - "@AssociationOverride(name=\"orderDetails\", joinColumns=@JoinColumn(name=\"orderdetails_orderaddressid\"))" }); - } - -} // Model1PackageImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Factory; +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Address; +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Company; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderAddress; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; +import org.eclipse.emf.cdo.tests.model1.VAT; + +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; + +import java.util.Map; + +/** + * An implementation of the model Package. + * @generated + */ +public class Model1PackageImpl extends EPackageImpl implements Model1Package +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * + * @generated + */ + private EClass addressEClass = null; + + /** + * + * @generated + */ + private EClass companyEClass = null; + + /** + * + * @generated + */ + private EClass supplierEClass = null; + + /** + * + * @generated + */ + private EClass customerEClass = null; + + /** + * + * @generated + */ + private EClass orderEClass = null; + + /** + * + * @generated + */ + private EClass orderDetailEClass = null; + + /** + * + * @generated + */ + private EClass purchaseOrderEClass = null; + + /** + * + * @generated + */ + private EClass salesOrderEClass = null; + + /** + * + * @generated + */ + private EClass categoryEClass = null; + + /** + * + * @generated + */ + private EClass product1EClass = null; + + /** + * + * @generated + */ + private EClass orderAddressEClass = null; + + /** + * + * @generated + */ + private EClass productToOrderEClass = null; + + /** + * + * @generated + */ + private EEnum vatEEnum = null; + + /** + * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry + * EPackage.Registry} by the package package URI value. + *

+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also + * performs initialization of the package, or returns the registered package, if one already exists. + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.emf.cdo.tests.legacy.model1.Model1Package#eNS_URI + * @see #init() + * @generated + */ + private Model1PackageImpl() + { + super(eNS_URI, Model1Factory.eINSTANCE); + } + + /** + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + *

+ * This method is used to initialize {@link Model1Package#eINSTANCE} when that field is accessed. Clients should not + * invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated NOT + */ + public static Model1Package init() + { + if (isInited) + { + return (Model1Package)EPackage.Registry.INSTANCE.getEPackage(Model1Package.eNS_URI); + } + + // Obtain or create and register package + Model1PackageImpl theModel1Package = (Model1PackageImpl)(EPackage.Registry.INSTANCE.get(Model1Package.eNS_URI) instanceof Model1PackageImpl ? EPackage.Registry.INSTANCE + .get(eNS_URI) : new Model1PackageImpl()); + + isInited = true; + + // Create package meta-data objects + theModel1Package.createPackageContents(); + + // Initialize created meta-data + theModel1Package.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theModel1Package.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(Model1Package.eNS_URI, theModel1Package); + return theModel1Package; + } + + /** + * + * @generated + */ + public EClass getAddress() + { + return addressEClass; + } + + /** + * + * @generated + */ + public EAttribute getAddress_Name() + { + return (EAttribute)addressEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EAttribute getAddress_Street() + { + return (EAttribute)addressEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EAttribute getAddress_City() + { + return (EAttribute)addressEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EClass getCompany() + { + return companyEClass; + } + + /** + * + * @generated + */ + public EReference getCompany_Categories() + { + return (EReference)companyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getCompany_Suppliers() + { + return (EReference)companyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EReference getCompany_Customers() + { + return (EReference)companyEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EReference getCompany_PurchaseOrders() + { + return (EReference)companyEClass.getEStructuralFeatures().get(3); + } + + /** + * + * @generated + */ + public EReference getCompany_SalesOrders() + { + return (EReference)companyEClass.getEStructuralFeatures().get(4); + } + + /** + * + * @generated + */ + public EClass getSupplier() + { + return supplierEClass; + } + + /** + * + * @generated + */ + public EReference getSupplier_PurchaseOrders() + { + return (EReference)supplierEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EAttribute getSupplier_Preferred() + { + return (EAttribute)supplierEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getCustomer() + { + return customerEClass; + } + + /** + * + * @generated + */ + public EReference getCustomer_SalesOrders() + { + return (EReference)customerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getCustomer_OrderByProduct() + { + return (EReference)customerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getOrder() + { + return orderEClass; + } + + /** + * + * @generated + */ + public EReference getOrder_OrderDetails() + { + return (EReference)orderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EClass getOrderDetail() + { + return orderDetailEClass; + } + + /** + * + * @generated + */ + public EReference getOrderDetail_Order() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getOrderDetail_Product() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EAttribute getOrderDetail_Price() + { + return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EClass getPurchaseOrder() + { + return purchaseOrderEClass; + } + + /** + * + * @generated + */ + public EAttribute getPurchaseOrder_Date() + { + return (EAttribute)purchaseOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getPurchaseOrder_Supplier() + { + return (EReference)purchaseOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getSalesOrder() + { + return salesOrderEClass; + } + + /** + * + * @generated + */ + public EAttribute getSalesOrder_Id() + { + return (EAttribute)salesOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getSalesOrder_Customer() + { + return (EReference)salesOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getCategory() + { + return categoryEClass; + } + + /** + * + * @generated + */ + public EAttribute getCategory_Name() + { + return (EAttribute)categoryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getCategory_Categories() + { + return (EReference)categoryEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EReference getCategory_Products() + { + return (EReference)categoryEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EClass getProduct1() + { + return product1EClass; + } + + /** + * + * @generated + */ + public EAttribute getProduct1_Name() + { + return (EAttribute)product1EClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getProduct1_OrderDetails() + { + return (EReference)product1EClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EAttribute getProduct1_Vat() + { + return (EAttribute)product1EClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getProduct1_OtherVATs() + { + return (EAttribute)product1EClass.getEStructuralFeatures().get(3); + } + + /** + * + * @generated + */ + public EAttribute getProduct1_Description() + { + return (EAttribute)product1EClass.getEStructuralFeatures().get(4); + } + + /** + * + * @generated + */ + public EClass getOrderAddress() + { + return orderAddressEClass; + } + + /** + * + * @generated + */ + public EAttribute getOrderAddress_TestAttribute() + { + return (EAttribute)orderAddressEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EClass getProductToOrder() + { + return productToOrderEClass; + } + + /** + * + * @generated + */ + public EReference getProductToOrder_Key() + { + return (EReference)productToOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getProductToOrder_Value() + { + return (EReference)productToOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EEnum getVAT() + { + return vatEEnum; + } + + /** + * + * @generated + */ + public Model1Factory getModel1Factory() + { + return (Model1Factory)getEFactoryInstance(); + } + + /** + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) + { + return; + } + isCreated = true; + + // Create classes and their features + addressEClass = createEClass(ADDRESS); + createEAttribute(addressEClass, ADDRESS__NAME); + createEAttribute(addressEClass, ADDRESS__STREET); + createEAttribute(addressEClass, ADDRESS__CITY); + + companyEClass = createEClass(COMPANY); + createEReference(companyEClass, COMPANY__CATEGORIES); + createEReference(companyEClass, COMPANY__SUPPLIERS); + createEReference(companyEClass, COMPANY__CUSTOMERS); + createEReference(companyEClass, COMPANY__PURCHASE_ORDERS); + createEReference(companyEClass, COMPANY__SALES_ORDERS); + + supplierEClass = createEClass(SUPPLIER); + createEReference(supplierEClass, SUPPLIER__PURCHASE_ORDERS); + createEAttribute(supplierEClass, SUPPLIER__PREFERRED); + + customerEClass = createEClass(CUSTOMER); + createEReference(customerEClass, CUSTOMER__SALES_ORDERS); + createEReference(customerEClass, CUSTOMER__ORDER_BY_PRODUCT); + + 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); + + product1EClass = createEClass(PRODUCT1); + createEAttribute(product1EClass, PRODUCT1__NAME); + createEReference(product1EClass, PRODUCT1__ORDER_DETAILS); + createEAttribute(product1EClass, PRODUCT1__VAT); + createEAttribute(product1EClass, PRODUCT1__OTHER_VA_TS); + createEAttribute(product1EClass, PRODUCT1__DESCRIPTION); + + orderAddressEClass = createEClass(ORDER_ADDRESS); + createEAttribute(orderAddressEClass, ORDER_ADDRESS__TEST_ATTRIBUTE); + + productToOrderEClass = createEClass(PRODUCT_TO_ORDER); + createEReference(productToOrderEClass, PRODUCT_TO_ORDER__KEY); + createEReference(productToOrderEClass, PRODUCT_TO_ORDER__VALUE); + + // Create enums + vatEEnum = createEEnum(VAT); + } + + /** + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) + { + return; + } + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + companyEClass.getESuperTypes().add(getAddress()); + supplierEClass.getESuperTypes().add(getAddress()); + customerEClass.getESuperTypes().add(getAddress()); + purchaseOrderEClass.getESuperTypes().add(getOrder()); + salesOrderEClass.getESuperTypes().add(getOrder()); + orderAddressEClass.getESuperTypes().add(getAddress()); + orderAddressEClass.getESuperTypes().add(getOrder()); + orderAddressEClass.getESuperTypes().add(getOrderDetail()); + + // Initialize classes and features; add operations and parameters + initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAddress_Name(), ecorePackage.getEString(), "name", null, 0, 1, Address.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAddress_Street(), ecorePackage.getEString(), "street", null, 0, 1, Address.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAddress_City(), ecorePackage.getEString(), "city", null, 0, 1, Address.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(companyEClass, Company.class, "Company", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompany_Categories(), getCategory(), null, "categories", null, 0, -1, Company.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getCompany_Suppliers(), getSupplier(), null, "suppliers", null, 0, -1, Company.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getCompany_Customers(), getCustomer(), null, "customers", null, 0, -1, Company.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getCompany_PurchaseOrders(), getPurchaseOrder(), null, "purchaseOrders", null, 0, -1, Company.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getCompany_SalesOrders(), getSalesOrder(), null, "salesOrders", null, 0, -1, Company.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + initEClass(supplierEClass, Supplier.class, "Supplier", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSupplier_PurchaseOrders(), getPurchaseOrder(), getPurchaseOrder_Supplier(), "purchaseOrders", + null, 0, -1, Supplier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getSupplier_Preferred(), ecorePackage.getEBoolean(), "preferred", "true", 0, 1, Supplier.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(customerEClass, Customer.class, "Customer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCustomer_SalesOrders(), getSalesOrder(), getSalesOrder_Customer(), "salesOrders", null, 0, -1, + Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCustomer_OrderByProduct(), getProductToOrder(), null, "orderByProduct", null, 0, -1, + Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(orderEClass, Order.class, "Order", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getOrder_OrderDetails(), getOrderDetail(), getOrderDetail_Order(), "orderDetails", null, 0, -1, + Order.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(orderDetailEClass, OrderDetail.class, "OrderDetail", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEReference(getOrderDetail_Order(), getOrder(), getOrder_OrderDetails(), "order", null, 1, 1, OrderDetail.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getOrderDetail_Product(), getProduct1(), getProduct1_OrderDetails(), "product", null, 0, 1, + OrderDetail.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getOrderDetail_Price(), ecorePackage.getEFloat(), "price", null, 0, 1, OrderDetail.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(purchaseOrderEClass, PurchaseOrder.class, "PurchaseOrder", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getPurchaseOrder_Date(), ecorePackage.getEDate(), "date", null, 0, 1, PurchaseOrder.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPurchaseOrder_Supplier(), getSupplier(), getSupplier_PurchaseOrders(), "supplier", null, 1, 1, + PurchaseOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(salesOrderEClass, SalesOrder.class, "SalesOrder", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getSalesOrder_Id(), ecorePackage.getEInt(), "id", null, 0, 1, SalesOrder.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getSalesOrder_Customer(), getCustomer(), getCustomer_SalesOrders(), "customer", null, 1, 1, + SalesOrder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(categoryEClass, Category.class, "Category", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getCategory_Name(), ecorePackage.getEString(), "name", null, 0, 1, Category.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCategory_Categories(), getCategory(), null, "categories", null, 0, -1, Category.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getCategory_Products(), getProduct1(), 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(product1EClass, Product1.class, "Product1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getProduct1_Name(), ecorePackage.getEString(), "name", null, 0, 1, Product1.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getProduct1_OrderDetails(), getOrderDetail(), getOrderDetail_Product(), "orderDetails", null, 0, -1, + Product1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProduct1_Vat(), getVAT(), "vat", "vat15", 0, 1, Product1.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProduct1_OtherVATs(), getVAT(), "otherVATs", "vat15", 0, -1, Product1.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProduct1_Description(), ecorePackage.getEString(), "description", null, 0, 1, Product1.class, + IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(orderAddressEClass, OrderAddress.class, "OrderAddress", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getOrderAddress_TestAttribute(), ecorePackage.getEBoolean(), "testAttribute", null, 0, 1, + OrderAddress.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEClass(productToOrderEClass, Map.Entry.class, "ProductToOrder", !IS_ABSTRACT, !IS_INTERFACE, + !IS_GENERATED_INSTANCE_CLASS); + initEReference(getProductToOrder_Key(), getProduct1(), null, "key", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + initEReference(getProductToOrder_Value(), getSalesOrder(), null, "value", null, 0, 1, Map.Entry.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(vatEEnum, VAT.class, "VAT"); + addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT0); + addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT7); + addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT15); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // teneo.jpa + createTeneoAnnotations(); + } + + /** + * Initializes the annotations for teneo.jpa. + * + * @generated + */ + protected void createTeneoAnnotations() + { + String source = "teneo.jpa"; + addAnnotation( + this, + source, + new String[] { + "value", + "@hbGenericGenerators({@GenericGenerator(name=\"system-uuid\", strategy = \"org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOUUIDHexGenerator\")})" }); + addAnnotation(orderEClass, source, new String[] { "value", "@Entity(name=\"BaseOrder\")" }); + addAnnotation(getProduct1_Name(), source, new String[] { "value", "@Id" }); + addAnnotation(orderAddressEClass, source, new String[] { "value", + "@AssociationOverride(name=\"orderDetails\", joinColumns=@JoinColumn(name=\"orderdetails_orderaddressid\"))" }); + } + +} // Model1PackageImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderAddressImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderAddressImpl.java index 283d14de1a..e552f4fec0 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderAddressImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderAddressImpl.java @@ -1,585 +1,560 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderAddress; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.ecore.util.InternalEList; - -import java.util.Collection; - -/** - * An implementation of the model object 'Order Address'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#getOrderDetails Order Details}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#getOrder Order}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#getProduct Product}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#getPrice Price}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#isTestAttribute Test Attribute}
  • - *
- *

- * - * @generated - */ -public class OrderAddressImpl extends AddressImpl implements OrderAddress -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The cached value of the '{@link #getOrderDetails() Order Details}' containment reference list. - * - * @see #getOrderDetails() - * @generated - * @ordered - */ - protected EList orderDetails; - - /** - * The cached value of the '{@link #getProduct() Product}' reference. - * - * @see #getProduct() - * @generated - * @ordered - */ - protected Product1 product; - - /** - * The default value of the '{@link #getPrice() Price}' attribute. - * - * @see #getPrice() - * @generated - * @ordered - */ - protected static final float PRICE_EDEFAULT = 0.0F; - - /** - * The cached value of the '{@link #getPrice() Price}' attribute. - * - * @see #getPrice() - * @generated - * @ordered - */ - protected float price = PRICE_EDEFAULT; - - /** - * The default value of the '{@link #isTestAttribute() Test Attribute}' attribute. - * - * - * @see #isTestAttribute() - * @generated - * @ordered - */ - protected static final boolean TEST_ATTRIBUTE_EDEFAULT = false; - - /** - * The cached value of the '{@link #isTestAttribute() Test Attribute}' attribute. - * - * - * @see #isTestAttribute() - * @generated - * @ordered - */ - protected boolean testAttribute = TEST_ATTRIBUTE_EDEFAULT; - - /** - * - * - * @generated - */ - protected OrderAddressImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getOrderAddress(); - } - - /** - * - * - * @generated - */ - public EList getOrderDetails() - { - if (orderDetails == null) - { - orderDetails = new EObjectContainmentWithInverseEList(OrderDetail.class, this, - Model1Package.ORDER_ADDRESS__ORDER_DETAILS, Model1Package.ORDER_DETAIL__ORDER); - } - return orderDetails; - } - - /** - * - * - * @generated - */ - public Order getOrder() - { - if (eContainerFeatureID() != Model1Package.ORDER_ADDRESS__ORDER) - return null; - return (Order)eContainer(); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetOrder(Order newOrder, NotificationChain msgs) - { - msgs = eBasicSetContainer((InternalEObject)newOrder, Model1Package.ORDER_ADDRESS__ORDER, msgs); - return msgs; - } - - /** - * - * - * @generated - */ - public void setOrder(Order newOrder) - { - if (newOrder != eInternalContainer() - || (eContainerFeatureID() != Model1Package.ORDER_ADDRESS__ORDER && newOrder != null)) - { - if (EcoreUtil.isAncestor(this, newOrder)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newOrder != null) - msgs = ((InternalEObject)newOrder).eInverseAdd(this, Model1Package.ORDER__ORDER_DETAILS, Order.class, msgs); - msgs = basicSetOrder(newOrder, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_ADDRESS__ORDER, newOrder, newOrder)); - } - - /** - * - * - * @generated - */ - public Product1 getProduct() - { - if (product != null && product.eIsProxy()) - { - InternalEObject oldProduct = (InternalEObject)product; - product = (Product1)eResolveProxy(oldProduct); - if (product != oldProduct) - { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.ORDER_ADDRESS__PRODUCT, oldProduct, - product)); - } - } - return product; - } - - /** - * - * - * @generated - */ - public Product1 basicGetProduct() - { - return product; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetProduct(Product1 newProduct, NotificationChain msgs) - { - Product1 oldProduct = product; - product = newProduct; - if (eNotificationRequired()) - { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, - Model1Package.ORDER_ADDRESS__PRODUCT, oldProduct, newProduct); - if (msgs == null) - msgs = notification; - else - msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setProduct(Product1 newProduct) - { - if (newProduct != product) - { - NotificationChain msgs = null; - if (product != null) - msgs = ((InternalEObject)product).eInverseRemove(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, - msgs); - if (newProduct != null) - msgs = ((InternalEObject)newProduct).eInverseAdd(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, - msgs); - msgs = basicSetProduct(newProduct, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_ADDRESS__PRODUCT, newProduct, - newProduct)); - } - - /** - * - * - * @generated - */ - public float getPrice() - { - return price; - } - - /** - * - * - * @generated - */ - public void setPrice(float newPrice) - { - float oldPrice = price; - price = newPrice; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_ADDRESS__PRICE, oldPrice, price)); - } - - /** - * - * - * @generated - */ - public boolean isTestAttribute() - { - return testAttribute; - } - - /** - * - * - * @generated - */ - public void setTestAttribute(boolean newTestAttribute) - { - boolean oldTestAttribute = testAttribute; - testAttribute = newTestAttribute; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE, - oldTestAttribute, testAttribute)); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: - return ((InternalEList)(InternalEList)getOrderDetails()).basicAdd(otherEnd, msgs); - case Model1Package.ORDER_ADDRESS__ORDER: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetOrder((Order)otherEnd, msgs); - case Model1Package.ORDER_ADDRESS__PRODUCT: - if (product != null) - msgs = ((InternalEObject)product).eInverseRemove(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, - msgs); - return basicSetProduct((Product1)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: - return ((InternalEList)getOrderDetails()).basicRemove(otherEnd, msgs); - case Model1Package.ORDER_ADDRESS__ORDER: - return basicSetOrder(null, msgs); - case Model1Package.ORDER_ADDRESS__PRODUCT: - return basicSetProduct(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) - { - switch (eContainerFeatureID()) - { - case Model1Package.ORDER_ADDRESS__ORDER: - return eInternalContainer().eInverseRemove(this, Model1Package.ORDER__ORDER_DETAILS, Order.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: - return getOrderDetails(); - case Model1Package.ORDER_ADDRESS__ORDER: - return getOrder(); - case Model1Package.ORDER_ADDRESS__PRODUCT: - if (resolve) - return getProduct(); - return basicGetProduct(); - case Model1Package.ORDER_ADDRESS__PRICE: - return getPrice(); - case Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE: - return isTestAttribute(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: - getOrderDetails().clear(); - getOrderDetails().addAll((Collection)newValue); - return; - case Model1Package.ORDER_ADDRESS__ORDER: - setOrder((Order)newValue); - return; - case Model1Package.ORDER_ADDRESS__PRODUCT: - setProduct((Product1)newValue); - return; - case Model1Package.ORDER_ADDRESS__PRICE: - setPrice((Float)newValue); - return; - case Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE: - setTestAttribute((Boolean)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: - getOrderDetails().clear(); - return; - case Model1Package.ORDER_ADDRESS__ORDER: - setOrder((Order)null); - return; - case Model1Package.ORDER_ADDRESS__PRODUCT: - setProduct((Product1)null); - return; - case Model1Package.ORDER_ADDRESS__PRICE: - setPrice(PRICE_EDEFAULT); - return; - case Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE: - setTestAttribute(TEST_ATTRIBUTE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: - return orderDetails != null && !orderDetails.isEmpty(); - case Model1Package.ORDER_ADDRESS__ORDER: - return getOrder() != null; - case Model1Package.ORDER_ADDRESS__PRODUCT: - return product != null; - case Model1Package.ORDER_ADDRESS__PRICE: - return price != PRICE_EDEFAULT; - case Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE: - return testAttribute != TEST_ATTRIBUTE_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) - { - if (baseClass == Order.class) - { - switch (derivedFeatureID) - { - case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: - return Model1Package.ORDER__ORDER_DETAILS; - default: - return -1; - } - } - if (baseClass == OrderDetail.class) - { - switch (derivedFeatureID) - { - case Model1Package.ORDER_ADDRESS__ORDER: - return Model1Package.ORDER_DETAIL__ORDER; - case Model1Package.ORDER_ADDRESS__PRODUCT: - return Model1Package.ORDER_DETAIL__PRODUCT; - case Model1Package.ORDER_ADDRESS__PRICE: - return Model1Package.ORDER_DETAIL__PRICE; - default: - return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } - - /** - * - * - * @generated - */ - @Override - public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) - { - if (baseClass == Order.class) - { - switch (baseFeatureID) - { - case Model1Package.ORDER__ORDER_DETAILS: - return Model1Package.ORDER_ADDRESS__ORDER_DETAILS; - default: - return -1; - } - } - if (baseClass == OrderDetail.class) - { - switch (baseFeatureID) - { - case Model1Package.ORDER_DETAIL__ORDER: - return Model1Package.ORDER_ADDRESS__ORDER; - case Model1Package.ORDER_DETAIL__PRODUCT: - return Model1Package.ORDER_ADDRESS__PRODUCT; - case Model1Package.ORDER_DETAIL__PRICE: - return Model1Package.ORDER_ADDRESS__PRICE; - default: - return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (price: "); - result.append(price); - result.append(", testAttribute: "); - result.append(testAttribute); - result.append(')'); - return result.toString(); - } - -} // OrderAddressImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderAddress; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Order Address'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#getOrderDetails Order Details}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#getOrder Order}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#getProduct Product}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#getPrice Price}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderAddressImpl#isTestAttribute Test Attribute}
  • + *
+ *

+ * + * @generated + */ +public class OrderAddressImpl extends AddressImpl implements OrderAddress +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The cached value of the '{@link #getOrderDetails() Order Details}' containment reference list. + * + * @see #getOrderDetails() + * @generated + * @ordered + */ + protected EList orderDetails; + + /** + * The cached value of the '{@link #getProduct() Product}' reference. + * + * @see #getProduct() + * @generated + * @ordered + */ + protected Product1 product; + + /** + * The default value of the '{@link #getPrice() Price}' attribute. + * + * @see #getPrice() + * @generated + * @ordered + */ + protected static final float PRICE_EDEFAULT = 0.0F; + + /** + * The cached value of the '{@link #getPrice() Price}' attribute. + * + * @see #getPrice() + * @generated + * @ordered + */ + protected float price = PRICE_EDEFAULT; + + /** + * The default value of the '{@link #isTestAttribute() Test Attribute}' attribute. + * + * + * @see #isTestAttribute() + * @generated + * @ordered + */ + protected static final boolean TEST_ATTRIBUTE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isTestAttribute() Test Attribute}' attribute. + * + * + * @see #isTestAttribute() + * @generated + * @ordered + */ + protected boolean testAttribute = TEST_ATTRIBUTE_EDEFAULT; + + /** + * + * @generated + */ + protected OrderAddressImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getOrderAddress(); + } + + /** + * + * @generated + */ + public EList getOrderDetails() + { + if (orderDetails == null) + { + orderDetails = new EObjectContainmentWithInverseEList(OrderDetail.class, this, + Model1Package.ORDER_ADDRESS__ORDER_DETAILS, Model1Package.ORDER_DETAIL__ORDER); + } + return orderDetails; + } + + /** + * + * @generated + */ + public Order getOrder() + { + if (eContainerFeatureID() != Model1Package.ORDER_ADDRESS__ORDER) + return null; + return (Order)eContainer(); + } + + /** + * + * @generated + */ + public NotificationChain basicSetOrder(Order newOrder, NotificationChain msgs) + { + msgs = eBasicSetContainer((InternalEObject)newOrder, Model1Package.ORDER_ADDRESS__ORDER, msgs); + return msgs; + } + + /** + * + * @generated + */ + public void setOrder(Order newOrder) + { + if (newOrder != eInternalContainer() + || (eContainerFeatureID() != Model1Package.ORDER_ADDRESS__ORDER && newOrder != null)) + { + if (EcoreUtil.isAncestor(this, newOrder)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newOrder != null) + msgs = ((InternalEObject)newOrder).eInverseAdd(this, Model1Package.ORDER__ORDER_DETAILS, Order.class, msgs); + msgs = basicSetOrder(newOrder, msgs); + if (msgs != null) + msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_ADDRESS__ORDER, newOrder, newOrder)); + } + + /** + * + * @generated + */ + public Product1 getProduct() + { + if (product != null && product.eIsProxy()) + { + InternalEObject oldProduct = (InternalEObject)product; + product = (Product1)eResolveProxy(oldProduct); + if (product != oldProduct) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.ORDER_ADDRESS__PRODUCT, oldProduct, + product)); + } + } + return product; + } + + /** + * + * @generated + */ + public Product1 basicGetProduct() + { + return product; + } + + /** + * + * @generated + */ + public NotificationChain basicSetProduct(Product1 newProduct, NotificationChain msgs) + { + Product1 oldProduct = product; + product = newProduct; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + Model1Package.ORDER_ADDRESS__PRODUCT, oldProduct, newProduct); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * @generated + */ + public void setProduct(Product1 newProduct) + { + if (newProduct != product) + { + NotificationChain msgs = null; + if (product != null) + msgs = ((InternalEObject)product).eInverseRemove(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, + msgs); + if (newProduct != null) + msgs = ((InternalEObject)newProduct).eInverseAdd(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, + msgs); + msgs = basicSetProduct(newProduct, msgs); + if (msgs != null) + msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_ADDRESS__PRODUCT, newProduct, + newProduct)); + } + + /** + * + * @generated + */ + public float getPrice() + { + return price; + } + + /** + * + * @generated + */ + public void setPrice(float newPrice) + { + float oldPrice = price; + price = newPrice; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_ADDRESS__PRICE, oldPrice, price)); + } + + /** + * + * @generated + */ + public boolean isTestAttribute() + { + return testAttribute; + } + + /** + * + * @generated + */ + public void setTestAttribute(boolean newTestAttribute) + { + boolean oldTestAttribute = testAttribute; + testAttribute = newTestAttribute; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE, + oldTestAttribute, testAttribute)); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: + return ((InternalEList)(InternalEList)getOrderDetails()).basicAdd(otherEnd, msgs); + case Model1Package.ORDER_ADDRESS__ORDER: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetOrder((Order)otherEnd, msgs); + case Model1Package.ORDER_ADDRESS__PRODUCT: + if (product != null) + msgs = ((InternalEObject)product).eInverseRemove(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, + msgs); + return basicSetProduct((Product1)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: + return ((InternalEList)getOrderDetails()).basicRemove(otherEnd, msgs); + case Model1Package.ORDER_ADDRESS__ORDER: + return basicSetOrder(null, msgs); + case Model1Package.ORDER_ADDRESS__PRODUCT: + return basicSetProduct(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) + { + switch (eContainerFeatureID()) + { + case Model1Package.ORDER_ADDRESS__ORDER: + return eInternalContainer().eInverseRemove(this, Model1Package.ORDER__ORDER_DETAILS, Order.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: + return getOrderDetails(); + case Model1Package.ORDER_ADDRESS__ORDER: + return getOrder(); + case Model1Package.ORDER_ADDRESS__PRODUCT: + if (resolve) + return getProduct(); + return basicGetProduct(); + case Model1Package.ORDER_ADDRESS__PRICE: + return getPrice(); + case Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE: + return isTestAttribute(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: + getOrderDetails().clear(); + getOrderDetails().addAll((Collection)newValue); + return; + case Model1Package.ORDER_ADDRESS__ORDER: + setOrder((Order)newValue); + return; + case Model1Package.ORDER_ADDRESS__PRODUCT: + setProduct((Product1)newValue); + return; + case Model1Package.ORDER_ADDRESS__PRICE: + setPrice((Float)newValue); + return; + case Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE: + setTestAttribute((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: + getOrderDetails().clear(); + return; + case Model1Package.ORDER_ADDRESS__ORDER: + setOrder((Order)null); + return; + case Model1Package.ORDER_ADDRESS__PRODUCT: + setProduct((Product1)null); + return; + case Model1Package.ORDER_ADDRESS__PRICE: + setPrice(PRICE_EDEFAULT); + return; + case Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE: + setTestAttribute(TEST_ATTRIBUTE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: + return orderDetails != null && !orderDetails.isEmpty(); + case Model1Package.ORDER_ADDRESS__ORDER: + return getOrder() != null; + case Model1Package.ORDER_ADDRESS__PRODUCT: + return product != null; + case Model1Package.ORDER_ADDRESS__PRICE: + return price != PRICE_EDEFAULT; + case Model1Package.ORDER_ADDRESS__TEST_ATTRIBUTE: + return testAttribute != TEST_ATTRIBUTE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == Order.class) + { + switch (derivedFeatureID) + { + case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: + return Model1Package.ORDER__ORDER_DETAILS; + default: + return -1; + } + } + if (baseClass == OrderDetail.class) + { + switch (derivedFeatureID) + { + case Model1Package.ORDER_ADDRESS__ORDER: + return Model1Package.ORDER_DETAIL__ORDER; + case Model1Package.ORDER_ADDRESS__PRODUCT: + return Model1Package.ORDER_DETAIL__PRODUCT; + case Model1Package.ORDER_ADDRESS__PRICE: + return Model1Package.ORDER_DETAIL__PRICE; + default: + return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) + { + if (baseClass == Order.class) + { + switch (baseFeatureID) + { + case Model1Package.ORDER__ORDER_DETAILS: + return Model1Package.ORDER_ADDRESS__ORDER_DETAILS; + default: + return -1; + } + } + if (baseClass == OrderDetail.class) + { + switch (baseFeatureID) + { + case Model1Package.ORDER_DETAIL__ORDER: + return Model1Package.ORDER_ADDRESS__ORDER; + case Model1Package.ORDER_DETAIL__PRODUCT: + return Model1Package.ORDER_ADDRESS__PRODUCT; + case Model1Package.ORDER_DETAIL__PRICE: + return Model1Package.ORDER_ADDRESS__PRICE; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (price: "); + result.append(price); + result.append(", testAttribute: "); + result.append(testAttribute); + result.append(')'); + return result.toString(); + } + +} // OrderAddressImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderDetailImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderDetailImpl.java index 9eb84a02af..51302df7f2 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderDetailImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderDetailImpl.java @@ -1,409 +1,389 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EcoreUtil; - -/** - * An implementation of the model object 'Order Detail'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getOrder Order}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getProduct Product}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getPrice Price}
  • - *
- *

- * - * @generated - */ -public class OrderDetailImpl extends EObjectImpl implements OrderDetail -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The cached value of the '{@link #getProduct() Product}' reference. - * - * @see #getProduct() - * @generated - * @ordered - */ - protected Product1 product; - - /** - * The default value of the '{@link #getPrice() Price}' attribute. - * - * @see #getPrice() - * @generated - * @ordered - */ - protected static final float PRICE_EDEFAULT = 0.0F; - - /** - * The cached value of the '{@link #getPrice() Price}' attribute. - * - * @see #getPrice() - * @generated - * @ordered - */ - protected float price = PRICE_EDEFAULT; - - /** - * - * - * @generated - */ - protected OrderDetailImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getOrderDetail(); - } - - /** - * - * - * @generated - */ - public Order getOrder() - { - if (eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER) - return null; - return (Order)eContainer(); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetOrder(Order newOrder, NotificationChain msgs) - { - msgs = eBasicSetContainer((InternalEObject)newOrder, Model1Package.ORDER_DETAIL__ORDER, msgs); - return msgs; - } - - /** - * - * - * @generated - */ - public void setOrder(Order newOrder) - { - if (newOrder != eInternalContainer() - || (eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER && newOrder != null)) - { - if (EcoreUtil.isAncestor(this, newOrder)) - throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); - NotificationChain msgs = null; - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - if (newOrder != null) - msgs = ((InternalEObject)newOrder).eInverseAdd(this, Model1Package.ORDER__ORDER_DETAILS, Order.class, msgs); - msgs = basicSetOrder(newOrder, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_DETAIL__ORDER, newOrder, newOrder)); - } - - /** - * - * - * @generated - */ - public Product1 getProduct() - { - if (product != null && product.eIsProxy()) - { - InternalEObject oldProduct = (InternalEObject)product; - product = (Product1)eResolveProxy(oldProduct); - if (product != oldProduct) - { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.ORDER_DETAIL__PRODUCT, oldProduct, - product)); - } - } - return product; - } - - /** - * - * - * @generated - */ - public Product1 basicGetProduct() - { - return product; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetProduct(Product1 newProduct, NotificationChain msgs) - { - Product1 oldProduct = product; - product = newProduct; - if (eNotificationRequired()) - { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, - Model1Package.ORDER_DETAIL__PRODUCT, oldProduct, newProduct); - if (msgs == null) - msgs = notification; - else - msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setProduct(Product1 newProduct) - { - if (newProduct != product) - { - NotificationChain msgs = null; - if (product != null) - msgs = ((InternalEObject)product).eInverseRemove(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, - msgs); - if (newProduct != null) - msgs = ((InternalEObject)newProduct).eInverseAdd(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, - msgs); - msgs = basicSetProduct(newProduct, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_DETAIL__PRODUCT, newProduct, newProduct)); - } - - /** - * - * - * @generated - */ - public float getPrice() - { - return price; - } - - /** - * - * - * @generated - */ - public void setPrice(float newPrice) - { - float oldPrice = price; - price = newPrice; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_DETAIL__PRICE, oldPrice, price)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.ORDER_DETAIL__ORDER: - if (eInternalContainer() != null) - msgs = eBasicRemoveFromContainer(msgs); - return basicSetOrder((Order)otherEnd, msgs); - case Model1Package.ORDER_DETAIL__PRODUCT: - if (product != null) - msgs = ((InternalEObject)product).eInverseRemove(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, - msgs); - return basicSetProduct((Product1)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.ORDER_DETAIL__ORDER: - return basicSetOrder(null, msgs); - case Model1Package.ORDER_DETAIL__PRODUCT: - return basicSetProduct(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) - { - switch (eContainerFeatureID()) - { - case Model1Package.ORDER_DETAIL__ORDER: - return eInternalContainer().eInverseRemove(this, Model1Package.ORDER__ORDER_DETAILS, Order.class, msgs); - } - return super.eBasicRemoveFromContainerFeature(msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.ORDER_DETAIL__ORDER: - return getOrder(); - case Model1Package.ORDER_DETAIL__PRODUCT: - if (resolve) - return getProduct(); - return basicGetProduct(); - case Model1Package.ORDER_DETAIL__PRICE: - return getPrice(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.ORDER_DETAIL__ORDER: - setOrder((Order)newValue); - return; - case Model1Package.ORDER_DETAIL__PRODUCT: - setProduct((Product1)newValue); - return; - case Model1Package.ORDER_DETAIL__PRICE: - setPrice((Float)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.ORDER_DETAIL__ORDER: - setOrder((Order)null); - return; - case Model1Package.ORDER_DETAIL__PRODUCT: - setProduct((Product1)null); - return; - case Model1Package.ORDER_DETAIL__PRICE: - setPrice(PRICE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.ORDER_DETAIL__ORDER: - return getOrder() != null; - case Model1Package.ORDER_DETAIL__PRODUCT: - return product != null; - case Model1Package.ORDER_DETAIL__PRICE: - return price != PRICE_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (price: "); - result.append(price); - result.append(')'); - return result.toString(); - } - -} // OrderDetailImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * An implementation of the model object 'Order Detail'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getOrder Order}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getProduct Product}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getPrice Price}
  • + *
+ *

+ * + * @generated + */ +public class OrderDetailImpl extends EObjectImpl implements OrderDetail +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The cached value of the '{@link #getProduct() Product}' reference. + * + * @see #getProduct() + * @generated + * @ordered + */ + protected Product1 product; + + /** + * The default value of the '{@link #getPrice() Price}' attribute. + * + * @see #getPrice() + * @generated + * @ordered + */ + protected static final float PRICE_EDEFAULT = 0.0F; + + /** + * The cached value of the '{@link #getPrice() Price}' attribute. + * + * @see #getPrice() + * @generated + * @ordered + */ + protected float price = PRICE_EDEFAULT; + + /** + * + * @generated + */ + protected OrderDetailImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getOrderDetail(); + } + + /** + * + * @generated + */ + public Order getOrder() + { + if (eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER) + return null; + return (Order)eContainer(); + } + + /** + * + * @generated + */ + public NotificationChain basicSetOrder(Order newOrder, NotificationChain msgs) + { + msgs = eBasicSetContainer((InternalEObject)newOrder, Model1Package.ORDER_DETAIL__ORDER, msgs); + return msgs; + } + + /** + * + * @generated + */ + public void setOrder(Order newOrder) + { + if (newOrder != eInternalContainer() + || (eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER && newOrder != null)) + { + if (EcoreUtil.isAncestor(this, newOrder)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newOrder != null) + msgs = ((InternalEObject)newOrder).eInverseAdd(this, Model1Package.ORDER__ORDER_DETAILS, Order.class, msgs); + msgs = basicSetOrder(newOrder, msgs); + if (msgs != null) + msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_DETAIL__ORDER, newOrder, newOrder)); + } + + /** + * + * @generated + */ + public Product1 getProduct() + { + if (product != null && product.eIsProxy()) + { + InternalEObject oldProduct = (InternalEObject)product; + product = (Product1)eResolveProxy(oldProduct); + if (product != oldProduct) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.ORDER_DETAIL__PRODUCT, oldProduct, + product)); + } + } + return product; + } + + /** + * + * @generated + */ + public Product1 basicGetProduct() + { + return product; + } + + /** + * + * @generated + */ + public NotificationChain basicSetProduct(Product1 newProduct, NotificationChain msgs) + { + Product1 oldProduct = product; + product = newProduct; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + Model1Package.ORDER_DETAIL__PRODUCT, oldProduct, newProduct); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * @generated + */ + public void setProduct(Product1 newProduct) + { + if (newProduct != product) + { + NotificationChain msgs = null; + if (product != null) + msgs = ((InternalEObject)product).eInverseRemove(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, + msgs); + if (newProduct != null) + msgs = ((InternalEObject)newProduct).eInverseAdd(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, + msgs); + msgs = basicSetProduct(newProduct, msgs); + if (msgs != null) + msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_DETAIL__PRODUCT, newProduct, newProduct)); + } + + /** + * + * @generated + */ + public float getPrice() + { + return price; + } + + /** + * + * @generated + */ + public void setPrice(float newPrice) + { + float oldPrice = price; + price = newPrice; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_DETAIL__PRICE, oldPrice, price)); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.ORDER_DETAIL__ORDER: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetOrder((Order)otherEnd, msgs); + case Model1Package.ORDER_DETAIL__PRODUCT: + if (product != null) + msgs = ((InternalEObject)product).eInverseRemove(this, Model1Package.PRODUCT1__ORDER_DETAILS, Product1.class, + msgs); + return basicSetProduct((Product1)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.ORDER_DETAIL__ORDER: + return basicSetOrder(null, msgs); + case Model1Package.ORDER_DETAIL__PRODUCT: + return basicSetProduct(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) + { + switch (eContainerFeatureID()) + { + case Model1Package.ORDER_DETAIL__ORDER: + return eInternalContainer().eInverseRemove(this, Model1Package.ORDER__ORDER_DETAILS, Order.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.ORDER_DETAIL__ORDER: + return getOrder(); + case Model1Package.ORDER_DETAIL__PRODUCT: + if (resolve) + return getProduct(); + return basicGetProduct(); + case Model1Package.ORDER_DETAIL__PRICE: + return getPrice(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.ORDER_DETAIL__ORDER: + setOrder((Order)newValue); + return; + case Model1Package.ORDER_DETAIL__PRODUCT: + setProduct((Product1)newValue); + return; + case Model1Package.ORDER_DETAIL__PRICE: + setPrice((Float)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.ORDER_DETAIL__ORDER: + setOrder((Order)null); + return; + case Model1Package.ORDER_DETAIL__PRODUCT: + setProduct((Product1)null); + return; + case Model1Package.ORDER_DETAIL__PRICE: + setPrice(PRICE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.ORDER_DETAIL__ORDER: + return getOrder() != null; + case Model1Package.ORDER_DETAIL__PRODUCT: + return product != null; + case Model1Package.ORDER_DETAIL__PRICE: + return price != PRICE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (price: "); + result.append(price); + result.append(')'); + return result.toString(); + } + +} // OrderDetailImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderImpl.java index 0dd484bc77..a5f028c594 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderImpl.java @@ -1,194 +1,184 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; - -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import java.util.Collection; - -/** - * An implementation of the model object 'Order'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderImpl#getOrderDetails Order Details}
  • - *
- *

- * - * @generated - */ -public abstract class OrderImpl extends EObjectImpl implements Order -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The cached value of the '{@link #getOrderDetails() Order Details}' containment reference list. - * - * @see #getOrderDetails() - * @generated - * @ordered - */ - protected EList orderDetails; - - /** - * - * - * @generated - */ - protected OrderImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getOrder(); - } - - /** - * - * - * @generated - */ - public EList getOrderDetails() - { - if (orderDetails == null) - { - orderDetails = new EObjectContainmentWithInverseEList(OrderDetail.class, this, - Model1Package.ORDER__ORDER_DETAILS, Model1Package.ORDER_DETAIL__ORDER); - } - return orderDetails; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.ORDER__ORDER_DETAILS: - return ((InternalEList)(InternalEList)getOrderDetails()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.ORDER__ORDER_DETAILS: - return ((InternalEList)getOrderDetails()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.ORDER__ORDER_DETAILS: - return getOrderDetails(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.ORDER__ORDER_DETAILS: - getOrderDetails().clear(); - getOrderDetails().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.ORDER__ORDER_DETAILS: - getOrderDetails().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.ORDER__ORDER_DETAILS: - return orderDetails != null && !orderDetails.isEmpty(); - } - return super.eIsSet(featureID); - } - -} // OrderImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; + +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Order'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderImpl#getOrderDetails Order Details}
  • + *
+ *

+ * + * @generated + */ +public abstract class OrderImpl extends EObjectImpl implements Order +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The cached value of the '{@link #getOrderDetails() Order Details}' containment reference list. + * + * @see #getOrderDetails() + * @generated + * @ordered + */ + protected EList orderDetails; + + /** + * + * @generated + */ + protected OrderImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getOrder(); + } + + /** + * + * @generated + */ + public EList getOrderDetails() + { + if (orderDetails == null) + { + orderDetails = new EObjectContainmentWithInverseEList(OrderDetail.class, this, + Model1Package.ORDER__ORDER_DETAILS, Model1Package.ORDER_DETAIL__ORDER); + } + return orderDetails; + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.ORDER__ORDER_DETAILS: + return ((InternalEList)(InternalEList)getOrderDetails()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.ORDER__ORDER_DETAILS: + return ((InternalEList)getOrderDetails()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.ORDER__ORDER_DETAILS: + return getOrderDetails(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.ORDER__ORDER_DETAILS: + getOrderDetails().clear(); + getOrderDetails().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.ORDER__ORDER_DETAILS: + getOrderDetails().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.ORDER__ORDER_DETAILS: + return orderDetails != null && !orderDetails.isEmpty(); + } + return super.eIsSet(featureID); + } + +} // OrderImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Product1Impl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Product1Impl.java index baaab059c8..e91cf25f7d 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Product1Impl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/Product1Impl.java @@ -1,379 +1,401 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.VAT; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import java.util.Collection; - -/** - * An implementation of the model object 'Product1'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl#getName Name}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl#getOrderDetails Order Details}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl#getVat Vat}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl#getDescription Description}
  • - *
- *

- * - * @generated - */ -public class Product1Impl extends EObjectImpl implements Product1 -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The cached value of the '{@link #getOrderDetails() Order Details}' reference list. - * - * - * @see #getOrderDetails() - * @generated - * @ordered - */ - protected EList orderDetails; - - /** - * The default value of the '{@link #getVat() Vat}' attribute. - * - * @see #getVat() - * @generated - * @ordered - */ - protected static final VAT VAT_EDEFAULT = VAT.VAT15; - - /** - * The cached value of the '{@link #getVat() Vat}' attribute. - * - * @see #getVat() - * @generated - * @ordered - */ - protected VAT vat = VAT_EDEFAULT; - - /** - * The default value of the '{@link #getDescription() Description}' attribute. - * - * @see #getDescription() - * @generated - * @ordered - */ - protected static final String DESCRIPTION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDescription() Description}' attribute. - * - * @see #getDescription() - * @generated - * @ordered - */ - protected String description = DESCRIPTION_EDEFAULT; - - /** - * - * - * @generated - */ - protected Product1Impl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getProduct1(); - } - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT1__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public EList getOrderDetails() - { - if (orderDetails == null) - { - orderDetails = new EObjectWithInverseResolvingEList(OrderDetail.class, this, - Model1Package.PRODUCT1__ORDER_DETAILS, Model1Package.ORDER_DETAIL__PRODUCT); - } - return orderDetails; - } - - /** - * - * - * @generated - */ - public VAT getVat() - { - return vat; - } - - /** - * - * - * @generated - */ - public void setVat(VAT newVat) - { - VAT oldVat = vat; - vat = newVat == null ? VAT_EDEFAULT : newVat; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT1__VAT, oldVat, vat)); - } - - /** - * - * - * @generated - */ - public String getDescription() - { - return description; - } - - /** - * - * - * @generated - */ - public void setDescription(String newDescription) - { - String oldDescription = description; - description = newDescription; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT1__DESCRIPTION, oldDescription, - description)); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.PRODUCT1__ORDER_DETAILS: - return ((InternalEList)(InternalEList)getOrderDetails()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.PRODUCT1__ORDER_DETAILS: - return ((InternalEList)getOrderDetails()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.PRODUCT1__NAME: - return getName(); - case Model1Package.PRODUCT1__ORDER_DETAILS: - return getOrderDetails(); - case Model1Package.PRODUCT1__VAT: - return getVat(); - case Model1Package.PRODUCT1__DESCRIPTION: - return getDescription(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.PRODUCT1__NAME: - setName((String)newValue); - return; - case Model1Package.PRODUCT1__ORDER_DETAILS: - getOrderDetails().clear(); - getOrderDetails().addAll((Collection)newValue); - return; - case Model1Package.PRODUCT1__VAT: - setVat((VAT)newValue); - return; - case Model1Package.PRODUCT1__DESCRIPTION: - setDescription((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.PRODUCT1__NAME: - setName(NAME_EDEFAULT); - return; - case Model1Package.PRODUCT1__ORDER_DETAILS: - getOrderDetails().clear(); - return; - case Model1Package.PRODUCT1__VAT: - setVat(VAT_EDEFAULT); - return; - case Model1Package.PRODUCT1__DESCRIPTION: - setDescription(DESCRIPTION_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.PRODUCT1__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case Model1Package.PRODUCT1__ORDER_DETAILS: - return orderDetails != null && !orderDetails.isEmpty(); - case Model1Package.PRODUCT1__VAT: - return vat != VAT_EDEFAULT; - case Model1Package.PRODUCT1__DESCRIPTION: - return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (name: "); - result.append(name); - result.append(", vat: "); - result.append(vat); - result.append(", description: "); - result.append(description); - result.append(')'); - return result.toString(); - } - -} // Product1Impl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.VAT; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Product1'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl#getOrderDetails Order Details}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl#getVat Vat}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl#getOtherVATs Other VA Ts}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.Product1Impl#getDescription Description}
  • + *
+ *

+ * + * @generated + */ +public class Product1Impl extends EObjectImpl implements Product1 +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getOrderDetails() Order Details}' reference list. + * + * + * @see #getOrderDetails() + * @generated + * @ordered + */ + protected EList orderDetails; + + /** + * The default value of the '{@link #getVat() Vat}' attribute. + * + * @see #getVat() + * @generated + * @ordered + */ + protected static final VAT VAT_EDEFAULT = VAT.VAT15; + + /** + * The cached value of the '{@link #getVat() Vat}' attribute. + * + * @see #getVat() + * @generated + * @ordered + */ + protected VAT vat = VAT_EDEFAULT; + + /** + * The cached value of the '{@link #getOtherVATs() Other VA Ts}' attribute list. + * + * + * @see #getOtherVATs() + * @generated + * @ordered + */ + protected EList otherVATs; + + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * + * @generated + */ + protected Product1Impl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getProduct1(); + } + + /** + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT1__NAME, oldName, name)); + } + + /** + * + * @generated + */ + public EList getOrderDetails() + { + if (orderDetails == null) + { + orderDetails = new EObjectWithInverseResolvingEList(OrderDetail.class, this, + Model1Package.PRODUCT1__ORDER_DETAILS, Model1Package.ORDER_DETAIL__PRODUCT); + } + return orderDetails; + } + + /** + * + * @generated + */ + public VAT getVat() + { + return vat; + } + + /** + * + * @generated + */ + public void setVat(VAT newVat) + { + VAT oldVat = vat; + vat = newVat == null ? VAT_EDEFAULT : newVat; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT1__VAT, oldVat, vat)); + } + + /** + * + * + * @generated + */ + public EList getOtherVATs() + { + if (otherVATs == null) + { + otherVATs = new EDataTypeUniqueEList(VAT.class, this, Model1Package.PRODUCT1__OTHER_VA_TS); + } + return otherVATs; + } + + /** + * + * @generated + */ + public String getDescription() + { + return description; + } + + /** + * + * @generated + */ + public void setDescription(String newDescription) + { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT1__DESCRIPTION, oldDescription, + description)); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.PRODUCT1__ORDER_DETAILS: + return ((InternalEList)(InternalEList)getOrderDetails()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.PRODUCT1__ORDER_DETAILS: + return ((InternalEList)getOrderDetails()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.PRODUCT1__NAME: + return getName(); + case Model1Package.PRODUCT1__ORDER_DETAILS: + return getOrderDetails(); + case Model1Package.PRODUCT1__VAT: + return getVat(); + case Model1Package.PRODUCT1__OTHER_VA_TS: + return getOtherVATs(); + case Model1Package.PRODUCT1__DESCRIPTION: + return getDescription(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.PRODUCT1__NAME: + setName((String)newValue); + return; + case Model1Package.PRODUCT1__ORDER_DETAILS: + getOrderDetails().clear(); + getOrderDetails().addAll((Collection)newValue); + return; + case Model1Package.PRODUCT1__VAT: + setVat((VAT)newValue); + return; + case Model1Package.PRODUCT1__OTHER_VA_TS: + getOtherVATs().clear(); + getOtherVATs().addAll((Collection)newValue); + return; + case Model1Package.PRODUCT1__DESCRIPTION: + setDescription((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.PRODUCT1__NAME: + setName(NAME_EDEFAULT); + return; + case Model1Package.PRODUCT1__ORDER_DETAILS: + getOrderDetails().clear(); + return; + case Model1Package.PRODUCT1__VAT: + setVat(VAT_EDEFAULT); + return; + case Model1Package.PRODUCT1__OTHER_VA_TS: + getOtherVATs().clear(); + return; + case Model1Package.PRODUCT1__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.PRODUCT1__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case Model1Package.PRODUCT1__ORDER_DETAILS: + return orderDetails != null && !orderDetails.isEmpty(); + case Model1Package.PRODUCT1__VAT: + return vat != VAT_EDEFAULT; + case Model1Package.PRODUCT1__OTHER_VA_TS: + return otherVATs != null && !otherVATs.isEmpty(); + case Model1Package.PRODUCT1__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", vat: "); + result.append(vat); + result.append(", otherVATs: "); + result.append(otherVATs); + result.append(", description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} // Product1Impl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/ProductToOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/ProductToOrderImpl.java index aad9404f2d..7ef6d38144 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/ProductToOrderImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/ProductToOrderImpl.java @@ -1,342 +1,321 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.util.BasicEMap; -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.impl.EObjectImpl; - -/** - * An implementation of the model object 'Product To Order'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.ProductToOrderImpl#getTypedKey Key}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.ProductToOrderImpl#getTypedValue Value}
  • - *
- *

- * - * @generated - */ -public class ProductToOrderImpl extends EObjectImpl implements BasicEMap.Entry -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The cached value of the '{@link #getTypedKey() Key}' reference. - * - * @see #getTypedKey() - * @generated - * @ordered - */ - protected Product1 key; - - /** - * The cached value of the '{@link #getTypedValue() Value}' reference. - * - * @see #getTypedValue() - * @generated - * @ordered - */ - protected SalesOrder value; - - /** - * - * - * @generated - */ - protected ProductToOrderImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getProductToOrder(); - } - - /** - * - * - * @generated - */ - public Product1 getTypedKey() - { - if (key != null && key.eIsProxy()) - { - InternalEObject oldKey = (InternalEObject)key; - key = (Product1)eResolveProxy(oldKey); - if (key != oldKey) - { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.PRODUCT_TO_ORDER__KEY, oldKey, key)); - } - } - return key; - } - - /** - * - * - * @generated - */ - public Product1 basicGetTypedKey() - { - return key; - } - - /** - * - * - * @generated - */ - public void setTypedKey(Product1 newKey) - { - Product1 oldKey = key; - key = newKey; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT_TO_ORDER__KEY, oldKey, key)); - } - - /** - * - * - * @generated - */ - public SalesOrder getTypedValue() - { - if (value != null && value.eIsProxy()) - { - InternalEObject oldValue = (InternalEObject)value; - value = (SalesOrder)eResolveProxy(oldValue); - if (value != oldValue) - { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.PRODUCT_TO_ORDER__VALUE, oldValue, - value)); - } - } - return value; - } - - /** - * - * - * @generated - */ - public SalesOrder basicGetTypedValue() - { - return value; - } - - /** - * - * - * @generated - */ - public void setTypedValue(SalesOrder newValue) - { - SalesOrder oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT_TO_ORDER__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.PRODUCT_TO_ORDER__KEY: - if (resolve) - return getTypedKey(); - return basicGetTypedKey(); - case Model1Package.PRODUCT_TO_ORDER__VALUE: - if (resolve) - return getTypedValue(); - return basicGetTypedValue(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.PRODUCT_TO_ORDER__KEY: - setTypedKey((Product1)newValue); - return; - case Model1Package.PRODUCT_TO_ORDER__VALUE: - setTypedValue((SalesOrder)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.PRODUCT_TO_ORDER__KEY: - setTypedKey((Product1)null); - return; - case Model1Package.PRODUCT_TO_ORDER__VALUE: - setTypedValue((SalesOrder)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.PRODUCT_TO_ORDER__KEY: - return key != null; - case Model1Package.PRODUCT_TO_ORDER__VALUE: - return value != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - protected int hash = -1; - - /** - * - * - * @generated - */ - public int getHash() - { - if (hash == -1) - { - Object theKey = getKey(); - hash = (theKey == null ? 0 : theKey.hashCode()); - } - return hash; - } - - /** - * - * - * @generated - */ - public void setHash(int hash) - { - this.hash = hash; - } - - /** - * - * - * @generated - */ - public Product1 getKey() - { - return getTypedKey(); - } - - /** - * - * - * @generated - */ - public void setKey(Product1 key) - { - setTypedKey(key); - } - - /** - * - * - * @generated - */ - public SalesOrder getValue() - { - return getTypedValue(); - } - - /** - * - * - * @generated - */ - public SalesOrder setValue(SalesOrder value) - { - SalesOrder oldValue = getValue(); - setTypedValue(value); - return oldValue; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EMap getEMap() - { - EObject container = eContainer(); - return container == null ? null : (EMap)container.eGet(eContainmentFeature()); - } - -} // ProductToOrderImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.BasicEMap; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * An implementation of the model object 'Product To Order'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.ProductToOrderImpl#getTypedKey Key}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.ProductToOrderImpl#getTypedValue Value}
  • + *
+ *

+ * + * @generated + */ +public class ProductToOrderImpl extends EObjectImpl implements BasicEMap.Entry +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The cached value of the '{@link #getTypedKey() Key}' reference. + * + * @see #getTypedKey() + * @generated + * @ordered + */ + protected Product1 key; + + /** + * The cached value of the '{@link #getTypedValue() Value}' reference. + * + * @see #getTypedValue() + * @generated + * @ordered + */ + protected SalesOrder value; + + /** + * + * @generated + */ + protected ProductToOrderImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getProductToOrder(); + } + + /** + * + * @generated + */ + public Product1 getTypedKey() + { + if (key != null && key.eIsProxy()) + { + InternalEObject oldKey = (InternalEObject)key; + key = (Product1)eResolveProxy(oldKey); + if (key != oldKey) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.PRODUCT_TO_ORDER__KEY, oldKey, key)); + } + } + return key; + } + + /** + * + * @generated + */ + public Product1 basicGetTypedKey() + { + return key; + } + + /** + * + * @generated + */ + public void setTypedKey(Product1 newKey) + { + Product1 oldKey = key; + key = newKey; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT_TO_ORDER__KEY, oldKey, key)); + } + + /** + * + * @generated + */ + public SalesOrder getTypedValue() + { + if (value != null && value.eIsProxy()) + { + InternalEObject oldValue = (InternalEObject)value; + value = (SalesOrder)eResolveProxy(oldValue); + if (value != oldValue) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.PRODUCT_TO_ORDER__VALUE, oldValue, + value)); + } + } + return value; + } + + /** + * + * @generated + */ + public SalesOrder basicGetTypedValue() + { + return value; + } + + /** + * + * @generated + */ + public void setTypedValue(SalesOrder newValue) + { + SalesOrder oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT_TO_ORDER__VALUE, oldValue, value)); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.PRODUCT_TO_ORDER__KEY: + if (resolve) + return getTypedKey(); + return basicGetTypedKey(); + case Model1Package.PRODUCT_TO_ORDER__VALUE: + if (resolve) + return getTypedValue(); + return basicGetTypedValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.PRODUCT_TO_ORDER__KEY: + setTypedKey((Product1)newValue); + return; + case Model1Package.PRODUCT_TO_ORDER__VALUE: + setTypedValue((SalesOrder)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.PRODUCT_TO_ORDER__KEY: + setTypedKey((Product1)null); + return; + case Model1Package.PRODUCT_TO_ORDER__VALUE: + setTypedValue((SalesOrder)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.PRODUCT_TO_ORDER__KEY: + return key != null; + case Model1Package.PRODUCT_TO_ORDER__VALUE: + return value != null; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + protected int hash = -1; + + /** + * + * @generated + */ + public int getHash() + { + if (hash == -1) + { + Object theKey = getKey(); + hash = (theKey == null ? 0 : theKey.hashCode()); + } + return hash; + } + + /** + * + * @generated + */ + public void setHash(int hash) + { + this.hash = hash; + } + + /** + * + * @generated + */ + public Product1 getKey() + { + return getTypedKey(); + } + + /** + * + * @generated + */ + public void setKey(Product1 key) + { + setTypedKey(key); + } + + /** + * + * @generated + */ + public SalesOrder getValue() + { + return getTypedValue(); + } + + /** + * + * @generated + */ + public SalesOrder setValue(SalesOrder value) + { + SalesOrder oldValue = getValue(); + setTypedValue(value); + return oldValue; + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EMap getEMap() + { + EObject container = eContainer(); + return container == null ? null : (EMap)container.eGet(eContainmentFeature()); + } + +} // ProductToOrderImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/PurchaseOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/PurchaseOrderImpl.java index 4aea935da1..367c6288f3 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/PurchaseOrderImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/PurchaseOrderImpl.java @@ -1,340 +1,302 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -import java.util.Date; - -/** - * @author Eike Stepper - */ -public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The default value of the '{@link #getDate() Date}' attribute. - * - * @see #getDate() - * @generated - * @ordered - */ - protected static final Date DATE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getDate() Date}' attribute. - * - * @see #getDate() - * @generated - * @ordered - */ - protected Date date = DATE_EDEFAULT; - - /** - * The cached value of the '{@link #getSupplier() Supplier}' reference. - * - * @see #getSupplier() - * @generated - * @ordered - */ - protected Supplier supplier; - - /** - * - * - * @generated - */ - protected PurchaseOrderImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getPurchaseOrder(); - } - - /** - * - * - * @generated - */ - public Date getDate() - { - return date; - } - - /** - * - * - * @generated - */ - public void setDate(Date newDate) - { - Date oldDate = date; - date = newDate; - if (eNotificationRequired()) - { - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PURCHASE_ORDER__DATE, oldDate, date)); - } - } - - /** - * - * - * @generated - */ - public Supplier getSupplier() - { - if (supplier != null && supplier.eIsProxy()) - { - InternalEObject oldSupplier = (InternalEObject)supplier; - supplier = (Supplier)eResolveProxy(oldSupplier); - if (supplier != oldSupplier) - { - if (eNotificationRequired()) - { - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.PURCHASE_ORDER__SUPPLIER, - oldSupplier, supplier)); - } - } - } - return supplier; - } - - /** - * - * - * @generated - */ - public Supplier basicGetSupplier() - { - return supplier; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSupplier(Supplier newSupplier, NotificationChain msgs) - { - Supplier oldSupplier = supplier; - supplier = newSupplier; - if (eNotificationRequired()) - { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, - Model1Package.PURCHASE_ORDER__SUPPLIER, oldSupplier, newSupplier); - if (msgs == null) - { - msgs = notification; - } - else - { - msgs.add(notification); - } - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setSupplier(Supplier newSupplier) - { - if (newSupplier != supplier) - { - NotificationChain msgs = null; - if (supplier != null) - { - msgs = ((InternalEObject)supplier).eInverseRemove(this, Model1Package.SUPPLIER__PURCHASE_ORDERS, - Supplier.class, msgs); - } - if (newSupplier != null) - { - msgs = ((InternalEObject)newSupplier).eInverseAdd(this, Model1Package.SUPPLIER__PURCHASE_ORDERS, - Supplier.class, msgs); - } - msgs = basicSetSupplier(newSupplier, msgs); - if (msgs != null) - { - msgs.dispatch(); - } - } - else if (eNotificationRequired()) - { - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PURCHASE_ORDER__SUPPLIER, newSupplier, - newSupplier)); - } - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.PURCHASE_ORDER__SUPPLIER: - if (supplier != null) - { - msgs = ((InternalEObject)supplier).eInverseRemove(this, Model1Package.SUPPLIER__PURCHASE_ORDERS, - Supplier.class, msgs); - } - return basicSetSupplier((Supplier)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.PURCHASE_ORDER__SUPPLIER: - return basicSetSupplier(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.PURCHASE_ORDER__DATE: - return getDate(); - case Model1Package.PURCHASE_ORDER__SUPPLIER: - if (resolve) - { - return getSupplier(); - } - return basicGetSupplier(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.PURCHASE_ORDER__DATE: - setDate((Date)newValue); - return; - case Model1Package.PURCHASE_ORDER__SUPPLIER: - setSupplier((Supplier)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.PURCHASE_ORDER__DATE: - setDate(DATE_EDEFAULT); - return; - case Model1Package.PURCHASE_ORDER__SUPPLIER: - setSupplier((Supplier)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.PURCHASE_ORDER__DATE: - return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date); - case Model1Package.PURCHASE_ORDER__SUPPLIER: - return supplier != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - { - return super.toString(); - } - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (date: "); - result.append(date); - result.append(')'); - return result.toString(); - } - -} // PurchaseOrderImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import java.util.Date; + +/** + * @author Eike Stepper + */ +public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The default value of the '{@link #getDate() Date}' attribute. + * + * @see #getDate() + * @generated + * @ordered + */ + protected static final Date DATE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDate() Date}' attribute. + * + * @see #getDate() + * @generated + * @ordered + */ + protected Date date = DATE_EDEFAULT; + + /** + * The cached value of the '{@link #getSupplier() Supplier}' reference. + * + * @see #getSupplier() + * @generated + * @ordered + */ + protected Supplier supplier; + + /** + * + * @generated + */ + protected PurchaseOrderImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getPurchaseOrder(); + } + + /** + * + * @generated + */ + public Date getDate() + { + return date; + } + + /** + * + * @generated + */ + public void setDate(Date newDate) + { + Date oldDate = date; + date = newDate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PURCHASE_ORDER__DATE, oldDate, date)); + } + + /** + * + * @generated + */ + public Supplier getSupplier() + { + if (supplier != null && supplier.eIsProxy()) + { + InternalEObject oldSupplier = (InternalEObject)supplier; + supplier = (Supplier)eResolveProxy(oldSupplier); + if (supplier != oldSupplier) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.PURCHASE_ORDER__SUPPLIER, + oldSupplier, supplier)); + } + } + return supplier; + } + + /** + * + * @generated + */ + public Supplier basicGetSupplier() + { + return supplier; + } + + /** + * + * @generated + */ + public NotificationChain basicSetSupplier(Supplier newSupplier, NotificationChain msgs) + { + Supplier oldSupplier = supplier; + supplier = newSupplier; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + Model1Package.PURCHASE_ORDER__SUPPLIER, oldSupplier, newSupplier); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * @generated + */ + public void setSupplier(Supplier newSupplier) + { + if (newSupplier != supplier) + { + NotificationChain msgs = null; + if (supplier != null) + msgs = ((InternalEObject)supplier).eInverseRemove(this, Model1Package.SUPPLIER__PURCHASE_ORDERS, + Supplier.class, msgs); + if (newSupplier != null) + msgs = ((InternalEObject)newSupplier).eInverseAdd(this, Model1Package.SUPPLIER__PURCHASE_ORDERS, + Supplier.class, msgs); + msgs = basicSetSupplier(newSupplier, msgs); + if (msgs != null) + msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PURCHASE_ORDER__SUPPLIER, newSupplier, + newSupplier)); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.PURCHASE_ORDER__SUPPLIER: + if (supplier != null) + msgs = ((InternalEObject)supplier).eInverseRemove(this, Model1Package.SUPPLIER__PURCHASE_ORDERS, + Supplier.class, msgs); + return basicSetSupplier((Supplier)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.PURCHASE_ORDER__SUPPLIER: + return basicSetSupplier(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.PURCHASE_ORDER__DATE: + return getDate(); + case Model1Package.PURCHASE_ORDER__SUPPLIER: + if (resolve) + return getSupplier(); + return basicGetSupplier(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.PURCHASE_ORDER__DATE: + setDate((Date)newValue); + return; + case Model1Package.PURCHASE_ORDER__SUPPLIER: + setSupplier((Supplier)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.PURCHASE_ORDER__DATE: + setDate(DATE_EDEFAULT); + return; + case Model1Package.PURCHASE_ORDER__SUPPLIER: + setSupplier((Supplier)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.PURCHASE_ORDER__DATE: + return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date); + case Model1Package.PURCHASE_ORDER__SUPPLIER: + return supplier != null; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (date: "); + result.append(date); + result.append(')'); + return result.toString(); + } + +} // PurchaseOrderImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/SalesOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/SalesOrderImpl.java index a58c4666b0..3302ccdaad 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/SalesOrderImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/SalesOrderImpl.java @@ -1,324 +1,308 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; - -/** - * An implementation of the model object 'Sales Order'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SalesOrderImpl#getId Id}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SalesOrderImpl#getCustomer Customer}
  • - *
- *

- * - * @generated - */ -public class SalesOrderImpl extends OrderImpl implements SalesOrder -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * @see #getId() - * @generated - * @ordered - */ - protected static final int ID_EDEFAULT = 0; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * @see #getId() - * @generated - * @ordered - */ - protected int id = ID_EDEFAULT; - - /** - * The cached value of the '{@link #getCustomer() Customer}' reference. - * - * @see #getCustomer() - * @generated - * @ordered - */ - protected Customer customer; - - /** - * - * - * @generated - */ - protected SalesOrderImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getSalesOrder(); - } - - /** - * - * - * @generated - */ - public int getId() - { - return id; - } - - /** - * - * - * @generated - */ - public void setId(int newId) - { - int oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.SALES_ORDER__ID, oldId, id)); - } - - /** - * - * - * @generated - */ - public Customer getCustomer() - { - if (customer != null && customer.eIsProxy()) - { - InternalEObject oldCustomer = (InternalEObject)customer; - customer = (Customer)eResolveProxy(oldCustomer); - if (customer != oldCustomer) - { - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.SALES_ORDER__CUSTOMER, oldCustomer, - customer)); - } - } - return customer; - } - - /** - * - * - * @generated - */ - public Customer basicGetCustomer() - { - return customer; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetCustomer(Customer newCustomer, NotificationChain msgs) - { - Customer oldCustomer = customer; - customer = newCustomer; - if (eNotificationRequired()) - { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, - Model1Package.SALES_ORDER__CUSTOMER, oldCustomer, newCustomer); - if (msgs == null) - msgs = notification; - else - msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setCustomer(Customer newCustomer) - { - if (newCustomer != customer) - { - NotificationChain msgs = null; - if (customer != null) - msgs = ((InternalEObject)customer).eInverseRemove(this, Model1Package.CUSTOMER__SALES_ORDERS, Customer.class, - msgs); - if (newCustomer != null) - msgs = ((InternalEObject)newCustomer).eInverseAdd(this, Model1Package.CUSTOMER__SALES_ORDERS, Customer.class, - msgs); - msgs = basicSetCustomer(newCustomer, msgs); - if (msgs != null) - msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.SALES_ORDER__CUSTOMER, newCustomer, - newCustomer)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.SALES_ORDER__CUSTOMER: - if (customer != null) - msgs = ((InternalEObject)customer).eInverseRemove(this, Model1Package.CUSTOMER__SALES_ORDERS, Customer.class, - msgs); - return basicSetCustomer((Customer)otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.SALES_ORDER__CUSTOMER: - return basicSetCustomer(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.SALES_ORDER__ID: - return getId(); - case Model1Package.SALES_ORDER__CUSTOMER: - if (resolve) - return getCustomer(); - return basicGetCustomer(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.SALES_ORDER__ID: - setId((Integer)newValue); - return; - case Model1Package.SALES_ORDER__CUSTOMER: - setCustomer((Customer)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.SALES_ORDER__ID: - setId(ID_EDEFAULT); - return; - case Model1Package.SALES_ORDER__CUSTOMER: - setCustomer((Customer)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.SALES_ORDER__ID: - return id != ID_EDEFAULT; - case Model1Package.SALES_ORDER__CUSTOMER: - return customer != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (id: "); - result.append(id); - result.append(')'); - return result.toString(); - } - -} // SalesOrderImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * An implementation of the model object 'Sales Order'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SalesOrderImpl#getId Id}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SalesOrderImpl#getCustomer Customer}
  • + *
+ *

+ * + * @generated + */ +public class SalesOrderImpl extends OrderImpl implements SalesOrder +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The default value of the '{@link #getId() Id}' attribute. + * + * @see #getId() + * @generated + * @ordered + */ + protected static final int ID_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getId() Id}' attribute. + * + * @see #getId() + * @generated + * @ordered + */ + protected int id = ID_EDEFAULT; + + /** + * The cached value of the '{@link #getCustomer() Customer}' reference. + * + * @see #getCustomer() + * @generated + * @ordered + */ + protected Customer customer; + + /** + * + * @generated + */ + protected SalesOrderImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getSalesOrder(); + } + + /** + * + * @generated + */ + public int getId() + { + return id; + } + + /** + * + * @generated + */ + public void setId(int newId) + { + int oldId = id; + id = newId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.SALES_ORDER__ID, oldId, id)); + } + + /** + * + * @generated + */ + public Customer getCustomer() + { + if (customer != null && customer.eIsProxy()) + { + InternalEObject oldCustomer = (InternalEObject)customer; + customer = (Customer)eResolveProxy(oldCustomer); + if (customer != oldCustomer) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.SALES_ORDER__CUSTOMER, oldCustomer, + customer)); + } + } + return customer; + } + + /** + * + * @generated + */ + public Customer basicGetCustomer() + { + return customer; + } + + /** + * + * @generated + */ + public NotificationChain basicSetCustomer(Customer newCustomer, NotificationChain msgs) + { + Customer oldCustomer = customer; + customer = newCustomer; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + Model1Package.SALES_ORDER__CUSTOMER, oldCustomer, newCustomer); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * @generated + */ + public void setCustomer(Customer newCustomer) + { + if (newCustomer != customer) + { + NotificationChain msgs = null; + if (customer != null) + msgs = ((InternalEObject)customer).eInverseRemove(this, Model1Package.CUSTOMER__SALES_ORDERS, Customer.class, + msgs); + if (newCustomer != null) + msgs = ((InternalEObject)newCustomer).eInverseAdd(this, Model1Package.CUSTOMER__SALES_ORDERS, Customer.class, + msgs); + msgs = basicSetCustomer(newCustomer, msgs); + if (msgs != null) + msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.SALES_ORDER__CUSTOMER, newCustomer, + newCustomer)); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.SALES_ORDER__CUSTOMER: + if (customer != null) + msgs = ((InternalEObject)customer).eInverseRemove(this, Model1Package.CUSTOMER__SALES_ORDERS, Customer.class, + msgs); + return basicSetCustomer((Customer)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.SALES_ORDER__CUSTOMER: + return basicSetCustomer(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.SALES_ORDER__ID: + return getId(); + case Model1Package.SALES_ORDER__CUSTOMER: + if (resolve) + return getCustomer(); + return basicGetCustomer(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.SALES_ORDER__ID: + setId((Integer)newValue); + return; + case Model1Package.SALES_ORDER__CUSTOMER: + setCustomer((Customer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.SALES_ORDER__ID: + setId(ID_EDEFAULT); + return; + case Model1Package.SALES_ORDER__CUSTOMER: + setCustomer((Customer)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.SALES_ORDER__ID: + return id != ID_EDEFAULT; + case Model1Package.SALES_ORDER__CUSTOMER: + return customer != null; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (id: "); + result.append(id); + result.append(')'); + return result.toString(); + } + +} // SalesOrderImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/SupplierImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/SupplierImpl.java index 371d671e3a..7c264f31b4 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/SupplierImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/SupplierImpl.java @@ -1,267 +1,254 @@ -/* - * 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.tests.legacy.model1.impl; - -import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; - -import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; -import org.eclipse.emf.ecore.impl.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; - -import java.util.Collection; - -/** - * An implementation of the model object 'Supplier'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SupplierImpl#getPurchaseOrders Purchase Orders}
  • - *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SupplierImpl#isPreferred Preferred}
  • - *
- *

- * - * @generated - */ -public class SupplierImpl extends AddressImpl implements Supplier -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The cached value of the '{@link #getPurchaseOrders() Purchase Orders}' reference list. - * - * @see #getPurchaseOrders() - * @generated - * @ordered - */ - protected EList purchaseOrders; - - /** - * The default value of the '{@link #isPreferred() Preferred}' attribute. - * - * @see #isPreferred() - * @generated - * @ordered - */ - protected static final boolean PREFERRED_EDEFAULT = true; - - /** - * The cached value of the '{@link #isPreferred() Preferred}' attribute. - * - * @see #isPreferred() - * @generated - * @ordered - */ - protected boolean preferred = PREFERRED_EDEFAULT; - - /** - * - * - * @generated - */ - protected SupplierImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getSupplier(); - } - - /** - * - * - * @generated - */ - public EList getPurchaseOrders() - { - if (purchaseOrders == null) - { - purchaseOrders = new EObjectWithInverseResolvingEList(PurchaseOrder.class, this, - Model1Package.SUPPLIER__PURCHASE_ORDERS, Model1Package.PURCHASE_ORDER__SUPPLIER); - } - return purchaseOrders; - } - - /** - * - * - * @generated - */ - public boolean isPreferred() - { - return preferred; - } - - /** - * - * - * @generated - */ - public void setPreferred(boolean newPreferred) - { - boolean oldPreferred = preferred; - preferred = newPreferred; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.SUPPLIER__PREFERRED, oldPreferred, preferred)); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.SUPPLIER__PURCHASE_ORDERS: - return ((InternalEList)(InternalEList)getPurchaseOrders()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) - { - switch (featureID) - { - case Model1Package.SUPPLIER__PURCHASE_ORDERS: - return ((InternalEList)getPurchaseOrders()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) - { - switch (featureID) - { - case Model1Package.SUPPLIER__PURCHASE_ORDERS: - return getPurchaseOrders(); - case Model1Package.SUPPLIER__PREFERRED: - return isPreferred(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) - { - switch (featureID) - { - case Model1Package.SUPPLIER__PURCHASE_ORDERS: - getPurchaseOrders().clear(); - getPurchaseOrders().addAll((Collection)newValue); - return; - case Model1Package.SUPPLIER__PREFERRED: - setPreferred((Boolean)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) - { - switch (featureID) - { - case Model1Package.SUPPLIER__PURCHASE_ORDERS: - getPurchaseOrders().clear(); - return; - case Model1Package.SUPPLIER__PREFERRED: - setPreferred(PREFERRED_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) - { - switch (featureID) - { - case Model1Package.SUPPLIER__PURCHASE_ORDERS: - return purchaseOrders != null && !purchaseOrders.isEmpty(); - case Model1Package.SUPPLIER__PREFERRED: - return preferred != PREFERRED_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() - { - if (eIsProxy()) - return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (preferred: "); - result.append(preferred); - result.append(')'); - return result.toString(); - } - -} // SupplierImpl +/* + * 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.tests.legacy.model1.impl; + +import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Supplier'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SupplierImpl#getPurchaseOrders Purchase Orders}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model1.impl.SupplierImpl#isPreferred Preferred}
  • + *
+ *

+ * + * @generated + */ +public class SupplierImpl extends AddressImpl implements Supplier +{ + /** + * + * @generated + */ + public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; + + /** + * The cached value of the '{@link #getPurchaseOrders() Purchase Orders}' reference list. + * + * @see #getPurchaseOrders() + * @generated + * @ordered + */ + protected EList purchaseOrders; + + /** + * The default value of the '{@link #isPreferred() Preferred}' attribute. + * + * @see #isPreferred() + * @generated + * @ordered + */ + protected static final boolean PREFERRED_EDEFAULT = true; + + /** + * The cached value of the '{@link #isPreferred() Preferred}' attribute. + * + * @see #isPreferred() + * @generated + * @ordered + */ + protected boolean preferred = PREFERRED_EDEFAULT; + + /** + * + * @generated + */ + protected SupplierImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getSupplier(); + } + + /** + * + * @generated + */ + public EList getPurchaseOrders() + { + if (purchaseOrders == null) + { + purchaseOrders = new EObjectWithInverseResolvingEList(PurchaseOrder.class, this, + Model1Package.SUPPLIER__PURCHASE_ORDERS, Model1Package.PURCHASE_ORDER__SUPPLIER); + } + return purchaseOrders; + } + + /** + * + * @generated + */ + public boolean isPreferred() + { + return preferred; + } + + /** + * + * @generated + */ + public void setPreferred(boolean newPreferred) + { + boolean oldPreferred = preferred; + preferred = newPreferred; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.SUPPLIER__PREFERRED, oldPreferred, preferred)); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.SUPPLIER__PURCHASE_ORDERS: + return ((InternalEList)(InternalEList)getPurchaseOrders()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model1Package.SUPPLIER__PURCHASE_ORDERS: + return ((InternalEList)getPurchaseOrders()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model1Package.SUPPLIER__PURCHASE_ORDERS: + return getPurchaseOrders(); + case Model1Package.SUPPLIER__PREFERRED: + return isPreferred(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model1Package.SUPPLIER__PURCHASE_ORDERS: + getPurchaseOrders().clear(); + getPurchaseOrders().addAll((Collection)newValue); + return; + case Model1Package.SUPPLIER__PREFERRED: + setPreferred((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model1Package.SUPPLIER__PURCHASE_ORDERS: + getPurchaseOrders().clear(); + return; + case Model1Package.SUPPLIER__PREFERRED: + setPreferred(PREFERRED_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model1Package.SUPPLIER__PURCHASE_ORDERS: + return purchaseOrders != null && !purchaseOrders.isEmpty(); + case Model1Package.SUPPLIER__PREFERRED: + return preferred != PREFERRED_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (preferred: "); + result.append(preferred); + result.append(')'); + return result.toString(); + } + +} // SupplierImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java index 1a9dabedd6..89ee7cc5df 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Address.java @@ -1,117 +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.tests.model1; - -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Address'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.Address#getName Name}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Address#getStreet Street}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Address#getCity City}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress() - * @model - * @generated - */ -public interface Address extends EObject -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Name' attribute. - *

- * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... - *

- * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress_Name() - * @model - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Address#getName Name}' attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Street' attribute. - *

- * If the meaning of the 'Street' attribute isn't clear, there really should be more of a description here... - *

- * - * - * @return the value of the 'Street' attribute. - * @see #setStreet(String) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress_Street() - * @model - * @generated - */ - String getStreet(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Address#getStreet Street}' attribute. - * - * @param value - * the new value of the 'Street' attribute. - * @see #getStreet() - * @generated - */ - void setStreet(String value); - - /** - * Returns the value of the 'City' attribute. - *

- * If the meaning of the 'City' attribute isn't clear, there really should be more of a description here... - *

- * - * - * @return the value of the 'City' attribute. - * @see #setCity(String) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress_City() - * @model - * @generated - */ - String getCity(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Address#getCity City}' attribute. - * - * @param value - * the new value of the 'City' attribute. - * @see #getCity() - * @generated - */ - void setCity(String value); - -} // Address +/* + * 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.tests.model1; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Address'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.Address#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Address#getStreet Street}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Address#getCity City}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress() + * @model + * @generated + */ +public interface Address extends EObject +{ + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Address#getName Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Street' attribute. + * + *

+ * If the meaning of the 'Street' attribute isn't clear, there really should be more of a description here... + *

+ * + * @return the value of the 'Street' attribute. + * @see #setStreet(String) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress_Street() + * @model + * @generated + */ + String getStreet(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Address#getStreet Street}' attribute. + * + * @param value + * the new value of the 'Street' attribute. + * @see #getStreet() + * @generated + */ + void setStreet(String value); + + /** + * Returns the value of the 'City' attribute. + * + *

+ * If the meaning of the 'City' attribute isn't clear, there really should be more of a description here... + *

+ * + * @return the value of the 'City' attribute. + * @see #setCity(String) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getAddress_City() + * @model + * @generated + */ + String getCity(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Address#getCity City}' attribute. + * + * @param value + * the new value of the 'City' attribute. + * @see #getCity() + * @generated + */ + void setCity(String value); + +} // Address diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java index 14121c7f70..2d2ca0be35 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Category.java @@ -1,98 +1,92 @@ -/* - * 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.tests.model1; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Category'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.Category#getName Name}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Category#getCategories Categories}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Category#getProducts Products}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory() - * @model - * @generated - */ -public interface Category extends EObject -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Name' attribute. - *

- * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... - *

- * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Name() - * @model - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Category#getName Name}' attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Categories' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.Category}. - *

- * If the meaning of the 'Categories' containment reference list isn't clear, there really should be more of - * a description here... - *

- * - * - * @return the value of the 'Categories' containment reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Categories() - * @model containment="true" - * @generated - */ - EList getCategories(); - - /** - * Returns the value of the 'Products' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.Product1}. - *

- * If the meaning of the 'Products' containment reference list isn't clear, there really should be more of a - * description here... - *

- * - * - * @return the value of the 'Products' containment reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Products() - * @model containment="true" - * @generated - */ - EList getProducts(); - -} // Category +/* + * 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.tests.model1; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Category'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.Category#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Category#getCategories Categories}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Category#getProducts Products}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory() + * @model + * @generated + */ +public interface Category extends EObject +{ + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Category#getName Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Categories' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Category}. + * + *

+ * If the meaning of the 'Categories' containment reference list isn't clear, there really should be more of + * a description here... + *

+ * + * @return the value of the 'Categories' containment reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Categories() + * @model containment="true" + * @generated + */ + EList getCategories(); + + /** + * Returns the value of the 'Products' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Product1}. + * + *

+ * If the meaning of the 'Products' containment reference list isn't clear, there really should be more of a + * description here... + *

+ * + * @return the value of the 'Products' containment reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCategory_Products() + * @model containment="true" + * @generated + */ + EList getProducts(); + +} // Category diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java index cdb2baba0c..98cacda872 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Company.java @@ -1,121 +1,115 @@ -/* - * 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.tests.model1; - -import org.eclipse.emf.common.util.EList; - -/** - * A representation of the model object 'Company'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getCategories Categories}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getSuppliers Suppliers}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getCustomers Customers}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders Purchase Orders}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders Sales Orders}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany() - * @model - * @generated - */ -public interface Company extends Address -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Categories' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.Category}. - *

- * If the meaning of the 'Categories' containment reference list isn't clear, there really should be more of - * a description here... - *

- * - * - * @return the value of the 'Categories' containment reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Categories() - * @model containment="true" - * @generated - */ - EList getCategories(); - - /** - * Returns the value of the 'Suppliers' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.Supplier}. - *

- * If the meaning of the 'Suppliers' containment reference list isn't clear, there really should be more of a - * description here... - *

- * - * - * @return the value of the 'Suppliers' containment reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Suppliers() - * @model containment="true" - * @generated - */ - EList getSuppliers(); - - /** - * Returns the value of the 'Purchase Orders' containment reference list. The list contents are of - * type {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder}. - *

- * If the meaning of the 'Purchase Orders' containment reference list isn't clear, there really should be - * more of a description here... - *

- * - * - * @return the value of the 'Purchase Orders' containment reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_PurchaseOrders() - * @model containment="true" - * @generated - */ - EList getPurchaseOrders(); - - /** - * Returns the value of the 'Customers' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.Customer}. - *

- * If the meaning of the 'Customers' containment reference list isn't clear, there really should be more of a - * description here... - *

- * - * - * @return the value of the 'Customers' containment reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Customers() - * @model containment="true" - * @generated - */ - EList getCustomers(); - - /** - * Returns the value of the 'Sales Orders' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}. - *

- * If the meaning of the 'Sales Orders' containment reference list isn't clear, there really should be more - * of a description here... - *

- * - * - * @return the value of the 'Sales Orders' containment reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_SalesOrders() - * @model containment="true" - * @generated - */ - EList getSalesOrders(); - -} // Company +/* + * 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.tests.model1; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Company'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getCategories Categories}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getSuppliers Suppliers}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getCustomers Customers}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders Purchase Orders}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders Sales Orders}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany() + * @model + * @generated + */ +public interface Company extends Address +{ + /** + * Returns the value of the 'Categories' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Category}. + * + *

+ * If the meaning of the 'Categories' containment reference list isn't clear, there really should be more of + * a description here... + *

+ * + * @return the value of the 'Categories' containment reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Categories() + * @model containment="true" + * @generated + */ + EList getCategories(); + + /** + * Returns the value of the 'Suppliers' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Supplier}. + * + *

+ * If the meaning of the 'Suppliers' containment reference list isn't clear, there really should be more of a + * description here... + *

+ * + * @return the value of the 'Suppliers' containment reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Suppliers() + * @model containment="true" + * @generated + */ + EList getSuppliers(); + + /** + * Returns the value of the 'Purchase Orders' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder}. + * + *

+ * If the meaning of the 'Purchase Orders' containment reference list isn't clear, there really should be + * more of a description here... + *

+ * + * @return the value of the 'Purchase Orders' containment reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_PurchaseOrders() + * @model containment="true" + * @generated + */ + EList getPurchaseOrders(); + + /** + * Returns the value of the 'Customers' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.Customer}. + * + *

+ * If the meaning of the 'Customers' containment reference list isn't clear, there really should be more of a + * description here... + *

+ * + * @return the value of the 'Customers' containment reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_Customers() + * @model containment="true" + * @generated + */ + EList getCustomers(); + + /** + * Returns the value of the 'Sales Orders' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}. + * + *

+ * If the meaning of the 'Sales Orders' containment reference list isn't clear, there really should be more + * of a description here... + *

+ * + * @return the value of the 'Sales Orders' containment reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCompany_SalesOrders() + * @model containment="true" + * @generated + */ + EList getSalesOrders(); + +} // Company diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java index 248de5f01d..3e44bd0e52 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Customer.java @@ -1,75 +1,68 @@ -/* - * 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.tests.model1; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.EMap; - -/** - * A representation of the model object 'Customer'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders Sales Orders}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Customer#getOrderByProduct Order By Product}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCustomer() - * @model - * @generated - */ -public interface Customer extends Address -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Sales Orders' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer Customer}'. - *

- * If the meaning of the 'Sales Orders' reference list isn't clear, there really should be more of a - * description here... - *

- * - * - * @return the value of the 'Sales Orders' reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCustomer_SalesOrders() - * @see org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer - * @model opposite="customer" - * @generated - */ - EList getSalesOrders(); - - /** - * Returns the value of the 'Order By Product' map. The key is of type - * {@link org.eclipse.emf.cdo.tests.model1.Product1}, and the value is of type - * {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}, - *

- * If the meaning of the 'Order By Product' map isn't clear, there really should be more of a description - * here... - *

- * - * - * @return the value of the 'Order By Product' map. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCustomer_OrderByProduct() - * @model mapType= - * "org.eclipse.emf.cdo.tests.model1.ProductToOrder" - * @generated - */ - EMap getOrderByProduct(); - -} // Customer +/* + * 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.tests.model1; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; + +/** + * A representation of the model object 'Customer'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders Sales Orders}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Customer#getOrderByProduct Order By Product}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCustomer() + * @model + * @generated + */ +public interface Customer extends Address +{ + /** + * Returns the value of the 'Sales Orders' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer Customer}'. + * + *

+ * If the meaning of the 'Sales Orders' reference list isn't clear, there really should be more of a + * description here... + *

+ * + * @return the value of the 'Sales Orders' reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCustomer_SalesOrders() + * @see org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer + * @model opposite="customer" + * @generated + */ + EList getSalesOrders(); + + /** + * Returns the value of the 'Order By Product' map. + * The key is of type {@link org.eclipse.emf.cdo.tests.model1.Product1}, + * and the value is of type {@link org.eclipse.emf.cdo.tests.model1.SalesOrder}, + * + *

+ * If the meaning of the 'Order By Product' map isn't clear, there really should be more of a description + * here... + *

+ * + * @return the value of the 'Order By Product' map. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getCustomer_OrderByProduct() + * @model mapType="org.eclipse.emf.cdo.tests.model1.ProductToOrder" + * @generated + */ + EMap getOrderByProduct(); + +} // Customer diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java index 03f371b1cb..5152362e69 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Factory.java @@ -1,126 +1,118 @@ -/* - * 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.tests.model1; - -import org.eclipse.emf.ecore.EFactory; - -/** - * The Factory for the model. It provides a create method for each non-abstract class of - * the model. - * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package - * @generated - */ -public interface Model1Factory extends EFactory -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The singleton instance of the factory. - * - * @generated - */ - Model1Factory eINSTANCE = org.eclipse.emf.cdo.tests.model1.impl.Model1FactoryImpl.init(); - - /** - * Returns a new object of class 'Address'. - * - * @return a new object of class 'Address'. - * @generated - */ - Address createAddress(); - - /** - * Returns a new object of class 'Supplier'. - * - * @return a new object of class 'Supplier'. - * @generated - */ - Supplier createSupplier(); - - /** - * Returns a new object of class 'Purchase Order'. - * - * @return a new object of class 'Purchase Order'. - * @generated - */ - PurchaseOrder createPurchaseOrder(); - - /** - * Returns a new object of class 'Order Detail'. - * - * @return a new object of class 'Order Detail'. - * @generated - */ - OrderDetail createOrderDetail(); - - /** - * Returns a new object of class 'Order Address'. - * - * @return a new object of class 'Order Address'. - * @generated - */ - OrderAddress createOrderAddress(); - - /** - * Returns a new object of class 'Category'. - * - * @return a new object of class 'Category'. - * @generated - */ - Category createCategory(); - - /** - * Returns a new object of class 'Product1'. - * - * @return a new object of class 'Product1'. - * @generated - */ - Product1 createProduct1(); - - /** - * Returns a new object of class 'Company'. - * - * @return a new object of class 'Company'. - * @generated - */ - Company createCompany(); - - /** - * Returns a new object of class 'Customer'. - * - * @return a new object of class 'Customer'. - * @generated - */ - Customer createCustomer(); - - /** - * Returns a new object of class 'Sales Order'. - * - * @return a new object of class 'Sales Order'. - * @generated - */ - SalesOrder createSalesOrder(); - - /** - * Returns the package supported by this factory. - * - * @return the package supported by this factory. - * @generated - */ - Model1Package getModel1Package(); - -} // Model1Factory +/* + * 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.tests.model1; + +import org.eclipse.emf.ecore.EFactory; + +/** + * The Factory for the model. It provides a create method for each non-abstract class of + * the model. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package + * @generated + */ +public interface Model1Factory extends EFactory +{ + /** + * The singleton instance of the factory. + * + * @generated + */ + Model1Factory eINSTANCE = org.eclipse.emf.cdo.tests.model1.impl.Model1FactoryImpl.init(); + + /** + * Returns a new object of class 'Address'. + * + * @return a new object of class 'Address'. + * @generated + */ + Address createAddress(); + + /** + * Returns a new object of class 'Supplier'. + * + * @return a new object of class 'Supplier'. + * @generated + */ + Supplier createSupplier(); + + /** + * Returns a new object of class 'Purchase Order'. + * + * @return a new object of class 'Purchase Order'. + * @generated + */ + PurchaseOrder createPurchaseOrder(); + + /** + * Returns a new object of class 'Order Detail'. + * + * @return a new object of class 'Order Detail'. + * @generated + */ + OrderDetail createOrderDetail(); + + /** + * Returns a new object of class 'Order Address'. + * + * @return a new object of class 'Order Address'. + * @generated + */ + OrderAddress createOrderAddress(); + + /** + * Returns a new object of class 'Category'. + * + * @return a new object of class 'Category'. + * @generated + */ + Category createCategory(); + + /** + * Returns a new object of class 'Product1'. + * + * @return a new object of class 'Product1'. + * @generated + */ + Product1 createProduct1(); + + /** + * Returns a new object of class 'Company'. + * + * @return a new object of class 'Company'. + * @generated + */ + Company createCompany(); + + /** + * Returns a new object of class 'Customer'. + * + * @return a new object of class 'Customer'. + * @generated + */ + Customer createCustomer(); + + /** + * Returns a new object of class 'Sales Order'. + * + * @return a new object of class 'Sales Order'. + * @generated + */ + SalesOrder createSalesOrder(); + + /** + * Returns the package supported by this factory. + * + * @return the package supported by this factory. + * @generated + */ + Model1Package getModel1Package(); + +} // Model1Factory diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java index f0eb8c1e8a..b3129e00ca 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java @@ -1,1177 +1,1149 @@ -/* - * 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.tests.model1; - -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; - -/** - * The Package for the model. It contains accessors for the meta objects to represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * - * @see org.eclipse.emf.cdo.tests.model1.Model1Factory - * @model kind="package" annotation="teneo.jpa value='@hbGenericGenerators( {@GenericGenerator(name=\"system-uuid\", - * strategy = - * \"org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOUUIDHexGenerator\")})'" - * @generated - */ -public interface Model1Package extends EPackage -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The package name. - * - * @generated - */ - String eNAME = "model1"; - - /** - * The package namespace URI. - * - * @generated - */ - String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/model1/1.0.0"; - - /** - * The package namespace name. - * - * @generated - */ - String eNS_PREFIX = "model1"; - - /** - * The singleton instance of the package. - * - * @generated - */ - Model1Package eINSTANCE = org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl.init(); - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl Address}' class. - * - * @see org.eclipse.emf.cdo.tests.model1.impl.AddressImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getAddress() - * @generated - */ - int ADDRESS = 0; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int ADDRESS__NAME = 0; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int ADDRESS__STREET = 1; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int ADDRESS__CITY = 2; - - /** - * The number of structural features of the 'Address' class. - * - * @generated - * @ordered - */ - int ADDRESS_FEATURE_COUNT = 3; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl Supplier}' class. - * - * - * @see org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getSupplier() - * @generated - */ - int SUPPLIER = 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl Purchase Order} - * ' class. - * - * @see org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getPurchaseOrder() - * @generated - */ - int PURCHASE_ORDER = 6; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl Order Detail}' - * class. - * - * @see org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getOrderDetail() - * @generated - */ - int ORDER_DETAIL = 5; - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Address Address}'. - * - * @return the meta object for class 'Address'. - * @see org.eclipse.emf.cdo.tests.model1.Address - * @generated - */ - EClass getAddress(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Address#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see org.eclipse.emf.cdo.tests.model1.Address#getName() - * @see #getAddress() - * @generated - */ - EAttribute getAddress_Name(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Address#getStreet - * Street}'. - * - * @return the meta object for the attribute 'Street'. - * @see org.eclipse.emf.cdo.tests.model1.Address#getStreet() - * @see #getAddress() - * @generated - */ - EAttribute getAddress_Street(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Address#getCity City}'. - * - * - * @return the meta object for the attribute 'City'. - * @see org.eclipse.emf.cdo.tests.model1.Address#getCity() - * @see #getAddress() - * @generated - */ - EAttribute getAddress_City(); - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl Category}' class. - * - * - * @see org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCategory() - * @generated - */ - int CATEGORY = 8; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl Company}' class. - * - * @see org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCompany() - * @generated - */ - int COMPANY = 1; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int COMPANY__NAME = ADDRESS__NAME; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int COMPANY__STREET = ADDRESS__STREET; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int COMPANY__CITY = ADDRESS__CITY; - - /** - * The feature id for the 'Categories' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__CATEGORIES = ADDRESS_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Suppliers' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__SUPPLIERS = ADDRESS_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Customers' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__CUSTOMERS = ADDRESS_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Purchase Orders' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Sales Orders' containment reference list. - * - * @generated - * @ordered - */ - int COMPANY__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 4; - - /** - * The number of structural features of the 'Company' class. - * - * @generated - * @ordered - */ - int COMPANY_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int SUPPLIER__NAME = ADDRESS__NAME; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int SUPPLIER__STREET = ADDRESS__STREET; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int SUPPLIER__CITY = ADDRESS__CITY; - - /** - * The feature id for the 'Purchase Orders' reference list. - * - * @generated - * @ordered - */ - int SUPPLIER__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Preferred' attribute. - * - * @generated - * @ordered - */ - int SUPPLIER__PREFERRED = ADDRESS_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Supplier' class. - * - * @generated - * @ordered - */ - int SUPPLIER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl Customer}' class. - * - * - * @see org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCustomer() - * @generated - */ - int CUSTOMER = 3; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int CUSTOMER__NAME = ADDRESS__NAME; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int CUSTOMER__STREET = ADDRESS__STREET; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int CUSTOMER__CITY = ADDRESS__CITY; - - /** - * The feature id for the 'Sales Orders' reference list. - * - * @generated - * @ordered - */ - int CUSTOMER__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Order By Product' map. - * - * @generated - * @ordered - */ - int CUSTOMER__ORDER_BY_PRODUCT = ADDRESS_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Customer' class. - * - * @generated - * @ordered - */ - int CUSTOMER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderImpl Order}' class. - * - * @see org.eclipse.emf.cdo.tests.model1.impl.OrderImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getOrder() - * @generated - */ - int ORDER = 4; - - /** - * The feature id for the 'Order Details' containment reference list. - * - * @generated - * @ordered - */ - int ORDER__ORDER_DETAILS = 0; - - /** - * The number of structural features of the 'Order' class. - * - * @generated - * @ordered - */ - int ORDER_FEATURE_COUNT = 1; - - /** - * The feature id for the 'Order' container reference. - * - * @generated - * @ordered - */ - int ORDER_DETAIL__ORDER = 0; - - /** - * The feature id for the 'Product' reference. - * - * @generated - * @ordered - */ - int ORDER_DETAIL__PRODUCT = 1; - - /** - * The feature id for the 'Price' attribute. - * - * @generated - * @ordered - */ - int ORDER_DETAIL__PRICE = 2; - - /** - * The number of structural features of the 'Order Detail' class. - * - * @generated - * @ordered - */ - int ORDER_DETAIL_FEATURE_COUNT = 3; - - /** - * The feature id for the 'Order Details' containment reference list. - * - * @generated - * @ordered - */ - int PURCHASE_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; - - /** - * The feature id for the 'Date' attribute. - * - * @generated - * @ordered - */ - int PURCHASE_ORDER__DATE = ORDER_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Supplier' reference. - * - * @generated - * @ordered - */ - int PURCHASE_ORDER__SUPPLIER = ORDER_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Purchase Order' class. - * - * @generated - * @ordered - */ - int PURCHASE_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl Sales Order}' - * class. - * - * @see org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getSalesOrder() - * @generated - */ - int SALES_ORDER = 7; - - /** - * The feature id for the 'Order Details' containment reference list. - * - * @generated - * @ordered - */ - int SALES_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; - - /** - * The feature id for the 'Id' attribute. - * - * @generated - * @ordered - */ - int SALES_ORDER__ID = ORDER_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Customer' reference. - * - * @generated - * @ordered - */ - int SALES_ORDER__CUSTOMER = ORDER_FEATURE_COUNT + 1; - - /** - * The number of structural features of the 'Sales Order' class. - * - * @generated - * @ordered - */ - int SALES_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int CATEGORY__NAME = 0; - - /** - * The feature id for the 'Categories' containment reference list. - * - * @generated - * @ordered - */ - int CATEGORY__CATEGORIES = 1; - - /** - * The feature id for the 'Products' containment reference list. - * - * @generated - * @ordered - */ - int CATEGORY__PRODUCTS = 2; - - /** - * The number of structural features of the 'Category' class. - * - * @generated - * @ordered - */ - int CATEGORY_FEATURE_COUNT = 3; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl Product1}' class. - * - * - * @see org.eclipse.emf.cdo.tests.model1.impl.Product1Impl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getProduct1() - * @generated - */ - int PRODUCT1 = 9; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int PRODUCT1__NAME = 0; - - /** - * The feature id for the 'Order Details' reference list. - * - * @generated - * @ordered - */ - int PRODUCT1__ORDER_DETAILS = 1; - - /** - * The feature id for the 'Vat' attribute. - * - * @generated - * @ordered - */ - int PRODUCT1__VAT = 2; - - /** - * The feature id for the 'Description' attribute. - * - * @generated - * @ordered - */ - int PRODUCT1__DESCRIPTION = 3; - - /** - * The number of structural features of the 'Product1' class. - * - * @generated - * @ordered - */ - int PRODUCT1_FEATURE_COUNT = 4; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl Order Address}' - * class. - * - * @see org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getOrderAddress() - * @generated - */ - int ORDER_ADDRESS = 10; - - /** - * The feature id for the 'Name' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__NAME = ADDRESS__NAME; - - /** - * The feature id for the 'Street' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__STREET = ADDRESS__STREET; - - /** - * The feature id for the 'City' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__CITY = ADDRESS__CITY; - - /** - * The feature id for the 'Order Details' containment reference list. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__ORDER_DETAILS = ADDRESS_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Order' container reference. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__ORDER = ADDRESS_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Product' reference. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__PRODUCT = ADDRESS_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Price' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__PRICE = ADDRESS_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Test Attribute' attribute. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS__TEST_ATTRIBUTE = ADDRESS_FEATURE_COUNT + 4; - - /** - * The number of structural features of the 'Order Address' class. - * - * @generated - * @ordered - */ - int ORDER_ADDRESS_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.ProductToOrderImpl - * Product To Order}' class. - * - * @see org.eclipse.emf.cdo.tests.model1.impl.ProductToOrderImpl - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getProductToOrder() - * @generated - */ - int PRODUCT_TO_ORDER = 11; - - /** - * The feature id for the 'Key' reference. - * - * @generated - * @ordered - */ - int PRODUCT_TO_ORDER__KEY = 0; - - /** - * The feature id for the 'Value' reference. - * - * @generated - * @ordered - */ - int PRODUCT_TO_ORDER__VALUE = 1; - - /** - * The number of structural features of the 'Product To Order' class. - * - * @generated - * @ordered - */ - int PRODUCT_TO_ORDER_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.VAT VAT}' enum. - * - * @see org.eclipse.emf.cdo.tests.model1.VAT - * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getVAT() - * @generated - */ - int VAT = 12; - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Supplier Supplier}'. - * - * @return the meta object for class 'Supplier'. - * @see org.eclipse.emf.cdo.tests.model1.Supplier - * @generated - */ - EClass getSupplier(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders - * Purchase Orders}'. - * - * @return the meta object for the reference list 'Purchase Orders'. - * @see org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders() - * @see #getSupplier() - * @generated - */ - EReference getSupplier_PurchaseOrders(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred - * Preferred}'. - * - * @return the meta object for the attribute 'Preferred'. - * @see org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred() - * @see #getSupplier() - * @generated - */ - EAttribute getSupplier_Preferred(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder Purchase Order}'. - * - * - * @return the meta object for class 'Purchase Order'. - * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder - * @generated - */ - EClass getPurchaseOrder(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate - * Date}'. - * - * @return the meta object for the attribute 'Date'. - * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate() - * @see #getPurchaseOrder() - * @generated - */ - EAttribute getPurchaseOrder_Date(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier - * Supplier}'. - * - * @return the meta object for the reference 'Supplier'. - * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier() - * @see #getPurchaseOrder() - * @generated - */ - EReference getPurchaseOrder_Supplier(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail Order Detail}'. - * - * - * @return the meta object for class 'Order Detail'. - * @see org.eclipse.emf.cdo.tests.model1.OrderDetail - * @generated - */ - EClass getOrderDetail(); - - /** - * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder - * Order}'. - * - * @return the meta object for the container reference 'Order'. - * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder() - * @see #getOrderDetail() - * @generated - */ - EReference getOrderDetail_Order(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct - * Product}'. - * - * @return the meta object for the reference 'Product'. - * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct() - * @see #getOrderDetail() - * @generated - */ - EReference getOrderDetail_Product(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice - * Price}'. - * - * @return the meta object for the attribute 'Price'. - * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice() - * @see #getOrderDetail() - * @generated - */ - EAttribute getOrderDetail_Price(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress Order Address}'. - * - * - * @return the meta object for class 'Order Address'. - * @see org.eclipse.emf.cdo.tests.model1.OrderAddress - * @generated - */ - EClass getOrderAddress(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress#isTestAttribute - * Test Attribute}'. - * - * @return the meta object for the attribute 'Test Attribute'. - * @see org.eclipse.emf.cdo.tests.model1.OrderAddress#isTestAttribute() - * @see #getOrderAddress() - * @generated - */ - EAttribute getOrderAddress_TestAttribute(); - - /** - * Returns the meta object for class '{@link java.util.Map.Entry Product To Order}'. - * - * - * @return the meta object for class 'Product To Order'. - * @see java.util.Map.Entry - * @model keyType="org.eclipse.emf.cdo.tests.model1.Product1" valueType="org.eclipse.emf.cdo.tests.model1.SalesOrder" - * @generated - */ - EClass getProductToOrder(); - - /** - * Returns the meta object for the reference '{@link java.util.Map.Entry Key}'. - * - * @return the meta object for the reference 'Key'. - * @see java.util.Map.Entry - * @see #getProductToOrder() - * @generated - */ - EReference getProductToOrder_Key(); - - /** - * Returns the meta object for the reference '{@link java.util.Map.Entry Value}'. - * - * - * @return the meta object for the reference 'Value'. - * @see java.util.Map.Entry - * @see #getProductToOrder() - * @generated - */ - EReference getProductToOrder_Value(); - - /** - * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.model1.VAT VAT}'. - * - * @return the meta object for enum 'VAT'. - * @see org.eclipse.emf.cdo.tests.model1.VAT - * @generated - */ - EEnum getVAT(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Category Category}'. - * - * @return the meta object for class 'Category'. - * @see org.eclipse.emf.cdo.tests.model1.Category - * @generated - */ - EClass getCategory(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Category#getName Name} - * '. - * - * @return the meta object for the attribute 'Name'. - * @see org.eclipse.emf.cdo.tests.model1.Category#getName() - * @see #getCategory() - * @generated - */ - EAttribute getCategory_Name(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model1.Category#getCategories Categories}'. - * - * @return the meta object for the containment reference list 'Categories'. - * @see org.eclipse.emf.cdo.tests.model1.Category#getCategories() - * @see #getCategory() - * @generated - */ - EReference getCategory_Categories(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model1.Category#getProducts Products}'. - * - * @return the meta object for the containment reference list 'Products'. - * @see org.eclipse.emf.cdo.tests.model1.Category#getProducts() - * @see #getCategory() - * @generated - */ - EReference getCategory_Products(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Product1 Product1}'. - * - * @return the meta object for class 'Product1'. - * @see org.eclipse.emf.cdo.tests.model1.Product1 - * @generated - */ - EClass getProduct1(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Product1#getName Name} - * '. - * - * @return the meta object for the attribute 'Name'. - * @see org.eclipse.emf.cdo.tests.model1.Product1#getName() - * @see #getProduct1() - * @generated - */ - EAttribute getProduct1_Name(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails - * Order Details}'. - * - * @return the meta object for the reference list 'Order Details'. - * @see org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails() - * @see #getProduct1() - * @generated - */ - EReference getProduct1_OrderDetails(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Product1#getVat Vat}'. - * - * - * @return the meta object for the attribute 'Vat'. - * @see org.eclipse.emf.cdo.tests.model1.Product1#getVat() - * @see #getProduct1() - * @generated - */ - EAttribute getProduct1_Vat(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Product1#getDescription - * Description}'. - * - * @return the meta object for the attribute 'Description'. - * @see org.eclipse.emf.cdo.tests.model1.Product1#getDescription() - * @see #getProduct1() - * @generated - */ - EAttribute getProduct1_Description(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Company Company}'. - * - * @return the meta object for class 'Company'. - * @see org.eclipse.emf.cdo.tests.model1.Company - * @generated - */ - EClass getCompany(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model1.Company#getCategories Categories}'. - * - * @return the meta object for the containment reference list 'Categories'. - * @see org.eclipse.emf.cdo.tests.model1.Company#getCategories() - * @see #getCompany() - * @generated - */ - EReference getCompany_Categories(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model1.Company#getSuppliers Suppliers}'. - * - * @return the meta object for the containment reference list 'Suppliers'. - * @see org.eclipse.emf.cdo.tests.model1.Company#getSuppliers() - * @see #getCompany() - * @generated - */ - EReference getCompany_Suppliers(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders Purchase Orders}'. - * - * @return the meta object for the containment reference list 'Purchase Orders'. - * @see org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders() - * @see #getCompany() - * @generated - */ - EReference getCompany_PurchaseOrders(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model1.Company#getCustomers Customers}'. - * - * @return the meta object for the containment reference list 'Customers'. - * @see org.eclipse.emf.cdo.tests.model1.Company#getCustomers() - * @see #getCompany() - * @generated - */ - EReference getCompany_Customers(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders Sales Orders}'. - * - * - * @return the meta object for the containment reference list 'Sales Orders'. - * @see org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders() - * @see #getCompany() - * @generated - */ - EReference getCompany_SalesOrders(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Customer Customer}'. - * - * @return the meta object for class 'Customer'. - * @see org.eclipse.emf.cdo.tests.model1.Customer - * @generated - */ - EClass getCustomer(); - - /** - * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders - * Sales Orders}'. - * - * @return the meta object for the reference list 'Sales Orders'. - * @see org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders() - * @see #getCustomer() - * @generated - */ - EReference getCustomer_SalesOrders(); - - /** - * Returns the meta object for the map '{@link org.eclipse.emf.cdo.tests.model1.Customer#getOrderByProduct - * Order By Product}'. - * - * @return the meta object for the map 'Order By Product'. - * @see org.eclipse.emf.cdo.tests.model1.Customer#getOrderByProduct() - * @see #getCustomer() - * @generated - */ - EReference getCustomer_OrderByProduct(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Order Order}'. - * - * @return the meta object for class 'Order'. - * @see org.eclipse.emf.cdo.tests.model1.Order - * @generated - */ - EClass getOrder(); - - /** - * Returns the meta object for the containment reference list ' - * {@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails Order Details}'. - * - * - * @return the meta object for the containment reference list 'Order Details'. - * @see org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails() - * @see #getOrder() - * @generated - */ - EReference getOrder_OrderDetails(); - - /** - * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder Sales Order}'. - * - * @return the meta object for class 'Sales Order'. - * @see org.eclipse.emf.cdo.tests.model1.SalesOrder - * @generated - */ - EClass getSalesOrder(); - - /** - * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId Id}'. - * - * - * @return the meta object for the attribute 'Id'. - * @see org.eclipse.emf.cdo.tests.model1.SalesOrder#getId() - * @see #getSalesOrder() - * @generated - */ - EAttribute getSalesOrder_Id(); - - /** - * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer - * Customer}'. - * - * @return the meta object for the reference 'Customer'. - * @see org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer() - * @see #getSalesOrder() - * @generated - */ - EReference getSalesOrder_Customer(); - - /** - * Returns the factory that creates the instances of the model. - * - * @return the factory that creates the instances of the model. - * @generated - */ - Model1Factory getModel1Factory(); - -} // Model1Package +/* + * 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.tests.model1; + +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; + +/** + * The Package for the model. It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Factory + * @model kind="package" + * annotation="teneo.jpa value='@hbGenericGenerators({@GenericGenerator(name=\"system-uuid\", strategy = \"org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOUUIDHexGenerator\")})'" + * @generated + */ +public interface Model1Package extends EPackage +{ + /** + * The package name. + * + * @generated + */ + String eNAME = "model1"; + + /** + * The package namespace URI. + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/emf/CDO/tests/model1/1.0.0"; + + /** + * The package namespace name. + * + * @generated + */ + String eNS_PREFIX = "model1"; + + /** + * The singleton instance of the package. + * + * @generated + */ + Model1Package eINSTANCE = org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl.init(); + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl Address}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.AddressImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getAddress() + * @generated + */ + int ADDRESS = 0; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int ADDRESS__NAME = 0; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int ADDRESS__STREET = 1; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int ADDRESS__CITY = 2; + + /** + * The number of structural features of the 'Address' class. + * + * @generated + * @ordered + */ + int ADDRESS_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl Supplier}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getSupplier() + * @generated + */ + int SUPPLIER = 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl Purchase Order}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getPurchaseOrder() + * @generated + */ + int PURCHASE_ORDER = 6; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl Order Detail}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getOrderDetail() + * @generated + */ + int ORDER_DETAIL = 5; + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Address Address}'. + * + * @return the meta object for class 'Address'. + * @see org.eclipse.emf.cdo.tests.model1.Address + * @generated + */ + EClass getAddress(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Address#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.model1.Address#getName() + * @see #getAddress() + * @generated + */ + EAttribute getAddress_Name(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Address#getStreet Street}'. + * + * @return the meta object for the attribute 'Street'. + * @see org.eclipse.emf.cdo.tests.model1.Address#getStreet() + * @see #getAddress() + * @generated + */ + EAttribute getAddress_Street(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Address#getCity City}'. + * + * @return the meta object for the attribute 'City'. + * @see org.eclipse.emf.cdo.tests.model1.Address#getCity() + * @see #getAddress() + * @generated + */ + EAttribute getAddress_City(); + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl Category}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCategory() + * @generated + */ + int CATEGORY = 8; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl Company}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCompany() + * @generated + */ + int COMPANY = 1; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int COMPANY__NAME = ADDRESS__NAME; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int COMPANY__STREET = ADDRESS__STREET; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int COMPANY__CITY = ADDRESS__CITY; + + /** + * The feature id for the 'Categories' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__CATEGORIES = ADDRESS_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Suppliers' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__SUPPLIERS = ADDRESS_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Customers' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__CUSTOMERS = ADDRESS_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Purchase Orders' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Sales Orders' containment reference list. + * + * @generated + * @ordered + */ + int COMPANY__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Company' class. + * + * @generated + * @ordered + */ + int COMPANY_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int SUPPLIER__NAME = ADDRESS__NAME; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int SUPPLIER__STREET = ADDRESS__STREET; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int SUPPLIER__CITY = ADDRESS__CITY; + + /** + * The feature id for the 'Purchase Orders' reference list. + * + * @generated + * @ordered + */ + int SUPPLIER__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Preferred' attribute. + * + * @generated + * @ordered + */ + int SUPPLIER__PREFERRED = ADDRESS_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Supplier' class. + * + * @generated + * @ordered + */ + int SUPPLIER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl Customer}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getCustomer() + * @generated + */ + int CUSTOMER = 3; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int CUSTOMER__NAME = ADDRESS__NAME; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int CUSTOMER__STREET = ADDRESS__STREET; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int CUSTOMER__CITY = ADDRESS__CITY; + + /** + * The feature id for the 'Sales Orders' reference list. + * + * @generated + * @ordered + */ + int CUSTOMER__SALES_ORDERS = ADDRESS_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Order By Product' map. + * + * @generated + * @ordered + */ + int CUSTOMER__ORDER_BY_PRODUCT = ADDRESS_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Customer' class. + * + * @generated + * @ordered + */ + int CUSTOMER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderImpl Order}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.OrderImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getOrder() + * @generated + */ + int ORDER = 4; + + /** + * The feature id for the 'Order Details' containment reference list. + * + * @generated + * @ordered + */ + int ORDER__ORDER_DETAILS = 0; + + /** + * The number of structural features of the 'Order' class. + * + * @generated + * @ordered + */ + int ORDER_FEATURE_COUNT = 1; + + /** + * The feature id for the 'Order' container reference. + * + * @generated + * @ordered + */ + int ORDER_DETAIL__ORDER = 0; + + /** + * The feature id for the 'Product' reference. + * + * @generated + * @ordered + */ + int ORDER_DETAIL__PRODUCT = 1; + + /** + * The feature id for the 'Price' attribute. + * + * @generated + * @ordered + */ + int ORDER_DETAIL__PRICE = 2; + + /** + * The number of structural features of the 'Order Detail' class. + * + * @generated + * @ordered + */ + int ORDER_DETAIL_FEATURE_COUNT = 3; + + /** + * The feature id for the 'Order Details' containment reference list. + * + * @generated + * @ordered + */ + int PURCHASE_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; + + /** + * The feature id for the 'Date' attribute. + * + * @generated + * @ordered + */ + int PURCHASE_ORDER__DATE = ORDER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Supplier' reference. + * + * @generated + * @ordered + */ + int PURCHASE_ORDER__SUPPLIER = ORDER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Purchase Order' class. + * + * @generated + * @ordered + */ + int PURCHASE_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl Sales Order}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getSalesOrder() + * @generated + */ + int SALES_ORDER = 7; + + /** + * The feature id for the 'Order Details' containment reference list. + * + * @generated + * @ordered + */ + int SALES_ORDER__ORDER_DETAILS = ORDER__ORDER_DETAILS; + + /** + * The feature id for the 'Id' attribute. + * + * @generated + * @ordered + */ + int SALES_ORDER__ID = ORDER_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Customer' reference. + * + * @generated + * @ordered + */ + int SALES_ORDER__CUSTOMER = ORDER_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Sales Order' class. + * + * @generated + * @ordered + */ + int SALES_ORDER_FEATURE_COUNT = ORDER_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int CATEGORY__NAME = 0; + + /** + * The feature id for the 'Categories' containment reference list. + * + * @generated + * @ordered + */ + int CATEGORY__CATEGORIES = 1; + + /** + * The feature id for the 'Products' containment reference list. + * + * @generated + * @ordered + */ + int CATEGORY__PRODUCTS = 2; + + /** + * The number of structural features of the 'Category' class. + * + * @generated + * @ordered + */ + int CATEGORY_FEATURE_COUNT = 3; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl Product1}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.Product1Impl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getProduct1() + * @generated + */ + int PRODUCT1 = 9; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int PRODUCT1__NAME = 0; + + /** + * The feature id for the 'Order Details' reference list. + * + * @generated + * @ordered + */ + int PRODUCT1__ORDER_DETAILS = 1; + + /** + * The feature id for the 'Vat' attribute. + * + * @generated + * @ordered + */ + int PRODUCT1__VAT = 2; + + /** + * The feature id for the 'Other VA Ts' attribute list. + * + * + * @generated + * @ordered + */ + int PRODUCT1__OTHER_VA_TS = 3; + + /** + * The feature id for the 'Description' attribute. + * + * @generated + * @ordered + */ + int PRODUCT1__DESCRIPTION = 4; + + /** + * The number of structural features of the 'Product1' class. + * + * @generated + * @ordered + */ + int PRODUCT1_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl Order Address}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getOrderAddress() + * @generated + */ + int ORDER_ADDRESS = 10; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__NAME = ADDRESS__NAME; + + /** + * The feature id for the 'Street' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__STREET = ADDRESS__STREET; + + /** + * The feature id for the 'City' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__CITY = ADDRESS__CITY; + + /** + * The feature id for the 'Order Details' containment reference list. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__ORDER_DETAILS = ADDRESS_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Order' container reference. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__ORDER = ADDRESS_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Product' reference. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__PRODUCT = ADDRESS_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Price' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__PRICE = ADDRESS_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Test Attribute' attribute. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS__TEST_ATTRIBUTE = ADDRESS_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Order Address' class. + * + * @generated + * @ordered + */ + int ORDER_ADDRESS_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 5; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.ProductToOrderImpl Product To Order}' class. + * + * @see org.eclipse.emf.cdo.tests.model1.impl.ProductToOrderImpl + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getProductToOrder() + * @generated + */ + int PRODUCT_TO_ORDER = 11; + + /** + * The feature id for the 'Key' reference. + * + * @generated + * @ordered + */ + int PRODUCT_TO_ORDER__KEY = 0; + + /** + * The feature id for the 'Value' reference. + * + * @generated + * @ordered + */ + int PRODUCT_TO_ORDER__VALUE = 1; + + /** + * The number of structural features of the 'Product To Order' class. + * + * @generated + * @ordered + */ + int PRODUCT_TO_ORDER_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.VAT VAT}' enum. + * + * @see org.eclipse.emf.cdo.tests.model1.VAT + * @see org.eclipse.emf.cdo.tests.model1.impl.Model1PackageImpl#getVAT() + * @generated + */ + int VAT = 12; + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Supplier Supplier}'. + * + * @return the meta object for class 'Supplier'. + * @see org.eclipse.emf.cdo.tests.model1.Supplier + * @generated + */ + EClass getSupplier(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders Purchase Orders}'. + * + * @return the meta object for the reference list 'Purchase Orders'. + * @see org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders() + * @see #getSupplier() + * @generated + */ + EReference getSupplier_PurchaseOrders(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred Preferred}'. + * + * @return the meta object for the attribute 'Preferred'. + * @see org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred() + * @see #getSupplier() + * @generated + */ + EAttribute getSupplier_Preferred(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder Purchase Order}'. + * + * @return the meta object for class 'Purchase Order'. + * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder + * @generated + */ + EClass getPurchaseOrder(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate Date}'. + * + * @return the meta object for the attribute 'Date'. + * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate() + * @see #getPurchaseOrder() + * @generated + */ + EAttribute getPurchaseOrder_Date(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier Supplier}'. + * + * @return the meta object for the reference 'Supplier'. + * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier() + * @see #getPurchaseOrder() + * @generated + */ + EReference getPurchaseOrder_Supplier(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail Order Detail}'. + * + * @return the meta object for class 'Order Detail'. + * @see org.eclipse.emf.cdo.tests.model1.OrderDetail + * @generated + */ + EClass getOrderDetail(); + + /** + * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder Order}'. + * + * @return the meta object for the container reference 'Order'. + * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder() + * @see #getOrderDetail() + * @generated + */ + EReference getOrderDetail_Order(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct Product}'. + * + * @return the meta object for the reference 'Product'. + * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct() + * @see #getOrderDetail() + * @generated + */ + EReference getOrderDetail_Product(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice Price}'. + * + * @return the meta object for the attribute 'Price'. + * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice() + * @see #getOrderDetail() + * @generated + */ + EAttribute getOrderDetail_Price(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress Order Address}'. + * + * @return the meta object for class 'Order Address'. + * @see org.eclipse.emf.cdo.tests.model1.OrderAddress + * @generated + */ + EClass getOrderAddress(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress#isTestAttribute Test Attribute}'. + * + * @return the meta object for the attribute 'Test Attribute'. + * @see org.eclipse.emf.cdo.tests.model1.OrderAddress#isTestAttribute() + * @see #getOrderAddress() + * @generated + */ + EAttribute getOrderAddress_TestAttribute(); + + /** + * Returns the meta object for class '{@link java.util.Map.Entry Product To Order}'. + * + * + * @return the meta object for class 'Product To Order'. + * @see java.util.Map.Entry + * @model keyType="org.eclipse.emf.cdo.tests.model1.Product1" + * valueType="org.eclipse.emf.cdo.tests.model1.SalesOrder" + * @generated + */ + EClass getProductToOrder(); + + /** + * Returns the meta object for the reference '{@link java.util.Map.Entry Key}'. + * + * @return the meta object for the reference 'Key'. + * @see java.util.Map.Entry + * @see #getProductToOrder() + * @generated + */ + EReference getProductToOrder_Key(); + + /** + * Returns the meta object for the reference '{@link java.util.Map.Entry Value}'. + * + * + * @return the meta object for the reference 'Value'. + * @see java.util.Map.Entry + * @see #getProductToOrder() + * @generated + */ + EReference getProductToOrder_Value(); + + /** + * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.model1.VAT VAT}'. + * + * @return the meta object for enum 'VAT'. + * @see org.eclipse.emf.cdo.tests.model1.VAT + * @generated + */ + EEnum getVAT(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Category Category}'. + * + * @return the meta object for class 'Category'. + * @see org.eclipse.emf.cdo.tests.model1.Category + * @generated + */ + EClass getCategory(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Category#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.model1.Category#getName() + * @see #getCategory() + * @generated + */ + EAttribute getCategory_Name(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Category#getCategories Categories}'. + * + * @return the meta object for the containment reference list 'Categories'. + * @see org.eclipse.emf.cdo.tests.model1.Category#getCategories() + * @see #getCategory() + * @generated + */ + EReference getCategory_Categories(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Category#getProducts Products}'. + * + * @return the meta object for the containment reference list 'Products'. + * @see org.eclipse.emf.cdo.tests.model1.Category#getProducts() + * @see #getCategory() + * @generated + */ + EReference getCategory_Products(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Product1 Product1}'. + * + * @return the meta object for class 'Product1'. + * @see org.eclipse.emf.cdo.tests.model1.Product1 + * @generated + */ + EClass getProduct1(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Product1#getName Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.model1.Product1#getName() + * @see #getProduct1() + * @generated + */ + EAttribute getProduct1_Name(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails Order Details}'. + * + * @return the meta object for the reference list 'Order Details'. + * @see org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails() + * @see #getProduct1() + * @generated + */ + EReference getProduct1_OrderDetails(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Product1#getVat Vat}'. + * + * @return the meta object for the attribute 'Vat'. + * @see org.eclipse.emf.cdo.tests.model1.Product1#getVat() + * @see #getProduct1() + * @generated + */ + EAttribute getProduct1_Vat(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.tests.model1.Product1#getOtherVATs Other VA Ts}'. + * + * + * @return the meta object for the attribute list 'Other VA Ts'. + * @see org.eclipse.emf.cdo.tests.model1.Product1#getOtherVATs() + * @see #getProduct1() + * @generated + */ + EAttribute getProduct1_OtherVATs(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Product1#getDescription Description}'. + * + * @return the meta object for the attribute 'Description'. + * @see org.eclipse.emf.cdo.tests.model1.Product1#getDescription() + * @see #getProduct1() + * @generated + */ + EAttribute getProduct1_Description(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Company Company}'. + * + * @return the meta object for class 'Company'. + * @see org.eclipse.emf.cdo.tests.model1.Company + * @generated + */ + EClass getCompany(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getCategories Categories}'. + * + * @return the meta object for the containment reference list 'Categories'. + * @see org.eclipse.emf.cdo.tests.model1.Company#getCategories() + * @see #getCompany() + * @generated + */ + EReference getCompany_Categories(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getSuppliers Suppliers}'. + * + * @return the meta object for the containment reference list 'Suppliers'. + * @see org.eclipse.emf.cdo.tests.model1.Company#getSuppliers() + * @see #getCompany() + * @generated + */ + EReference getCompany_Suppliers(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders Purchase Orders}'. + * + * @return the meta object for the containment reference list 'Purchase Orders'. + * @see org.eclipse.emf.cdo.tests.model1.Company#getPurchaseOrders() + * @see #getCompany() + * @generated + */ + EReference getCompany_PurchaseOrders(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getCustomers Customers}'. + * + * @return the meta object for the containment reference list 'Customers'. + * @see org.eclipse.emf.cdo.tests.model1.Company#getCustomers() + * @see #getCompany() + * @generated + */ + EReference getCompany_Customers(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders Sales Orders}'. + * + * + * @return the meta object for the containment reference list 'Sales Orders'. + * @see org.eclipse.emf.cdo.tests.model1.Company#getSalesOrders() + * @see #getCompany() + * @generated + */ + EReference getCompany_SalesOrders(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Customer Customer}'. + * + * @return the meta object for class 'Customer'. + * @see org.eclipse.emf.cdo.tests.model1.Customer + * @generated + */ + EClass getCustomer(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders Sales Orders}'. + * + * @return the meta object for the reference list 'Sales Orders'. + * @see org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders() + * @see #getCustomer() + * @generated + */ + EReference getCustomer_SalesOrders(); + + /** + * Returns the meta object for the map '{@link org.eclipse.emf.cdo.tests.model1.Customer#getOrderByProduct Order By Product}'. + * + * @return the meta object for the map 'Order By Product'. + * @see org.eclipse.emf.cdo.tests.model1.Customer#getOrderByProduct() + * @see #getCustomer() + * @generated + */ + EReference getCustomer_OrderByProduct(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.Order Order}'. + * + * @return the meta object for class 'Order'. + * @see org.eclipse.emf.cdo.tests.model1.Order + * @generated + */ + EClass getOrder(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails Order Details}'. + * + * + * @return the meta object for the containment reference list 'Order Details'. + * @see org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails() + * @see #getOrder() + * @generated + */ + EReference getOrder_OrderDetails(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder Sales Order}'. + * + * @return the meta object for class 'Sales Order'. + * @see org.eclipse.emf.cdo.tests.model1.SalesOrder + * @generated + */ + EClass getSalesOrder(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId Id}'. + * + * @return the meta object for the attribute 'Id'. + * @see org.eclipse.emf.cdo.tests.model1.SalesOrder#getId() + * @see #getSalesOrder() + * @generated + */ + EAttribute getSalesOrder_Id(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer Customer}'. + * + * @return the meta object for the reference 'Customer'. + * @see org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer() + * @see #getSalesOrder() + * @generated + */ + EReference getSalesOrder_Customer(); + + /** + * Returns the factory that creates the instances of the model. + * + * @return the factory that creates the instances of the model. + * @generated + */ + Model1Factory getModel1Factory(); + +} // Model1Package diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java index c37c4aa1d2..00119b1b39 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Order.java @@ -1,56 +1,51 @@ -/* - * 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.tests.model1; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Order'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails Order Details}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrder() - * @model abstract="true" annotation="teneo.jpa value='@Entity(name=\"BaseOrder\")'" - * @generated - */ -public interface Order extends EObject -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Order Details' containment reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.OrderDetail}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder Order}'. - *

- * If the meaning of the 'Order Details' containment reference list isn't clear, there really should be more - * of a description here... - *

- * - * - * @return the value of the 'Order Details' containment reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrder_OrderDetails() - * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder - * @model opposite="order" containment="true" - * @generated - */ - EList getOrderDetails(); - -} // Order +/* + * 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.tests.model1; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Order'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails Order Details}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrder() + * @model abstract="true" + * annotation="teneo.jpa value='@Entity(name=\"BaseOrder\")'" + * @generated + */ +public interface Order extends EObject +{ + /** + * Returns the value of the 'Order Details' containment reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.OrderDetail}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder Order}'. + * + *

+ * If the meaning of the 'Order Details' containment reference list isn't clear, there really should be more + * of a description here... + *

+ * + * @return the value of the 'Order Details' containment reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrder_OrderDetails() + * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder + * @model opposite="order" containment="true" + * @generated + */ + EList getOrderDetails(); + +} // Order diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderAddress.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderAddress.java index 9d402848ce..6014fe7510 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderAddress.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderAddress.java @@ -1,63 +1,54 @@ -/* - * 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.tests.model1; - -/** - * A representation of the model object 'Order Address'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.OrderAddress#isTestAttribute Test Attribute}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderAddress() - * @model annotation= - * "teneo.jpa value='@AssociationOverride(name=\"orderDetails\", joinColumns=@JoinColumn(name=\"orderdetails_orderaddressid\"))'" - * @generated - */ -public interface OrderAddress extends Address, Order, OrderDetail -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Test Attribute' attribute. - *

- * If the meaning of the 'Test Attribute' attribute isn't clear, there really should be more of a description - * here... - *

- * - * - * @return the value of the 'Test Attribute' attribute. - * @see #setTestAttribute(boolean) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderAddress_TestAttribute() - * @model - * @generated - */ - boolean isTestAttribute(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress#isTestAttribute - * Test Attribute}' attribute. - * - * @param value - * the new value of the 'Test Attribute' attribute. - * @see #isTestAttribute() - * @generated - */ - void setTestAttribute(boolean value); - -} // OrderAddress +/* + * 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.tests.model1; + +/** + * A representation of the model object 'Order Address'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.OrderAddress#isTestAttribute Test Attribute}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderAddress() + * @model annotation="teneo.jpa value='@AssociationOverride(name=\"orderDetails\", joinColumns=@JoinColumn(name=\"orderdetails_orderaddressid\"))'" + * @generated + */ +public interface OrderAddress extends Address, Order, OrderDetail +{ + /** + * Returns the value of the 'Test Attribute' attribute. + * + *

+ * If the meaning of the 'Test Attribute' attribute isn't clear, there really should be more of a description + * here... + *

+ * + * @return the value of the 'Test Attribute' attribute. + * @see #setTestAttribute(boolean) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderAddress_TestAttribute() + * @model + * @generated + */ + boolean isTestAttribute(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress#isTestAttribute Test Attribute}' attribute. + * + * @param value the new value of the 'Test Attribute' attribute. + * @see #isTestAttribute() + * @generated + */ + void setTestAttribute(boolean value); + +} // OrderAddress diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java index a0676fdf1b..7665f4e09d 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/OrderDetail.java @@ -1,123 +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.tests.model1; - -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Order Detail'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder Order}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct Product}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice Price}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail() - * @model - * @generated - */ -public interface OrderDetail extends EObject -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Order' container reference. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails Order Details}'. - *

- * If the meaning of the 'Order' container reference isn't clear, there really should be more of a - * description here... - *

- * - * - * @return the value of the 'Order' container reference. - * @see #setOrder(Order) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail_Order() - * @see org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails - * @model opposite="orderDetails" required="true" transient="false" - * @generated - */ - Order getOrder(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder Order}' container - * reference. - * - * @param value - * the new value of the 'Order' container reference. - * @see #getOrder() - * @generated - */ - void setOrder(Order value); - - /** - * Returns the value of the 'Product' reference. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails Order Details}'. - *

- * If the meaning of the 'Product' reference isn't clear, there really should be more of a description - * here... - *

- * - * - * @return the value of the 'Product' reference. - * @see #setProduct(Product1) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail_Product() - * @see org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails - * @model opposite="orderDetails" - * @generated - */ - Product1 getProduct(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct Product}' reference. - * - * - * @param value - * the new value of the 'Product' reference. - * @see #getProduct() - * @generated - */ - void setProduct(Product1 value); - - /** - * Returns the value of the 'Price' attribute. - *

- * If the meaning of the 'Price' attribute isn't clear, there really should be more of a description here... - *

- * - * - * @return the value of the 'Price' attribute. - * @see #setPrice(float) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail_Price() - * @model - * @generated - */ - float getPrice(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice Price}' attribute. - * - * - * @param value - * the new value of the 'Price' attribute. - * @see #getPrice() - * @generated - */ - void setPrice(float value); - -} // OrderDetail +/* + * 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.tests.model1; + +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Order Detail'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder Order}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct Product}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice Price}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail() + * @model + * @generated + */ +public interface OrderDetail extends EObject +{ + /** + * Returns the value of the 'Order' container reference. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails Order Details}'. + * + *

+ * If the meaning of the 'Order' container reference isn't clear, there really should be more of a + * description here... + *

+ * + * @return the value of the 'Order' container reference. + * @see #setOrder(Order) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail_Order() + * @see org.eclipse.emf.cdo.tests.model1.Order#getOrderDetails + * @model opposite="orderDetails" required="true" transient="false" + * @generated + */ + Order getOrder(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getOrder Order}' container reference. + * + * @param value the new value of the 'Order' container reference. + * @see #getOrder() + * @generated + */ + void setOrder(Order value); + + /** + * Returns the value of the 'Product' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails Order Details}'. + * + *

+ * If the meaning of the 'Product' reference isn't clear, there really should be more of a description + * here... + *

+ * + * @return the value of the 'Product' reference. + * @see #setProduct(Product1) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail_Product() + * @see org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails + * @model opposite="orderDetails" + * @generated + */ + Product1 getProduct(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct Product}' reference. + * + * @param value the new value of the 'Product' reference. + * @see #getProduct() + * @generated + */ + void setProduct(Product1 value); + + /** + * Returns the value of the 'Price' attribute. + * + *

+ * If the meaning of the 'Price' attribute isn't clear, there really should be more of a description here... + *

+ * + * @return the value of the 'Price' attribute. + * @see #setPrice(float) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getOrderDetail_Price() + * @model + * @generated + */ + float getPrice(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getPrice Price}' attribute. + * + * @param value the new value of the 'Price' attribute. + * @see #getPrice() + * @generated + */ + void setPrice(float value); + +} // OrderDetail diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product1.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product1.java index cc330e2adb..10727e4517 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product1.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Product1.java @@ -1,141 +1,153 @@ -/* - * 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.tests.model1; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; - -/** - * A representation of the model object 'Product'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.Product1#getName Name}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails Order Details}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Product1#getVat Vat}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Product1#getDescription Description}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1() - * @model - * @generated - */ -public interface Product1 extends EObject -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Name' attribute. - *

- * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... - *

- * - * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1_Name() - * @model annotation="teneo.jpa value='@Id'" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Product1#getName Name}' attribute. - * - * @param value - * the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Order Details' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.OrderDetail}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct Product}'. - *

- * If the meaning of the 'Order Details' reference list isn't clear, there really should be more of a - * description here... - *

- * - * - * @return the value of the 'Order Details' reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1_OrderDetails() - * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct - * @model opposite="product" - * @generated - */ - EList getOrderDetails(); - - /** - * Returns the value of the 'Vat' attribute. The default value is "vat15". The literals - * are from the enumeration {@link org.eclipse.emf.cdo.tests.model1.VAT}. - *

- * If the meaning of the 'Vat' attribute isn't clear, there really should be more of a description here... - *

- * - * - * @return the value of the 'Vat' attribute. - * @see org.eclipse.emf.cdo.tests.model1.VAT - * @see #setVat(VAT) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1_Vat() - * @model default="vat15" - * @generated - */ - VAT getVat(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Product1#getVat Vat}' attribute. - * - * @param value - * the new value of the 'Vat' attribute. - * @see org.eclipse.emf.cdo.tests.model1.VAT - * @see #getVat() - * @generated - */ - void setVat(VAT value); - - /** - * Returns the value of the 'Description' attribute. - *

- * If the meaning of the 'Description' attribute isn't clear, there really should be more of a description - * here... - *

- * - * - * @return the value of the 'Description' attribute. - * @see #setDescription(String) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1_Description() - * @model transient="true" - * @generated - */ - String getDescription(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Product1#getDescription Description}' - * attribute. - * - * @param value - * the new value of the 'Description' attribute. - * @see #getDescription() - * @generated - */ - void setDescription(String value); - -} // Product +/* + * 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.tests.model1; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Product'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.Product1#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Product1#getOrderDetails Order Details}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Product1#getVat Vat}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Product1#getOtherVATs Other VA Ts}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Product1#getDescription Description}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1() + * @model + * @generated + */ +public interface Product1 extends EObject +{ + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1_Name() + * @model annotation="teneo.jpa value='@Id'" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Product1#getName Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Order Details' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.OrderDetail}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct Product}'. + * + *

+ * If the meaning of the 'Order Details' reference list isn't clear, there really should be more of a + * description here... + *

+ * + * @return the value of the 'Order Details' reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1_OrderDetails() + * @see org.eclipse.emf.cdo.tests.model1.OrderDetail#getProduct + * @model opposite="product" + * @generated + */ + EList getOrderDetails(); + + /** + * Returns the value of the 'Vat' attribute. + * The default value is "vat15". + * The literals are from the enumeration {@link org.eclipse.emf.cdo.tests.model1.VAT}. + * + *

+ * If the meaning of the 'Vat' attribute isn't clear, there really should be more of a description here... + *

+ * + * @return the value of the 'Vat' attribute. + * @see org.eclipse.emf.cdo.tests.model1.VAT + * @see #setVat(VAT) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1_Vat() + * @model default="vat15" + * @generated + */ + VAT getVat(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Product1#getVat Vat}' attribute. + * + * @param value + * the new value of the 'Vat' attribute. + * @see org.eclipse.emf.cdo.tests.model1.VAT + * @see #getVat() + * @generated + */ + void setVat(VAT value); + + /** + * Returns the value of the 'Other VA Ts' attribute list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.VAT}. + * The literals are from the enumeration {@link org.eclipse.emf.cdo.tests.model1.VAT}. + * + *

+ * If the meaning of the 'Other VA Ts' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Other VA Ts' attribute list. + * @see org.eclipse.emf.cdo.tests.model1.VAT + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1_OtherVATs() + * @model default="vat15" + * @generated + */ + EList getOtherVATs(); + + /** + * Returns the value of the 'Description' attribute. + * + *

+ * If the meaning of the 'Description' attribute isn't clear, there really should be more of a description + * here... + *

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getProduct1_Description() + * @model transient="true" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Product1#getDescription Description}' attribute. + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + +} // Product diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java index 00078f4452..f8873444a4 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/PurchaseOrder.java @@ -1,94 +1,84 @@ -/* - * 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.tests.model1; - -import java.util.Date; - -/** - * A representation of the model object 'Purchase Order'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate Date}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier Supplier}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getPurchaseOrder() - * @model - * @generated - */ -public interface PurchaseOrder extends Order -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Date' attribute. - *

- * If the meaning of the 'Date' attribute isn't clear, there really should be more of a description here... - *

- * - * - * @return the value of the 'Date' attribute. - * @see #setDate(Date) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getPurchaseOrder_Date() - * @model - * @generated - */ - Date getDate(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate Date}' attribute. - * - * - * @param value - * the new value of the 'Date' attribute. - * @see #getDate() - * @generated - */ - void setDate(Date value); - - /** - * Returns the value of the 'Supplier' reference. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders Purchase Orders}'. - *

- * If the meaning of the 'Supplier' reference isn't clear, there really should be more of a description - * here... - *

- * - * - * @return the value of the 'Supplier' reference. - * @see #setSupplier(Supplier) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getPurchaseOrder_Supplier() - * @see org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders - * @model opposite="purchaseOrders" required="true" - * @generated - */ - Supplier getSupplier(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier Supplier}' - * reference. - * - * @param value - * the new value of the 'Supplier' reference. - * @see #getSupplier() - * @generated - */ - void setSupplier(Supplier value); - -} // PurchaseOrder +/* + * 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.tests.model1; + +import java.util.Date; + +/** + * A representation of the model object 'Purchase Order'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate Date}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier Supplier}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getPurchaseOrder() + * @model + * @generated + */ +public interface PurchaseOrder extends Order +{ + /** + * Returns the value of the 'Date' attribute. + * + *

+ * If the meaning of the 'Date' attribute isn't clear, there really should be more of a description here... + *

+ * + * @return the value of the 'Date' attribute. + * @see #setDate(Date) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getPurchaseOrder_Date() + * @model + * @generated + */ + Date getDate(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getDate Date}' attribute. + * + * @param value the new value of the 'Date' attribute. + * @see #getDate() + * @generated + */ + void setDate(Date value); + + /** + * Returns the value of the 'Supplier' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders Purchase Orders}'. + * + *

+ * If the meaning of the 'Supplier' reference isn't clear, there really should be more of a description + * here... + *

+ * + * @return the value of the 'Supplier' reference. + * @see #setSupplier(Supplier) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getPurchaseOrder_Supplier() + * @see org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders + * @model opposite="purchaseOrders" required="true" + * @generated + */ + Supplier getSupplier(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier Supplier}' reference. + * + * @param value the new value of the 'Supplier' reference. + * @see #getSupplier() + * @generated + */ + void setSupplier(Supplier value); + +} // PurchaseOrder diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java index a1a8f03908..c5756231d7 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/SalesOrder.java @@ -1,91 +1,83 @@ -/* - * 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.tests.model1; - -/** - * A representation of the model object 'Sales Order'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId Id}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer Customer}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSalesOrder() - * @model - * @generated - */ -public interface SalesOrder extends Order -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Id' attribute. - *

- * If the meaning of the 'Id' attribute isn't clear, there really should be more of a description here... - *

- * - * - * @return the value of the 'Id' attribute. - * @see #setId(int) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSalesOrder_Id() - * @model - * @generated - */ - int getId(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId Id}' attribute. - * - * @param value - * the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(int value); - - /** - * Returns the value of the 'Customer' reference. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders Sales Orders}'. - *

- * If the meaning of the 'Customer' reference isn't clear, there really should be more of a description - * here... - *

- * - * - * @return the value of the 'Customer' reference. - * @see #setCustomer(Customer) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSalesOrder_Customer() - * @see org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders - * @model opposite="salesOrders" required="true" - * @generated - */ - Customer getCustomer(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer Customer}' - * reference. - * - * @param value - * the new value of the 'Customer' reference. - * @see #getCustomer() - * @generated - */ - void setCustomer(Customer value); - -} // SalesOrder +/* + * 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.tests.model1; + +/** + * A representation of the model object 'Sales Order'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId Id}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer Customer}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSalesOrder() + * @model + * @generated + */ +public interface SalesOrder extends Order +{ + /** + * Returns the value of the 'Id' attribute. + * + *

+ * If the meaning of the 'Id' attribute isn't clear, there really should be more of a description here... + *

+ * + * @return the value of the 'Id' attribute. + * @see #setId(int) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSalesOrder_Id() + * @model + * @generated + */ + int getId(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getId Id}' attribute. + * + * @param value + * the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(int value); + + /** + * Returns the value of the 'Customer' reference. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders Sales Orders}'. + * + *

+ * If the meaning of the 'Customer' reference isn't clear, there really should be more of a description + * here... + *

+ * + * @return the value of the 'Customer' reference. + * @see #setCustomer(Customer) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSalesOrder_Customer() + * @see org.eclipse.emf.cdo.tests.model1.Customer#getSalesOrders + * @model opposite="salesOrders" required="true" + * @generated + */ + Customer getCustomer(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder#getCustomer Customer}' reference. + * + * @param value the new value of the 'Customer' reference. + * @see #getCustomer() + * @generated + */ + void setCustomer(Customer value); + +} // SalesOrder diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java index 350aff4e23..c0de3d4f69 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java @@ -1,84 +1,76 @@ -/* - * 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.tests.model1; - -import org.eclipse.emf.common.util.EList; - -/** - * A representation of the model object 'Supplier'. - *

- * The following features are supported: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders Purchase Orders}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred Preferred}
  • - *
- *

- * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier() - * @model - * @generated - */ -public interface Supplier extends Address -{ - /** - * - * - * @generated - */ - String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Returns the value of the 'Purchase Orders' reference list. The list contents are of type - * {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder}. It is bidirectional and its opposite is ' - * {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier Supplier}'. - *

- * If the meaning of the 'Purchase Orders' reference list isn't clear, there really should be more of a - * description here... - *

- * - * - * @return the value of the 'Purchase Orders' reference list. - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier_PurchaseOrders() - * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier - * @model opposite="supplier" - * @generated - */ - EList getPurchaseOrders(); - - /** - * Returns the value of the 'Preferred' attribute. The default value is "true". - *

- * If the meaning of the 'Preferred' attribute isn't clear, there really should be more of a description - * here... - *

- * - * - * @return the value of the 'Preferred' attribute. - * @see #setPreferred(boolean) - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier_Preferred() - * @model default="true" - * @generated - */ - boolean isPreferred(); - - /** - * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred Preferred}' attribute. - * - * - * @param value - * the new value of the 'Preferred' attribute. - * @see #isPreferred() - * @generated - */ - void setPreferred(boolean value); - -} // Supplier +/* + * 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.tests.model1; + +import org.eclipse.emf.common.util.EList; + +/** + * A representation of the model object 'Supplier'. + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders Purchase Orders}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred Preferred}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier() + * @model + * @generated + */ +public interface Supplier extends Address +{ + /** + * Returns the value of the 'Purchase Orders' reference list. + * The list contents are of type {@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder}. + * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier Supplier}'. + * + *

+ * If the meaning of the 'Purchase Orders' reference list isn't clear, there really should be more of a + * description here... + *

+ * + * @return the value of the 'Purchase Orders' reference list. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier_PurchaseOrders() + * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder#getSupplier + * @model opposite="supplier" + * @generated + */ + EList getPurchaseOrders(); + + /** + * Returns the value of the 'Preferred' attribute. The default value is "true". + *

+ * If the meaning of the 'Preferred' attribute isn't clear, there really should be more of a description + * here... + *

+ * + * + * @return the value of the 'Preferred' attribute. + * @see #setPreferred(boolean) + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier_Preferred() + * @model default="true" + * @generated + */ + boolean isPreferred(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred Preferred}' attribute. + * + * @param value the new value of the 'Preferred' attribute. + * @see #isPreferred() + * @generated + */ + void setPreferred(boolean value); + +} // Supplier diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/VAT.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/VAT.java index fbab85ad3c..84074b7fd3 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/VAT.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/VAT.java @@ -1,254 +1,240 @@ -/* - * 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.tests.model1; - -import org.eclipse.emf.common.util.Enumerator; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -/** - * A representation of the literals of the enumeration 'VAT', and utility - * methods for working with them. - * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getVAT() - * @model - * @generated - */ -public enum VAT implements Enumerator -{ - /** - * The 'Vat0' literal object. - * - * @see #VAT0_VALUE - * @generated - * @ordered - */ - VAT0(0, "vat0", "vat0"), - - /** - * The 'Vat7' literal object. - * - * @see #VAT7_VALUE - * @generated - * @ordered - */ - VAT7(7, "vat7", "vat7"), - - /** - * The 'Vat15' literal object. - * - * @see #VAT15_VALUE - * @generated - * @ordered - */ - VAT15(15, "vat15", "vat15"); - - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The 'Vat0' literal value. - *

- * If the meaning of 'Vat0' literal object isn't clear, there really should be more of a description - * here... - *

- * - * - * @see #VAT0 - * @model name="vat0" - * @generated - * @ordered - */ - public static final int VAT0_VALUE = 0; - - /** - * The 'Vat7' literal value. - *

- * If the meaning of 'Vat7' literal object isn't clear, there really should be more of a description - * here... - *

- * - * - * @see #VAT7 - * @model name="vat7" - * @generated - * @ordered - */ - public static final int VAT7_VALUE = 7; - - /** - * The 'Vat15' literal value. - *

- * If the meaning of 'Vat15' literal object isn't clear, there really should be more of a description - * here... - *

- * - * - * @see #VAT15 - * @model name="vat15" - * @generated - * @ordered - */ - public static final int VAT15_VALUE = 15; - - /** - * An array of all the 'VAT' enumerators. - * - * @generated - */ - private static final VAT[] VALUES_ARRAY = new VAT[] { VAT0, VAT7, VAT15, }; - - /** - * A public read-only list of all the 'VAT' enumerators. - * - * @generated - */ - public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); - - /** - * Returns the 'VAT' literal with the specified literal value. - * - * @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 'VAT' literal with the specified name. - * - * @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 'VAT' literal with the specified integer value. - * - * @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; - } - - /** - * - * - * @generated - */ - private final int value; - - /** - * - * - * @generated - */ - private final String name; - - /** - * - * - * @generated - */ - private final String literal; - - /** - * Only this class can construct instances. - * - * @generated - */ - private VAT(int value, String name, String literal) - { - this.value = value; - this.name = name; - this.literal = literal; - } - - /** - * - * - * @generated - */ - public int getValue() - { - return value; - } - - /** - * - * - * @generated - */ - public String getName() - { - return name; - } - - /** - * - * - * @generated - */ - public String getLiteral() - { - return literal; - } - - /** - * Returns the literal value of the enumerator, which is its string representation. - * - * @generated - */ - @Override - public String toString() - { - return literal; - } - -} // VAT +/* + * 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.tests.model1; + +import org.eclipse.emf.common.util.Enumerator; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * A representation of the literals of the enumeration 'VAT', and utility + * methods for working with them. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getVAT() + * @model + * @generated + */ +public enum VAT implements Enumerator +{ + /** + * The 'Vat0' literal object. + * + * @see #VAT0_VALUE + * @generated + * @ordered + */ + VAT0(0, "vat0", "vat0"), + + /** + * The 'Vat7' literal object. + * + * @see #VAT7_VALUE + * @generated + * @ordered + */ + VAT7(7, "vat7", "vat7"), + + /** + * The 'Vat15' literal object. + * + * @see #VAT15_VALUE + * @generated + * @ordered + */ + VAT15(15, "vat15", "vat15"); + + /** + * The 'Vat0' literal value. + * + *

+ * If the meaning of 'Vat0' literal object isn't clear, there really should be more of a description + * here... + *

+ * + * @see #VAT0 + * @model name="vat0" + * @generated + * @ordered + */ + public static final int VAT0_VALUE = 0; + + /** + * The 'Vat7' literal value. + * + *

+ * If the meaning of 'Vat7' literal object isn't clear, there really should be more of a description + * here... + *

+ * + * @see #VAT7 + * @model name="vat7" + * @generated + * @ordered + */ + public static final int VAT7_VALUE = 7; + + /** + * The 'Vat15' literal value. + * + *

+ * If the meaning of 'Vat15' literal object isn't clear, there really should be more of a description + * here... + *

+ * + * @see #VAT15 + * @model name="vat15" + * @generated + * @ordered + */ + public static final int VAT15_VALUE = 15; + + /** + * An array of all the 'VAT' enumerators. + * + * @generated + */ + private static final VAT[] VALUES_ARRAY = new VAT[] { VAT0, VAT7, VAT15, }; + + /** + * A public read-only list of all the 'VAT' enumerators. + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'VAT' literal with the specified literal value. + * + * @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 'VAT' literal with the specified name. + * + * @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 'VAT' literal with the specified integer value. + * + * @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; + } + + /** + * + * @generated + */ + private final int value; + + /** + * + * @generated + */ + private final String name; + + /** + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * @generated + */ + private VAT(int value, String name, String literal) + { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * @generated + */ + public int getValue() + { + return value; + } + + /** + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * @generated + */ + public String getLiteral() + { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * @generated + */ + @Override + public String toString() + { + return literal; + } + +} // VAT diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java index bc3a924636..d32dbfeb15 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/AddressImpl.java @@ -1,134 +1,118 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Model1Package; - -import org.eclipse.emf.internal.cdo.CDOObjectImpl; - -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Address'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getName Name}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getStreet Street}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getCity City}
  • - *
- *

- * - * @generated - */ -public class AddressImpl extends CDOObjectImpl implements Address -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected AddressImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getAddress(); - } - - /** - * - * - * @generated - */ - @Override - protected int eStaticFeatureCount() - { - return 0; - } - - /** - * - * - * @generated - */ - public String getName() - { - return (String)eGet(Model1Package.eINSTANCE.getAddress_Name(), true); - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - eSet(Model1Package.eINSTANCE.getAddress_Name(), newName); - } - - /** - * - * - * @generated - */ - public String getStreet() - { - return (String)eGet(Model1Package.eINSTANCE.getAddress_Street(), true); - } - - /** - * - * - * @generated - */ - public void setStreet(String newStreet) - { - eSet(Model1Package.eINSTANCE.getAddress_Street(), newStreet); - } - - /** - * - * - * @generated - */ - public String getCity() - { - return (String)eGet(Model1Package.eINSTANCE.getAddress_City(), true); - } - - /** - * - * - * @generated - */ - public void setCity(String newCity) - { - eSet(Model1Package.eINSTANCE.getAddress_City(), newCity); - } - -} // AddressImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Address; +import org.eclipse.emf.cdo.tests.model1.Model1Package; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Address'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getStreet Street}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.AddressImpl#getCity City}
  • + *
+ *

+ * + * @generated + */ +public class AddressImpl extends CDOObjectImpl implements Address +{ + /** + * + * @generated + */ + protected AddressImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getAddress(); + } + + /** + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * @generated + */ + public String getName() + { + return (String)eGet(Model1Package.eINSTANCE.getAddress_Name(), true); + } + + /** + * + * @generated + */ + public void setName(String newName) + { + eSet(Model1Package.eINSTANCE.getAddress_Name(), newName); + } + + /** + * + * @generated + */ + public String getStreet() + { + return (String)eGet(Model1Package.eINSTANCE.getAddress_Street(), true); + } + + /** + * + * @generated + */ + public void setStreet(String newStreet) + { + eSet(Model1Package.eINSTANCE.getAddress_Street(), newStreet); + } + + /** + * + * @generated + */ + public String getCity() + { + return (String)eGet(Model1Package.eINSTANCE.getAddress_City(), true); + } + + /** + * + * @generated + */ + public void setCity(String newCity) + { + eSet(Model1Package.eINSTANCE.getAddress_City(), newCity); + } + +} // AddressImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CategoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CategoryImpl.java index 1cade857e2..f21dda7fed 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CategoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CategoryImpl.java @@ -1,118 +1,104 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Product1; - -import org.eclipse.emf.internal.cdo.CDOObjectImpl; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Category'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getName Name}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getCategories Categories}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getProducts Products}
  • - *
- *

- * - * @generated - */ -public class CategoryImpl extends CDOObjectImpl implements Category -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected CategoryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getCategory(); - } - - /** - * - * - * @generated - */ - @Override - protected int eStaticFeatureCount() - { - return 0; - } - - /** - * - * - * @generated - */ - public String getName() - { - return (String)eGet(Model1Package.eINSTANCE.getCategory_Name(), true); - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - eSet(Model1Package.eINSTANCE.getCategory_Name(), newName); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getCategories() - { - return (EList)eGet(Model1Package.eINSTANCE.getCategory_Categories(), true); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getProducts() - { - return (EList)eGet(Model1Package.eINSTANCE.getCategory_Products(), true); - } - -} // CategoryImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Product1; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Category'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getCategories Categories}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CategoryImpl#getProducts Products}
  • + *
+ *

+ * + * @generated + */ +public class CategoryImpl extends CDOObjectImpl implements Category +{ + /** + * + * @generated + */ + protected CategoryImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getCategory(); + } + + /** + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * @generated + */ + public String getName() + { + return (String)eGet(Model1Package.eINSTANCE.getCategory_Name(), true); + } + + /** + * + * @generated + */ + public void setName(String newName) + { + eSet(Model1Package.eINSTANCE.getCategory_Name(), newName); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getCategories() + { + return (EList)eGet(Model1Package.eINSTANCE.getCategory_Categories(), true); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getProducts() + { + return (EList)eGet(Model1Package.eINSTANCE.getCategory_Products(), true); + } + +} // CategoryImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CompanyImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CompanyImpl.java index 42715dc2d2..f7a0aed8b1 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CompanyImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CompanyImpl.java @@ -1,124 +1,110 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Company; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Company'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getCategories Categories}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getSuppliers Suppliers}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getCustomers Customers}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getPurchaseOrders Purchase Orders}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getSalesOrders Sales Orders}
  • - *
- *

- * - * @generated - */ -public class CompanyImpl extends AddressImpl implements Company -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected CompanyImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getCompany(); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getCategories() - { - return (EList)eGet(Model1Package.eINSTANCE.getCompany_Categories(), true); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getSuppliers() - { - return (EList)eGet(Model1Package.eINSTANCE.getCompany_Suppliers(), true); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getPurchaseOrders() - { - return (EList)eGet(Model1Package.eINSTANCE.getCompany_PurchaseOrders(), true); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getCustomers() - { - return (EList)eGet(Model1Package.eINSTANCE.getCompany_Customers(), true); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getSalesOrders() - { - return (EList)eGet(Model1Package.eINSTANCE.getCompany_SalesOrders(), true); - } - -} // CompanyImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Company; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Company'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getCategories Categories}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getSuppliers Suppliers}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getCustomers Customers}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getPurchaseOrders Purchase Orders}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CompanyImpl#getSalesOrders Sales Orders}
  • + *
+ *

+ * + * @generated + */ +public class CompanyImpl extends AddressImpl implements Company +{ + /** + * + * @generated + */ + protected CompanyImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getCompany(); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getCategories() + { + return (EList)eGet(Model1Package.eINSTANCE.getCompany_Categories(), true); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getSuppliers() + { + return (EList)eGet(Model1Package.eINSTANCE.getCompany_Suppliers(), true); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getPurchaseOrders() + { + return (EList)eGet(Model1Package.eINSTANCE.getCompany_PurchaseOrders(), true); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getCustomers() + { + return (EList)eGet(Model1Package.eINSTANCE.getCompany_Customers(), true); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getSalesOrders() + { + return (EList)eGet(Model1Package.eINSTANCE.getCompany_SalesOrders(), true); + } + +} // CompanyImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java index 4dcaa637db..34ecd505b8 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/CustomerImpl.java @@ -1,86 +1,75 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Customer'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl#getSalesOrders Sales Orders}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl#getOrderByProduct Order By Product}
  • - *
- *

- * - * @generated - */ -public class CustomerImpl extends AddressImpl implements Customer -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected CustomerImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getCustomer(); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getSalesOrders() - { - return (EList)eGet(Model1Package.eINSTANCE.getCustomer_SalesOrders(), true); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EMap getOrderByProduct() - { - return (EMap)eGet(Model1Package.eINSTANCE.getCustomer_OrderByProduct(), true); - } - -} // CustomerImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Customer'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl#getSalesOrders Sales Orders}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl#getOrderByProduct Order By Product}
  • + *
+ *

+ * + * @generated + */ +public class CustomerImpl extends AddressImpl implements Customer +{ + /** + * + * @generated + */ + protected CustomerImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getCustomer(); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getSalesOrders() + { + return (EList)eGet(Model1Package.eINSTANCE.getCustomer_SalesOrders(), true); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EMap getOrderByProduct() + { + return (EMap)eGet(Model1Package.eINSTANCE.getCustomer_OrderByProduct(), true); + } + +} // CustomerImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java index e5d00c9316..d522133a5f 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1FactoryImpl.java @@ -1,321 +1,295 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Company; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.Model1Factory; -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.OrderAddress; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; -import org.eclipse.emf.cdo.tests.model1.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; - -import java.util.Map; - -/** - * An implementation of the model Factory. - * - * @generated - */ -public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * Creates the default factory implementation. - * - * @generated - */ - public static Model1Factory init() - { - try - { - Model1Factory theModel1Factory = (Model1Factory)EPackage.Registry.INSTANCE - .getEFactory("http://www.eclipse.org/emf/CDO/tests/model1/1.0.0"); - if (theModel1Factory != null) - { - return theModel1Factory; - } - } - catch (Exception exception) - { - EcorePlugin.INSTANCE.log(exception); - } - return new Model1FactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * @generated - */ - public Model1FactoryImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) - { - switch (eClass.getClassifierID()) - { - case Model1Package.ADDRESS: - return createAddress(); - case Model1Package.COMPANY: - return createCompany(); - case Model1Package.SUPPLIER: - return createSupplier(); - case Model1Package.CUSTOMER: - return createCustomer(); - case Model1Package.ORDER_DETAIL: - return createOrderDetail(); - case Model1Package.PURCHASE_ORDER: - return createPurchaseOrder(); - case Model1Package.SALES_ORDER: - return createSalesOrder(); - case Model1Package.CATEGORY: - return createCategory(); - case Model1Package.PRODUCT1: - return createProduct1(); - case Model1Package.ORDER_ADDRESS: - return createOrderAddress(); - case Model1Package.PRODUCT_TO_ORDER: - return (EObject)createProductToOrder(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public Object createFromString(EDataType eDataType, String initialValue) - { - switch (eDataType.getClassifierID()) - { - case Model1Package.VAT: - return createVATFromString(eDataType, initialValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - @Override - public String convertToString(EDataType eDataType, Object instanceValue) - { - switch (eDataType.getClassifierID()) - { - case Model1Package.VAT: - return convertVATToString(eDataType, instanceValue); - default: - throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public Address createAddress() - { - AddressImpl address = new AddressImpl(); - return address; - } - - /** - * - * - * @generated - */ - public Supplier createSupplier() - { - SupplierImpl supplier = new SupplierImpl(); - return supplier; - } - - /** - * - * - * @generated - */ - public PurchaseOrder createPurchaseOrder() - { - PurchaseOrderImpl purchaseOrder = new PurchaseOrderImpl(); - return purchaseOrder; - } - - /** - * - * - * @generated - */ - public OrderDetail createOrderDetail() - { - OrderDetailImpl orderDetail = new OrderDetailImpl(); - return orderDetail; - } - - /** - * - * - * @generated - */ - public OrderAddress createOrderAddress() - { - OrderAddressImpl orderAddress = new OrderAddressImpl(); - return orderAddress; - } - - /** - * - * - * @generated - */ - public Map.Entry createProductToOrder() - { - ProductToOrderImpl productToOrder = new ProductToOrderImpl(); - return productToOrder; - } - - /** - * - * - * @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; - } - - /** - * - * - * @generated - */ - public String convertVATToString(EDataType eDataType, Object instanceValue) - { - return instanceValue == null ? null : instanceValue.toString(); - } - - /** - * - * - * @generated - */ - public Category createCategory() - { - CategoryImpl category = new CategoryImpl(); - return category; - } - - /** - * - * - * @generated - */ - public Product1 createProduct1() - { - Product1Impl product1 = new Product1Impl(); - return product1; - } - - /** - * - * - * @generated - */ - public Company createCompany() - { - CompanyImpl company = new CompanyImpl(); - return company; - } - - /** - * - * - * @generated - */ - public Customer createCustomer() - { - CustomerImpl customer = new CustomerImpl(); - return customer; - } - - /** - * - * - * @generated - */ - public SalesOrder createSalesOrder() - { - SalesOrderImpl salesOrder = new SalesOrderImpl(); - return salesOrder; - } - - /** - * - * - * @generated - */ - public Model1Package getModel1Package() - { - return (Model1Package)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static Model1Package getPackage() - { - return Model1Package.eINSTANCE; - } - -} // Model1FactoryImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Address; +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Company; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.Model1Factory; +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.OrderAddress; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; +import org.eclipse.emf.cdo.tests.model1.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; + +import java.util.Map; + +/** + * An implementation of the model Factory. + * @generated + */ +public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory +{ + /** + * Creates the default factory implementation. + * + * @generated + */ + public static Model1Factory init() + { + try + { + Model1Factory theModel1Factory = (Model1Factory)EPackage.Registry.INSTANCE + .getEFactory("http://www.eclipse.org/emf/CDO/tests/model1/1.0.0"); + if (theModel1Factory != null) + { + return theModel1Factory; + } + } + catch (Exception exception) + { + EcorePlugin.INSTANCE.log(exception); + } + return new Model1FactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * @generated + */ + public Model1FactoryImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + public EObject create(EClass eClass) + { + switch (eClass.getClassifierID()) + { + case Model1Package.ADDRESS: + return createAddress(); + case Model1Package.COMPANY: + return createCompany(); + case Model1Package.SUPPLIER: + return createSupplier(); + case Model1Package.CUSTOMER: + return createCustomer(); + case Model1Package.ORDER_DETAIL: + return createOrderDetail(); + case Model1Package.PURCHASE_ORDER: + return createPurchaseOrder(); + case Model1Package.SALES_ORDER: + return createSalesOrder(); + case Model1Package.CATEGORY: + return createCategory(); + case Model1Package.PRODUCT1: + return createProduct1(); + case Model1Package.ORDER_ADDRESS: + return createOrderAddress(); + case Model1Package.PRODUCT_TO_ORDER: + return (EObject)createProductToOrder(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) + { + switch (eDataType.getClassifierID()) + { + case Model1Package.VAT: + return createVATFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) + { + switch (eDataType.getClassifierID()) + { + case Model1Package.VAT: + return convertVATToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * @generated + */ + public Address createAddress() + { + AddressImpl address = new AddressImpl(); + return address; + } + + /** + * + * @generated + */ + public Supplier createSupplier() + { + SupplierImpl supplier = new SupplierImpl(); + return supplier; + } + + /** + * + * @generated + */ + public PurchaseOrder createPurchaseOrder() + { + PurchaseOrderImpl purchaseOrder = new PurchaseOrderImpl(); + return purchaseOrder; + } + + /** + * + * @generated + */ + public OrderDetail createOrderDetail() + { + OrderDetailImpl orderDetail = new OrderDetailImpl(); + return orderDetail; + } + + /** + * + * @generated + */ + public OrderAddress createOrderAddress() + { + OrderAddressImpl orderAddress = new OrderAddressImpl(); + return orderAddress; + } + + /** + * + * @generated + */ + public Map.Entry createProductToOrder() + { + ProductToOrderImpl productToOrder = new ProductToOrderImpl(); + return productToOrder; + } + + /** + * + * @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; + } + + /** + * + * @generated + */ + public String convertVATToString(EDataType eDataType, Object instanceValue) + { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * @generated + */ + public Category createCategory() + { + CategoryImpl category = new CategoryImpl(); + return category; + } + + /** + * + * @generated + */ + public Product1 createProduct1() + { + Product1Impl product1 = new Product1Impl(); + return product1; + } + + /** + * + * @generated + */ + public Company createCompany() + { + CompanyImpl company = new CompanyImpl(); + return company; + } + + /** + * + * @generated + */ + public Customer createCustomer() + { + CustomerImpl customer = new CustomerImpl(); + return customer; + } + + /** + * + * @generated + */ + public SalesOrder createSalesOrder() + { + SalesOrderImpl salesOrder = new SalesOrderImpl(); + return salesOrder; + } + + /** + * + * @generated + */ + public Model1Package getModel1Package() + { + return (Model1Package)getEPackage(); + } + + /** + * + * @deprecated + * @generated + */ + @Deprecated + public static Model1Package getPackage() + { + return Model1Package.eINSTANCE; + } + +} // Model1FactoryImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java index 5d599f51e7..25295128af 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java @@ -1,902 +1,847 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Company; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.Model1Factory; -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderAddress; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; -import org.eclipse.emf.cdo.tests.model1.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; - -import java.util.Map; - -/** - * An implementation of the model Package. - * - * @generated - */ -public class Model1PackageImpl extends EPackageImpl implements Model1Package -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - private EClass addressEClass = null; - - /** - * - * - * @generated - */ - private EClass supplierEClass = null; - - /** - * - * - * @generated - */ - private EClass purchaseOrderEClass = null; - - /** - * - * - * @generated - */ - private EClass orderDetailEClass = null; - - /** - * - * - * @generated - */ - private EClass orderAddressEClass = null; - - /** - * - * - * @generated - */ - private EClass productToOrderEClass = null; - - /** - * - * - * @generated - */ - private EEnum vatEEnum = null; - - /** - * - * - * @generated - */ - private EClass categoryEClass = null; - - /** - * - * - * @generated - */ - private EClass product1EClass = null; - - /** - * - * - * @generated - */ - private EClass companyEClass = null; - - /** - * - * - * @generated - */ - private EClass customerEClass = null; - - /** - * - * - * @generated - */ - private EClass orderEClass = null; - - /** - * - * - * @generated - */ - private EClass salesOrderEClass = null; - - /** - * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry - * EPackage.Registry} by the package package URI value. - *

- * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also - * performs initialization of the package, or returns the registered package, if one already exists. - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.eclipse.emf.cdo.tests.model1.Model1Package#eNS_URI - * @see #init() - * @generated - */ - private Model1PackageImpl() - { - super(eNS_URI, Model1Factory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - *

- * This method is used to initialize {@link Model1Package#eINSTANCE} when that field is accessed. Clients should not - * invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static Model1Package init() - { - if (isInited) - return (Model1Package)EPackage.Registry.INSTANCE.getEPackage(Model1Package.eNS_URI); - - // Obtain or create and register package - Model1PackageImpl theModel1Package = (Model1PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model1PackageImpl ? EPackage.Registry.INSTANCE - .get(eNS_URI) : new Model1PackageImpl()); - - isInited = true; - - // Create package meta-data objects - theModel1Package.createPackageContents(); - - // Initialize created meta-data - theModel1Package.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theModel1Package.freeze(); - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(Model1Package.eNS_URI, theModel1Package); - return theModel1Package; - } - - /** - * - * - * @generated - */ - public EClass getAddress() - { - return addressEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getAddress_Name() - { - return (EAttribute)addressEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getAddress_Street() - { - return (EAttribute)addressEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getAddress_City() - { - return (EAttribute)addressEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getSupplier() - { - return supplierEClass; - } - - /** - * - * - * @generated - */ - public EReference getSupplier_PurchaseOrders() - { - return (EReference)supplierEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getSupplier_Preferred() - { - return (EAttribute)supplierEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getPurchaseOrder() - { - return purchaseOrderEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getPurchaseOrder_Date() - { - return (EAttribute)purchaseOrderEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getPurchaseOrder_Supplier() - { - return (EReference)purchaseOrderEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getOrderDetail() - { - return orderDetailEClass; - } - - /** - * - * - * @generated - */ - public EReference getOrderDetail_Order() - { - return (EReference)orderDetailEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getOrderDetail_Product() - { - return (EReference)orderDetailEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getOrderDetail_Price() - { - return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getOrderAddress() - { - return orderAddressEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getOrderAddress_TestAttribute() - { - return (EAttribute)orderAddressEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getProductToOrder() - { - return productToOrderEClass; - } - - /** - * - * - * @generated - */ - public EReference getProductToOrder_Key() - { - return (EReference)productToOrderEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getProductToOrder_Value() - { - return (EReference)productToOrderEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EEnum getVAT() - { - return vatEEnum; - } - - /** - * - * - * @generated - */ - public EClass getCategory() - { - return categoryEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getCategory_Name() - { - return (EAttribute)categoryEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getCategory_Categories() - { - return (EReference)categoryEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getCategory_Products() - { - return (EReference)categoryEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getProduct1() - { - return product1EClass; - } - - /** - * - * - * @generated - */ - public EAttribute getProduct1_Name() - { - return (EAttribute)product1EClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getProduct1_OrderDetails() - { - return (EReference)product1EClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getProduct1_Vat() - { - return (EAttribute)product1EClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getProduct1_Description() - { - return (EAttribute)product1EClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EClass getCompany() - { - return companyEClass; - } - - /** - * - * - * @generated - */ - public EReference getCompany_Categories() - { - return (EReference)companyEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getCompany_Suppliers() - { - return (EReference)companyEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getCompany_PurchaseOrders() - { - return (EReference)companyEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getCompany_Customers() - { - return (EReference)companyEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getCompany_SalesOrders() - { - return (EReference)companyEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EClass getCustomer() - { - return customerEClass; - } - - /** - * - * - * @generated - */ - public EReference getCustomer_SalesOrders() - { - return (EReference)customerEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getCustomer_OrderByProduct() - { - return (EReference)customerEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getOrder() - { - return orderEClass; - } - - /** - * - * - * @generated - */ - public EReference getOrder_OrderDetails() - { - return (EReference)orderEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getSalesOrder() - { - return salesOrderEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getSalesOrder_Id() - { - return (EAttribute)salesOrderEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getSalesOrder_Customer() - { - return (EReference)salesOrderEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public Model1Factory getModel1Factory() - { - return (Model1Factory)getEFactoryInstance(); - } - - /** - * - * - * @generated - */ - private boolean isCreated = false; - - /** - * Creates the meta-model objects for the package. This method is guarded to have no affect on any invocation but its - * first. - * - * @generated - */ - public void createPackageContents() - { - if (isCreated) - return; - isCreated = true; - - // Create classes and their features - addressEClass = createEClass(ADDRESS); - createEAttribute(addressEClass, ADDRESS__NAME); - createEAttribute(addressEClass, ADDRESS__STREET); - createEAttribute(addressEClass, ADDRESS__CITY); - - companyEClass = createEClass(COMPANY); - createEReference(companyEClass, COMPANY__CATEGORIES); - createEReference(companyEClass, COMPANY__SUPPLIERS); - createEReference(companyEClass, COMPANY__CUSTOMERS); - createEReference(companyEClass, COMPANY__PURCHASE_ORDERS); - createEReference(companyEClass, COMPANY__SALES_ORDERS); - - supplierEClass = createEClass(SUPPLIER); - createEReference(supplierEClass, SUPPLIER__PURCHASE_ORDERS); - createEAttribute(supplierEClass, SUPPLIER__PREFERRED); - - customerEClass = createEClass(CUSTOMER); - createEReference(customerEClass, CUSTOMER__SALES_ORDERS); - createEReference(customerEClass, CUSTOMER__ORDER_BY_PRODUCT); - - 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); - - product1EClass = createEClass(PRODUCT1); - createEAttribute(product1EClass, PRODUCT1__NAME); - createEReference(product1EClass, PRODUCT1__ORDER_DETAILS); - createEAttribute(product1EClass, PRODUCT1__VAT); - createEAttribute(product1EClass, PRODUCT1__DESCRIPTION); - - orderAddressEClass = createEClass(ORDER_ADDRESS); - createEAttribute(orderAddressEClass, ORDER_ADDRESS__TEST_ATTRIBUTE); - - productToOrderEClass = createEClass(PRODUCT_TO_ORDER); - createEReference(productToOrderEClass, PRODUCT_TO_ORDER__KEY); - createEReference(productToOrderEClass, PRODUCT_TO_ORDER__VALUE); - - // Create enums - vatEEnum = createEEnum(VAT); - } - - /** - * - * - * @generated - */ - private boolean isInitialized = false; - - /** - * Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any - * invocation but its first. - * - * @generated - */ - public void initializePackageContents() - { - if (isInitialized) - return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - companyEClass.getESuperTypes().add(this.getAddress()); - supplierEClass.getESuperTypes().add(this.getAddress()); - customerEClass.getESuperTypes().add(this.getAddress()); - purchaseOrderEClass.getESuperTypes().add(this.getOrder()); - salesOrderEClass.getESuperTypes().add(this.getOrder()); - orderAddressEClass.getESuperTypes().add(this.getAddress()); - orderAddressEClass.getESuperTypes().add(this.getOrder()); - orderAddressEClass.getESuperTypes().add(this.getOrderDetail()); - - // Initialize classes and features; add operations and parameters - initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getAddress_Name(), ecorePackage.getEString(), "name", null, 0, 1, Address.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAddress_Street(), ecorePackage.getEString(), "street", null, 0, 1, Address.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getAddress_City(), ecorePackage.getEString(), "city", null, 0, 1, Address.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(companyEClass, Company.class, "Company", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getCompany_Categories(), 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); - initEReference(getCustomer_OrderByProduct(), this.getProductToOrder(), null, "orderByProduct", 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.getProduct1(), this.getProduct1_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.getProduct1(), 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(product1EClass, Product1.class, "Product1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getProduct1_Name(), ecorePackage.getEString(), "name", null, 0, 1, Product1.class, !IS_TRANSIENT, - !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getProduct1_OrderDetails(), this.getOrderDetail(), this.getOrderDetail_Product(), "orderDetails", - null, 0, -1, Product1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProduct1_Vat(), this.getVAT(), "vat", "vat15", 0, 1, Product1.class, !IS_TRANSIENT, !IS_VOLATILE, - IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProduct1_Description(), ecorePackage.getEString(), "description", null, 0, 1, Product1.class, - IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(orderAddressEClass, OrderAddress.class, "OrderAddress", !IS_ABSTRACT, !IS_INTERFACE, - IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getOrderAddress_TestAttribute(), ecorePackage.getEBoolean(), "testAttribute", null, 0, 1, - OrderAddress.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, - IS_ORDERED); - - initEClass(productToOrderEClass, Map.Entry.class, "ProductToOrder", !IS_ABSTRACT, !IS_INTERFACE, - !IS_GENERATED_INSTANCE_CLASS); - initEReference(getProductToOrder_Key(), this.getProduct1(), null, "key", null, 0, 1, Map.Entry.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - initEReference(getProductToOrder_Value(), this.getSalesOrder(), null, "value", null, 0, 1, Map.Entry.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, - !IS_DERIVED, IS_ORDERED); - - // Initialize enums and add enum literals - initEEnum(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.class, "VAT"); - addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT0); - addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT7); - addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT15); - - // Create resource - createResource(eNS_URI); - - // Create annotations - // teneo.jpa - createTeneoAnnotations(); - } - - /** - * Initializes the annotations for teneo.jpa. - * - * @generated - */ - protected void createTeneoAnnotations() - { - String source = "teneo.jpa"; - addAnnotation( - this, - source, - new String[] { - "value", - "@hbGenericGenerators({@GenericGenerator(name=\"system-uuid\", strategy = \"org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOUUIDHexGenerator\")})" }); - addAnnotation(orderEClass, source, new String[] { "value", "@Entity(name=\"BaseOrder\")" }); - addAnnotation(getProduct1_Name(), source, new String[] { "value", "@Id" }); - addAnnotation(orderAddressEClass, source, new String[] { "value", - "@AssociationOverride(name=\"orderDetails\", joinColumns=@JoinColumn(name=\"orderdetails_orderaddressid\"))" }); - } - -} // Model1PackageImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Address; +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Company; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.Model1Factory; +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderAddress; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model1.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; + +import java.util.Map; + +/** + * An implementation of the model Package. + * @generated + */ +public class Model1PackageImpl extends EPackageImpl implements Model1Package +{ + /** + * + * @generated + */ + private EClass addressEClass = null; + + /** + * + * @generated + */ + private EClass supplierEClass = null; + + /** + * + * @generated + */ + private EClass purchaseOrderEClass = null; + + /** + * + * @generated + */ + private EClass orderDetailEClass = null; + + /** + * + * @generated + */ + private EClass orderAddressEClass = null; + + /** + * + * @generated + */ + private EClass productToOrderEClass = null; + + /** + * + * @generated + */ + private EEnum vatEEnum = null; + + /** + * + * @generated + */ + private EClass categoryEClass = null; + + /** + * + * @generated + */ + private EClass product1EClass = null; + + /** + * + * @generated + */ + private EClass companyEClass = null; + + /** + * + * @generated + */ + private EClass customerEClass = null; + + /** + * + * @generated + */ + private EClass orderEClass = null; + + /** + * + * @generated + */ + private EClass salesOrderEClass = null; + + /** + * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry + * EPackage.Registry} by the package package URI value. + *

+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also + * performs initialization of the package, or returns the registered package, if one already exists. + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.eclipse.emf.cdo.tests.model1.Model1Package#eNS_URI + * @see #init() + * @generated + */ + private Model1PackageImpl() + { + super(eNS_URI, Model1Factory.eINSTANCE); + } + + /** + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link Model1Package#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static Model1Package init() + { + if (isInited) + return (Model1Package)EPackage.Registry.INSTANCE.getEPackage(Model1Package.eNS_URI); + + // Obtain or create and register package + Model1PackageImpl theModel1Package = (Model1PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model1PackageImpl ? EPackage.Registry.INSTANCE + .get(eNS_URI) : new Model1PackageImpl()); + + isInited = true; + + // Create package meta-data objects + theModel1Package.createPackageContents(); + + // Initialize created meta-data + theModel1Package.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theModel1Package.freeze(); + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(Model1Package.eNS_URI, theModel1Package); + return theModel1Package; + } + + /** + * + * @generated + */ + public EClass getAddress() + { + return addressEClass; + } + + /** + * + * @generated + */ + public EAttribute getAddress_Name() + { + return (EAttribute)addressEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EAttribute getAddress_Street() + { + return (EAttribute)addressEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EAttribute getAddress_City() + { + return (EAttribute)addressEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EClass getSupplier() + { + return supplierEClass; + } + + /** + * + * @generated + */ + public EReference getSupplier_PurchaseOrders() + { + return (EReference)supplierEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EAttribute getSupplier_Preferred() + { + return (EAttribute)supplierEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getPurchaseOrder() + { + return purchaseOrderEClass; + } + + /** + * + * @generated + */ + public EAttribute getPurchaseOrder_Date() + { + return (EAttribute)purchaseOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getPurchaseOrder_Supplier() + { + return (EReference)purchaseOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getOrderDetail() + { + return orderDetailEClass; + } + + /** + * + * @generated + */ + public EReference getOrderDetail_Order() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getOrderDetail_Product() + { + return (EReference)orderDetailEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EAttribute getOrderDetail_Price() + { + return (EAttribute)orderDetailEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EClass getOrderAddress() + { + return orderAddressEClass; + } + + /** + * + * @generated + */ + public EAttribute getOrderAddress_TestAttribute() + { + return (EAttribute)orderAddressEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EClass getProductToOrder() + { + return productToOrderEClass; + } + + /** + * + * @generated + */ + public EReference getProductToOrder_Key() + { + return (EReference)productToOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getProductToOrder_Value() + { + return (EReference)productToOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EEnum getVAT() + { + return vatEEnum; + } + + /** + * + * @generated + */ + public EClass getCategory() + { + return categoryEClass; + } + + /** + * + * @generated + */ + public EAttribute getCategory_Name() + { + return (EAttribute)categoryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getCategory_Categories() + { + return (EReference)categoryEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EReference getCategory_Products() + { + return (EReference)categoryEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EClass getProduct1() + { + return product1EClass; + } + + /** + * + * @generated + */ + public EAttribute getProduct1_Name() + { + return (EAttribute)product1EClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getProduct1_OrderDetails() + { + return (EReference)product1EClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EAttribute getProduct1_Vat() + { + return (EAttribute)product1EClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getProduct1_OtherVATs() + { + return (EAttribute)product1EClass.getEStructuralFeatures().get(3); + } + + /** + * + * @generated + */ + public EAttribute getProduct1_Description() + { + return (EAttribute)product1EClass.getEStructuralFeatures().get(4); + } + + /** + * + * @generated + */ + public EClass getCompany() + { + return companyEClass; + } + + /** + * + * @generated + */ + public EReference getCompany_Categories() + { + return (EReference)companyEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getCompany_Suppliers() + { + return (EReference)companyEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EReference getCompany_PurchaseOrders() + { + return (EReference)companyEClass.getEStructuralFeatures().get(3); + } + + /** + * + * @generated + */ + public EReference getCompany_Customers() + { + return (EReference)companyEClass.getEStructuralFeatures().get(2); + } + + /** + * + * @generated + */ + public EReference getCompany_SalesOrders() + { + return (EReference)companyEClass.getEStructuralFeatures().get(4); + } + + /** + * + * @generated + */ + public EClass getCustomer() + { + return customerEClass; + } + + /** + * + * @generated + */ + public EReference getCustomer_SalesOrders() + { + return (EReference)customerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getCustomer_OrderByProduct() + { + return (EReference)customerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public EClass getOrder() + { + return orderEClass; + } + + /** + * + * @generated + */ + public EReference getOrder_OrderDetails() + { + return (EReference)orderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EClass getSalesOrder() + { + return salesOrderEClass; + } + + /** + * + * @generated + */ + public EAttribute getSalesOrder_Id() + { + return (EAttribute)salesOrderEClass.getEStructuralFeatures().get(0); + } + + /** + * + * @generated + */ + public EReference getSalesOrder_Customer() + { + return (EReference)salesOrderEClass.getEStructuralFeatures().get(1); + } + + /** + * + * @generated + */ + public Model1Factory getModel1Factory() + { + return (Model1Factory)getEFactoryInstance(); + } + + /** + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * @generated + */ + public void createPackageContents() + { + if (isCreated) + return; + isCreated = true; + + // Create classes and their features + addressEClass = createEClass(ADDRESS); + createEAttribute(addressEClass, ADDRESS__NAME); + createEAttribute(addressEClass, ADDRESS__STREET); + createEAttribute(addressEClass, ADDRESS__CITY); + + companyEClass = createEClass(COMPANY); + createEReference(companyEClass, COMPANY__CATEGORIES); + createEReference(companyEClass, COMPANY__SUPPLIERS); + createEReference(companyEClass, COMPANY__CUSTOMERS); + createEReference(companyEClass, COMPANY__PURCHASE_ORDERS); + createEReference(companyEClass, COMPANY__SALES_ORDERS); + + supplierEClass = createEClass(SUPPLIER); + createEReference(supplierEClass, SUPPLIER__PURCHASE_ORDERS); + createEAttribute(supplierEClass, SUPPLIER__PREFERRED); + + customerEClass = createEClass(CUSTOMER); + createEReference(customerEClass, CUSTOMER__SALES_ORDERS); + createEReference(customerEClass, CUSTOMER__ORDER_BY_PRODUCT); + + 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); + + product1EClass = createEClass(PRODUCT1); + createEAttribute(product1EClass, PRODUCT1__NAME); + createEReference(product1EClass, PRODUCT1__ORDER_DETAILS); + createEAttribute(product1EClass, PRODUCT1__VAT); + createEAttribute(product1EClass, PRODUCT1__OTHER_VA_TS); + createEAttribute(product1EClass, PRODUCT1__DESCRIPTION); + + orderAddressEClass = createEClass(ORDER_ADDRESS); + createEAttribute(orderAddressEClass, ORDER_ADDRESS__TEST_ATTRIBUTE); + + productToOrderEClass = createEClass(PRODUCT_TO_ORDER); + createEReference(productToOrderEClass, PRODUCT_TO_ORDER__KEY); + createEReference(productToOrderEClass, PRODUCT_TO_ORDER__VALUE); + + // Create enums + vatEEnum = createEEnum(VAT); + } + + /** + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * @generated + */ + public void initializePackageContents() + { + if (isInitialized) + return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + companyEClass.getESuperTypes().add(this.getAddress()); + supplierEClass.getESuperTypes().add(this.getAddress()); + customerEClass.getESuperTypes().add(this.getAddress()); + purchaseOrderEClass.getESuperTypes().add(this.getOrder()); + salesOrderEClass.getESuperTypes().add(this.getOrder()); + orderAddressEClass.getESuperTypes().add(this.getAddress()); + orderAddressEClass.getESuperTypes().add(this.getOrder()); + orderAddressEClass.getESuperTypes().add(this.getOrderDetail()); + + // Initialize classes and features; add operations and parameters + initEClass(addressEClass, Address.class, "Address", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAddress_Name(), ecorePackage.getEString(), "name", null, 0, 1, Address.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAddress_Street(), ecorePackage.getEString(), "street", null, 0, 1, Address.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAddress_City(), ecorePackage.getEString(), "city", null, 0, 1, Address.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(companyEClass, Company.class, "Company", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompany_Categories(), 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); + initEReference(getCustomer_OrderByProduct(), this.getProductToOrder(), null, "orderByProduct", 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.getProduct1(), this.getProduct1_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.getProduct1(), 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(product1EClass, Product1.class, "Product1", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getProduct1_Name(), ecorePackage.getEString(), "name", null, 0, 1, Product1.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getProduct1_OrderDetails(), this.getOrderDetail(), this.getOrderDetail_Product(), "orderDetails", + null, 0, -1, Product1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProduct1_Vat(), this.getVAT(), "vat", "vat15", 0, 1, Product1.class, !IS_TRANSIENT, !IS_VOLATILE, + IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProduct1_OtherVATs(), this.getVAT(), "otherVATs", "vat15", 0, -1, Product1.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getProduct1_Description(), ecorePackage.getEString(), "description", null, 0, 1, Product1.class, + IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(orderAddressEClass, OrderAddress.class, "OrderAddress", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getOrderAddress_TestAttribute(), ecorePackage.getEBoolean(), "testAttribute", null, 0, 1, + OrderAddress.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); + + initEClass(productToOrderEClass, Map.Entry.class, "ProductToOrder", !IS_ABSTRACT, !IS_INTERFACE, + !IS_GENERATED_INSTANCE_CLASS); + initEReference(getProductToOrder_Key(), this.getProduct1(), null, "key", null, 0, 1, Map.Entry.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getProductToOrder_Value(), this.getSalesOrder(), null, "value", null, 0, 1, Map.Entry.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.class, "VAT"); + addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT0); + addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT7); + addEEnumLiteral(vatEEnum, org.eclipse.emf.cdo.tests.model1.VAT.VAT15); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // teneo.jpa + createTeneoAnnotations(); + } + + /** + * Initializes the annotations for teneo.jpa. + * + * @generated + */ + protected void createTeneoAnnotations() + { + String source = "teneo.jpa"; + addAnnotation( + this, + source, + new String[] { + "value", + "@hbGenericGenerators({@GenericGenerator(name=\"system-uuid\", strategy = \"org.eclipse.emf.cdo.server.internal.hibernate.tuplizer.CDOUUIDHexGenerator\")})" }); + addAnnotation(orderEClass, source, new String[] { "value", "@Entity(name=\"BaseOrder\")" }); + addAnnotation(getProduct1_Name(), source, new String[] { "value", "@Id" }); + addAnnotation(orderAddressEClass, source, new String[] { "value", + "@AssociationOverride(name=\"orderDetails\", joinColumns=@JoinColumn(name=\"orderdetails_orderaddressid\"))" }); + } + +} // Model1PackageImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderAddressImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderAddressImpl.java index d4f101ec63..e2dbf293a5 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderAddressImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderAddressImpl.java @@ -1,228 +1,208 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderAddress; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Order Address'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#getOrderDetails Order Details}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#getOrder Order}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#getProduct Product}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#getPrice Price}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#isTestAttribute Test Attribute}
  • - *
- *

- * - * @generated - */ -public class OrderAddressImpl extends AddressImpl implements OrderAddress -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected OrderAddressImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getOrderAddress(); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getOrderDetails() - { - return (EList)eGet(Model1Package.eINSTANCE.getOrder_OrderDetails(), true); - } - - /** - * - * - * @generated - */ - public Order getOrder() - { - return (Order)eGet(Model1Package.eINSTANCE.getOrderDetail_Order(), true); - } - - /** - * - * - * @generated - */ - public void setOrder(Order newOrder) - { - eSet(Model1Package.eINSTANCE.getOrderDetail_Order(), newOrder); - } - - /** - * - * - * @generated - */ - public Product1 getProduct() - { - return (Product1)eGet(Model1Package.eINSTANCE.getOrderDetail_Product(), true); - } - - /** - * - * - * @generated - */ - public void setProduct(Product1 newProduct) - { - eSet(Model1Package.eINSTANCE.getOrderDetail_Product(), newProduct); - } - - /** - * - * - * @generated - */ - public float getPrice() - { - return (Float)eGet(Model1Package.eINSTANCE.getOrderDetail_Price(), true); - } - - /** - * - * - * @generated - */ - public void setPrice(float newPrice) - { - eSet(Model1Package.eINSTANCE.getOrderDetail_Price(), newPrice); - } - - /** - * - * - * @generated - */ - public boolean isTestAttribute() - { - return (Boolean)eGet(Model1Package.eINSTANCE.getOrderAddress_TestAttribute(), true); - } - - /** - * - * - * @generated - */ - public void setTestAttribute(boolean newTestAttribute) - { - eSet(Model1Package.eINSTANCE.getOrderAddress_TestAttribute(), newTestAttribute); - } - - /** - * - * - * @generated - */ - @Override - public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) - { - if (baseClass == Order.class) - { - switch (derivedFeatureID) - { - case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: - return Model1Package.ORDER__ORDER_DETAILS; - default: - return -1; - } - } - if (baseClass == OrderDetail.class) - { - switch (derivedFeatureID) - { - case Model1Package.ORDER_ADDRESS__ORDER: - return Model1Package.ORDER_DETAIL__ORDER; - case Model1Package.ORDER_ADDRESS__PRODUCT: - return Model1Package.ORDER_DETAIL__PRODUCT; - case Model1Package.ORDER_ADDRESS__PRICE: - return Model1Package.ORDER_DETAIL__PRICE; - default: - return -1; - } - } - return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); - } - - /** - * - * - * @generated - */ - @Override - public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) - { - if (baseClass == Order.class) - { - switch (baseFeatureID) - { - case Model1Package.ORDER__ORDER_DETAILS: - return Model1Package.ORDER_ADDRESS__ORDER_DETAILS; - default: - return -1; - } - } - if (baseClass == OrderDetail.class) - { - switch (baseFeatureID) - { - case Model1Package.ORDER_DETAIL__ORDER: - return Model1Package.ORDER_ADDRESS__ORDER; - case Model1Package.ORDER_DETAIL__PRODUCT: - return Model1Package.ORDER_ADDRESS__PRODUCT; - case Model1Package.ORDER_DETAIL__PRICE: - return Model1Package.ORDER_ADDRESS__PRICE; - default: - return -1; - } - } - return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); - } - -} // OrderAddressImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderAddress; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Order Address'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#getOrderDetails Order Details}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#getOrder Order}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#getProduct Product}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#getPrice Price}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderAddressImpl#isTestAttribute Test Attribute}
  • + *
+ *

+ * + * @generated + */ +public class OrderAddressImpl extends AddressImpl implements OrderAddress +{ + /** + * + * @generated + */ + protected OrderAddressImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getOrderAddress(); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getOrderDetails() + { + return (EList)eGet(Model1Package.eINSTANCE.getOrder_OrderDetails(), true); + } + + /** + * + * @generated + */ + public Order getOrder() + { + return (Order)eGet(Model1Package.eINSTANCE.getOrderDetail_Order(), true); + } + + /** + * + * @generated + */ + public void setOrder(Order newOrder) + { + eSet(Model1Package.eINSTANCE.getOrderDetail_Order(), newOrder); + } + + /** + * + * @generated + */ + public Product1 getProduct() + { + return (Product1)eGet(Model1Package.eINSTANCE.getOrderDetail_Product(), true); + } + + /** + * + * @generated + */ + public void setProduct(Product1 newProduct) + { + eSet(Model1Package.eINSTANCE.getOrderDetail_Product(), newProduct); + } + + /** + * + * @generated + */ + public float getPrice() + { + return (Float)eGet(Model1Package.eINSTANCE.getOrderDetail_Price(), true); + } + + /** + * + * @generated + */ + public void setPrice(float newPrice) + { + eSet(Model1Package.eINSTANCE.getOrderDetail_Price(), newPrice); + } + + /** + * + * @generated + */ + public boolean isTestAttribute() + { + return (Boolean)eGet(Model1Package.eINSTANCE.getOrderAddress_TestAttribute(), true); + } + + /** + * + * @generated + */ + public void setTestAttribute(boolean newTestAttribute) + { + eSet(Model1Package.eINSTANCE.getOrderAddress_TestAttribute(), newTestAttribute); + } + + /** + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) + { + if (baseClass == Order.class) + { + switch (derivedFeatureID) + { + case Model1Package.ORDER_ADDRESS__ORDER_DETAILS: + return Model1Package.ORDER__ORDER_DETAILS; + default: + return -1; + } + } + if (baseClass == OrderDetail.class) + { + switch (derivedFeatureID) + { + case Model1Package.ORDER_ADDRESS__ORDER: + return Model1Package.ORDER_DETAIL__ORDER; + case Model1Package.ORDER_ADDRESS__PRODUCT: + return Model1Package.ORDER_DETAIL__PRODUCT; + case Model1Package.ORDER_ADDRESS__PRICE: + return Model1Package.ORDER_DETAIL__PRICE; + default: + return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) + { + if (baseClass == Order.class) + { + switch (baseFeatureID) + { + case Model1Package.ORDER__ORDER_DETAILS: + return Model1Package.ORDER_ADDRESS__ORDER_DETAILS; + default: + return -1; + } + } + if (baseClass == OrderDetail.class) + { + switch (baseFeatureID) + { + case Model1Package.ORDER_DETAIL__ORDER: + return Model1Package.ORDER_ADDRESS__ORDER; + case Model1Package.ORDER_DETAIL__PRODUCT: + return Model1Package.ORDER_ADDRESS__PRODUCT; + case Model1Package.ORDER_DETAIL__PRICE: + return Model1Package.ORDER_ADDRESS__PRICE; + default: + return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} // OrderAddressImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java index b84f305157..f3c627c26f 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderDetailImpl.java @@ -1,136 +1,120 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; - -import org.eclipse.emf.internal.cdo.CDOObjectImpl; - -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Order Detail'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getOrder Order}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getProduct Product}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getPrice Price}
  • - *
- *

- * - * @generated - */ -public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected OrderDetailImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getOrderDetail(); - } - - /** - * - * - * @generated - */ - @Override - protected int eStaticFeatureCount() - { - return 0; - } - - /** - * - * - * @generated - */ - public Order getOrder() - { - return (Order)eGet(Model1Package.eINSTANCE.getOrderDetail_Order(), true); - } - - /** - * - * - * @generated - */ - public void setOrder(Order newOrder) - { - eSet(Model1Package.eINSTANCE.getOrderDetail_Order(), newOrder); - } - - /** - * - * - * @generated - */ - public Product1 getProduct() - { - return (Product1)eGet(Model1Package.eINSTANCE.getOrderDetail_Product(), true); - } - - /** - * - * - * @generated - */ - public void setProduct(Product1 newProduct) - { - eSet(Model1Package.eINSTANCE.getOrderDetail_Product(), newProduct); - } - - /** - * - * - * @generated - */ - public float getPrice() - { - return (Float)eGet(Model1Package.eINSTANCE.getOrderDetail_Price(), true); - } - - /** - * - * - * @generated - */ - public void setPrice(float newPrice) - { - eSet(Model1Package.eINSTANCE.getOrderDetail_Price(), newPrice); - } - -} // OrderDetailImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Order Detail'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getOrder Order}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getProduct Product}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderDetailImpl#getPrice Price}
  • + *
+ *

+ * + * @generated + */ +public class OrderDetailImpl extends CDOObjectImpl implements OrderDetail +{ + /** + * + * @generated + */ + protected OrderDetailImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getOrderDetail(); + } + + /** + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * @generated + */ + public Order getOrder() + { + return (Order)eGet(Model1Package.eINSTANCE.getOrderDetail_Order(), true); + } + + /** + * + * @generated + */ + public void setOrder(Order newOrder) + { + eSet(Model1Package.eINSTANCE.getOrderDetail_Order(), newOrder); + } + + /** + * + * @generated + */ + public Product1 getProduct() + { + return (Product1)eGet(Model1Package.eINSTANCE.getOrderDetail_Product(), true); + } + + /** + * + * @generated + */ + public void setProduct(Product1 newProduct) + { + eSet(Model1Package.eINSTANCE.getOrderDetail_Product(), newProduct); + } + + /** + * + * @generated + */ + public float getPrice() + { + return (Float)eGet(Model1Package.eINSTANCE.getOrderDetail_Price(), true); + } + + /** + * + * @generated + */ + public void setPrice(float newPrice) + { + eSet(Model1Package.eINSTANCE.getOrderDetail_Price(), newPrice); + } + +} // OrderDetailImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java index 424322aeda..d1c5457a5a 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/OrderImpl.java @@ -1,85 +1,74 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; - -import org.eclipse.emf.internal.cdo.CDOObjectImpl; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Order'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderImpl#getOrderDetails Order Details}
  • - *
- *

- * - * @generated - */ -public abstract class OrderImpl extends CDOObjectImpl implements Order -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected OrderImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getOrder(); - } - - /** - * - * - * @generated - */ - @Override - protected int eStaticFeatureCount() - { - return 0; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getOrderDetails() - { - return (EList)eGet(Model1Package.eINSTANCE.getOrder_OrderDetails(), true); - } - -} // OrderImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Order'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.OrderImpl#getOrderDetails Order Details}
  • + *
+ *

+ * + * @generated + */ +public abstract class OrderImpl extends CDOObjectImpl implements Order +{ + /** + * + * @generated + */ + protected OrderImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getOrder(); + } + + /** + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getOrderDetails() + { + return (EList)eGet(Model1Package.eINSTANCE.getOrder_OrderDetails(), true); + } + +} // OrderImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Product1Impl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Product1Impl.java index 4b479fbdb2..0adaae4146 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Product1Impl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Product1Impl.java @@ -1,149 +1,144 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.VAT; - -import org.eclipse.emf.internal.cdo.CDOObjectImpl; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Product'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl#getName Name}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl#getOrderDetails Order Details}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl#getVat Vat}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl#getDescription Description}
  • - *
- *

- * - * @generated - */ -public class Product1Impl extends CDOObjectImpl implements Product1 -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected Product1Impl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getProduct1(); - } - - /** - * - * - * @generated - */ - @Override - protected int eStaticFeatureCount() - { - return 0; - } - - /** - * - * - * @generated - */ - public String getName() - { - return (String)eGet(Model1Package.eINSTANCE.getProduct1_Name(), true); - } - - /** - * - * - * @generated - */ - public void setName(String newName) - { - eSet(Model1Package.eINSTANCE.getProduct1_Name(), newName); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getOrderDetails() - { - return (EList)eGet(Model1Package.eINSTANCE.getProduct1_OrderDetails(), true); - } - - /** - * - * - * @generated - */ - public VAT getVat() - { - return (VAT)eGet(Model1Package.eINSTANCE.getProduct1_Vat(), true); - } - - /** - * - * - * @generated - */ - public void setVat(VAT newVat) - { - eSet(Model1Package.eINSTANCE.getProduct1_Vat(), newVat); - } - - /** - * - * - * @generated - */ - public String getDescription() - { - return (String)eGet(Model1Package.eINSTANCE.getProduct1_Description(), true); - } - - /** - * - * - * @generated - */ - public void setDescription(String newDescription) - { - eSet(Model1Package.eINSTANCE.getProduct1_Description(), newDescription); - } - -} // ProductImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.VAT; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Product'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl#getOrderDetails Order Details}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl#getVat Vat}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl#getOtherVATs Other VA Ts}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.Product1Impl#getDescription Description}
  • + *
+ *

+ * + * @generated + */ +public class Product1Impl extends CDOObjectImpl implements Product1 +{ + /** + * + * @generated + */ + protected Product1Impl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getProduct1(); + } + + /** + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * @generated + */ + public String getName() + { + return (String)eGet(Model1Package.eINSTANCE.getProduct1_Name(), true); + } + + /** + * + * @generated + */ + public void setName(String newName) + { + eSet(Model1Package.eINSTANCE.getProduct1_Name(), newName); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getOrderDetails() + { + return (EList)eGet(Model1Package.eINSTANCE.getProduct1_OrderDetails(), true); + } + + /** + * + * @generated + */ + public VAT getVat() + { + return (VAT)eGet(Model1Package.eINSTANCE.getProduct1_Vat(), true); + } + + /** + * + * @generated + */ + public void setVat(VAT newVat) + { + eSet(Model1Package.eINSTANCE.getProduct1_Vat(), newVat); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getOtherVATs() + { + return (EList)eGet(Model1Package.eINSTANCE.getProduct1_OtherVATs(), true); + } + + /** + * + * @generated + */ + public String getDescription() + { + return (String)eGet(Model1Package.eINSTANCE.getProduct1_Description(), true); + } + + /** + * + * @generated + */ + public void setDescription(String newDescription) + { + eSet(Model1Package.eINSTANCE.getProduct1_Description(), newDescription); + } + +} // ProductImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductToOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductToOrderImpl.java index 093f1d6a59..6f9a44f76b 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductToOrderImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/ProductToOrderImpl.java @@ -1,204 +1,182 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; - -import org.eclipse.emf.internal.cdo.CDOObjectImpl; - -import org.eclipse.emf.common.util.BasicEMap; -import org.eclipse.emf.common.util.EMap; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; - -/** - * An implementation of the model object 'Product To Order'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.ProductToOrderImpl#getTypedKey Key}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.ProductToOrderImpl#getTypedValue Value}
  • - *
- *

- * - * @generated - */ -public class ProductToOrderImpl extends CDOObjectImpl implements BasicEMap.Entry -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected ProductToOrderImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getProductToOrder(); - } - - /** - * - * - * @generated - */ - @Override - protected int eStaticFeatureCount() - { - return 0; - } - - /** - * - * - * @generated - */ - public Product1 getTypedKey() - { - return (Product1)eGet(Model1Package.eINSTANCE.getProductToOrder_Key(), true); - } - - /** - * - * - * @generated - */ - public void setTypedKey(Product1 newKey) - { - eSet(Model1Package.eINSTANCE.getProductToOrder_Key(), newKey); - } - - /** - * - * - * @generated - */ - public SalesOrder getTypedValue() - { - return (SalesOrder)eGet(Model1Package.eINSTANCE.getProductToOrder_Value(), true); - } - - /** - * - * - * @generated - */ - public void setTypedValue(SalesOrder newValue) - { - eSet(Model1Package.eINSTANCE.getProductToOrder_Value(), newValue); - } - - /** - * - * - * @generated - */ - protected int hash = -1; - - /** - * - * - * @generated - */ - public int getHash() - { - if (hash == -1) - { - Object theKey = getKey(); - hash = (theKey == null ? 0 : theKey.hashCode()); - } - return hash; - } - - /** - * - * - * @generated - */ - public void setHash(int hash) - { - this.hash = hash; - } - - /** - * - * - * @generated - */ - public Product1 getKey() - { - return getTypedKey(); - } - - /** - * - * - * @generated - */ - public void setKey(Product1 key) - { - setTypedKey(key); - } - - /** - * - * - * @generated - */ - public SalesOrder getValue() - { - return getTypedValue(); - } - - /** - * - * - * @generated - */ - public SalesOrder setValue(SalesOrder value) - { - SalesOrder oldValue = getValue(); - setTypedValue(value); - return oldValue; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EMap getEMap() - { - EObject container = eContainer(); - return container == null ? null : (EMap)container.eGet(eContainmentFeature()); - } - -} // ProductToOrderImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.BasicEMap; +import org.eclipse.emf.common.util.EMap; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +/** + * An implementation of the model object 'Product To Order'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.ProductToOrderImpl#getTypedKey Key}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.ProductToOrderImpl#getTypedValue Value}
  • + *
+ *

+ * + * @generated + */ +public class ProductToOrderImpl extends CDOObjectImpl implements BasicEMap.Entry +{ + /** + * + * @generated + */ + protected ProductToOrderImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getProductToOrder(); + } + + /** + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * @generated + */ + public Product1 getTypedKey() + { + return (Product1)eGet(Model1Package.eINSTANCE.getProductToOrder_Key(), true); + } + + /** + * + * @generated + */ + public void setTypedKey(Product1 newKey) + { + eSet(Model1Package.eINSTANCE.getProductToOrder_Key(), newKey); + } + + /** + * + * @generated + */ + public SalesOrder getTypedValue() + { + return (SalesOrder)eGet(Model1Package.eINSTANCE.getProductToOrder_Value(), true); + } + + /** + * + * @generated + */ + public void setTypedValue(SalesOrder newValue) + { + eSet(Model1Package.eINSTANCE.getProductToOrder_Value(), newValue); + } + + /** + * + * @generated + */ + protected int hash = -1; + + /** + * + * @generated + */ + public int getHash() + { + if (hash == -1) + { + Object theKey = getKey(); + hash = (theKey == null ? 0 : theKey.hashCode()); + } + return hash; + } + + /** + * + * @generated + */ + public void setHash(int hash) + { + this.hash = hash; + } + + /** + * + * @generated + */ + public Product1 getKey() + { + return getTypedKey(); + } + + /** + * + * @generated + */ + public void setKey(Product1 key) + { + setTypedKey(key); + } + + /** + * + * @generated + */ + public SalesOrder getValue() + { + return getTypedValue(); + } + + /** + * + * @generated + */ + public SalesOrder setValue(SalesOrder value) + { + SalesOrder oldValue = getValue(); + setTypedValue(value); + return oldValue; + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EMap getEMap() + { + EObject container = eContainer(); + return container == null ? null : (EMap)container.eGet(eContainmentFeature()); + } + +} // ProductToOrderImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java index 26991236ea..5fe8ea3317 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/PurchaseOrderImpl.java @@ -1,103 +1,90 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; - -import org.eclipse.emf.ecore.EClass; - -import java.util.Date; - -/** - * An implementation of the model object 'Purchase Order'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl#getDate Date}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl#getSupplier Supplier}
  • - *
- *

- * - * @generated - */ -public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected PurchaseOrderImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getPurchaseOrder(); - } - - /** - * - * - * @generated - */ - public Date getDate() - { - return (Date)eGet(Model1Package.eINSTANCE.getPurchaseOrder_Date(), true); - } - - /** - * - * - * @generated - */ - public void setDate(Date newDate) - { - eSet(Model1Package.eINSTANCE.getPurchaseOrder_Date(), newDate); - } - - /** - * - * - * @generated - */ - public Supplier getSupplier() - { - return (Supplier)eGet(Model1Package.eINSTANCE.getPurchaseOrder_Supplier(), true); - } - - /** - * - * - * @generated - */ - public void setSupplier(Supplier newSupplier) - { - eSet(Model1Package.eINSTANCE.getPurchaseOrder_Supplier(), newSupplier); - } - -} // PurchaseOrderImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; + +import org.eclipse.emf.ecore.EClass; + +import java.util.Date; + +/** + * An implementation of the model object 'Purchase Order'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl#getDate Date}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl#getSupplier Supplier}
  • + *
+ *

+ * + * @generated + */ +public class PurchaseOrderImpl extends OrderImpl implements PurchaseOrder +{ + /** + * + * @generated + */ + protected PurchaseOrderImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getPurchaseOrder(); + } + + /** + * + * @generated + */ + public Date getDate() + { + return (Date)eGet(Model1Package.eINSTANCE.getPurchaseOrder_Date(), true); + } + + /** + * + * @generated + */ + public void setDate(Date newDate) + { + eSet(Model1Package.eINSTANCE.getPurchaseOrder_Date(), newDate); + } + + /** + * + * @generated + */ + public Supplier getSupplier() + { + return (Supplier)eGet(Model1Package.eINSTANCE.getPurchaseOrder_Supplier(), true); + } + + /** + * + * @generated + */ + public void setSupplier(Supplier newSupplier) + { + eSet(Model1Package.eINSTANCE.getPurchaseOrder_Supplier(), newSupplier); + } + +} // PurchaseOrderImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java index dc201dc9dd..57400e178d 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SalesOrderImpl.java @@ -1,101 +1,88 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; - -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Sales Order'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl#getId Id}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl#getCustomer Customer}
  • - *
- *

- * - * @generated - */ -public class SalesOrderImpl extends OrderImpl implements SalesOrder -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected SalesOrderImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getSalesOrder(); - } - - /** - * - * - * @generated - */ - public int getId() - { - return (Integer)eGet(Model1Package.eINSTANCE.getSalesOrder_Id(), true); - } - - /** - * - * - * @generated - */ - public void setId(int newId) - { - eSet(Model1Package.eINSTANCE.getSalesOrder_Id(), newId); - } - - /** - * - * - * @generated - */ - public Customer getCustomer() - { - return (Customer)eGet(Model1Package.eINSTANCE.getSalesOrder_Customer(), true); - } - - /** - * - * - * @generated - */ - public void setCustomer(Customer newCustomer) - { - eSet(Model1Package.eINSTANCE.getSalesOrder_Customer(), newCustomer); - } - -} // SalesOrderImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; + +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Sales Order'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl#getId Id}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.SalesOrderImpl#getCustomer Customer}
  • + *
+ *

+ * + * @generated + */ +public class SalesOrderImpl extends OrderImpl implements SalesOrder +{ + /** + * + * @generated + */ + protected SalesOrderImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getSalesOrder(); + } + + /** + * + * @generated + */ + public int getId() + { + return (Integer)eGet(Model1Package.eINSTANCE.getSalesOrder_Id(), true); + } + + /** + * + * @generated + */ + public void setId(int newId) + { + eSet(Model1Package.eINSTANCE.getSalesOrder_Id(), newId); + } + + /** + * + * @generated + */ + public Customer getCustomer() + { + return (Customer)eGet(Model1Package.eINSTANCE.getSalesOrder_Customer(), true); + } + + /** + * + * @generated + */ + public void setCustomer(Customer newCustomer) + { + eSet(Model1Package.eINSTANCE.getSalesOrder_Customer(), newCustomer); + } + +} // SalesOrderImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java index 7f4325c600..98a0ce233c 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java @@ -1,93 +1,81 @@ -/* - * 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.tests.model1.impl; - -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; - -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EClass; - -/** - * An implementation of the model object 'Supplier'. - *

- * The following features are implemented: - *

    - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl#getPurchaseOrders Purchase Orders}
  • - *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl#isPreferred Preferred}
  • - *
- *

- * - * @generated - */ -public class SupplierImpl extends AddressImpl implements Supplier -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * - * - * @generated - */ - protected SupplierImpl() - { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() - { - return Model1Package.eINSTANCE.getSupplier(); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - public EList getPurchaseOrders() - { - return (EList)eGet(Model1Package.eINSTANCE.getSupplier_PurchaseOrders(), true); - } - - /** - * - * - * @generated - */ - public boolean isPreferred() - { - return (Boolean)eGet(Model1Package.eINSTANCE.getSupplier_Preferred(), true); - } - - /** - * - * - * @generated - */ - public void setPreferred(boolean newPreferred) - { - eSet(Model1Package.eINSTANCE.getSupplier_Preferred(), newPreferred); - } - -} // SupplierImpl +/* + * 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.tests.model1.impl; + +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Supplier'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl#getPurchaseOrders Purchase Orders}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl#isPreferred Preferred}
  • + *
+ *

+ * + * @generated + */ +public class SupplierImpl extends AddressImpl implements Supplier +{ + /** + * + * @generated + */ + protected SupplierImpl() + { + super(); + } + + /** + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model1Package.eINSTANCE.getSupplier(); + } + + /** + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getPurchaseOrders() + { + return (EList)eGet(Model1Package.eINSTANCE.getSupplier_PurchaseOrders(), true); + } + + /** + * + * @generated + */ + public boolean isPreferred() + { + return (Boolean)eGet(Model1Package.eINSTANCE.getSupplier_Preferred(), true); + } + + /** + * + * @generated + */ + public void setPreferred(boolean newPreferred) + { + eSet(Model1Package.eINSTANCE.getSupplier_Preferred(), newPreferred); + } + +} // SupplierImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java index 7a2f71bb34..0d6ec676a5 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1AdapterFactory.java @@ -1,371 +1,352 @@ -/* - * 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.tests.model1.util; - -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Company; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderAddress; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; -import org.eclipse.emf.cdo.tests.model1.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; - -import java.util.Map; - -/** - * The Adapter Factory for the model. It provides an adapter createXXX - * method for each class of the model. - * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package - * @generated - */ -public class Model1AdapterFactory extends AdapterFactoryImpl -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The cached model package. - * - * @generated - */ - protected static Model1Package modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * @generated - */ - public Model1AdapterFactory() - { - if (modelPackage == null) - { - modelPackage = Model1Package.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. This implementation - * returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) - { - if (object == modelPackage) - { - return true; - } - if (object instanceof EObject) - { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch that delegates to the createXXX methods. - * - * @generated - */ - protected Model1Switch modelSwitch = new Model1Switch() - { - @Override - public Adapter caseAddress(Address object) - { - return createAddressAdapter(); - } - - @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 caseProduct1(Product1 object) - { - return createProduct1Adapter(); - } - - @Override - public Adapter caseOrderAddress(OrderAddress object) - { - return createOrderAddressAdapter(); - } - - @Override - public Adapter caseProductToOrder(Map.Entry object) - { - return createProductToOrderAdapter(); - } - - @Override - public Adapter defaultCase(EObject object) - { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * @param target - * the object to adapt. - * @return the adapter for the target. - * @generated - */ - @Override - public Adapter createAdapter(Notifier target) - { - return modelSwitch.doSwitch((EObject)target); - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Address Address}'. - * This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.Address - * @generated - */ - public Adapter createAddressAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Supplier Supplier}'. - * This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.Supplier - * @generated - */ - public Adapter createSupplierAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder - * Purchase Order}'. This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder - * @generated - */ - public Adapter createPurchaseOrderAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail - * Order Detail}'. This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.OrderDetail - * @generated - */ - public Adapter createOrderDetailAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress - * Order Address}'. This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.OrderAddress - * @generated - */ - public Adapter createOrderAddressAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link java.util.Map.Entry Product To Order}'. This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see java.util.Map.Entry - * @generated - */ - public Adapter createProductToOrderAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Category Category}'. - * This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.Category - * @generated - */ - public Adapter createCategoryAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Product1 Product1}'. - * This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.Product1 - * @generated - */ - public Adapter createProduct1Adapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Company Company}'. - * This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.Company - * @generated - */ - public Adapter createCompanyAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Customer Customer}'. - * This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.Customer - * @generated - */ - public Adapter createCustomerAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Order Order}'. This default implementation returns null so that we can easily ignore cases; it's useful to - * ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.Order - * @generated - */ - public Adapter createOrderAdapter() - { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder - * Sales Order}'. This default implementation returns null so that we can easily - * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see org.eclipse.emf.cdo.tests.model1.SalesOrder - * @generated - */ - public Adapter createSalesOrderAdapter() - { - return null; - } - - /** - * Creates a new adapter for the default case. This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() - { - return null; - } - -} // Model1AdapterFactory +/* + * 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.tests.model1.util; + +import org.eclipse.emf.cdo.tests.model1.Address; +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Company; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderAddress; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model1.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; + +import java.util.Map; + +/** + * The Adapter Factory for the model. It provides an adapter createXXX + * method for each class of the model. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package + * @generated + */ +public class Model1AdapterFactory extends AdapterFactoryImpl +{ + /** + * The cached model package. + * + * @generated + */ + protected static Model1Package modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * @generated + */ + public Model1AdapterFactory() + { + if (modelPackage == null) + { + modelPackage = Model1Package.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * This implementation + * returns true if the object is either the model's package or is an instance object of the model. + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) + { + if (object == modelPackage) + { + return true; + } + if (object instanceof EObject) + { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * @generated + */ + protected Model1Switch modelSwitch = new Model1Switch() + { + @Override + public Adapter caseAddress(Address object) + { + return createAddressAdapter(); + } + + @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 caseProduct1(Product1 object) + { + return createProduct1Adapter(); + } + + @Override + public Adapter caseOrderAddress(OrderAddress object) + { + return createOrderAddressAdapter(); + } + + @Override + public Adapter caseProductToOrder(Map.Entry object) + { + return createProductToOrderAdapter(); + } + + @Override + public Adapter defaultCase(EObject object) + { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) + { + return modelSwitch.doSwitch((EObject)target); + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Address Address}'. + * This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.Address + * @generated + */ + public Adapter createAddressAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Supplier Supplier}'. + * This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.Supplier + * @generated + */ + public Adapter createSupplierAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder Purchase Order}'. + * This default implementation returns null so that we can easily + * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.PurchaseOrder + * @generated + */ + public Adapter createPurchaseOrderAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.OrderDetail Order Detail}'. + * This default implementation returns null so that we can easily + * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.OrderDetail + * @generated + */ + public Adapter createOrderDetailAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.OrderAddress Order Address}'. + * This default implementation returns null so that we can easily + * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.OrderAddress + * @generated + */ + public Adapter createOrderAddressAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link java.util.Map.Entry Product To Order}'. This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see java.util.Map.Entry + * @generated + */ + public Adapter createProductToOrderAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Category Category}'. + * This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.Category + * @generated + */ + public Adapter createCategoryAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Product1 Product1}'. + * This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.Product1 + * @generated + */ + public Adapter createProduct1Adapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Company Company}'. + * This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.Company + * @generated + */ + public Adapter createCompanyAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Customer Customer}'. + * This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.Customer + * @generated + */ + public Adapter createCustomerAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Order Order}'. This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.Order + * @generated + */ + public Adapter createOrderAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.SalesOrder Sales Order}'. + * This default implementation returns null so that we can easily + * ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model1.SalesOrder + * @generated + */ + public Adapter createSalesOrderAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * This default implementation returns null. + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() + { + return null; + } + +} // Model1AdapterFactory diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java index 1e04ce4435..b4050c710e 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java @@ -1,427 +1,389 @@ -/* - * 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.tests.model1.util; - -import org.eclipse.emf.cdo.tests.model1.Address; -import org.eclipse.emf.cdo.tests.model1.Category; -import org.eclipse.emf.cdo.tests.model1.Company; -import org.eclipse.emf.cdo.tests.model1.Customer; -import org.eclipse.emf.cdo.tests.model1.Model1Package; -import org.eclipse.emf.cdo.tests.model1.Order; -import org.eclipse.emf.cdo.tests.model1.OrderAddress; -import org.eclipse.emf.cdo.tests.model1.OrderDetail; -import org.eclipse.emf.cdo.tests.model1.Product1; -import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; -import org.eclipse.emf.cdo.tests.model1.SalesOrder; -import org.eclipse.emf.cdo.tests.model1.Supplier; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; - -import java.util.List; -import java.util.Map; - -/** - * The Switch for the model's inheritance hierarchy. It supports the call - * {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX method for each class of the model, - * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is - * returned, which is the result of the switch. - * - * @see org.eclipse.emf.cdo.tests.model1.Model1Package - * @generated - */ -public class Model1Switch -{ - /** - * - * - * @generated - */ - public static final String copyright = "Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation"; - - /** - * The cached model package - * - * @generated - */ - protected static Model1Package modelPackage; - - /** - * Creates an instance of the switch. - * - * @generated - */ - public Model1Switch() - { - if (modelPackage == null) - { - modelPackage = Model1Package.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public T doSwitch(EObject theEObject) - { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - protected T doSwitch(EClass theEClass, EObject theEObject) - { - if (theEClass.eContainer() == modelPackage) - { - return doSwitch(theEClass.getClassifierID(), theEObject); - } - else - { - List eSuperTypes = theEClass.getESuperTypes(); - return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject); - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - protected T doSwitch(int classifierID, EObject theEObject) - { - switch (classifierID) - { - case Model1Package.ADDRESS: - { - Address address = (Address)theEObject; - T result = caseAddress(address); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model1Package.COMPANY: - { - Company company = (Company)theEObject; - T result = caseCompany(company); - if (result == null) - result = caseAddress(company); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model1Package.SUPPLIER: - { - Supplier supplier = (Supplier)theEObject; - T result = caseSupplier(supplier); - if (result == null) - result = caseAddress(supplier); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model1Package.CUSTOMER: - { - Customer customer = (Customer)theEObject; - T result = caseCustomer(customer); - if (result == null) - result = caseAddress(customer); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model1Package.ORDER: - { - Order order = (Order)theEObject; - T result = caseOrder(order); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model1Package.ORDER_DETAIL: - { - OrderDetail orderDetail = (OrderDetail)theEObject; - T result = caseOrderDetail(orderDetail); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model1Package.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 Model1Package.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 Model1Package.CATEGORY: - { - Category category = (Category)theEObject; - T result = caseCategory(category); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model1Package.PRODUCT1: - { - Product1 product1 = (Product1)theEObject; - T result = caseProduct1(product1); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model1Package.ORDER_ADDRESS: - { - OrderAddress orderAddress = (OrderAddress)theEObject; - T result = caseOrderAddress(orderAddress); - if (result == null) - result = caseAddress(orderAddress); - if (result == null) - result = caseOrder(orderAddress); - if (result == null) - result = caseOrderDetail(orderAddress); - if (result == null) - result = defaultCase(theEObject); - return result; - } - case Model1Package.PRODUCT_TO_ORDER: - { - @SuppressWarnings("unchecked") - Map.Entry productToOrder = (Map.Entry)theEObject; - T result = caseProductToOrder(productToOrder); - if (result == null) - result = defaultCase(theEObject); - return result; - } - default: - return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Address'. This - * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Address'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseAddress(Address object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Supplier'. This - * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Supplier'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSupplier(Supplier object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Purchase Order'. - * This implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Purchase Order'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T casePurchaseOrder(PurchaseOrder object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Order Detail'. - * This implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Order Detail'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseOrderDetail(OrderDetail object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Order Address'. - * This implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Order Address'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseOrderAddress(OrderAddress object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Product To Order'. This implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Product To Order'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseProductToOrder(Map.Entry object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Category'. This - * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Category'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCategory(Category object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Product1'. This - * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Product1'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseProduct1(Product1 object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Company'. This - * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Company'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCompany(Company object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Customer'. This - * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Customer'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCustomer(Customer object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Order'. This - * implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Order'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseOrder(Order object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Sales Order'. - * This implementation returns null; returning a non-null result will terminate the switch. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'Sales Order'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSalesOrder(SalesOrder object) - { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'EObject'. This - * implementation returns null; returning a non-null result will terminate the switch, but this is the last case - * anyway. - * - * @param object - * the target of the switch. - * @return the result of interpreting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public T defaultCase(EObject object) - { - return null; - } - -} // Model1Switch +/* + * 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.tests.model1.util; + +import org.eclipse.emf.cdo.tests.model1.Address; +import org.eclipse.emf.cdo.tests.model1.Category; +import org.eclipse.emf.cdo.tests.model1.Company; +import org.eclipse.emf.cdo.tests.model1.Customer; +import org.eclipse.emf.cdo.tests.model1.Model1Package; +import org.eclipse.emf.cdo.tests.model1.Order; +import org.eclipse.emf.cdo.tests.model1.OrderAddress; +import org.eclipse.emf.cdo.tests.model1.OrderDetail; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.PurchaseOrder; +import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model1.Supplier; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; + +import java.util.Map; + +/** + * The Switch for the model's inheritance hierarchy. It supports the call + * {@link #doSwitch(EObject) doSwitch(object)} to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is + * returned, which is the result of the switch. + * @see org.eclipse.emf.cdo.tests.model1.Model1Package + * @generated + */ +public class Model1Switch extends Switch +{ + /** + * The cached model package + * + * @generated + */ + protected static Model1Package modelPackage; + + /** + * Creates an instance of the switch. + * + * @generated + */ + public Model1Switch() + { + if (modelPackage == null) + { + modelPackage = Model1Package.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) + { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) + { + switch (classifierID) + { + case Model1Package.ADDRESS: + { + Address address = (Address)theEObject; + T result = caseAddress(address); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model1Package.COMPANY: + { + Company company = (Company)theEObject; + T result = caseCompany(company); + if (result == null) + result = caseAddress(company); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model1Package.SUPPLIER: + { + Supplier supplier = (Supplier)theEObject; + T result = caseSupplier(supplier); + if (result == null) + result = caseAddress(supplier); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model1Package.CUSTOMER: + { + Customer customer = (Customer)theEObject; + T result = caseCustomer(customer); + if (result == null) + result = caseAddress(customer); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model1Package.ORDER: + { + Order order = (Order)theEObject; + T result = caseOrder(order); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model1Package.ORDER_DETAIL: + { + OrderDetail orderDetail = (OrderDetail)theEObject; + T result = caseOrderDetail(orderDetail); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model1Package.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 Model1Package.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 Model1Package.CATEGORY: + { + Category category = (Category)theEObject; + T result = caseCategory(category); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model1Package.PRODUCT1: + { + Product1 product1 = (Product1)theEObject; + T result = caseProduct1(product1); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model1Package.ORDER_ADDRESS: + { + OrderAddress orderAddress = (OrderAddress)theEObject; + T result = caseOrderAddress(orderAddress); + if (result == null) + result = caseAddress(orderAddress); + if (result == null) + result = caseOrder(orderAddress); + if (result == null) + result = caseOrderDetail(orderAddress); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model1Package.PRODUCT_TO_ORDER: + { + @SuppressWarnings("unchecked") + Map.Entry productToOrder = (Map.Entry)theEObject; + T result = caseProductToOrder(productToOrder); + if (result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Address'. + * This + * implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Address'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAddress(Address object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Supplier'. + * This + * implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Supplier'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSupplier(Supplier object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Purchase Order'. + * + * This implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Purchase Order'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePurchaseOrder(PurchaseOrder object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Order Detail'. + * + * This implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Order Detail'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOrderDetail(OrderDetail object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Order Address'. + * + * This implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Order Address'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOrderAddress(OrderAddress object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Product To Order'. + * This implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Product To Order'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseProductToOrder(Map.Entry object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Category'. + * This + * implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Category'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCategory(Category object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Product1'. + * This + * implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Product1'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseProduct1(Product1 object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Company'. + * This + * implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Company'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompany(Company object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Customer'. + * This + * implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Customer'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCustomer(Customer object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Order'. + * This + * implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Order'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseOrder(Order object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Sales Order'. + * + * This implementation returns null; returning a non-null result will terminate the switch. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Sales Order'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSalesOrder(SalesOrder object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * This + * implementation returns null; returning a non-null result will terminate the switch, but this is the last case + * anyway. + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) + { + return null; + } + +} // Model1Switch diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_376610_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_376610_Test.java new file mode 100644 index 0000000000..e83791e762 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_376610_Test.java @@ -0,0 +1,69 @@ +/* + * 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: + * Esteban Dugueperoux - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.bugzilla; + +import org.eclipse.emf.cdo.eresource.CDOResource; +import org.eclipse.emf.cdo.session.CDOSession; +import org.eclipse.emf.cdo.tests.AbstractCDOTest; +import org.eclipse.emf.cdo.tests.model1.Product1; +import org.eclipse.emf.cdo.tests.model1.VAT; +import org.eclipse.emf.cdo.transaction.CDOTransaction; + +import java.util.ArrayList; +import java.util.Collection; + +/** + * @author Esteban Dugueperoux + */ +public class Bugzilla_376610_Test extends AbstractCDOTest +{ + public void testRemoveOneEnumLiteral() throws Throwable + { + Product1 product = getModel1Factory().createProduct1(); + + CDOSession session = openSession(); + CDOTransaction transaction = session.openTransaction(); + CDOResource mainResource = transaction.createResource(getResourcePath("/mainResource.model1")); + mainResource.getContents().add(product); + transaction.commit(); + + // Add several enum literals + Collection vats = new ArrayList(); + vats.add(VAT.VAT0); + vats.add(VAT.VAT7); + vats.add(VAT.VAT15); + product.getOtherVATs().addAll(vats); + + // Remove them + product.getOtherVATs().remove(VAT.VAT15); + } + + public void testRemoveAllEnumLiterals() throws Throwable + { + Product1 product = getModel1Factory().createProduct1(); + + CDOSession session = openSession(); + CDOTransaction transaction = session.openTransaction(); + CDOResource mainResource = transaction.createResource(getResourcePath("/mainResource.model1")); + mainResource.getContents().add(product); + transaction.commit(); + + // Add several enum literals + Collection vats = new ArrayList(); + vats.add(VAT.VAT0); + vats.add(VAT.VAT7); + vats.add(VAT.VAT15); + product.getOtherVATs().addAll(vats); + + // Remove them + product.getOtherVATs().removeAll(vats); + } +} diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyAdapter.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyAdapter.java index cbeaf33fd0..010142d1bd 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyAdapter.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/object/CDOLegacyAdapter.java @@ -223,13 +223,18 @@ public class CDOLegacyAdapter extends CDOLegacyWrapper implements Adapter.Intern protected void notifyRemove(EStructuralFeature feature, int position) { CDOStore store = view.getStore(); - InternalEObject oldChild = (InternalEObject)store.remove(instance, feature, position); - if (oldChild != null && feature instanceof EReference) + + Object oldChild = store.remove(instance, feature, position); + if (oldChild instanceof InternalEObject) { - EReference reference = (EReference)feature; - if (reference.isContainment()) + if (feature instanceof EReference) { - setContainer(store, oldChild, null, 0); + EReference reference = (EReference)feature; + if (reference.isContainment()) + { + InternalEObject oldChildEObject = (InternalEObject)oldChild; + setContainer(store, oldChildEObject, null, 0); + } } } } @@ -237,17 +242,22 @@ public class CDOLegacyAdapter extends CDOLegacyWrapper implements Adapter.Intern protected void notifyRemoveMany(EStructuralFeature feature, Object oldValue) { CDOStore store = view.getStore(); + @SuppressWarnings("unchecked") List list = (List)oldValue; for (int i = list.size() - 1; i >= 0; --i) { - InternalEObject oldChild = (InternalEObject)store.remove(instance, feature, i); - if (oldChild != null && feature instanceof EReference) + Object oldChild = store.remove(instance, feature, i); + if (oldChild instanceof InternalEObject) { - EReference reference = (EReference)feature; - if (reference.isContainment()) + if (feature instanceof EReference) { - setContainer(store, oldChild, null, 0); + EReference reference = (EReference)feature; + if (reference.isContainment()) + { + InternalEObject oldChildEObject = (InternalEObject)oldChild; + setContainer(store, oldChildEObject, null, 0); + } } } } -- cgit v1.2.3