diff options
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/IncomeImpl.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/IncomeImpl.java | 614 |
1 files changed, 614 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/IncomeImpl.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/IncomeImpl.java new file mode 100644 index 00000000..f4793894 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/IncomeImpl.java | |||
@@ -0,0 +1,614 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package Taxation.impl; | ||
4 | |||
5 | import Taxation.Expense; | ||
6 | import Taxation.Income; | ||
7 | import Taxation.Income_Detail; | ||
8 | import Taxation.Income_Type; | ||
9 | import Taxation.Tax_Card; | ||
10 | import Taxation.Tax_Payer; | ||
11 | import Taxation.TaxationPackage; | ||
12 | |||
13 | import java.util.Collection; | ||
14 | |||
15 | import org.eclipse.emf.common.notify.Notification; | ||
16 | import org.eclipse.emf.common.notify.NotificationChain; | ||
17 | |||
18 | import org.eclipse.emf.common.util.EList; | ||
19 | |||
20 | import org.eclipse.emf.ecore.EClass; | ||
21 | import org.eclipse.emf.ecore.InternalEObject; | ||
22 | |||
23 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
24 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
25 | |||
26 | import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; | ||
27 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
28 | import org.eclipse.emf.ecore.util.InternalEList; | ||
29 | |||
30 | /** | ||
31 | * <!-- begin-user-doc --> | ||
32 | * An implementation of the model object '<em><b>Income</b></em>'. | ||
33 | * <!-- end-user-doc --> | ||
34 | * <p> | ||
35 | * The following features are implemented: | ||
36 | * </p> | ||
37 | * <ul> | ||
38 | * <li>{@link Taxation.impl.IncomeImpl#getIncome_amount <em>Income amount</em>}</li> | ||
39 | * <li>{@link Taxation.impl.IncomeImpl#getIncome_type <em>Income type</em>}</li> | ||
40 | * <li>{@link Taxation.impl.IncomeImpl#getTax_card <em>Tax card</em>}</li> | ||
41 | * <li>{@link Taxation.impl.IncomeImpl#getTax_liability <em>Tax liability</em>}</li> | ||
42 | * <li>{@link Taxation.impl.IncomeImpl#getTaxPayer <em>Tax Payer</em>}</li> | ||
43 | * <li>{@link Taxation.impl.IncomeImpl#getDetails <em>Details</em>}</li> | ||
44 | * <li>{@link Taxation.impl.IncomeImpl#getNum <em>Num</em>}</li> | ||
45 | * <li>{@link Taxation.impl.IncomeImpl#getExpenses <em>Expenses</em>}</li> | ||
46 | * </ul> | ||
47 | * | ||
48 | * @generated | ||
49 | */ | ||
50 | public abstract class IncomeImpl extends MinimalEObjectImpl.Container implements Income { | ||
51 | /** | ||
52 | * The default value of the '{@link #getIncome_amount() <em>Income amount</em>}' attribute. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #getIncome_amount() | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | protected static final double INCOME_AMOUNT_EDEFAULT = 0.0; | ||
60 | |||
61 | /** | ||
62 | * The cached value of the '{@link #getIncome_amount() <em>Income amount</em>}' attribute. | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @see #getIncome_amount() | ||
66 | * @generated | ||
67 | * @ordered | ||
68 | */ | ||
69 | protected double income_amount = INCOME_AMOUNT_EDEFAULT; | ||
70 | |||
71 | /** | ||
72 | * The cached value of the '{@link #getIncome_type() <em>Income type</em>}' containment reference. | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @see #getIncome_type() | ||
76 | * @generated | ||
77 | * @ordered | ||
78 | */ | ||
79 | protected Income_Type income_type; | ||
80 | |||
81 | /** | ||
82 | * The cached value of the '{@link #getTax_card() <em>Tax card</em>}' containment reference. | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @see #getTax_card() | ||
86 | * @generated | ||
87 | * @ordered | ||
88 | */ | ||
89 | protected Tax_Card tax_card; | ||
90 | |||
91 | /** | ||
92 | * The default value of the '{@link #getTax_liability() <em>Tax liability</em>}' attribute. | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @see #getTax_liability() | ||
96 | * @generated | ||
97 | * @ordered | ||
98 | */ | ||
99 | protected static final double TAX_LIABILITY_EDEFAULT = 0.0; | ||
100 | |||
101 | /** | ||
102 | * The cached value of the '{@link #getTax_liability() <em>Tax liability</em>}' attribute. | ||
103 | * <!-- begin-user-doc --> | ||
104 | * <!-- end-user-doc --> | ||
105 | * @see #getTax_liability() | ||
106 | * @generated | ||
107 | * @ordered | ||
108 | */ | ||
109 | protected double tax_liability = TAX_LIABILITY_EDEFAULT; | ||
110 | |||
111 | /** | ||
112 | * The cached value of the '{@link #getDetails() <em>Details</em>}' containment reference list. | ||
113 | * <!-- begin-user-doc --> | ||
114 | * <!-- end-user-doc --> | ||
115 | * @see #getDetails() | ||
116 | * @generated | ||
117 | * @ordered | ||
118 | */ | ||
119 | protected EList<Income_Detail> details; | ||
120 | |||
121 | /** | ||
122 | * The default value of the '{@link #getNum() <em>Num</em>}' attribute. | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @see #getNum() | ||
126 | * @generated | ||
127 | * @ordered | ||
128 | */ | ||
129 | protected static final int NUM_EDEFAULT = 0; | ||
130 | |||
131 | /** | ||
132 | * The cached value of the '{@link #getNum() <em>Num</em>}' attribute. | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @see #getNum() | ||
136 | * @generated | ||
137 | * @ordered | ||
138 | */ | ||
139 | protected int num = NUM_EDEFAULT; | ||
140 | |||
141 | /** | ||
142 | * The cached value of the '{@link #getExpenses() <em>Expenses</em>}' containment reference list. | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @see #getExpenses() | ||
146 | * @generated | ||
147 | * @ordered | ||
148 | */ | ||
149 | protected EList<Expense> expenses; | ||
150 | |||
151 | /** | ||
152 | * <!-- begin-user-doc --> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @generated | ||
155 | */ | ||
156 | protected IncomeImpl() { | ||
157 | super(); | ||
158 | } | ||
159 | |||
160 | /** | ||
161 | * <!-- begin-user-doc --> | ||
162 | * <!-- end-user-doc --> | ||
163 | * @generated | ||
164 | */ | ||
165 | @Override | ||
166 | protected EClass eStaticClass() { | ||
167 | return TaxationPackage.Literals.INCOME; | ||
168 | } | ||
169 | |||
170 | /** | ||
171 | * <!-- begin-user-doc --> | ||
172 | * <!-- end-user-doc --> | ||
173 | * @generated | ||
174 | */ | ||
175 | @Override | ||
176 | public double getIncome_amount() { | ||
177 | return income_amount; | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * <!-- begin-user-doc --> | ||
182 | * <!-- end-user-doc --> | ||
183 | * @generated | ||
184 | */ | ||
185 | @Override | ||
186 | public void setIncome_amount(double newIncome_amount) { | ||
187 | double oldIncome_amount = income_amount; | ||
188 | income_amount = newIncome_amount; | ||
189 | if (eNotificationRequired()) | ||
190 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__INCOME_AMOUNT, oldIncome_amount, income_amount)); | ||
191 | } | ||
192 | |||
193 | /** | ||
194 | * <!-- begin-user-doc --> | ||
195 | * <!-- end-user-doc --> | ||
196 | * @generated | ||
197 | */ | ||
198 | @Override | ||
199 | public Income_Type getIncome_type() { | ||
200 | return income_type; | ||
201 | } | ||
202 | |||
203 | /** | ||
204 | * <!-- begin-user-doc --> | ||
205 | * <!-- end-user-doc --> | ||
206 | * @generated | ||
207 | */ | ||
208 | public NotificationChain basicSetIncome_type(Income_Type newIncome_type, NotificationChain msgs) { | ||
209 | Income_Type oldIncome_type = income_type; | ||
210 | income_type = newIncome_type; | ||
211 | if (eNotificationRequired()) { | ||
212 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__INCOME_TYPE, oldIncome_type, newIncome_type); | ||
213 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
214 | } | ||
215 | return msgs; | ||
216 | } | ||
217 | |||
218 | /** | ||
219 | * <!-- begin-user-doc --> | ||
220 | * <!-- end-user-doc --> | ||
221 | * @generated | ||
222 | */ | ||
223 | @Override | ||
224 | public void setIncome_type(Income_Type newIncome_type) { | ||
225 | if (newIncome_type != income_type) { | ||
226 | NotificationChain msgs = null; | ||
227 | if (income_type != null) | ||
228 | msgs = ((InternalEObject)income_type).eInverseRemove(this, TaxationPackage.INCOME_TYPE__INCOME, Income_Type.class, msgs); | ||
229 | if (newIncome_type != null) | ||
230 | msgs = ((InternalEObject)newIncome_type).eInverseAdd(this, TaxationPackage.INCOME_TYPE__INCOME, Income_Type.class, msgs); | ||
231 | msgs = basicSetIncome_type(newIncome_type, msgs); | ||
232 | if (msgs != null) msgs.dispatch(); | ||
233 | } | ||
234 | else if (eNotificationRequired()) | ||
235 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__INCOME_TYPE, newIncome_type, newIncome_type)); | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * <!-- begin-user-doc --> | ||
240 | * <!-- end-user-doc --> | ||
241 | * @generated | ||
242 | */ | ||
243 | @Override | ||
244 | public Tax_Card getTax_card() { | ||
245 | return tax_card; | ||
246 | } | ||
247 | |||
248 | /** | ||
249 | * <!-- begin-user-doc --> | ||
250 | * <!-- end-user-doc --> | ||
251 | * @generated | ||
252 | */ | ||
253 | public NotificationChain basicSetTax_card(Tax_Card newTax_card, NotificationChain msgs) { | ||
254 | Tax_Card oldTax_card = tax_card; | ||
255 | tax_card = newTax_card; | ||
256 | if (eNotificationRequired()) { | ||
257 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__TAX_CARD, oldTax_card, newTax_card); | ||
258 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
259 | } | ||
260 | return msgs; | ||
261 | } | ||
262 | |||
263 | /** | ||
264 | * <!-- begin-user-doc --> | ||
265 | * <!-- end-user-doc --> | ||
266 | * @generated | ||
267 | */ | ||
268 | @Override | ||
269 | public void setTax_card(Tax_Card newTax_card) { | ||
270 | if (newTax_card != tax_card) { | ||
271 | NotificationChain msgs = null; | ||
272 | if (tax_card != null) | ||
273 | msgs = ((InternalEObject)tax_card).eInverseRemove(this, TaxationPackage.TAX_CARD__INCOME, Tax_Card.class, msgs); | ||
274 | if (newTax_card != null) | ||
275 | msgs = ((InternalEObject)newTax_card).eInverseAdd(this, TaxationPackage.TAX_CARD__INCOME, Tax_Card.class, msgs); | ||
276 | msgs = basicSetTax_card(newTax_card, msgs); | ||
277 | if (msgs != null) msgs.dispatch(); | ||
278 | } | ||
279 | else if (eNotificationRequired()) | ||
280 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__TAX_CARD, newTax_card, newTax_card)); | ||
281 | } | ||
282 | |||
283 | /** | ||
284 | * <!-- begin-user-doc --> | ||
285 | * <!-- end-user-doc --> | ||
286 | * @generated | ||
287 | */ | ||
288 | @Override | ||
289 | public double getTax_liability() { | ||
290 | return tax_liability; | ||
291 | } | ||
292 | |||
293 | /** | ||
294 | * <!-- begin-user-doc --> | ||
295 | * <!-- end-user-doc --> | ||
296 | * @generated | ||
297 | */ | ||
298 | @Override | ||
299 | public void setTax_liability(double newTax_liability) { | ||
300 | double oldTax_liability = tax_liability; | ||
301 | tax_liability = newTax_liability; | ||
302 | if (eNotificationRequired()) | ||
303 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__TAX_LIABILITY, oldTax_liability, tax_liability)); | ||
304 | } | ||
305 | |||
306 | /** | ||
307 | * <!-- begin-user-doc --> | ||
308 | * <!-- end-user-doc --> | ||
309 | * @generated | ||
310 | */ | ||
311 | @Override | ||
312 | public Tax_Payer getTaxPayer() { | ||
313 | if (eContainerFeatureID() != TaxationPackage.INCOME__TAX_PAYER) return null; | ||
314 | return (Tax_Payer)eInternalContainer(); | ||
315 | } | ||
316 | |||
317 | /** | ||
318 | * <!-- begin-user-doc --> | ||
319 | * <!-- end-user-doc --> | ||
320 | * @generated | ||
321 | */ | ||
322 | public NotificationChain basicSetTaxPayer(Tax_Payer newTaxPayer, NotificationChain msgs) { | ||
323 | msgs = eBasicSetContainer((InternalEObject)newTaxPayer, TaxationPackage.INCOME__TAX_PAYER, msgs); | ||
324 | return msgs; | ||
325 | } | ||
326 | |||
327 | /** | ||
328 | * <!-- begin-user-doc --> | ||
329 | * <!-- end-user-doc --> | ||
330 | * @generated | ||
331 | */ | ||
332 | @Override | ||
333 | public void setTaxPayer(Tax_Payer newTaxPayer) { | ||
334 | if (newTaxPayer != eInternalContainer() || (eContainerFeatureID() != TaxationPackage.INCOME__TAX_PAYER && newTaxPayer != null)) { | ||
335 | if (EcoreUtil.isAncestor(this, newTaxPayer)) | ||
336 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); | ||
337 | NotificationChain msgs = null; | ||
338 | if (eInternalContainer() != null) | ||
339 | msgs = eBasicRemoveFromContainer(msgs); | ||
340 | if (newTaxPayer != null) | ||
341 | msgs = ((InternalEObject)newTaxPayer).eInverseAdd(this, TaxationPackage.TAX_PAYER__INCOMES, Tax_Payer.class, msgs); | ||
342 | msgs = basicSetTaxPayer(newTaxPayer, msgs); | ||
343 | if (msgs != null) msgs.dispatch(); | ||
344 | } | ||
345 | else if (eNotificationRequired()) | ||
346 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__TAX_PAYER, newTaxPayer, newTaxPayer)); | ||
347 | } | ||
348 | |||
349 | /** | ||
350 | * <!-- begin-user-doc --> | ||
351 | * <!-- end-user-doc --> | ||
352 | * @generated | ||
353 | */ | ||
354 | @Override | ||
355 | public EList<Income_Detail> getDetails() { | ||
356 | if (details == null) { | ||
357 | details = new EObjectContainmentWithInverseEList<Income_Detail>(Income_Detail.class, this, TaxationPackage.INCOME__DETAILS, TaxationPackage.INCOME_DETAIL__INCOME); | ||
358 | } | ||
359 | return details; | ||
360 | } | ||
361 | |||
362 | /** | ||
363 | * <!-- begin-user-doc --> | ||
364 | * <!-- end-user-doc --> | ||
365 | * @generated | ||
366 | */ | ||
367 | @Override | ||
368 | public int getNum() { | ||
369 | return num; | ||
370 | } | ||
371 | |||
372 | /** | ||
373 | * <!-- begin-user-doc --> | ||
374 | * <!-- end-user-doc --> | ||
375 | * @generated | ||
376 | */ | ||
377 | @Override | ||
378 | public void setNum(int newNum) { | ||
379 | int oldNum = num; | ||
380 | num = newNum; | ||
381 | if (eNotificationRequired()) | ||
382 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__NUM, oldNum, num)); | ||
383 | } | ||
384 | |||
385 | /** | ||
386 | * <!-- begin-user-doc --> | ||
387 | * <!-- end-user-doc --> | ||
388 | * @generated | ||
389 | */ | ||
390 | @Override | ||
391 | public EList<Expense> getExpenses() { | ||
392 | if (expenses == null) { | ||
393 | expenses = new EObjectContainmentWithInverseEList<Expense>(Expense.class, this, TaxationPackage.INCOME__EXPENSES, TaxationPackage.EXPENSE__INCOME); | ||
394 | } | ||
395 | return expenses; | ||
396 | } | ||
397 | |||
398 | /** | ||
399 | * <!-- begin-user-doc --> | ||
400 | * <!-- end-user-doc --> | ||
401 | * @generated | ||
402 | */ | ||
403 | @SuppressWarnings("unchecked") | ||
404 | @Override | ||
405 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
406 | switch (featureID) { | ||
407 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
408 | if (income_type != null) | ||
409 | msgs = ((InternalEObject)income_type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaxationPackage.INCOME__INCOME_TYPE, null, msgs); | ||
410 | return basicSetIncome_type((Income_Type)otherEnd, msgs); | ||
411 | case TaxationPackage.INCOME__TAX_CARD: | ||
412 | if (tax_card != null) | ||
413 | msgs = ((InternalEObject)tax_card).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaxationPackage.INCOME__TAX_CARD, null, msgs); | ||
414 | return basicSetTax_card((Tax_Card)otherEnd, msgs); | ||
415 | case TaxationPackage.INCOME__TAX_PAYER: | ||
416 | if (eInternalContainer() != null) | ||
417 | msgs = eBasicRemoveFromContainer(msgs); | ||
418 | return basicSetTaxPayer((Tax_Payer)otherEnd, msgs); | ||
419 | case TaxationPackage.INCOME__DETAILS: | ||
420 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getDetails()).basicAdd(otherEnd, msgs); | ||
421 | case TaxationPackage.INCOME__EXPENSES: | ||
422 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getExpenses()).basicAdd(otherEnd, msgs); | ||
423 | } | ||
424 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
425 | } | ||
426 | |||
427 | /** | ||
428 | * <!-- begin-user-doc --> | ||
429 | * <!-- end-user-doc --> | ||
430 | * @generated | ||
431 | */ | ||
432 | @Override | ||
433 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
434 | switch (featureID) { | ||
435 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
436 | return basicSetIncome_type(null, msgs); | ||
437 | case TaxationPackage.INCOME__TAX_CARD: | ||
438 | return basicSetTax_card(null, msgs); | ||
439 | case TaxationPackage.INCOME__TAX_PAYER: | ||
440 | return basicSetTaxPayer(null, msgs); | ||
441 | case TaxationPackage.INCOME__DETAILS: | ||
442 | return ((InternalEList<?>)getDetails()).basicRemove(otherEnd, msgs); | ||
443 | case TaxationPackage.INCOME__EXPENSES: | ||
444 | return ((InternalEList<?>)getExpenses()).basicRemove(otherEnd, msgs); | ||
445 | } | ||
446 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
447 | } | ||
448 | |||
449 | /** | ||
450 | * <!-- begin-user-doc --> | ||
451 | * <!-- end-user-doc --> | ||
452 | * @generated | ||
453 | */ | ||
454 | @Override | ||
455 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { | ||
456 | switch (eContainerFeatureID()) { | ||
457 | case TaxationPackage.INCOME__TAX_PAYER: | ||
458 | return eInternalContainer().eInverseRemove(this, TaxationPackage.TAX_PAYER__INCOMES, Tax_Payer.class, msgs); | ||
459 | } | ||
460 | return super.eBasicRemoveFromContainerFeature(msgs); | ||
461 | } | ||
462 | |||
463 | /** | ||
464 | * <!-- begin-user-doc --> | ||
465 | * <!-- end-user-doc --> | ||
466 | * @generated | ||
467 | */ | ||
468 | @Override | ||
469 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
470 | switch (featureID) { | ||
471 | case TaxationPackage.INCOME__INCOME_AMOUNT: | ||
472 | return getIncome_amount(); | ||
473 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
474 | return getIncome_type(); | ||
475 | case TaxationPackage.INCOME__TAX_CARD: | ||
476 | return getTax_card(); | ||
477 | case TaxationPackage.INCOME__TAX_LIABILITY: | ||
478 | return getTax_liability(); | ||
479 | case TaxationPackage.INCOME__TAX_PAYER: | ||
480 | return getTaxPayer(); | ||
481 | case TaxationPackage.INCOME__DETAILS: | ||
482 | return getDetails(); | ||
483 | case TaxationPackage.INCOME__NUM: | ||
484 | return getNum(); | ||
485 | case TaxationPackage.INCOME__EXPENSES: | ||
486 | return getExpenses(); | ||
487 | } | ||
488 | return super.eGet(featureID, resolve, coreType); | ||
489 | } | ||
490 | |||
491 | /** | ||
492 | * <!-- begin-user-doc --> | ||
493 | * <!-- end-user-doc --> | ||
494 | * @generated | ||
495 | */ | ||
496 | @SuppressWarnings("unchecked") | ||
497 | @Override | ||
498 | public void eSet(int featureID, Object newValue) { | ||
499 | switch (featureID) { | ||
500 | case TaxationPackage.INCOME__INCOME_AMOUNT: | ||
501 | setIncome_amount((Double)newValue); | ||
502 | return; | ||
503 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
504 | setIncome_type((Income_Type)newValue); | ||
505 | return; | ||
506 | case TaxationPackage.INCOME__TAX_CARD: | ||
507 | setTax_card((Tax_Card)newValue); | ||
508 | return; | ||
509 | case TaxationPackage.INCOME__TAX_LIABILITY: | ||
510 | setTax_liability((Double)newValue); | ||
511 | return; | ||
512 | case TaxationPackage.INCOME__TAX_PAYER: | ||
513 | setTaxPayer((Tax_Payer)newValue); | ||
514 | return; | ||
515 | case TaxationPackage.INCOME__DETAILS: | ||
516 | getDetails().clear(); | ||
517 | getDetails().addAll((Collection<? extends Income_Detail>)newValue); | ||
518 | return; | ||
519 | case TaxationPackage.INCOME__NUM: | ||
520 | setNum((Integer)newValue); | ||
521 | return; | ||
522 | case TaxationPackage.INCOME__EXPENSES: | ||
523 | getExpenses().clear(); | ||
524 | getExpenses().addAll((Collection<? extends Expense>)newValue); | ||
525 | return; | ||
526 | } | ||
527 | super.eSet(featureID, newValue); | ||
528 | } | ||
529 | |||
530 | /** | ||
531 | * <!-- begin-user-doc --> | ||
532 | * <!-- end-user-doc --> | ||
533 | * @generated | ||
534 | */ | ||
535 | @Override | ||
536 | public void eUnset(int featureID) { | ||
537 | switch (featureID) { | ||
538 | case TaxationPackage.INCOME__INCOME_AMOUNT: | ||
539 | setIncome_amount(INCOME_AMOUNT_EDEFAULT); | ||
540 | return; | ||
541 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
542 | setIncome_type((Income_Type)null); | ||
543 | return; | ||
544 | case TaxationPackage.INCOME__TAX_CARD: | ||
545 | setTax_card((Tax_Card)null); | ||
546 | return; | ||
547 | case TaxationPackage.INCOME__TAX_LIABILITY: | ||
548 | setTax_liability(TAX_LIABILITY_EDEFAULT); | ||
549 | return; | ||
550 | case TaxationPackage.INCOME__TAX_PAYER: | ||
551 | setTaxPayer((Tax_Payer)null); | ||
552 | return; | ||
553 | case TaxationPackage.INCOME__DETAILS: | ||
554 | getDetails().clear(); | ||
555 | return; | ||
556 | case TaxationPackage.INCOME__NUM: | ||
557 | setNum(NUM_EDEFAULT); | ||
558 | return; | ||
559 | case TaxationPackage.INCOME__EXPENSES: | ||
560 | getExpenses().clear(); | ||
561 | return; | ||
562 | } | ||
563 | super.eUnset(featureID); | ||
564 | } | ||
565 | |||
566 | /** | ||
567 | * <!-- begin-user-doc --> | ||
568 | * <!-- end-user-doc --> | ||
569 | * @generated | ||
570 | */ | ||
571 | @Override | ||
572 | public boolean eIsSet(int featureID) { | ||
573 | switch (featureID) { | ||
574 | case TaxationPackage.INCOME__INCOME_AMOUNT: | ||
575 | return income_amount != INCOME_AMOUNT_EDEFAULT; | ||
576 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
577 | return income_type != null; | ||
578 | case TaxationPackage.INCOME__TAX_CARD: | ||
579 | return tax_card != null; | ||
580 | case TaxationPackage.INCOME__TAX_LIABILITY: | ||
581 | return tax_liability != TAX_LIABILITY_EDEFAULT; | ||
582 | case TaxationPackage.INCOME__TAX_PAYER: | ||
583 | return getTaxPayer() != null; | ||
584 | case TaxationPackage.INCOME__DETAILS: | ||
585 | return details != null && !details.isEmpty(); | ||
586 | case TaxationPackage.INCOME__NUM: | ||
587 | return num != NUM_EDEFAULT; | ||
588 | case TaxationPackage.INCOME__EXPENSES: | ||
589 | return expenses != null && !expenses.isEmpty(); | ||
590 | } | ||
591 | return super.eIsSet(featureID); | ||
592 | } | ||
593 | |||
594 | /** | ||
595 | * <!-- begin-user-doc --> | ||
596 | * <!-- end-user-doc --> | ||
597 | * @generated | ||
598 | */ | ||
599 | @Override | ||
600 | public String toString() { | ||
601 | if (eIsProxy()) return super.toString(); | ||
602 | |||
603 | StringBuilder result = new StringBuilder(super.toString()); | ||
604 | result.append(" (income_amount: "); | ||
605 | result.append(income_amount); | ||
606 | result.append(", tax_liability: "); | ||
607 | result.append(tax_liability); | ||
608 | result.append(", num: "); | ||
609 | result.append(num); | ||
610 | result.append(')'); | ||
611 | return result.toString(); | ||
612 | } | ||
613 | |||
614 | } //IncomeImpl | ||