| 1 | /** |
| 2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.pcm.qosannotations.qos_performance.impl; |
| 7 | |
| 8 | import org.eclipse.emf.common.notify.Notification; |
| 9 | import org.eclipse.emf.common.notify.NotificationChain; |
| 10 | import org.eclipse.emf.ecore.EClass; |
| 11 | import org.eclipse.emf.ecore.InternalEObject; |
| 12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| 13 | |
| 14 | import de.uka.ipd.sdq.pcm.core.CorePackage; |
| 15 | import de.uka.ipd.sdq.pcm.core.PCMRandomVariable; |
| 16 | import de.uka.ipd.sdq.pcm.qosannotations.impl.SpecifiedQoSAnnotationImpl; |
| 17 | import de.uka.ipd.sdq.pcm.qosannotations.qos_performance.Qos_performancePackage; |
| 18 | import de.uka.ipd.sdq.pcm.qosannotations.qos_performance.SpecifiedExecutionTime; |
| 19 | |
| 20 | /** |
| 21 | * <!-- begin-user-doc --> |
| 22 | * An implementation of the model object '<em><b>Specified Execution Time</b></em>'. |
| 23 | * <!-- end-user-doc --> |
| 24 | * <p> |
| 25 | * The following features are implemented: |
| 26 | * <ul> |
| 27 | * <li>{@link de.uka.ipd.sdq.pcm.qosannotations.qos_performance.impl.SpecifiedExecutionTimeImpl#getSpecification_SpecifiedExecutionTime <em>Specification Specified Execution Time</em>}</li> |
| 28 | * </ul> |
| 29 | * </p> |
| 30 | * |
| 31 | * @generated |
| 32 | */ |
| 33 | public abstract class SpecifiedExecutionTimeImpl extends SpecifiedQoSAnnotationImpl implements SpecifiedExecutionTime { |
| 34 | /** |
| 35 | * <!-- begin-user-doc --> |
| 36 | * <!-- end-user-doc --> |
| 37 | * @generated |
| 38 | */ |
| 39 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
| 40 | |
| 41 | /** |
| 42 | * The cached value of the '{@link #getSpecification_SpecifiedExecutionTime() <em>Specification Specified Execution Time</em>}' containment reference. |
| 43 | * <!-- begin-user-doc --> |
| 44 | * <!-- end-user-doc --> |
| 45 | * @see #getSpecification_SpecifiedExecutionTime() |
| 46 | * @generated |
| 47 | * @ordered |
| 48 | */ |
| 49 | protected PCMRandomVariable specification_SpecifiedExecutionTime; |
| 50 | |
| 51 | /** |
| 52 | * <!-- begin-user-doc --> |
| 53 | * <!-- end-user-doc --> |
| 54 | * @generated |
| 55 | */ |
| 56 | protected SpecifiedExecutionTimeImpl() { |
| 57 | super(); |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * <!-- begin-user-doc --> |
| 62 | * <!-- end-user-doc --> |
| 63 | * @generated |
| 64 | */ |
| 65 | @Override |
| 66 | protected EClass eStaticClass() { |
| 67 | return Qos_performancePackage.Literals.SPECIFIED_EXECUTION_TIME; |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * <!-- begin-user-doc --> |
| 72 | * <!-- end-user-doc --> |
| 73 | * @generated |
| 74 | */ |
| 75 | public PCMRandomVariable getSpecification_SpecifiedExecutionTime() { |
| 76 | return specification_SpecifiedExecutionTime; |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * <!-- begin-user-doc --> |
| 81 | * <!-- end-user-doc --> |
| 82 | * @generated |
| 83 | */ |
| 84 | public NotificationChain basicSetSpecification_SpecifiedExecutionTime(PCMRandomVariable newSpecification_SpecifiedExecutionTime, NotificationChain msgs) { |
| 85 | PCMRandomVariable oldSpecification_SpecifiedExecutionTime = specification_SpecifiedExecutionTime; |
| 86 | specification_SpecifiedExecutionTime = newSpecification_SpecifiedExecutionTime; |
| 87 | if (eNotificationRequired()) { |
| 88 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Qos_performancePackage.SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME, oldSpecification_SpecifiedExecutionTime, newSpecification_SpecifiedExecutionTime); |
| 89 | if (msgs == null) msgs = notification; else msgs.add(notification); |
| 90 | } |
| 91 | return msgs; |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * <!-- begin-user-doc --> |
| 96 | * <!-- end-user-doc --> |
| 97 | * @generated |
| 98 | */ |
| 99 | public void setSpecification_SpecifiedExecutionTime(PCMRandomVariable newSpecification_SpecifiedExecutionTime) { |
| 100 | if (newSpecification_SpecifiedExecutionTime != specification_SpecifiedExecutionTime) { |
| 101 | NotificationChain msgs = null; |
| 102 | if (specification_SpecifiedExecutionTime != null) |
| 103 | msgs = ((InternalEObject)specification_SpecifiedExecutionTime).eInverseRemove(this, CorePackage.PCM_RANDOM_VARIABLE__SPECIFIED_EXECUTION_TIME_PCM_RANDOM_VARIABLE, PCMRandomVariable.class, msgs); |
| 104 | if (newSpecification_SpecifiedExecutionTime != null) |
| 105 | msgs = ((InternalEObject)newSpecification_SpecifiedExecutionTime).eInverseAdd(this, CorePackage.PCM_RANDOM_VARIABLE__SPECIFIED_EXECUTION_TIME_PCM_RANDOM_VARIABLE, PCMRandomVariable.class, msgs); |
| 106 | msgs = basicSetSpecification_SpecifiedExecutionTime(newSpecification_SpecifiedExecutionTime, msgs); |
| 107 | if (msgs != null) msgs.dispatch(); |
| 108 | } |
| 109 | else if (eNotificationRequired()) |
| 110 | eNotify(new ENotificationImpl(this, Notification.SET, Qos_performancePackage.SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME, newSpecification_SpecifiedExecutionTime, newSpecification_SpecifiedExecutionTime)); |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * <!-- begin-user-doc --> |
| 115 | * <!-- end-user-doc --> |
| 116 | * @generated |
| 117 | */ |
| 118 | @Override |
| 119 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 120 | switch (featureID) { |
| 121 | case Qos_performancePackage.SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME: |
| 122 | if (specification_SpecifiedExecutionTime != null) |
| 123 | msgs = ((InternalEObject)specification_SpecifiedExecutionTime).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Qos_performancePackage.SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME, null, msgs); |
| 124 | return basicSetSpecification_SpecifiedExecutionTime((PCMRandomVariable)otherEnd, msgs); |
| 125 | } |
| 126 | return super.eInverseAdd(otherEnd, featureID, msgs); |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * <!-- begin-user-doc --> |
| 131 | * <!-- end-user-doc --> |
| 132 | * @generated |
| 133 | */ |
| 134 | @Override |
| 135 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 136 | switch (featureID) { |
| 137 | case Qos_performancePackage.SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME: |
| 138 | return basicSetSpecification_SpecifiedExecutionTime(null, msgs); |
| 139 | } |
| 140 | return super.eInverseRemove(otherEnd, featureID, msgs); |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * <!-- begin-user-doc --> |
| 145 | * <!-- end-user-doc --> |
| 146 | * @generated |
| 147 | */ |
| 148 | @Override |
| 149 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| 150 | switch (featureID) { |
| 151 | case Qos_performancePackage.SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME: |
| 152 | return getSpecification_SpecifiedExecutionTime(); |
| 153 | } |
| 154 | return super.eGet(featureID, resolve, coreType); |
| 155 | } |
| 156 | |
| 157 | /** |
| 158 | * <!-- begin-user-doc --> |
| 159 | * <!-- end-user-doc --> |
| 160 | * @generated |
| 161 | */ |
| 162 | @Override |
| 163 | public void eSet(int featureID, Object newValue) { |
| 164 | switch (featureID) { |
| 165 | case Qos_performancePackage.SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME: |
| 166 | setSpecification_SpecifiedExecutionTime((PCMRandomVariable)newValue); |
| 167 | return; |
| 168 | } |
| 169 | super.eSet(featureID, newValue); |
| 170 | } |
| 171 | |
| 172 | /** |
| 173 | * <!-- begin-user-doc --> |
| 174 | * <!-- end-user-doc --> |
| 175 | * @generated |
| 176 | */ |
| 177 | @Override |
| 178 | public void eUnset(int featureID) { |
| 179 | switch (featureID) { |
| 180 | case Qos_performancePackage.SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME: |
| 181 | setSpecification_SpecifiedExecutionTime((PCMRandomVariable)null); |
| 182 | return; |
| 183 | } |
| 184 | super.eUnset(featureID); |
| 185 | } |
| 186 | |
| 187 | /** |
| 188 | * <!-- begin-user-doc --> |
| 189 | * <!-- end-user-doc --> |
| 190 | * @generated |
| 191 | */ |
| 192 | @Override |
| 193 | public boolean eIsSet(int featureID) { |
| 194 | switch (featureID) { |
| 195 | case Qos_performancePackage.SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME: |
| 196 | return specification_SpecifiedExecutionTime != null; |
| 197 | } |
| 198 | return super.eIsSet(featureID); |
| 199 | } |
| 200 | |
| 201 | } //SpecifiedExecutionTimeImpl |