aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TypeImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TypeImpl.java')
-rw-r--r--Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TypeImpl.java324
1 files changed, 324 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TypeImpl.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TypeImpl.java
new file mode 100644
index 00000000..7b2564b2
--- /dev/null
+++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Income_TypeImpl.java
@@ -0,0 +1,324 @@
1/**
2 */
3package Taxation.impl;
4
5import Taxation.Income;
6import Taxation.Income_Type;
7import Taxation.TaxationPackage;
8
9import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain;
11
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.InternalEObject;
14
15import org.eclipse.emf.ecore.impl.ENotificationImpl;
16import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
17
18import org.eclipse.emf.ecore.util.EcoreUtil;
19
20/**
21 * <!-- begin-user-doc -->
22 * An implementation of the model object '<em><b>Income Type</b></em>'.
23 * <!-- end-user-doc -->
24 * <p>
25 * The following features are implemented:
26 * </p>
27 * <ul>
28 * <li>{@link Taxation.impl.Income_TypeImpl#isSubjectToWithholdingTax <em>Subject To Withholding Tax</em>}</li>
29 * <li>{@link Taxation.impl.Income_TypeImpl#getId8 <em>Id8</em>}</li>
30 * <li>{@link Taxation.impl.Income_TypeImpl#getIncome <em>Income</em>}</li>
31 * </ul>
32 *
33 * @generated
34 */
35public abstract class Income_TypeImpl extends MinimalEObjectImpl.Container implements Income_Type {
36 /**
37 * The default value of the '{@link #isSubjectToWithholdingTax() <em>Subject To Withholding Tax</em>}' attribute.
38 * <!-- begin-user-doc -->
39 * <!-- end-user-doc -->
40 * @see #isSubjectToWithholdingTax()
41 * @generated
42 * @ordered
43 */
44 protected static final boolean SUBJECT_TO_WITHHOLDING_TAX_EDEFAULT = false;
45
46 /**
47 * The cached value of the '{@link #isSubjectToWithholdingTax() <em>Subject To Withholding Tax</em>}' attribute.
48 * <!-- begin-user-doc -->
49 * <!-- end-user-doc -->
50 * @see #isSubjectToWithholdingTax()
51 * @generated
52 * @ordered
53 */
54 protected boolean subjectToWithholdingTax = SUBJECT_TO_WITHHOLDING_TAX_EDEFAULT;
55
56 /**
57 * The default value of the '{@link #getId8() <em>Id8</em>}' attribute.
58 * <!-- begin-user-doc -->
59 * <!-- end-user-doc -->
60 * @see #getId8()
61 * @generated
62 * @ordered
63 */
64 protected static final String ID8_EDEFAULT = null;
65
66 /**
67 * The cached value of the '{@link #getId8() <em>Id8</em>}' attribute.
68 * <!-- begin-user-doc -->
69 * <!-- end-user-doc -->
70 * @see #getId8()
71 * @generated
72 * @ordered
73 */
74 protected String id8 = ID8_EDEFAULT;
75
76 /**
77 * <!-- begin-user-doc -->
78 * <!-- end-user-doc -->
79 * @generated
80 */
81 protected Income_TypeImpl() {
82 super();
83 }
84
85 /**
86 * <!-- begin-user-doc -->
87 * <!-- end-user-doc -->
88 * @generated
89 */
90 @Override
91 protected EClass eStaticClass() {
92 return TaxationPackage.Literals.INCOME_TYPE;
93 }
94
95 /**
96 * <!-- begin-user-doc -->
97 * <!-- end-user-doc -->
98 * @generated
99 */
100 @Override
101 public boolean isSubjectToWithholdingTax() {
102 return subjectToWithholdingTax;
103 }
104
105 /**
106 * <!-- begin-user-doc -->
107 * <!-- end-user-doc -->
108 * @generated
109 */
110 @Override
111 public void setSubjectToWithholdingTax(boolean newSubjectToWithholdingTax) {
112 boolean oldSubjectToWithholdingTax = subjectToWithholdingTax;
113 subjectToWithholdingTax = newSubjectToWithholdingTax;
114 if (eNotificationRequired())
115 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_TYPE__SUBJECT_TO_WITHHOLDING_TAX, oldSubjectToWithholdingTax, subjectToWithholdingTax));
116 }
117
118 /**
119 * <!-- begin-user-doc -->
120 * <!-- end-user-doc -->
121 * @generated
122 */
123 @Override
124 public String getId8() {
125 return id8;
126 }
127
128 /**
129 * <!-- begin-user-doc -->
130 * <!-- end-user-doc -->
131 * @generated
132 */
133 @Override
134 public void setId8(String newId8) {
135 String oldId8 = id8;
136 id8 = newId8;
137 if (eNotificationRequired())
138 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_TYPE__ID8, oldId8, id8));
139 }
140
141 /**
142 * <!-- begin-user-doc -->
143 * <!-- end-user-doc -->
144 * @generated
145 */
146 @Override
147 public Income getIncome() {
148 if (eContainerFeatureID() != TaxationPackage.INCOME_TYPE__INCOME) return null;
149 return (Income)eInternalContainer();
150 }
151
152 /**
153 * <!-- begin-user-doc -->
154 * <!-- end-user-doc -->
155 * @generated
156 */
157 public NotificationChain basicSetIncome(Income newIncome, NotificationChain msgs) {
158 msgs = eBasicSetContainer((InternalEObject)newIncome, TaxationPackage.INCOME_TYPE__INCOME, msgs);
159 return msgs;
160 }
161
162 /**
163 * <!-- begin-user-doc -->
164 * <!-- end-user-doc -->
165 * @generated
166 */
167 @Override
168 public void setIncome(Income newIncome) {
169 if (newIncome != eInternalContainer() || (eContainerFeatureID() != TaxationPackage.INCOME_TYPE__INCOME && newIncome != null)) {
170 if (EcoreUtil.isAncestor(this, newIncome))
171 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
172 NotificationChain msgs = null;
173 if (eInternalContainer() != null)
174 msgs = eBasicRemoveFromContainer(msgs);
175 if (newIncome != null)
176 msgs = ((InternalEObject)newIncome).eInverseAdd(this, TaxationPackage.INCOME__INCOME_TYPE, Income.class, msgs);
177 msgs = basicSetIncome(newIncome, msgs);
178 if (msgs != null) msgs.dispatch();
179 }
180 else if (eNotificationRequired())
181 eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME_TYPE__INCOME, newIncome, newIncome));
182 }
183
184 /**
185 * <!-- begin-user-doc -->
186 * <!-- end-user-doc -->
187 * @generated
188 */
189 @Override
190 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
191 switch (featureID) {
192 case TaxationPackage.INCOME_TYPE__INCOME:
193 if (eInternalContainer() != null)
194 msgs = eBasicRemoveFromContainer(msgs);
195 return basicSetIncome((Income)otherEnd, msgs);
196 }
197 return super.eInverseAdd(otherEnd, featureID, msgs);
198 }
199
200 /**
201 * <!-- begin-user-doc -->
202 * <!-- end-user-doc -->
203 * @generated
204 */
205 @Override
206 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
207 switch (featureID) {
208 case TaxationPackage.INCOME_TYPE__INCOME:
209 return basicSetIncome(null, msgs);
210 }
211 return super.eInverseRemove(otherEnd, featureID, msgs);
212 }
213
214 /**
215 * <!-- begin-user-doc -->
216 * <!-- end-user-doc -->
217 * @generated
218 */
219 @Override
220 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
221 switch (eContainerFeatureID()) {
222 case TaxationPackage.INCOME_TYPE__INCOME:
223 return eInternalContainer().eInverseRemove(this, TaxationPackage.INCOME__INCOME_TYPE, Income.class, msgs);
224 }
225 return super.eBasicRemoveFromContainerFeature(msgs);
226 }
227
228 /**
229 * <!-- begin-user-doc -->
230 * <!-- end-user-doc -->
231 * @generated
232 */
233 @Override
234 public Object eGet(int featureID, boolean resolve, boolean coreType) {
235 switch (featureID) {
236 case TaxationPackage.INCOME_TYPE__SUBJECT_TO_WITHHOLDING_TAX:
237 return isSubjectToWithholdingTax();
238 case TaxationPackage.INCOME_TYPE__ID8:
239 return getId8();
240 case TaxationPackage.INCOME_TYPE__INCOME:
241 return getIncome();
242 }
243 return super.eGet(featureID, resolve, coreType);
244 }
245
246 /**
247 * <!-- begin-user-doc -->
248 * <!-- end-user-doc -->
249 * @generated
250 */
251 @Override
252 public void eSet(int featureID, Object newValue) {
253 switch (featureID) {
254 case TaxationPackage.INCOME_TYPE__SUBJECT_TO_WITHHOLDING_TAX:
255 setSubjectToWithholdingTax((Boolean)newValue);
256 return;
257 case TaxationPackage.INCOME_TYPE__ID8:
258 setId8((String)newValue);
259 return;
260 case TaxationPackage.INCOME_TYPE__INCOME:
261 setIncome((Income)newValue);
262 return;
263 }
264 super.eSet(featureID, newValue);
265 }
266
267 /**
268 * <!-- begin-user-doc -->
269 * <!-- end-user-doc -->
270 * @generated
271 */
272 @Override
273 public void eUnset(int featureID) {
274 switch (featureID) {
275 case TaxationPackage.INCOME_TYPE__SUBJECT_TO_WITHHOLDING_TAX:
276 setSubjectToWithholdingTax(SUBJECT_TO_WITHHOLDING_TAX_EDEFAULT);
277 return;
278 case TaxationPackage.INCOME_TYPE__ID8:
279 setId8(ID8_EDEFAULT);
280 return;
281 case TaxationPackage.INCOME_TYPE__INCOME:
282 setIncome((Income)null);
283 return;
284 }
285 super.eUnset(featureID);
286 }
287
288 /**
289 * <!-- begin-user-doc -->
290 * <!-- end-user-doc -->
291 * @generated
292 */
293 @Override
294 public boolean eIsSet(int featureID) {
295 switch (featureID) {
296 case TaxationPackage.INCOME_TYPE__SUBJECT_TO_WITHHOLDING_TAX:
297 return subjectToWithholdingTax != SUBJECT_TO_WITHHOLDING_TAX_EDEFAULT;
298 case TaxationPackage.INCOME_TYPE__ID8:
299 return ID8_EDEFAULT == null ? id8 != null : !ID8_EDEFAULT.equals(id8);
300 case TaxationPackage.INCOME_TYPE__INCOME:
301 return getIncome() != null;
302 }
303 return super.eIsSet(featureID);
304 }
305
306 /**
307 * <!-- begin-user-doc -->
308 * <!-- end-user-doc -->
309 * @generated
310 */
311 @Override
312 public String toString() {
313 if (eIsProxy()) return super.toString();
314
315 StringBuilder result = new StringBuilder(super.toString());
316 result.append(" (subjectToWithholdingTax: ");
317 result.append(subjectToWithholdingTax);
318 result.append(", id8: ");
319 result.append(id8);
320 result.append(')');
321 return result.toString();
322 }
323
324} //Income_TypeImpl