Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model1')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/META-INF/MANIFEST.MF14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/pom.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/AddressImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1FactoryImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1PackageImpl.java80
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/OrderDetailImpl.java42
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/ProductToOrderImpl.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/util/Model1Switch.java40
8 files changed, 48 insertions, 154 deletions
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 a5398d201a..55ba93d55e 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.1.0.qualifier
+Bundle-Version: 3.1.1.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -9,10 +9,10 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.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.model1;version="3.1.0",
- org.eclipse.emf.cdo.tests.model1.impl;version="3.1.0",
- org.eclipse.emf.cdo.tests.model1.legacy;version="3.1.0",
- org.eclipse.emf.cdo.tests.model1.legacy.impl;version="3.1.0",
- org.eclipse.emf.cdo.tests.model1.legacy.util;version="3.1.0",
- org.eclipse.emf.cdo.tests.model1.util;version="3.1.0"
+Export-Package: org.eclipse.emf.cdo.tests.model1;version="3.1.1",
+ org.eclipse.emf.cdo.tests.model1.impl;version="3.1.1",
+ org.eclipse.emf.cdo.tests.model1.legacy;version="3.1.1",
+ org.eclipse.emf.cdo.tests.model1.legacy.impl;version="3.1.1",
+ org.eclipse.emf.cdo.tests.model1.legacy.util;version="3.1.1",
+ org.eclipse.emf.cdo.tests.model1.util;version="3.1.1"
Automatic-Module-Name: org.eclipse.emf.cdo.tests.model1
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/pom.xml b/plugins/org.eclipse.emf.cdo.tests.model1/pom.xml
index 699ca00e3f..83afd5a2ca 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/pom.xml
@@ -25,7 +25,7 @@
<groupId>org.eclipse.emf.cdo</groupId>
<artifactId>org.eclipse.emf.cdo.tests.model1</artifactId>
- <version>3.1.0-SNAPSHOT</version>
+ <version>3.1.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/AddressImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/AddressImpl.java
index 826ef27dc2..036ca2ea25 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/AddressImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/AddressImpl.java
@@ -130,9 +130,7 @@ public class AddressImpl extends EObjectImpl implements Address
String oldName = name;
name = newName;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ADDRESS__NAME, oldName, name));
- }
}
/**
@@ -155,9 +153,7 @@ public class AddressImpl extends EObjectImpl implements Address
String oldStreet = street;
street = newStreet;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ADDRESS__STREET, oldStreet, street));
- }
}
/**
@@ -180,9 +176,7 @@ public class AddressImpl extends EObjectImpl implements Address
String oldCity = city;
city = newCity;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ADDRESS__CITY, oldCity, city));
- }
}
/**
@@ -275,9 +269,7 @@ public class AddressImpl extends EObjectImpl implements Address
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuilder result = new StringBuilder(super.toString());
result.append(" (name: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1FactoryImpl.java
index a0c733490f..6f4646abdb 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1FactoryImpl.java
@@ -269,9 +269,7 @@ public class Model1FactoryImpl extends EFactoryImpl implements Model1Factory
{
VAT result = VAT.get(initialValue);
if (result == null)
- {
throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- }
return result;
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1PackageImpl.java
index fd18186e3f..186fe8ef21 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/Model1PackageImpl.java
@@ -671,9 +671,7 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -753,9 +751,7 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -768,14 +764,14 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
// 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());
+ 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);
@@ -787,74 +783,74 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
!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,
+ 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(), getSupplier(), null, "suppliers", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
+ 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(), getCustomer(), null, "customers", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
+ 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(), getPurchaseOrder(), null, "purchaseOrders", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE,
+ 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(), getSalesOrder(), null, "salesOrders", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
+ 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(), 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);
+ 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(), getSalesOrder(), getSalesOrder_Customer(), "salesOrders", null, 0, -1, Customer.class, !IS_TRANSIENT,
+ 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(), getProductToOrder(), null, "orderByProduct", null, 0, -1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE,
+ 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(), 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);
+ 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(), 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,
+ 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(), 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);
- initEReference(getPurchaseOrder_SalesOrders(), getSalesOrder(), getSalesOrder_PurchaseOrders(), "salesOrders", null, 0, -1, PurchaseOrder.class,
+ 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);
+ initEReference(getPurchaseOrder_SalesOrders(), this.getSalesOrder(), this.getSalesOrder_PurchaseOrders(), "salesOrders", null, 0, -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);
- initEReference(getSalesOrder_PurchaseOrders(), getPurchaseOrder(), getPurchaseOrder_SalesOrders(), "purchaseOrders", null, 0, -1, SalesOrder.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, 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);
+ initEReference(getSalesOrder_PurchaseOrders(), this.getPurchaseOrder(), this.getPurchaseOrder_SalesOrders(), "purchaseOrders", null, 0, -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,
+ 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(), getProduct1(), null, "products", null, 0, -1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
+ 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(), getOrderDetail(), getOrderDetail_Product(), "orderDetails", null, 0, -1, Product1.class, !IS_TRANSIENT,
+ 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(), getVAT(), "vat", "vat15", 0, 1, Product1.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ 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(), 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_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);
@@ -863,9 +859,9 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
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,
+ 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
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/OrderDetailImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/OrderDetailImpl.java
index ae63455020..a0a2e6fd2c 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/OrderDetailImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/OrderDetailImpl.java
@@ -95,9 +95,7 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
public Order getOrder()
{
if (eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER)
- {
return null;
- }
return (Order)eContainer();
}
@@ -109,9 +107,7 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
public Order basicGetOrder()
{
if (eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER)
- {
return null;
- }
return (Order)eInternalContainer();
}
@@ -132,31 +128,21 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
@Override
public void setOrder(Order newOrder)
{
- if (newOrder != eInternalContainer() || eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER && newOrder != null)
+ 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));
- }
}
/**
@@ -173,9 +159,7 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
if (product != oldProduct)
{
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.ORDER_DETAIL__PRODUCT, oldProduct, product));
- }
}
}
return product;
@@ -202,13 +186,9 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
{
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_DETAIL__PRODUCT, oldProduct, newProduct);
if (msgs == null)
- {
msgs = notification;
- }
else
- {
msgs.add(notification);
- }
}
return msgs;
}
@@ -224,23 +204,15 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
{
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));
- }
}
/**
@@ -263,9 +235,7 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
float oldPrice = price;
price = newPrice;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.ORDER_DETAIL__PRICE, oldPrice, price));
- }
}
/**
@@ -279,15 +249,11 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
{
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);
@@ -336,15 +302,11 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
{
case Model1Package.ORDER_DETAIL__ORDER:
if (resolve)
- {
return getOrder();
- }
return basicGetOrder();
case Model1Package.ORDER_DETAIL__PRODUCT:
if (resolve)
- {
return getProduct();
- }
return basicGetProduct();
case Model1Package.ORDER_DETAIL__PRICE:
return getPrice();
@@ -423,9 +385,7 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuilder result = new StringBuilder(super.toString());
result.append(" (price: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/ProductToOrderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/ProductToOrderImpl.java
index 3a97106b5c..d73e024b08 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/ProductToOrderImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/impl/ProductToOrderImpl.java
@@ -90,9 +90,7 @@ public class ProductToOrderImpl extends EObjectImpl implements BasicEMap.Entry<P
if (key != oldKey)
{
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.PRODUCT_TO_ORDER__KEY, oldKey, key));
- }
}
}
return key;
@@ -116,9 +114,7 @@ public class ProductToOrderImpl extends EObjectImpl implements BasicEMap.Entry<P
Product1 oldKey = key;
key = newKey;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT_TO_ORDER__KEY, oldKey, key));
- }
}
/**
@@ -134,9 +130,7 @@ public class ProductToOrderImpl extends EObjectImpl implements BasicEMap.Entry<P
if (value != oldValue)
{
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model1Package.PRODUCT_TO_ORDER__VALUE, oldValue, value));
- }
}
}
return value;
@@ -160,9 +154,7 @@ public class ProductToOrderImpl extends EObjectImpl implements BasicEMap.Entry<P
SalesOrder oldValue = value;
value = newValue;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, Model1Package.PRODUCT_TO_ORDER__VALUE, oldValue, value));
- }
}
/**
@@ -176,15 +168,11 @@ public class ProductToOrderImpl extends EObjectImpl implements BasicEMap.Entry<P
{
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);
@@ -261,7 +249,7 @@ public class ProductToOrderImpl extends EObjectImpl implements BasicEMap.Entry<P
if (hash == -1)
{
Object theKey = getKey();
- hash = theKey == null ? 0 : theKey.hashCode();
+ hash = (theKey == null ? 0 : theKey.hashCode());
}
return hash;
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/util/Model1Switch.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/util/Model1Switch.java
index 5f96a0b2e2..7c17b0f9c1 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/util/Model1Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/legacy/util/Model1Switch.java
@@ -116,9 +116,7 @@ public class Model1Switch<T>
Address address = (Address)theEObject;
T result = caseAddress(address);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.COMPANY:
@@ -126,13 +124,9 @@ public class Model1Switch<T>
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:
@@ -140,13 +134,9 @@ public class Model1Switch<T>
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:
@@ -154,13 +144,9 @@ public class Model1Switch<T>
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:
@@ -168,9 +154,7 @@ public class Model1Switch<T>
Order order = (Order)theEObject;
T result = caseOrder(order);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.ORDER_DETAIL:
@@ -178,9 +162,7 @@ public class Model1Switch<T>
OrderDetail orderDetail = (OrderDetail)theEObject;
T result = caseOrderDetail(orderDetail);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.PURCHASE_ORDER:
@@ -188,13 +170,9 @@ public class Model1Switch<T>
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:
@@ -202,13 +180,9 @@ public class Model1Switch<T>
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:
@@ -216,9 +190,7 @@ public class Model1Switch<T>
Category category = (Category)theEObject;
T result = caseCategory(category);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.PRODUCT1:
@@ -226,9 +198,7 @@ public class Model1Switch<T>
Product1 product1 = (Product1)theEObject;
T result = caseProduct1(product1);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model1Package.ORDER_ADDRESS:
@@ -236,21 +206,13 @@ public class Model1Switch<T>
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:
@@ -259,9 +221,7 @@ public class Model1Switch<T>
Map.Entry<Product1, SalesOrder> productToOrder = (Map.Entry<Product1, SalesOrder>)theEObject;
T result = caseProductToOrder(productToOrder);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
default:

Back to the top