/** * <copyright> * Copyright (c) 2005, 2012 IBM Corporation and others. * 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: * IBM Corporation - initial API and implementation * </copyright> * * $Id: OnEventExtensionImpl.java,v 1.3 2008/05/04 11:05:28 odanilov Exp $ */ package org.eclipse.bpel.ui.uiextensionmodel.impl; import org.eclipse.bpel.ui.uiextensionmodel.OnEventExtension; import org.eclipse.bpel.ui.uiextensionmodel.UiextensionmodelPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>On Event Extension</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link org.eclipse.bpel.ui.uiextensionmodel.impl.OnEventExtensionImpl#getDisplayName <em>Display Name</em>}</li> * </ul> * </p> * * @generated */ public class OnEventExtensionImpl extends EObjectImpl implements OnEventExtension { /** * The default value of the '{@link #getDisplayName() <em>Display Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDisplayName() * @generated * @ordered */ protected static final String DISPLAY_NAME_EDEFAULT = null; /** * The cached value of the '{@link #getDisplayName() <em>Display Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDisplayName() * @generated * @ordered */ protected String displayName = DISPLAY_NAME_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected OnEventExtensionImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return UiextensionmodelPackage.Literals.ON_EVENT_EXTENSION; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getDisplayName() { return displayName; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDisplayName(String newDisplayName) { String oldDisplayName = displayName; displayName = newDisplayName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, UiextensionmodelPackage.ON_EVENT_EXTENSION__DISPLAY_NAME, oldDisplayName, displayName)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case UiextensionmodelPackage.ON_EVENT_EXTENSION__DISPLAY_NAME: return getDisplayName(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case UiextensionmodelPackage.ON_EVENT_EXTENSION__DISPLAY_NAME: setDisplayName((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case UiextensionmodelPackage.ON_EVENT_EXTENSION__DISPLAY_NAME: setDisplayName(DISPLAY_NAME_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case UiextensionmodelPackage.ON_EVENT_EXTENSION__DISPLAY_NAME: return DISPLAY_NAME_EDEFAULT == null ? displayName != null : !DISPLAY_NAME_EDEFAULT.equals(displayName); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (displayName: "); result.append(displayName); result.append(')'); return result.toString(); } } //OnEventExtensionImpl