Switch to side-by-side view

--- a
+++ b/src/main/java/genericbcm/impl/LogicalGroupMemberLinkImpl.java
@@ -0,0 +1,270 @@
+/**
+ */
+package genericbcm.impl;
+
+import genericbcm.GenericbcmPackage;
+import genericbcm.LogicalGroup;
+import genericbcm.LogicalGroupMemberLink;
+import genericbcm.Unit;
+
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Logical Group Member Link</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link genericbcm.impl.LogicalGroupMemberLinkImpl#getFrom <em>From</em>}</li>
+ *   <li>{@link genericbcm.impl.LogicalGroupMemberLinkImpl#getTo <em>To</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class LogicalGroupMemberLinkImpl extends NameableImpl implements LogicalGroupMemberLink {
+	/**
+	 * The cached value of the '{@link #getFrom() <em>From</em>}' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getFrom()
+	 * @generated
+	 * @ordered
+	 */
+	protected LogicalGroup from;
+
+	/**
+	 * The cached value of the '{@link #getTo() <em>To</em>}' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTo()
+	 * @generated
+	 * @ordered
+	 */
+	protected Unit to;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected LogicalGroupMemberLinkImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return GenericbcmPackage.Literals.LOGICAL_GROUP_MEMBER_LINK;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public LogicalGroup getFrom() {
+		if (from != null && from.eIsProxy()) {
+			InternalEObject oldFrom = (InternalEObject)from;
+			from = (LogicalGroup)eResolveProxy(oldFrom);
+			if (from != oldFrom) {
+				if (eNotificationRequired())
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__FROM, oldFrom, from));
+			}
+		}
+		return from;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public LogicalGroup basicGetFrom() {
+		return from;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setFrom(LogicalGroup newFrom) {
+		LogicalGroup oldFrom = from;
+		from = newFrom;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__FROM, oldFrom, from));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Unit getTo() {
+		if (to != null && to.eIsProxy()) {
+			InternalEObject oldTo = (InternalEObject)to;
+			to = (Unit)eResolveProxy(oldTo);
+			if (to != oldTo) {
+				if (eNotificationRequired())
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__TO, oldTo, to));
+			}
+		}
+		return to;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Unit basicGetTo() {
+		return to;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetTo(Unit newTo, NotificationChain msgs) {
+		Unit oldTo = to;
+		to = newTo;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__TO, oldTo, newTo);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setTo(Unit newTo) {
+		if (newTo != to) {
+			NotificationChain msgs = null;
+			if (to != null)
+				msgs = ((InternalEObject)to).eInverseRemove(this, GenericbcmPackage.UNIT__MEMBER_OF_LOGICAL_GROUP, Unit.class, msgs);
+			if (newTo != null)
+				msgs = ((InternalEObject)newTo).eInverseAdd(this, GenericbcmPackage.UNIT__MEMBER_OF_LOGICAL_GROUP, Unit.class, msgs);
+			msgs = basicSetTo(newTo, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__TO, newTo, newTo));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__TO:
+				if (to != null)
+					msgs = ((InternalEObject)to).eInverseRemove(this, GenericbcmPackage.UNIT__MEMBER_OF_LOGICAL_GROUP, Unit.class, msgs);
+				return basicSetTo((Unit)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 GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__TO:
+				return basicSetTo(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__FROM:
+				if (resolve) return getFrom();
+				return basicGetFrom();
+			case GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__TO:
+				if (resolve) return getTo();
+				return basicGetTo();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__FROM:
+				setFrom((LogicalGroup)newValue);
+				return;
+			case GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__TO:
+				setTo((Unit)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__FROM:
+				setFrom((LogicalGroup)null);
+				return;
+			case GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__TO:
+				setTo((Unit)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__FROM:
+				return from != null;
+			case GenericbcmPackage.LOGICAL_GROUP_MEMBER_LINK__TO:
+				return to != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+} //LogicalGroupMemberLinkImpl