| /** |
| * <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: PartnerLinkExtensionImpl.java,v 1.4 2011/02/11 16:43:04 vzurczak Exp $ |
| */ |
| package org.eclipse.bpel.ui.uiextensionmodel.impl; |
| |
| import org.eclipse.bpel.ui.uiextensionmodel.PartnerLinkExtension; |
| 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>Partner Link Extension</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.bpel.ui.uiextensionmodel.impl.PartnerLinkExtensionImpl#getPartnerKind <em>Partner Kind</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class PartnerLinkExtensionImpl extends EObjectImpl implements PartnerLinkExtension { |
| /** |
| * The default value of the '{@link #getPartnerKind() <em>Partner Kind</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPartnerKind() |
| * @generated |
| * @ordered |
| */ |
| protected static final int PARTNER_KIND_EDEFAULT = 0; |
| |
| /** |
| * The cached value of the '{@link #getPartnerKind() <em>Partner Kind</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPartnerKind() |
| * @generated |
| * @ordered |
| */ |
| protected int partnerKind = PARTNER_KIND_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected PartnerLinkExtensionImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return UiextensionmodelPackage.Literals.PARTNER_LINK_EXTENSION; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int getPartnerKind() { |
| return partnerKind; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPartnerKind(int newPartnerKind) { |
| int oldPartnerKind = partnerKind; |
| partnerKind = newPartnerKind; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, UiextensionmodelPackage.PARTNER_LINK_EXTENSION__PARTNER_KIND, oldPartnerKind, partnerKind)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case UiextensionmodelPackage.PARTNER_LINK_EXTENSION__PARTNER_KIND: |
| return Integer.valueOf( getPartnerKind()); |
| } |
| 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.PARTNER_LINK_EXTENSION__PARTNER_KIND: |
| setPartnerKind(((Integer)newValue).intValue()); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case UiextensionmodelPackage.PARTNER_LINK_EXTENSION__PARTNER_KIND: |
| setPartnerKind(PARTNER_KIND_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case UiextensionmodelPackage.PARTNER_LINK_EXTENSION__PARTNER_KIND: |
| return partnerKind != PARTNER_KIND_EDEFAULT; |
| } |
| 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(" (partnerKind: "); |
| result.append(partnerKind); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //PartnerLinkExtensionImpl |