org.omg.bpmn.bpmn2.impl.ConversationAssociationImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.omg.bpmn.model Show documentation
Show all versions of org.omg.bpmn.model Show documentation
Ecore and generated code for org.omg.bpmn2
The newest version!
/*
* Copyright (c) 2012 - 2024 Data In Motion and others.
* All rights reserved.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mark Hoffmann - initial API and implementation
*/
package org.omg.bpmn.bpmn2.impl;
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;
import org.omg.bpmn.bpmn2.Bpmn2Package;
import org.omg.bpmn.bpmn2.ConversationAssociation;
import org.omg.bpmn.bpmn2.ConversationNode;
/**
*
* An implementation of the model object 'Conversation Association'.
*
*
* The following features are implemented:
*
*
* - {@link org.omg.bpmn.bpmn2.impl.ConversationAssociationImpl#getInnerConversationNodeRef Inner Conversation Node Ref}
* - {@link org.omg.bpmn.bpmn2.impl.ConversationAssociationImpl#getOuterConversationNodeRef Outer Conversation Node Ref}
*
*
* @generated
*/
public class ConversationAssociationImpl extends BaseElementImpl implements ConversationAssociation {
/**
* The cached value of the '{@link #getInnerConversationNodeRef() Inner Conversation Node Ref}' reference.
*
*
* @see #getInnerConversationNodeRef()
* @generated
* @ordered
*/
protected ConversationNode innerConversationNodeRef;
/**
* The cached value of the '{@link #getOuterConversationNodeRef() Outer Conversation Node Ref}' reference.
*
*
* @see #getOuterConversationNodeRef()
* @generated
* @ordered
*/
protected ConversationNode outerConversationNodeRef;
/**
*
*
* @generated
*/
protected ConversationAssociationImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Bpmn2Package.eINSTANCE.getConversationAssociation();
}
/**
*
*
* @generated
*/
@Override
public ConversationNode getInnerConversationNodeRef() {
if (innerConversationNodeRef != null && innerConversationNodeRef.eIsProxy()) {
InternalEObject oldInnerConversationNodeRef = (InternalEObject)innerConversationNodeRef;
innerConversationNodeRef = (ConversationNode)eResolveProxy(oldInnerConversationNodeRef);
if (innerConversationNodeRef != oldInnerConversationNodeRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Bpmn2Package.CONVERSATION_ASSOCIATION__INNER_CONVERSATION_NODE_REF, oldInnerConversationNodeRef, innerConversationNodeRef));
}
}
return innerConversationNodeRef;
}
/**
*
*
* @generated
*/
public ConversationNode basicGetInnerConversationNodeRef() {
return innerConversationNodeRef;
}
/**
*
*
* @generated
*/
@Override
public void setInnerConversationNodeRef(ConversationNode newInnerConversationNodeRef) {
ConversationNode oldInnerConversationNodeRef = innerConversationNodeRef;
innerConversationNodeRef = newInnerConversationNodeRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.CONVERSATION_ASSOCIATION__INNER_CONVERSATION_NODE_REF, oldInnerConversationNodeRef, innerConversationNodeRef));
}
/**
*
*
* @generated
*/
@Override
public ConversationNode getOuterConversationNodeRef() {
if (outerConversationNodeRef != null && outerConversationNodeRef.eIsProxy()) {
InternalEObject oldOuterConversationNodeRef = (InternalEObject)outerConversationNodeRef;
outerConversationNodeRef = (ConversationNode)eResolveProxy(oldOuterConversationNodeRef);
if (outerConversationNodeRef != oldOuterConversationNodeRef) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Bpmn2Package.CONVERSATION_ASSOCIATION__OUTER_CONVERSATION_NODE_REF, oldOuterConversationNodeRef, outerConversationNodeRef));
}
}
return outerConversationNodeRef;
}
/**
*
*
* @generated
*/
public ConversationNode basicGetOuterConversationNodeRef() {
return outerConversationNodeRef;
}
/**
*
*
* @generated
*/
@Override
public void setOuterConversationNodeRef(ConversationNode newOuterConversationNodeRef) {
ConversationNode oldOuterConversationNodeRef = outerConversationNodeRef;
outerConversationNodeRef = newOuterConversationNodeRef;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.CONVERSATION_ASSOCIATION__OUTER_CONVERSATION_NODE_REF, oldOuterConversationNodeRef, outerConversationNodeRef));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Bpmn2Package.CONVERSATION_ASSOCIATION__INNER_CONVERSATION_NODE_REF:
if (resolve) return getInnerConversationNodeRef();
return basicGetInnerConversationNodeRef();
case Bpmn2Package.CONVERSATION_ASSOCIATION__OUTER_CONVERSATION_NODE_REF:
if (resolve) return getOuterConversationNodeRef();
return basicGetOuterConversationNodeRef();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Bpmn2Package.CONVERSATION_ASSOCIATION__INNER_CONVERSATION_NODE_REF:
setInnerConversationNodeRef((ConversationNode)newValue);
return;
case Bpmn2Package.CONVERSATION_ASSOCIATION__OUTER_CONVERSATION_NODE_REF:
setOuterConversationNodeRef((ConversationNode)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Bpmn2Package.CONVERSATION_ASSOCIATION__INNER_CONVERSATION_NODE_REF:
setInnerConversationNodeRef((ConversationNode)null);
return;
case Bpmn2Package.CONVERSATION_ASSOCIATION__OUTER_CONVERSATION_NODE_REF:
setOuterConversationNodeRef((ConversationNode)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Bpmn2Package.CONVERSATION_ASSOCIATION__INNER_CONVERSATION_NODE_REF:
return innerConversationNodeRef != null;
case Bpmn2Package.CONVERSATION_ASSOCIATION__OUTER_CONVERSATION_NODE_REF:
return outerConversationNodeRef != null;
}
return super.eIsSet(featureID);
}
} //ConversationAssociationImpl