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

org.eclipse.bpmn2.impl.ThrowEventImpl Maven / Gradle / Ivy

There is a newer version: 7.54.0.Final
Show newest version
/**
 * 
 * 
 * Copyright (c) 2010 SAP AG.
 * 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:
 *    Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation
 * 
 * 
 */
package org.eclipse.bpmn2.impl;

import com.google.gwt.user.client.rpc.GwtTransient;

import java.util.Collection;

import org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.DataInput;
import org.eclipse.bpmn2.DataInputAssociation;
import org.eclipse.bpmn2.EventDefinition;
import org.eclipse.bpmn2.InputSet;
import org.eclipse.bpmn2.ThrowEvent;

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

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * 
 * An implementation of the model object 'Throw Event'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.eclipse.bpmn2.impl.ThrowEventImpl#getDataInputs Data Inputs}
  • *
  • {@link org.eclipse.bpmn2.impl.ThrowEventImpl#getDataInputAssociation Data Input Association}
  • *
  • {@link org.eclipse.bpmn2.impl.ThrowEventImpl#getInputSet Input Set}
  • *
  • {@link org.eclipse.bpmn2.impl.ThrowEventImpl#getEventDefinitions Event Definitions}
  • *
  • {@link org.eclipse.bpmn2.impl.ThrowEventImpl#getEventDefinitionRefs Event Definition Refs}
  • *
* * @generated */ public abstract class ThrowEventImpl extends EventImpl implements ThrowEvent { /** * The cached value of the '{@link #getDataInputs() Data Inputs}' containment reference list. * * * @see #getDataInputs() * @generated * @ordered */ @GwtTransient protected EList dataInputs; /** * The cached value of the '{@link #getDataInputAssociation() Data Input Association}' containment reference list. * * * @see #getDataInputAssociation() * @generated * @ordered */ @GwtTransient protected EList dataInputAssociation; /** * The cached value of the '{@link #getInputSet() Input Set}' containment reference. * * * @see #getInputSet() * @generated * @ordered */ @GwtTransient protected InputSet inputSet; /** * The cached value of the '{@link #getEventDefinitions() Event Definitions}' containment reference list. * * * @see #getEventDefinitions() * @generated * @ordered */ @GwtTransient protected EList eventDefinitions; /** * The cached value of the '{@link #getEventDefinitionRefs() Event Definition Refs}' reference list. * * * @see #getEventDefinitionRefs() * @generated * @ordered */ @GwtTransient protected EList eventDefinitionRefs; /** * * * @generated */ protected ThrowEventImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Bpmn2Package.Literals.THROW_EVENT; } /** * * * @generated */ @Override public EList getDataInputs() { if (dataInputs == null) { dataInputs = new EObjectContainmentEList(DataInput.class, this, Bpmn2Package.THROW_EVENT__DATA_INPUTS); } return dataInputs; } /** * * * @generated */ @Override public EList getDataInputAssociation() { if (dataInputAssociation == null) { dataInputAssociation = new EObjectContainmentEList(DataInputAssociation.class, this, Bpmn2Package.THROW_EVENT__DATA_INPUT_ASSOCIATION); } return dataInputAssociation; } /** * * * @generated */ @Override public InputSet getInputSet() { return inputSet; } /** * * * @generated */ public NotificationChain basicSetInputSet(InputSet newInputSet, NotificationChain msgs) { InputSet oldInputSet = inputSet; inputSet = newInputSet; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bpmn2Package.THROW_EVENT__INPUT_SET, oldInputSet, newInputSet); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setInputSet(InputSet newInputSet) { if (newInputSet != inputSet) { NotificationChain msgs = null; if (inputSet != null) msgs = ((InternalEObject) inputSet).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Bpmn2Package.THROW_EVENT__INPUT_SET, null, msgs); if (newInputSet != null) msgs = ((InternalEObject) newInputSet).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Bpmn2Package.THROW_EVENT__INPUT_SET, null, msgs); msgs = basicSetInputSet(newInputSet, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.THROW_EVENT__INPUT_SET, newInputSet, newInputSet)); } /** * * * @generated */ @Override public EList getEventDefinitions() { if (eventDefinitions == null) { eventDefinitions = new EObjectContainmentEList(EventDefinition.class, this, Bpmn2Package.THROW_EVENT__EVENT_DEFINITIONS); } return eventDefinitions; } /** * * * @generated */ @Override public EList getEventDefinitionRefs() { if (eventDefinitionRefs == null) { eventDefinitionRefs = new EObjectResolvingEList(EventDefinition.class, this, Bpmn2Package.THROW_EVENT__EVENT_DEFINITION_REFS); } return eventDefinitionRefs; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case Bpmn2Package.THROW_EVENT__DATA_INPUTS: return ((InternalEList) getDataInputs()).basicRemove(otherEnd, msgs); case Bpmn2Package.THROW_EVENT__DATA_INPUT_ASSOCIATION: return ((InternalEList) getDataInputAssociation()).basicRemove(otherEnd, msgs); case Bpmn2Package.THROW_EVENT__INPUT_SET: return basicSetInputSet(null, msgs); case Bpmn2Package.THROW_EVENT__EVENT_DEFINITIONS: return ((InternalEList) getEventDefinitions()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Bpmn2Package.THROW_EVENT__DATA_INPUTS: return getDataInputs(); case Bpmn2Package.THROW_EVENT__DATA_INPUT_ASSOCIATION: return getDataInputAssociation(); case Bpmn2Package.THROW_EVENT__INPUT_SET: return getInputSet(); case Bpmn2Package.THROW_EVENT__EVENT_DEFINITIONS: return getEventDefinitions(); case Bpmn2Package.THROW_EVENT__EVENT_DEFINITION_REFS: return getEventDefinitionRefs(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Bpmn2Package.THROW_EVENT__DATA_INPUTS: getDataInputs().clear(); getDataInputs().addAll((Collection) newValue); return; case Bpmn2Package.THROW_EVENT__DATA_INPUT_ASSOCIATION: getDataInputAssociation().clear(); getDataInputAssociation().addAll((Collection) newValue); return; case Bpmn2Package.THROW_EVENT__INPUT_SET: setInputSet((InputSet) newValue); return; case Bpmn2Package.THROW_EVENT__EVENT_DEFINITIONS: getEventDefinitions().clear(); getEventDefinitions().addAll((Collection) newValue); return; case Bpmn2Package.THROW_EVENT__EVENT_DEFINITION_REFS: getEventDefinitionRefs().clear(); getEventDefinitionRefs().addAll((Collection) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Bpmn2Package.THROW_EVENT__DATA_INPUTS: getDataInputs().clear(); return; case Bpmn2Package.THROW_EVENT__DATA_INPUT_ASSOCIATION: getDataInputAssociation().clear(); return; case Bpmn2Package.THROW_EVENT__INPUT_SET: setInputSet((InputSet) null); return; case Bpmn2Package.THROW_EVENT__EVENT_DEFINITIONS: getEventDefinitions().clear(); return; case Bpmn2Package.THROW_EVENT__EVENT_DEFINITION_REFS: getEventDefinitionRefs().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Bpmn2Package.THROW_EVENT__DATA_INPUTS: return dataInputs != null && !dataInputs.isEmpty(); case Bpmn2Package.THROW_EVENT__DATA_INPUT_ASSOCIATION: return dataInputAssociation != null && !dataInputAssociation.isEmpty(); case Bpmn2Package.THROW_EVENT__INPUT_SET: return inputSet != null; case Bpmn2Package.THROW_EVENT__EVENT_DEFINITIONS: return eventDefinitions != null && !eventDefinitions.isEmpty(); case Bpmn2Package.THROW_EVENT__EVENT_DEFINITION_REFS: return eventDefinitionRefs != null && !eventDefinitionRefs.isEmpty(); } return super.eIsSet(featureID); } } //ThrowEventImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy