All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.contextmapper.dsl.contextMappingDSL.impl.SymmetricRelationshipImpl Maven / Gradle / Ivy

There is a newer version: 6.12.0
Show newest version
/**
 * generated by Xtext 2.20.0
 */
package org.contextmapper.dsl.contextMappingDSL.impl;

import org.contextmapper.dsl.contextMappingDSL.BoundedContext;
import org.contextmapper.dsl.contextMappingDSL.ContextMappingDSLPackage;
import org.contextmapper.dsl.contextMappingDSL.SymmetricRelationship;

import org.eclipse.emf.common.notify.Notification;

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 'Symmetric Relationship'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.SymmetricRelationshipImpl#getParticipant1 Participant1}
  • *
  • {@link org.contextmapper.dsl.contextMappingDSL.impl.SymmetricRelationshipImpl#getParticipant2 Participant2}
  • *
* * @generated */ public class SymmetricRelationshipImpl extends RelationshipImpl implements SymmetricRelationship { /** * The cached value of the '{@link #getParticipant1() Participant1}' reference. * * * @see #getParticipant1() * @generated * @ordered */ protected BoundedContext participant1; /** * The cached value of the '{@link #getParticipant2() Participant2}' reference. * * * @see #getParticipant2() * @generated * @ordered */ protected BoundedContext participant2; /** * * * @generated */ protected SymmetricRelationshipImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ContextMappingDSLPackage.Literals.SYMMETRIC_RELATIONSHIP; } /** * * * @generated */ public BoundedContext getParticipant1() { if (participant1 != null && participant1.eIsProxy()) { InternalEObject oldParticipant1 = (InternalEObject)participant1; participant1 = (BoundedContext)eResolveProxy(oldParticipant1); if (participant1 != oldParticipant1) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT1, oldParticipant1, participant1)); } } return participant1; } /** * * * @generated */ public BoundedContext basicGetParticipant1() { return participant1; } /** * * * @generated */ public void setParticipant1(BoundedContext newParticipant1) { BoundedContext oldParticipant1 = participant1; participant1 = newParticipant1; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT1, oldParticipant1, participant1)); } /** * * * @generated */ public BoundedContext getParticipant2() { if (participant2 != null && participant2.eIsProxy()) { InternalEObject oldParticipant2 = (InternalEObject)participant2; participant2 = (BoundedContext)eResolveProxy(oldParticipant2); if (participant2 != oldParticipant2) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT2, oldParticipant2, participant2)); } } return participant2; } /** * * * @generated */ public BoundedContext basicGetParticipant2() { return participant2; } /** * * * @generated */ public void setParticipant2(BoundedContext newParticipant2) { BoundedContext oldParticipant2 = participant2; participant2 = newParticipant2; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT2, oldParticipant2, participant2)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT1: if (resolve) return getParticipant1(); return basicGetParticipant1(); case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT2: if (resolve) return getParticipant2(); return basicGetParticipant2(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT1: setParticipant1((BoundedContext)newValue); return; case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT2: setParticipant2((BoundedContext)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT1: setParticipant1((BoundedContext)null); return; case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT2: setParticipant2((BoundedContext)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT1: return participant1 != null; case ContextMappingDSLPackage.SYMMETRIC_RELATIONSHIP__PARTICIPANT2: return participant2 != null; } return super.eIsSet(featureID); } } //SymmetricRelationshipImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy