Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderDetailImpl.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderDetailImpl.java798
1 files changed, 389 insertions, 409 deletions
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;
-
-/**
- * <!-- begin-user-doc --> An implementation of the model object '<em><b>Order Detail</b></em>'. <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getOrder <em>Order</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getProduct <em>Product</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getPrice <em>Price</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class OrderDetailImpl extends EObjectImpl implements OrderDetail
-{
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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() <em>Product</em>}' reference. <!-- begin-user-doc --> <!--
- * end-user-doc -->
- *
- * @see #getProduct()
- * @generated
- * @ordered
- */
- protected Product1 product;
-
- /**
- * The default value of the '{@link #getPrice() <em>Price</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @see #getPrice()
- * @generated
- * @ordered
- */
- protected static final float PRICE_EDEFAULT = 0.0F;
-
- /**
- * The cached value of the '{@link #getPrice() <em>Price</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
- * -->
- *
- * @see #getPrice()
- * @generated
- * @ordered
- */
- protected float price = PRICE_EDEFAULT;
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- protected OrderDetailImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return Model1Package.eINSTANCE.getOrderDetail();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Order getOrder()
- {
- if (eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER)
- return null;
- return (Order)eContainer();
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public NotificationChain basicSetOrder(Order newOrder, NotificationChain msgs)
- {
- msgs = eBasicSetContainer((InternalEObject)newOrder, Model1Package.ORDER_DETAIL__ORDER, msgs);
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public Product1 basicGetProduct()
- {
- return product;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @generated
- */
- public float getPrice()
- {
- return price;
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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));
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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);
- }
-
- /**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- *
- * @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;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Order Detail</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getOrder <em>Order</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getProduct <em>Product</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model1.impl.OrderDetailImpl#getPrice <em>Price</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class OrderDetailImpl extends EObjectImpl implements OrderDetail
+{
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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() <em>Product</em>}' reference.
+ * <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ * @see #getProduct()
+ * @generated
+ * @ordered
+ */
+ protected Product1 product;
+
+ /**
+ * The default value of the '{@link #getPrice() <em>Price</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #getPrice()
+ * @generated
+ * @ordered
+ */
+ protected static final float PRICE_EDEFAULT = 0.0F;
+
+ /**
+ * The cached value of the '{@link #getPrice() <em>Price</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #getPrice()
+ * @generated
+ * @ordered
+ */
+ protected float price = PRICE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ protected OrderDetailImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model1Package.eINSTANCE.getOrderDetail();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public Order getOrder()
+ {
+ if (eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER)
+ return null;
+ return (Order)eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOrder(Order newOrder, NotificationChain msgs)
+ {
+ msgs = eBasicSetContainer((InternalEObject)newOrder, Model1Package.ORDER_DETAIL__ORDER, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public Product1 basicGetProduct()
+ {
+ return product;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
+ public float getPrice()
+ {
+ return price;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @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

Back to the top