Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-02-03 10:26:25 +0000
committerEike Stepper2010-02-03 10:26:25 +0000
commitda0577de6aa1c8829e8da7d59a5875cfb076b30c (patch)
tree2c508f5558bec4e5535f3039525a75f6b110ba96 /plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/legacy/model1/impl/OrderDetailImpl.java
parent8d7152b4786c2b9fe3a2ec6523d67a3d5f0a6702 (diff)
downloadcdo-da0577de6aa1c8829e8da7d59a5875cfb076b30c.tar.gz
cdo-da0577de6aa1c8829e8da7d59a5875cfb076b30c.tar.xz
cdo-da0577de6aa1c8829e8da7d59a5875cfb076b30c.zip
adjust legal headers
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.java48
1 files changed, 41 insertions, 7 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 a6eb44123d..3ed3c1cdcd 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,14 +1,12 @@
/**
- * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * Copyright (c) 2004 - 2010 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
- *
- * $Id: OrderDetailImpl.java,v 1.7 2010-01-08 19:43:18 mfluegge Exp $
*/
package org.eclipse.emf.cdo.tests.legacy.model1.impl;
@@ -45,7 +43,7 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
*
* @generated
*/
- public static final String copyright = "Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n\r\nContributors:\r\n Eike Stepper - initial API and implementation";
+ public static final String copyright = "Copyright (c) 2004 - 2010 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 --> <!--
@@ -106,7 +104,9 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
public Order getOrder()
{
if (eContainerFeatureID() != Model1Package.ORDER_DETAIL__ORDER)
+ {
return null;
+ }
return (Order)eContainer();
}
@@ -128,22 +128,32 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
*/
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));
+ }
}
/**
@@ -160,8 +170,10 @@ 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;
@@ -191,9 +203,13 @@ 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;
}
@@ -209,17 +225,25 @@ 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));
+ }
}
/**
@@ -242,7 +266,9 @@ 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));
+ }
}
/**
@@ -257,12 +283,16 @@ 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);
@@ -316,7 +346,9 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
return getOrder();
case Model1Package.ORDER_DETAIL__PRODUCT:
if (resolve)
+ {
return getProduct();
+ }
return basicGetProduct();
case Model1Package.ORDER_DETAIL__PRICE:
return getPrice();
@@ -399,7 +431,9 @@ public class OrderDetailImpl extends EObjectImpl implements OrderDetail
public String toString()
{
if (eIsProxy())
+ {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (price: ");

Back to the top