/***************************************************************************** * Copyright (c) 2010 CEA LIST. * * * 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: * Chokri MRAIDHA (CEA LIST) chokri.mraidha@cea.fr - Initial API and implementation * *****************************************************************************/ package org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwGeneral.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwGeneral.HwGeneralPackage; import org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwGeneral.HwResourceService; import org.eclipse.papyrus.MARTE.MARTE_Foundations.GRM.impl.GrServiceImpl; /** * * An implementation of the model object 'Hw Resource Service'. * *

* The following features are implemented: *

*

* * @generated */ public class HwResourceServiceImpl extends GrServiceImpl implements HwResourceService { /** * The default value of the '{@link #getConsumption() Consumption}' attribute. * * * @see #getConsumption() * @generated * @ordered */ protected static final String CONSUMPTION_EDEFAULT = null; /** * The cached value of the '{@link #getConsumption() Consumption}' attribute. * * * @see #getConsumption() * @generated * @ordered */ protected String consumption = CONSUMPTION_EDEFAULT; /** * The default value of the '{@link #getDissipation() Dissipation}' attribute. * * * @see #getDissipation() * @generated * @ordered */ protected static final String DISSIPATION_EDEFAULT = null; /** * The cached value of the '{@link #getDissipation() Dissipation}' attribute. * * * @see #getDissipation() * @generated * @ordered */ protected String dissipation = DISSIPATION_EDEFAULT; /** * * * @generated */ protected HwResourceServiceImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return HwGeneralPackage.Literals.HW_RESOURCE_SERVICE; } /** * * * @generated */ public String getConsumption() { return consumption; } /** * * * @generated */ public void setConsumption(String newConsumption) { String oldConsumption = consumption; consumption = newConsumption; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, HwGeneralPackage.HW_RESOURCE_SERVICE__CONSUMPTION, oldConsumption, consumption)); } /** * * * @generated */ public String getDissipation() { return dissipation; } /** * * * @generated */ public void setDissipation(String newDissipation) { String oldDissipation = dissipation; dissipation = newDissipation; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, HwGeneralPackage.HW_RESOURCE_SERVICE__DISSIPATION, oldDissipation, dissipation)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case HwGeneralPackage.HW_RESOURCE_SERVICE__CONSUMPTION: return getConsumption(); case HwGeneralPackage.HW_RESOURCE_SERVICE__DISSIPATION: return getDissipation(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case HwGeneralPackage.HW_RESOURCE_SERVICE__CONSUMPTION: setConsumption((String)newValue); return; case HwGeneralPackage.HW_RESOURCE_SERVICE__DISSIPATION: setDissipation((String)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case HwGeneralPackage.HW_RESOURCE_SERVICE__CONSUMPTION: setConsumption(CONSUMPTION_EDEFAULT); return; case HwGeneralPackage.HW_RESOURCE_SERVICE__DISSIPATION: setDissipation(DISSIPATION_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case HwGeneralPackage.HW_RESOURCE_SERVICE__CONSUMPTION: return CONSUMPTION_EDEFAULT == null ? consumption != null : !CONSUMPTION_EDEFAULT.equals(consumption); case HwGeneralPackage.HW_RESOURCE_SERVICE__DISSIPATION: return DISSIPATION_EDEFAULT == null ? dissipation != null : !DISSIPATION_EDEFAULT.equals(dissipation); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (consumption: "); result.append(consumption); result.append(", dissipation: "); result.append(dissipation); result.append(')'); return result.toString(); } } //HwResourceServiceImpl