1 | /** |
2 | * Copyright 2006, SDQ Group, University Karlsruhe (TH) |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.context.aggregatedUsageContext.impl; |
7 | |
8 | import java.util.Collection; |
9 | |
10 | import org.eclipse.emf.common.notify.Notification; |
11 | import org.eclipse.emf.common.notify.NotificationChain; |
12 | import org.eclipse.emf.common.util.EList; |
13 | import org.eclipse.emf.ecore.EClass; |
14 | import org.eclipse.emf.ecore.InternalEObject; |
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
16 | import org.eclipse.emf.ecore.impl.EObjectImpl; |
17 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
18 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; |
19 | import org.eclipse.emf.ecore.util.InternalEList; |
20 | |
21 | import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedCommunication; |
22 | import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedResourceDemand; |
23 | import de.uka.ipd.sdq.context.aggregatedUsageContext.AggregatedUsageContextPackage; |
24 | import de.uka.ipd.sdq.context.aggregatedUsageContext.ServiceExecutionContext; |
25 | import de.uka.ipd.sdq.pcm.allocation.AllocationContext; |
26 | import de.uka.ipd.sdq.pcm.seff.ResourceDemandingSEFF; |
27 | import de.uka.ipd.sdq.pcm.usagemodel.UsageScenario; |
28 | |
29 | /** |
30 | * <!-- begin-user-doc --> |
31 | * An implementation of the model object '<em><b>Service Execution Context</b></em>'. |
32 | * <!-- end-user-doc --> |
33 | * <p> |
34 | * The following features are implemented: |
35 | * <ul> |
36 | * <li>{@link de.uka.ipd.sdq.context.aggregatedUsageContext.impl.ServiceExecutionContextImpl#getGlobalExecutionFrequency <em>Global Execution Frequency</em>}</li> |
37 | * <li>{@link de.uka.ipd.sdq.context.aggregatedUsageContext.impl.ServiceExecutionContextImpl#getAllocationContext_ServiceExecutionContext <em>Allocation Context Service Execution Context</em>}</li> |
38 | * <li>{@link de.uka.ipd.sdq.context.aggregatedUsageContext.impl.ServiceExecutionContextImpl#getDescribedSEFF_ServiceExecutionContext <em>Described SEFF Service Execution Context</em>}</li> |
39 | * <li>{@link de.uka.ipd.sdq.context.aggregatedUsageContext.impl.ServiceExecutionContextImpl#getAggregatedResourceDemands_ServiceExecutionContext <em>Aggregated Resource Demands Service Execution Context</em>}</li> |
40 | * <li>{@link de.uka.ipd.sdq.context.aggregatedUsageContext.impl.ServiceExecutionContextImpl#getUsageScenario_ServiceExecutionContext <em>Usage Scenario Service Execution Context</em>}</li> |
41 | * <li>{@link de.uka.ipd.sdq.context.aggregatedUsageContext.impl.ServiceExecutionContextImpl#getSentAggregatedCommunications_ServiceExecutionContext <em>Sent Aggregated Communications Service Execution Context</em>}</li> |
42 | * <li>{@link de.uka.ipd.sdq.context.aggregatedUsageContext.impl.ServiceExecutionContextImpl#getReceivedAggregatedCommunication_AggregatedCommunication <em>Received Aggregated Communication Aggregated Communication</em>}</li> |
43 | * </ul> |
44 | * </p> |
45 | * |
46 | * @generated |
47 | */ |
48 | public class ServiceExecutionContextImpl extends EObjectImpl implements ServiceExecutionContext { |
49 | /** |
50 | * <!-- begin-user-doc --> |
51 | * <!-- end-user-doc --> |
52 | * @generated |
53 | */ |
54 | public static final String copyright = "Copyright 2006, SDQ Group, University Karlsruhe (TH)"; |
55 | |
56 | /** |
57 | * The default value of the '{@link #getGlobalExecutionFrequency() <em>Global Execution Frequency</em>}' attribute. |
58 | * <!-- begin-user-doc --> |
59 | * <!-- end-user-doc --> |
60 | * @see #getGlobalExecutionFrequency() |
61 | * @generated |
62 | * @ordered |
63 | */ |
64 | protected static final double GLOBAL_EXECUTION_FREQUENCY_EDEFAULT = 0.0; |
65 | |
66 | /** |
67 | * The cached value of the '{@link #getGlobalExecutionFrequency() <em>Global Execution Frequency</em>}' attribute. |
68 | * <!-- begin-user-doc --> |
69 | * <!-- end-user-doc --> |
70 | * @see #getGlobalExecutionFrequency() |
71 | * @generated |
72 | * @ordered |
73 | */ |
74 | protected double globalExecutionFrequency = GLOBAL_EXECUTION_FREQUENCY_EDEFAULT; |
75 | |
76 | /** |
77 | * The cached value of the '{@link #getAllocationContext_ServiceExecutionContext() <em>Allocation Context Service Execution Context</em>}' reference. |
78 | * <!-- begin-user-doc --> |
79 | * <!-- end-user-doc --> |
80 | * @see #getAllocationContext_ServiceExecutionContext() |
81 | * @generated |
82 | * @ordered |
83 | */ |
84 | protected AllocationContext allocationContext_ServiceExecutionContext; |
85 | |
86 | /** |
87 | * The cached value of the '{@link #getDescribedSEFF_ServiceExecutionContext() <em>Described SEFF Service Execution Context</em>}' reference. |
88 | * <!-- begin-user-doc --> |
89 | * <!-- end-user-doc --> |
90 | * @see #getDescribedSEFF_ServiceExecutionContext() |
91 | * @generated |
92 | * @ordered |
93 | */ |
94 | protected ResourceDemandingSEFF describedSEFF_ServiceExecutionContext; |
95 | |
96 | /** |
97 | * The cached value of the '{@link #getAggregatedResourceDemands_ServiceExecutionContext() <em>Aggregated Resource Demands Service Execution Context</em>}' containment reference list. |
98 | * <!-- begin-user-doc --> |
99 | * <!-- end-user-doc --> |
100 | * @see #getAggregatedResourceDemands_ServiceExecutionContext() |
101 | * @generated |
102 | * @ordered |
103 | */ |
104 | protected EList<AggregatedResourceDemand> aggregatedResourceDemands_ServiceExecutionContext; |
105 | |
106 | /** |
107 | * The cached value of the '{@link #getUsageScenario_ServiceExecutionContext() <em>Usage Scenario Service Execution Context</em>}' reference. |
108 | * <!-- begin-user-doc --> |
109 | * <!-- end-user-doc --> |
110 | * @see #getUsageScenario_ServiceExecutionContext() |
111 | * @generated |
112 | * @ordered |
113 | */ |
114 | protected UsageScenario usageScenario_ServiceExecutionContext; |
115 | |
116 | /** |
117 | * The cached value of the '{@link #getSentAggregatedCommunications_ServiceExecutionContext() <em>Sent Aggregated Communications Service Execution Context</em>}' containment reference list. |
118 | * <!-- begin-user-doc --> |
119 | * <!-- end-user-doc --> |
120 | * @see #getSentAggregatedCommunications_ServiceExecutionContext() |
121 | * @generated |
122 | * @ordered |
123 | */ |
124 | protected EList<AggregatedCommunication> sentAggregatedCommunications_ServiceExecutionContext; |
125 | |
126 | /** |
127 | * The cached value of the '{@link #getReceivedAggregatedCommunication_AggregatedCommunication() <em>Received Aggregated Communication Aggregated Communication</em>}' reference list. |
128 | * <!-- begin-user-doc --> |
129 | * <!-- end-user-doc --> |
130 | * @see #getReceivedAggregatedCommunication_AggregatedCommunication() |
131 | * @generated |
132 | * @ordered |
133 | */ |
134 | protected EList<AggregatedCommunication> receivedAggregatedCommunication_AggregatedCommunication; |
135 | |
136 | /** |
137 | * <!-- begin-user-doc --> |
138 | * <!-- end-user-doc --> |
139 | * @generated |
140 | */ |
141 | protected ServiceExecutionContextImpl() { |
142 | super(); |
143 | } |
144 | |
145 | /** |
146 | * <!-- begin-user-doc --> |
147 | * <!-- end-user-doc --> |
148 | * @generated |
149 | */ |
150 | @Override |
151 | protected EClass eStaticClass() { |
152 | return AggregatedUsageContextPackage.Literals.SERVICE_EXECUTION_CONTEXT; |
153 | } |
154 | |
155 | /** |
156 | * <!-- begin-user-doc --> |
157 | * <!-- end-user-doc --> |
158 | * @generated |
159 | */ |
160 | public double getGlobalExecutionFrequency() { |
161 | return globalExecutionFrequency; |
162 | } |
163 | |
164 | /** |
165 | * <!-- begin-user-doc --> |
166 | * <!-- end-user-doc --> |
167 | * @generated |
168 | */ |
169 | public void setGlobalExecutionFrequency(double newGlobalExecutionFrequency) { |
170 | double oldGlobalExecutionFrequency = globalExecutionFrequency; |
171 | globalExecutionFrequency = newGlobalExecutionFrequency; |
172 | if (eNotificationRequired()) |
173 | eNotify(new ENotificationImpl(this, Notification.SET, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__GLOBAL_EXECUTION_FREQUENCY, oldGlobalExecutionFrequency, globalExecutionFrequency)); |
174 | } |
175 | |
176 | /** |
177 | * <!-- begin-user-doc --> |
178 | * <!-- end-user-doc --> |
179 | * @generated |
180 | */ |
181 | public AllocationContext getAllocationContext_ServiceExecutionContext() { |
182 | if (allocationContext_ServiceExecutionContext != null && allocationContext_ServiceExecutionContext.eIsProxy()) { |
183 | InternalEObject oldAllocationContext_ServiceExecutionContext = (InternalEObject)allocationContext_ServiceExecutionContext; |
184 | allocationContext_ServiceExecutionContext = (AllocationContext)eResolveProxy(oldAllocationContext_ServiceExecutionContext); |
185 | if (allocationContext_ServiceExecutionContext != oldAllocationContext_ServiceExecutionContext) { |
186 | if (eNotificationRequired()) |
187 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__ALLOCATION_CONTEXT_SERVICE_EXECUTION_CONTEXT, oldAllocationContext_ServiceExecutionContext, allocationContext_ServiceExecutionContext)); |
188 | } |
189 | } |
190 | return allocationContext_ServiceExecutionContext; |
191 | } |
192 | |
193 | /** |
194 | * <!-- begin-user-doc --> |
195 | * <!-- end-user-doc --> |
196 | * @generated |
197 | */ |
198 | public AllocationContext basicGetAllocationContext_ServiceExecutionContext() { |
199 | return allocationContext_ServiceExecutionContext; |
200 | } |
201 | |
202 | /** |
203 | * <!-- begin-user-doc --> |
204 | * <!-- end-user-doc --> |
205 | * @generated |
206 | */ |
207 | public void setAllocationContext_ServiceExecutionContext(AllocationContext newAllocationContext_ServiceExecutionContext) { |
208 | AllocationContext oldAllocationContext_ServiceExecutionContext = allocationContext_ServiceExecutionContext; |
209 | allocationContext_ServiceExecutionContext = newAllocationContext_ServiceExecutionContext; |
210 | if (eNotificationRequired()) |
211 | eNotify(new ENotificationImpl(this, Notification.SET, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__ALLOCATION_CONTEXT_SERVICE_EXECUTION_CONTEXT, oldAllocationContext_ServiceExecutionContext, allocationContext_ServiceExecutionContext)); |
212 | } |
213 | |
214 | /** |
215 | * <!-- begin-user-doc --> |
216 | * <!-- end-user-doc --> |
217 | * @generated |
218 | */ |
219 | public ResourceDemandingSEFF getDescribedSEFF_ServiceExecutionContext() { |
220 | if (describedSEFF_ServiceExecutionContext != null && describedSEFF_ServiceExecutionContext.eIsProxy()) { |
221 | InternalEObject oldDescribedSEFF_ServiceExecutionContext = (InternalEObject)describedSEFF_ServiceExecutionContext; |
222 | describedSEFF_ServiceExecutionContext = (ResourceDemandingSEFF)eResolveProxy(oldDescribedSEFF_ServiceExecutionContext); |
223 | if (describedSEFF_ServiceExecutionContext != oldDescribedSEFF_ServiceExecutionContext) { |
224 | if (eNotificationRequired()) |
225 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__DESCRIBED_SEFF_SERVICE_EXECUTION_CONTEXT, oldDescribedSEFF_ServiceExecutionContext, describedSEFF_ServiceExecutionContext)); |
226 | } |
227 | } |
228 | return describedSEFF_ServiceExecutionContext; |
229 | } |
230 | |
231 | /** |
232 | * <!-- begin-user-doc --> |
233 | * <!-- end-user-doc --> |
234 | * @generated |
235 | */ |
236 | public ResourceDemandingSEFF basicGetDescribedSEFF_ServiceExecutionContext() { |
237 | return describedSEFF_ServiceExecutionContext; |
238 | } |
239 | |
240 | /** |
241 | * <!-- begin-user-doc --> |
242 | * <!-- end-user-doc --> |
243 | * @generated |
244 | */ |
245 | public void setDescribedSEFF_ServiceExecutionContext(ResourceDemandingSEFF newDescribedSEFF_ServiceExecutionContext) { |
246 | ResourceDemandingSEFF oldDescribedSEFF_ServiceExecutionContext = describedSEFF_ServiceExecutionContext; |
247 | describedSEFF_ServiceExecutionContext = newDescribedSEFF_ServiceExecutionContext; |
248 | if (eNotificationRequired()) |
249 | eNotify(new ENotificationImpl(this, Notification.SET, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__DESCRIBED_SEFF_SERVICE_EXECUTION_CONTEXT, oldDescribedSEFF_ServiceExecutionContext, describedSEFF_ServiceExecutionContext)); |
250 | } |
251 | |
252 | /** |
253 | * <!-- begin-user-doc --> |
254 | * <!-- end-user-doc --> |
255 | * @generated |
256 | */ |
257 | public EList<AggregatedResourceDemand> getAggregatedResourceDemands_ServiceExecutionContext() { |
258 | if (aggregatedResourceDemands_ServiceExecutionContext == null) { |
259 | aggregatedResourceDemands_ServiceExecutionContext = new EObjectContainmentEList<AggregatedResourceDemand>(AggregatedResourceDemand.class, this, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__AGGREGATED_RESOURCE_DEMANDS_SERVICE_EXECUTION_CONTEXT); |
260 | } |
261 | return aggregatedResourceDemands_ServiceExecutionContext; |
262 | } |
263 | |
264 | /** |
265 | * <!-- begin-user-doc --> |
266 | * <!-- end-user-doc --> |
267 | * @generated |
268 | */ |
269 | public UsageScenario getUsageScenario_ServiceExecutionContext() { |
270 | if (usageScenario_ServiceExecutionContext != null && usageScenario_ServiceExecutionContext.eIsProxy()) { |
271 | InternalEObject oldUsageScenario_ServiceExecutionContext = (InternalEObject)usageScenario_ServiceExecutionContext; |
272 | usageScenario_ServiceExecutionContext = (UsageScenario)eResolveProxy(oldUsageScenario_ServiceExecutionContext); |
273 | if (usageScenario_ServiceExecutionContext != oldUsageScenario_ServiceExecutionContext) { |
274 | if (eNotificationRequired()) |
275 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__USAGE_SCENARIO_SERVICE_EXECUTION_CONTEXT, oldUsageScenario_ServiceExecutionContext, usageScenario_ServiceExecutionContext)); |
276 | } |
277 | } |
278 | return usageScenario_ServiceExecutionContext; |
279 | } |
280 | |
281 | /** |
282 | * <!-- begin-user-doc --> |
283 | * <!-- end-user-doc --> |
284 | * @generated |
285 | */ |
286 | public UsageScenario basicGetUsageScenario_ServiceExecutionContext() { |
287 | return usageScenario_ServiceExecutionContext; |
288 | } |
289 | |
290 | /** |
291 | * <!-- begin-user-doc --> |
292 | * <!-- end-user-doc --> |
293 | * @generated |
294 | */ |
295 | public void setUsageScenario_ServiceExecutionContext(UsageScenario newUsageScenario_ServiceExecutionContext) { |
296 | UsageScenario oldUsageScenario_ServiceExecutionContext = usageScenario_ServiceExecutionContext; |
297 | usageScenario_ServiceExecutionContext = newUsageScenario_ServiceExecutionContext; |
298 | if (eNotificationRequired()) |
299 | eNotify(new ENotificationImpl(this, Notification.SET, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__USAGE_SCENARIO_SERVICE_EXECUTION_CONTEXT, oldUsageScenario_ServiceExecutionContext, usageScenario_ServiceExecutionContext)); |
300 | } |
301 | |
302 | /** |
303 | * <!-- begin-user-doc --> |
304 | * <!-- end-user-doc --> |
305 | * @generated |
306 | */ |
307 | public EList<AggregatedCommunication> getSentAggregatedCommunications_ServiceExecutionContext() { |
308 | if (sentAggregatedCommunications_ServiceExecutionContext == null) { |
309 | sentAggregatedCommunications_ServiceExecutionContext = new EObjectContainmentEList<AggregatedCommunication>(AggregatedCommunication.class, this, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__SENT_AGGREGATED_COMMUNICATIONS_SERVICE_EXECUTION_CONTEXT); |
310 | } |
311 | return sentAggregatedCommunications_ServiceExecutionContext; |
312 | } |
313 | |
314 | /** |
315 | * <!-- begin-user-doc --> |
316 | * <!-- end-user-doc --> |
317 | * @generated |
318 | */ |
319 | public EList<AggregatedCommunication> getReceivedAggregatedCommunication_AggregatedCommunication() { |
320 | if (receivedAggregatedCommunication_AggregatedCommunication == null) { |
321 | receivedAggregatedCommunication_AggregatedCommunication = new EObjectWithInverseResolvingEList<AggregatedCommunication>(AggregatedCommunication.class, this, AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__RECEIVED_AGGREGATED_COMMUNICATION_AGGREGATED_COMMUNICATION, AggregatedUsageContextPackage.AGGREGATED_COMMUNICATION__RECEIVER_AGGREGATED_COMMUNICATION); |
322 | } |
323 | return receivedAggregatedCommunication_AggregatedCommunication; |
324 | } |
325 | |
326 | /** |
327 | * <!-- begin-user-doc --> |
328 | * <!-- end-user-doc --> |
329 | * @generated |
330 | */ |
331 | @SuppressWarnings("unchecked") |
332 | @Override |
333 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
334 | switch (featureID) { |
335 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__RECEIVED_AGGREGATED_COMMUNICATION_AGGREGATED_COMMUNICATION: |
336 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getReceivedAggregatedCommunication_AggregatedCommunication()).basicAdd(otherEnd, msgs); |
337 | } |
338 | return super.eInverseAdd(otherEnd, featureID, msgs); |
339 | } |
340 | |
341 | /** |
342 | * <!-- begin-user-doc --> |
343 | * <!-- end-user-doc --> |
344 | * @generated |
345 | */ |
346 | @Override |
347 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
348 | switch (featureID) { |
349 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__AGGREGATED_RESOURCE_DEMANDS_SERVICE_EXECUTION_CONTEXT: |
350 | return ((InternalEList<?>)getAggregatedResourceDemands_ServiceExecutionContext()).basicRemove(otherEnd, msgs); |
351 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__SENT_AGGREGATED_COMMUNICATIONS_SERVICE_EXECUTION_CONTEXT: |
352 | return ((InternalEList<?>)getSentAggregatedCommunications_ServiceExecutionContext()).basicRemove(otherEnd, msgs); |
353 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__RECEIVED_AGGREGATED_COMMUNICATION_AGGREGATED_COMMUNICATION: |
354 | return ((InternalEList<?>)getReceivedAggregatedCommunication_AggregatedCommunication()).basicRemove(otherEnd, msgs); |
355 | } |
356 | return super.eInverseRemove(otherEnd, featureID, msgs); |
357 | } |
358 | |
359 | /** |
360 | * <!-- begin-user-doc --> |
361 | * <!-- end-user-doc --> |
362 | * @generated |
363 | */ |
364 | @Override |
365 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
366 | switch (featureID) { |
367 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__GLOBAL_EXECUTION_FREQUENCY: |
368 | return getGlobalExecutionFrequency(); |
369 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__ALLOCATION_CONTEXT_SERVICE_EXECUTION_CONTEXT: |
370 | if (resolve) return getAllocationContext_ServiceExecutionContext(); |
371 | return basicGetAllocationContext_ServiceExecutionContext(); |
372 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__DESCRIBED_SEFF_SERVICE_EXECUTION_CONTEXT: |
373 | if (resolve) return getDescribedSEFF_ServiceExecutionContext(); |
374 | return basicGetDescribedSEFF_ServiceExecutionContext(); |
375 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__AGGREGATED_RESOURCE_DEMANDS_SERVICE_EXECUTION_CONTEXT: |
376 | return getAggregatedResourceDemands_ServiceExecutionContext(); |
377 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__USAGE_SCENARIO_SERVICE_EXECUTION_CONTEXT: |
378 | if (resolve) return getUsageScenario_ServiceExecutionContext(); |
379 | return basicGetUsageScenario_ServiceExecutionContext(); |
380 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__SENT_AGGREGATED_COMMUNICATIONS_SERVICE_EXECUTION_CONTEXT: |
381 | return getSentAggregatedCommunications_ServiceExecutionContext(); |
382 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__RECEIVED_AGGREGATED_COMMUNICATION_AGGREGATED_COMMUNICATION: |
383 | return getReceivedAggregatedCommunication_AggregatedCommunication(); |
384 | } |
385 | return super.eGet(featureID, resolve, coreType); |
386 | } |
387 | |
388 | /** |
389 | * <!-- begin-user-doc --> |
390 | * <!-- end-user-doc --> |
391 | * @generated |
392 | */ |
393 | @SuppressWarnings("unchecked") |
394 | @Override |
395 | public void eSet(int featureID, Object newValue) { |
396 | switch (featureID) { |
397 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__GLOBAL_EXECUTION_FREQUENCY: |
398 | setGlobalExecutionFrequency((Double)newValue); |
399 | return; |
400 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__ALLOCATION_CONTEXT_SERVICE_EXECUTION_CONTEXT: |
401 | setAllocationContext_ServiceExecutionContext((AllocationContext)newValue); |
402 | return; |
403 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__DESCRIBED_SEFF_SERVICE_EXECUTION_CONTEXT: |
404 | setDescribedSEFF_ServiceExecutionContext((ResourceDemandingSEFF)newValue); |
405 | return; |
406 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__AGGREGATED_RESOURCE_DEMANDS_SERVICE_EXECUTION_CONTEXT: |
407 | getAggregatedResourceDemands_ServiceExecutionContext().clear(); |
408 | getAggregatedResourceDemands_ServiceExecutionContext().addAll((Collection<? extends AggregatedResourceDemand>)newValue); |
409 | return; |
410 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__USAGE_SCENARIO_SERVICE_EXECUTION_CONTEXT: |
411 | setUsageScenario_ServiceExecutionContext((UsageScenario)newValue); |
412 | return; |
413 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__SENT_AGGREGATED_COMMUNICATIONS_SERVICE_EXECUTION_CONTEXT: |
414 | getSentAggregatedCommunications_ServiceExecutionContext().clear(); |
415 | getSentAggregatedCommunications_ServiceExecutionContext().addAll((Collection<? extends AggregatedCommunication>)newValue); |
416 | return; |
417 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__RECEIVED_AGGREGATED_COMMUNICATION_AGGREGATED_COMMUNICATION: |
418 | getReceivedAggregatedCommunication_AggregatedCommunication().clear(); |
419 | getReceivedAggregatedCommunication_AggregatedCommunication().addAll((Collection<? extends AggregatedCommunication>)newValue); |
420 | return; |
421 | } |
422 | super.eSet(featureID, newValue); |
423 | } |
424 | |
425 | /** |
426 | * <!-- begin-user-doc --> |
427 | * <!-- end-user-doc --> |
428 | * @generated |
429 | */ |
430 | @Override |
431 | public void eUnset(int featureID) { |
432 | switch (featureID) { |
433 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__GLOBAL_EXECUTION_FREQUENCY: |
434 | setGlobalExecutionFrequency(GLOBAL_EXECUTION_FREQUENCY_EDEFAULT); |
435 | return; |
436 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__ALLOCATION_CONTEXT_SERVICE_EXECUTION_CONTEXT: |
437 | setAllocationContext_ServiceExecutionContext((AllocationContext)null); |
438 | return; |
439 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__DESCRIBED_SEFF_SERVICE_EXECUTION_CONTEXT: |
440 | setDescribedSEFF_ServiceExecutionContext((ResourceDemandingSEFF)null); |
441 | return; |
442 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__AGGREGATED_RESOURCE_DEMANDS_SERVICE_EXECUTION_CONTEXT: |
443 | getAggregatedResourceDemands_ServiceExecutionContext().clear(); |
444 | return; |
445 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__USAGE_SCENARIO_SERVICE_EXECUTION_CONTEXT: |
446 | setUsageScenario_ServiceExecutionContext((UsageScenario)null); |
447 | return; |
448 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__SENT_AGGREGATED_COMMUNICATIONS_SERVICE_EXECUTION_CONTEXT: |
449 | getSentAggregatedCommunications_ServiceExecutionContext().clear(); |
450 | return; |
451 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__RECEIVED_AGGREGATED_COMMUNICATION_AGGREGATED_COMMUNICATION: |
452 | getReceivedAggregatedCommunication_AggregatedCommunication().clear(); |
453 | return; |
454 | } |
455 | super.eUnset(featureID); |
456 | } |
457 | |
458 | /** |
459 | * <!-- begin-user-doc --> |
460 | * <!-- end-user-doc --> |
461 | * @generated |
462 | */ |
463 | @Override |
464 | public boolean eIsSet(int featureID) { |
465 | switch (featureID) { |
466 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__GLOBAL_EXECUTION_FREQUENCY: |
467 | return globalExecutionFrequency != GLOBAL_EXECUTION_FREQUENCY_EDEFAULT; |
468 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__ALLOCATION_CONTEXT_SERVICE_EXECUTION_CONTEXT: |
469 | return allocationContext_ServiceExecutionContext != null; |
470 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__DESCRIBED_SEFF_SERVICE_EXECUTION_CONTEXT: |
471 | return describedSEFF_ServiceExecutionContext != null; |
472 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__AGGREGATED_RESOURCE_DEMANDS_SERVICE_EXECUTION_CONTEXT: |
473 | return aggregatedResourceDemands_ServiceExecutionContext != null && !aggregatedResourceDemands_ServiceExecutionContext.isEmpty(); |
474 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__USAGE_SCENARIO_SERVICE_EXECUTION_CONTEXT: |
475 | return usageScenario_ServiceExecutionContext != null; |
476 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__SENT_AGGREGATED_COMMUNICATIONS_SERVICE_EXECUTION_CONTEXT: |
477 | return sentAggregatedCommunications_ServiceExecutionContext != null && !sentAggregatedCommunications_ServiceExecutionContext.isEmpty(); |
478 | case AggregatedUsageContextPackage.SERVICE_EXECUTION_CONTEXT__RECEIVED_AGGREGATED_COMMUNICATION_AGGREGATED_COMMUNICATION: |
479 | return receivedAggregatedCommunication_AggregatedCommunication != null && !receivedAggregatedCommunication_AggregatedCommunication.isEmpty(); |
480 | } |
481 | return super.eIsSet(featureID); |
482 | } |
483 | |
484 | /** |
485 | * <!-- begin-user-doc --> |
486 | * <!-- end-user-doc --> |
487 | * @generated |
488 | */ |
489 | @Override |
490 | public String toString() { |
491 | if (eIsProxy()) return super.toString(); |
492 | |
493 | StringBuffer result = new StringBuffer(super.toString()); |
494 | result.append(" (globalExecutionFrequency: "); |
495 | result.append(globalExecutionFrequency); |
496 | result.append(')'); |
497 | return result.toString(); |
498 | } |
499 | |
500 | } //ServiceExecutionContextImpl |