1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.fzi.se.quality.parameters.pcm.impl; |
8 | |
9 | import de.fzi.se.quality.parameters.impl.BusinessOperationReferenceImpl; |
10 | |
11 | import de.fzi.se.quality.parameters.pcm.PCMBusinessOperationReference; |
12 | import de.fzi.se.quality.parameters.pcm.PCMPackage; |
13 | |
14 | import de.uka.ipd.sdq.pcm.repository.RequiredRole; |
15 | import de.uka.ipd.sdq.pcm.repository.Signature; |
16 | |
17 | import org.eclipse.emf.common.notify.Notification; |
18 | |
19 | import org.eclipse.emf.ecore.EClass; |
20 | import org.eclipse.emf.ecore.InternalEObject; |
21 | |
22 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
23 | |
24 | /** |
25 | * <!-- begin-user-doc --> |
26 | * An implementation of the model object '<em><b>Business Operation Reference</b></em>'. |
27 | * <!-- end-user-doc --> |
28 | * <p> |
29 | * The following features are implemented: |
30 | * <ul> |
31 | * <li>{@link de.fzi.se.quality.parameters.pcm.impl.PCMBusinessOperationReferenceImpl#getRequiredRole <em>Required Role</em>}</li> |
32 | * <li>{@link de.fzi.se.quality.parameters.pcm.impl.PCMBusinessOperationReferenceImpl#getSignature <em>Signature</em>}</li> |
33 | * </ul> |
34 | * </p> |
35 | * |
36 | * @generated |
37 | */ |
38 | public class PCMBusinessOperationReferenceImpl extends BusinessOperationReferenceImpl implements PCMBusinessOperationReference { |
39 | /** |
40 | * The cached value of the '{@link #getRequiredRole() <em>Required Role</em>}' reference. |
41 | * <!-- begin-user-doc --> |
42 | * <!-- end-user-doc --> |
43 | * @see #getRequiredRole() |
44 | * @generated |
45 | * @ordered |
46 | */ |
47 | protected RequiredRole requiredRole; |
48 | |
49 | /** |
50 | * The cached value of the '{@link #getSignature() <em>Signature</em>}' reference. |
51 | * <!-- begin-user-doc --> |
52 | * <!-- end-user-doc --> |
53 | * @see #getSignature() |
54 | * @generated |
55 | * @ordered |
56 | */ |
57 | protected Signature signature; |
58 | |
59 | /** |
60 | * <!-- begin-user-doc --> |
61 | * <!-- end-user-doc --> |
62 | * @generated |
63 | */ |
64 | protected PCMBusinessOperationReferenceImpl() { |
65 | super(); |
66 | } |
67 | |
68 | /** |
69 | * <!-- begin-user-doc --> |
70 | * <!-- end-user-doc --> |
71 | * @generated |
72 | */ |
73 | @Override |
74 | protected EClass eStaticClass() { |
75 | return PCMPackage.Literals.PCM_BUSINESS_OPERATION_REFERENCE; |
76 | } |
77 | |
78 | /** |
79 | * <!-- begin-user-doc --> |
80 | * <!-- end-user-doc --> |
81 | * @generated |
82 | */ |
83 | public RequiredRole getRequiredRole() { |
84 | if (requiredRole != null && requiredRole.eIsProxy()) { |
85 | InternalEObject oldRequiredRole = (InternalEObject)requiredRole; |
86 | requiredRole = (RequiredRole)eResolveProxy(oldRequiredRole); |
87 | if (requiredRole != oldRequiredRole) { |
88 | if (eNotificationRequired()) |
89 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__REQUIRED_ROLE, oldRequiredRole, requiredRole)); |
90 | } |
91 | } |
92 | return requiredRole; |
93 | } |
94 | |
95 | /** |
96 | * <!-- begin-user-doc --> |
97 | * <!-- end-user-doc --> |
98 | * @generated |
99 | */ |
100 | public RequiredRole basicGetRequiredRole() { |
101 | return requiredRole; |
102 | } |
103 | |
104 | /** |
105 | * <!-- begin-user-doc --> |
106 | * <!-- end-user-doc --> |
107 | * @generated |
108 | */ |
109 | public void setRequiredRole(RequiredRole newRequiredRole) { |
110 | RequiredRole oldRequiredRole = requiredRole; |
111 | requiredRole = newRequiredRole; |
112 | if (eNotificationRequired()) |
113 | eNotify(new ENotificationImpl(this, Notification.SET, PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__REQUIRED_ROLE, oldRequiredRole, requiredRole)); |
114 | } |
115 | |
116 | /** |
117 | * <!-- begin-user-doc --> |
118 | * <!-- end-user-doc --> |
119 | * @generated |
120 | */ |
121 | public Signature getSignature() { |
122 | if (signature != null && signature.eIsProxy()) { |
123 | InternalEObject oldSignature = (InternalEObject)signature; |
124 | signature = (Signature)eResolveProxy(oldSignature); |
125 | if (signature != oldSignature) { |
126 | if (eNotificationRequired()) |
127 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__SIGNATURE, oldSignature, signature)); |
128 | } |
129 | } |
130 | return signature; |
131 | } |
132 | |
133 | /** |
134 | * <!-- begin-user-doc --> |
135 | * <!-- end-user-doc --> |
136 | * @generated |
137 | */ |
138 | public Signature basicGetSignature() { |
139 | return signature; |
140 | } |
141 | |
142 | /** |
143 | * <!-- begin-user-doc --> |
144 | * <!-- end-user-doc --> |
145 | * @generated |
146 | */ |
147 | public void setSignature(Signature newSignature) { |
148 | Signature oldSignature = signature; |
149 | signature = newSignature; |
150 | if (eNotificationRequired()) |
151 | eNotify(new ENotificationImpl(this, Notification.SET, PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__SIGNATURE, oldSignature, signature)); |
152 | } |
153 | |
154 | /** |
155 | * <!-- begin-user-doc --> |
156 | * <!-- end-user-doc --> |
157 | * @generated |
158 | */ |
159 | @Override |
160 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
161 | switch (featureID) { |
162 | case PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__REQUIRED_ROLE: |
163 | if (resolve) return getRequiredRole(); |
164 | return basicGetRequiredRole(); |
165 | case PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__SIGNATURE: |
166 | if (resolve) return getSignature(); |
167 | return basicGetSignature(); |
168 | } |
169 | return super.eGet(featureID, resolve, coreType); |
170 | } |
171 | |
172 | /** |
173 | * <!-- begin-user-doc --> |
174 | * <!-- end-user-doc --> |
175 | * @generated |
176 | */ |
177 | @Override |
178 | public void eSet(int featureID, Object newValue) { |
179 | switch (featureID) { |
180 | case PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__REQUIRED_ROLE: |
181 | setRequiredRole((RequiredRole)newValue); |
182 | return; |
183 | case PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__SIGNATURE: |
184 | setSignature((Signature)newValue); |
185 | return; |
186 | } |
187 | super.eSet(featureID, newValue); |
188 | } |
189 | |
190 | /** |
191 | * <!-- begin-user-doc --> |
192 | * <!-- end-user-doc --> |
193 | * @generated |
194 | */ |
195 | @Override |
196 | public void eUnset(int featureID) { |
197 | switch (featureID) { |
198 | case PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__REQUIRED_ROLE: |
199 | setRequiredRole((RequiredRole)null); |
200 | return; |
201 | case PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__SIGNATURE: |
202 | setSignature((Signature)null); |
203 | return; |
204 | } |
205 | super.eUnset(featureID); |
206 | } |
207 | |
208 | /** |
209 | * <!-- begin-user-doc --> |
210 | * <!-- end-user-doc --> |
211 | * @generated |
212 | */ |
213 | @Override |
214 | public boolean eIsSet(int featureID) { |
215 | switch (featureID) { |
216 | case PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__REQUIRED_ROLE: |
217 | return requiredRole != null; |
218 | case PCMPackage.PCM_BUSINESS_OPERATION_REFERENCE__SIGNATURE: |
219 | return signature != null; |
220 | } |
221 | return super.eIsSet(featureID); |
222 | } |
223 | |
224 | } //PCMBusinessOperationReferenceImpl |