1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.pcm.designdecision.impl; |
8 | |
9 | import de.uka.ipd.sdq.pcm.designdecision.ContinuousProcessingRateDegree; |
10 | import de.uka.ipd.sdq.pcm.designdecision.ProcessingRateDegree; |
11 | import de.uka.ipd.sdq.pcm.designdecision.ProcessingResourceDegree; |
12 | import de.uka.ipd.sdq.pcm.designdecision.designdecisionPackage; |
13 | |
14 | import de.uka.ipd.sdq.pcm.resourcetype.ProcessingResourceType; |
15 | |
16 | import org.eclipse.emf.common.notify.Notification; |
17 | |
18 | import org.eclipse.emf.ecore.EClass; |
19 | import org.eclipse.emf.ecore.InternalEObject; |
20 | |
21 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
22 | |
23 | /** |
24 | * <!-- begin-user-doc --> |
25 | * An implementation of the model object '<em><b>Continuous Processing Rate Degree</b></em>'. |
26 | * <!-- end-user-doc --> |
27 | * <p> |
28 | * The following features are implemented: |
29 | * <ul> |
30 | * <li>{@link de.uka.ipd.sdq.pcm.designdecision.impl.ContinuousProcessingRateDegreeImpl#getProcessingresourcetype <em>Processingresourcetype</em>}</li> |
31 | * </ul> |
32 | * </p> |
33 | * |
34 | * @generated |
35 | */ |
36 | public class ContinuousProcessingRateDegreeImpl extends ContinuousRangeDegreeImpl implements ContinuousProcessingRateDegree { |
37 | /** |
38 | * The cached value of the '{@link #getProcessingresourcetype() <em>Processingresourcetype</em>}' reference. |
39 | * <!-- begin-user-doc --> |
40 | * <!-- end-user-doc --> |
41 | * @see #getProcessingresourcetype() |
42 | * @generated |
43 | * @ordered |
44 | */ |
45 | protected ProcessingResourceType processingresourcetype; |
46 | |
47 | /** |
48 | * <!-- begin-user-doc --> |
49 | * <!-- end-user-doc --> |
50 | * @generated |
51 | */ |
52 | protected ContinuousProcessingRateDegreeImpl() { |
53 | super(); |
54 | } |
55 | |
56 | /** |
57 | * <!-- begin-user-doc --> |
58 | * <!-- end-user-doc --> |
59 | * @generated |
60 | */ |
61 | @Override |
62 | protected EClass eStaticClass() { |
63 | return designdecisionPackage.Literals.CONTINUOUS_PROCESSING_RATE_DEGREE; |
64 | } |
65 | |
66 | /** |
67 | * <!-- begin-user-doc --> |
68 | * <!-- end-user-doc --> |
69 | * @generated |
70 | */ |
71 | public ProcessingResourceType getProcessingresourcetype() { |
72 | if (processingresourcetype != null && processingresourcetype.eIsProxy()) { |
73 | InternalEObject oldProcessingresourcetype = (InternalEObject)processingresourcetype; |
74 | processingresourcetype = (ProcessingResourceType)eResolveProxy(oldProcessingresourcetype); |
75 | if (processingresourcetype != oldProcessingresourcetype) { |
76 | if (eNotificationRequired()) |
77 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, designdecisionPackage.CONTINUOUS_PROCESSING_RATE_DEGREE__PROCESSINGRESOURCETYPE, oldProcessingresourcetype, processingresourcetype)); |
78 | } |
79 | } |
80 | return processingresourcetype; |
81 | } |
82 | |
83 | /** |
84 | * <!-- begin-user-doc --> |
85 | * <!-- end-user-doc --> |
86 | * @generated |
87 | */ |
88 | public ProcessingResourceType basicGetProcessingresourcetype() { |
89 | return processingresourcetype; |
90 | } |
91 | |
92 | /** |
93 | * <!-- begin-user-doc --> |
94 | * <!-- end-user-doc --> |
95 | * @generated |
96 | */ |
97 | public void setProcessingresourcetype(ProcessingResourceType newProcessingresourcetype) { |
98 | ProcessingResourceType oldProcessingresourcetype = processingresourcetype; |
99 | processingresourcetype = newProcessingresourcetype; |
100 | if (eNotificationRequired()) |
101 | eNotify(new ENotificationImpl(this, Notification.SET, designdecisionPackage.CONTINUOUS_PROCESSING_RATE_DEGREE__PROCESSINGRESOURCETYPE, oldProcessingresourcetype, processingresourcetype)); |
102 | } |
103 | |
104 | /** |
105 | * <!-- begin-user-doc --> |
106 | * <!-- end-user-doc --> |
107 | * @generated |
108 | */ |
109 | @Override |
110 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
111 | switch (featureID) { |
112 | case designdecisionPackage.CONTINUOUS_PROCESSING_RATE_DEGREE__PROCESSINGRESOURCETYPE: |
113 | if (resolve) return getProcessingresourcetype(); |
114 | return basicGetProcessingresourcetype(); |
115 | } |
116 | return super.eGet(featureID, resolve, coreType); |
117 | } |
118 | |
119 | /** |
120 | * <!-- begin-user-doc --> |
121 | * <!-- end-user-doc --> |
122 | * @generated |
123 | */ |
124 | @Override |
125 | public void eSet(int featureID, Object newValue) { |
126 | switch (featureID) { |
127 | case designdecisionPackage.CONTINUOUS_PROCESSING_RATE_DEGREE__PROCESSINGRESOURCETYPE: |
128 | setProcessingresourcetype((ProcessingResourceType)newValue); |
129 | return; |
130 | } |
131 | super.eSet(featureID, newValue); |
132 | } |
133 | |
134 | /** |
135 | * <!-- begin-user-doc --> |
136 | * <!-- end-user-doc --> |
137 | * @generated |
138 | */ |
139 | @Override |
140 | public void eUnset(int featureID) { |
141 | switch (featureID) { |
142 | case designdecisionPackage.CONTINUOUS_PROCESSING_RATE_DEGREE__PROCESSINGRESOURCETYPE: |
143 | setProcessingresourcetype((ProcessingResourceType)null); |
144 | return; |
145 | } |
146 | super.eUnset(featureID); |
147 | } |
148 | |
149 | /** |
150 | * <!-- begin-user-doc --> |
151 | * <!-- end-user-doc --> |
152 | * @generated |
153 | */ |
154 | @Override |
155 | public boolean eIsSet(int featureID) { |
156 | switch (featureID) { |
157 | case designdecisionPackage.CONTINUOUS_PROCESSING_RATE_DEGREE__PROCESSINGRESOURCETYPE: |
158 | return processingresourcetype != null; |
159 | } |
160 | return super.eIsSet(featureID); |
161 | } |
162 | |
163 | /** |
164 | * <!-- begin-user-doc --> |
165 | * <!-- end-user-doc --> |
166 | * @generated |
167 | */ |
168 | @Override |
169 | public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { |
170 | if (baseClass == ProcessingResourceDegree.class) { |
171 | switch (derivedFeatureID) { |
172 | case designdecisionPackage.CONTINUOUS_PROCESSING_RATE_DEGREE__PROCESSINGRESOURCETYPE: return designdecisionPackage.PROCESSING_RESOURCE_DEGREE__PROCESSINGRESOURCETYPE; |
173 | default: return -1; |
174 | } |
175 | } |
176 | if (baseClass == ProcessingRateDegree.class) { |
177 | switch (derivedFeatureID) { |
178 | default: return -1; |
179 | } |
180 | } |
181 | return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); |
182 | } |
183 | |
184 | /** |
185 | * <!-- begin-user-doc --> |
186 | * <!-- end-user-doc --> |
187 | * @generated |
188 | */ |
189 | @Override |
190 | public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { |
191 | if (baseClass == ProcessingResourceDegree.class) { |
192 | switch (baseFeatureID) { |
193 | case designdecisionPackage.PROCESSING_RESOURCE_DEGREE__PROCESSINGRESOURCETYPE: return designdecisionPackage.CONTINUOUS_PROCESSING_RATE_DEGREE__PROCESSINGRESOURCETYPE; |
194 | default: return -1; |
195 | } |
196 | } |
197 | if (baseClass == ProcessingRateDegree.class) { |
198 | switch (baseFeatureID) { |
199 | default: return -1; |
200 | } |
201 | } |
202 | return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); |
203 | } |
204 | |
205 | } //ContinuousProcessingRateDegreeImpl |