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

org.eclipse.bpmn2.impl.MessageImpl 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 org.eclipse.bpmn2.Bpmn2Package;
import org.eclipse.bpmn2.ItemDefinition;
import org.eclipse.bpmn2.Message;

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 'Message'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.eclipse.bpmn2.impl.MessageImpl#getItemRef Item Ref}
  • *
  • {@link org.eclipse.bpmn2.impl.MessageImpl#getName Name}
  • *
* * @generated */ public class MessageImpl extends RootElementImpl implements Message { /** * The cached value of the '{@link #getItemRef() Item Ref}' reference. * * * @see #getItemRef() * @generated * @ordered */ @GwtTransient protected ItemDefinition itemRef; /** * The default value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ protected static final String NAME_EDEFAULT = null; /** * The cached value of the '{@link #getName() Name}' attribute. * * * @see #getName() * @generated * @ordered */ @GwtTransient protected String name = NAME_EDEFAULT; /** * * * @generated */ protected MessageImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return Bpmn2Package.Literals.MESSAGE; } /** * * * @generated */ @Override public ItemDefinition getItemRef() { if (itemRef != null && itemRef.eIsProxy()) { InternalEObject oldItemRef = (InternalEObject) itemRef; itemRef = (ItemDefinition) eResolveProxy(oldItemRef); if (itemRef != oldItemRef) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, Bpmn2Package.MESSAGE__ITEM_REF, oldItemRef, itemRef)); } } return itemRef; } /** * * * @generated */ public ItemDefinition basicGetItemRef() { return itemRef; } /** * * * @generated */ @Override public void setItemRef(ItemDefinition newItemRef) { ItemDefinition oldItemRef = itemRef; itemRef = newItemRef; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.MESSAGE__ITEM_REF, oldItemRef, itemRef)); } /** * * * @generated */ @Override public String getName() { return name; } /** * * * @generated */ @Override public void setName(String newName) { String oldName = name; name = newName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, Bpmn2Package.MESSAGE__NAME, oldName, name)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case Bpmn2Package.MESSAGE__ITEM_REF: if (resolve) return getItemRef(); return basicGetItemRef(); case Bpmn2Package.MESSAGE__NAME: return getName(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case Bpmn2Package.MESSAGE__ITEM_REF: setItemRef((ItemDefinition) newValue); return; case Bpmn2Package.MESSAGE__NAME: setName((String) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case Bpmn2Package.MESSAGE__ITEM_REF: setItemRef((ItemDefinition) null); return; case Bpmn2Package.MESSAGE__NAME: setName(NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case Bpmn2Package.MESSAGE__ITEM_REF: return itemRef != null; case Bpmn2Package.MESSAGE__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (name: "); result.append(name); result.append(')'); return result.toString(); } } //MessageImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy