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 | 782 |
1 files changed, 782 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..233d467c --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/IncomeImpl.java | |||
@@ -0,0 +1,782 @@ | |||
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 | import java.util.Collection; | ||
13 | import java.util.Date; | ||
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#getStart_date_within_taxation_year <em>Start date within taxation year</em>}</li> | ||
41 | * <li>{@link Taxation.impl.IncomeImpl#getStart_date_of_contract <em>Start date of contract</em>}</li> | ||
42 | * <li>{@link Taxation.impl.IncomeImpl#getEnd_date_within_taxation_year <em>End date within taxation year</em>}</li> | ||
43 | * <li>{@link Taxation.impl.IncomeImpl#getTax_card <em>Tax card</em>}</li> | ||
44 | * <li>{@link Taxation.impl.IncomeImpl#getTax_liability <em>Tax liability</em>}</li> | ||
45 | * <li>{@link Taxation.impl.IncomeImpl#getTaxPayer <em>Tax Payer</em>}</li> | ||
46 | * <li>{@link Taxation.impl.IncomeImpl#getDetails <em>Details</em>}</li> | ||
47 | * <li>{@link Taxation.impl.IncomeImpl#getNum <em>Num</em>}</li> | ||
48 | * <li>{@link Taxation.impl.IncomeImpl#getExpenses <em>Expenses</em>}</li> | ||
49 | * </ul> | ||
50 | * | ||
51 | * @generated | ||
52 | */ | ||
53 | public abstract class IncomeImpl extends MinimalEObjectImpl.Container implements Income { | ||
54 | /** | ||
55 | * The default value of the '{@link #getIncome_amount() <em>Income amount</em>}' attribute. | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @see #getIncome_amount() | ||
59 | * @generated | ||
60 | * @ordered | ||
61 | */ | ||
62 | protected static final double INCOME_AMOUNT_EDEFAULT = 0.0; | ||
63 | |||
64 | /** | ||
65 | * The cached value of the '{@link #getIncome_amount() <em>Income amount</em>}' attribute. | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @see #getIncome_amount() | ||
69 | * @generated | ||
70 | * @ordered | ||
71 | */ | ||
72 | protected double income_amount = INCOME_AMOUNT_EDEFAULT; | ||
73 | |||
74 | /** | ||
75 | * The cached value of the '{@link #getIncome_type() <em>Income type</em>}' containment reference. | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @see #getIncome_type() | ||
79 | * @generated | ||
80 | * @ordered | ||
81 | */ | ||
82 | protected Income_Type income_type; | ||
83 | |||
84 | /** | ||
85 | * The default value of the '{@link #getStart_date_within_taxation_year() <em>Start date within taxation year</em>}' attribute. | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @see #getStart_date_within_taxation_year() | ||
89 | * @generated | ||
90 | * @ordered | ||
91 | */ | ||
92 | protected static final Date START_DATE_WITHIN_TAXATION_YEAR_EDEFAULT = null; | ||
93 | |||
94 | /** | ||
95 | * The cached value of the '{@link #getStart_date_within_taxation_year() <em>Start date within taxation year</em>}' attribute. | ||
96 | * <!-- begin-user-doc --> | ||
97 | * <!-- end-user-doc --> | ||
98 | * @see #getStart_date_within_taxation_year() | ||
99 | * @generated | ||
100 | * @ordered | ||
101 | */ | ||
102 | protected Date start_date_within_taxation_year = START_DATE_WITHIN_TAXATION_YEAR_EDEFAULT; | ||
103 | |||
104 | /** | ||
105 | * The default value of the '{@link #getStart_date_of_contract() <em>Start date of contract</em>}' attribute. | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @see #getStart_date_of_contract() | ||
109 | * @generated | ||
110 | * @ordered | ||
111 | */ | ||
112 | protected static final Date START_DATE_OF_CONTRACT_EDEFAULT = null; | ||
113 | |||
114 | /** | ||
115 | * The cached value of the '{@link #getStart_date_of_contract() <em>Start date of contract</em>}' attribute. | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @see #getStart_date_of_contract() | ||
119 | * @generated | ||
120 | * @ordered | ||
121 | */ | ||
122 | protected Date start_date_of_contract = START_DATE_OF_CONTRACT_EDEFAULT; | ||
123 | |||
124 | /** | ||
125 | * The default value of the '{@link #getEnd_date_within_taxation_year() <em>End date within taxation year</em>}' attribute. | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @see #getEnd_date_within_taxation_year() | ||
129 | * @generated | ||
130 | * @ordered | ||
131 | */ | ||
132 | protected static final Date END_DATE_WITHIN_TAXATION_YEAR_EDEFAULT = null; | ||
133 | |||
134 | /** | ||
135 | * The cached value of the '{@link #getEnd_date_within_taxation_year() <em>End date within taxation year</em>}' attribute. | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @see #getEnd_date_within_taxation_year() | ||
139 | * @generated | ||
140 | * @ordered | ||
141 | */ | ||
142 | protected Date end_date_within_taxation_year = END_DATE_WITHIN_TAXATION_YEAR_EDEFAULT; | ||
143 | |||
144 | /** | ||
145 | * The cached value of the '{@link #getTax_card() <em>Tax card</em>}' containment reference. | ||
146 | * <!-- begin-user-doc --> | ||
147 | * <!-- end-user-doc --> | ||
148 | * @see #getTax_card() | ||
149 | * @generated | ||
150 | * @ordered | ||
151 | */ | ||
152 | protected Tax_Card tax_card; | ||
153 | |||
154 | /** | ||
155 | * The default value of the '{@link #getTax_liability() <em>Tax liability</em>}' attribute. | ||
156 | * <!-- begin-user-doc --> | ||
157 | * <!-- end-user-doc --> | ||
158 | * @see #getTax_liability() | ||
159 | * @generated | ||
160 | * @ordered | ||
161 | */ | ||
162 | protected static final double TAX_LIABILITY_EDEFAULT = 0.0; | ||
163 | |||
164 | /** | ||
165 | * The cached value of the '{@link #getTax_liability() <em>Tax liability</em>}' attribute. | ||
166 | * <!-- begin-user-doc --> | ||
167 | * <!-- end-user-doc --> | ||
168 | * @see #getTax_liability() | ||
169 | * @generated | ||
170 | * @ordered | ||
171 | */ | ||
172 | protected double tax_liability = TAX_LIABILITY_EDEFAULT; | ||
173 | |||
174 | /** | ||
175 | * The cached value of the '{@link #getDetails() <em>Details</em>}' containment reference list. | ||
176 | * <!-- begin-user-doc --> | ||
177 | * <!-- end-user-doc --> | ||
178 | * @see #getDetails() | ||
179 | * @generated | ||
180 | * @ordered | ||
181 | */ | ||
182 | protected EList<Income_Detail> details; | ||
183 | |||
184 | /** | ||
185 | * The default value of the '{@link #getNum() <em>Num</em>}' attribute. | ||
186 | * <!-- begin-user-doc --> | ||
187 | * <!-- end-user-doc --> | ||
188 | * @see #getNum() | ||
189 | * @generated | ||
190 | * @ordered | ||
191 | */ | ||
192 | protected static final int NUM_EDEFAULT = 0; | ||
193 | |||
194 | /** | ||
195 | * The cached value of the '{@link #getNum() <em>Num</em>}' attribute. | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @see #getNum() | ||
199 | * @generated | ||
200 | * @ordered | ||
201 | */ | ||
202 | protected int num = NUM_EDEFAULT; | ||
203 | |||
204 | /** | ||
205 | * The cached value of the '{@link #getExpenses() <em>Expenses</em>}' containment reference list. | ||
206 | * <!-- begin-user-doc --> | ||
207 | * <!-- end-user-doc --> | ||
208 | * @see #getExpenses() | ||
209 | * @generated | ||
210 | * @ordered | ||
211 | */ | ||
212 | protected EList<Expense> expenses; | ||
213 | |||
214 | /** | ||
215 | * <!-- begin-user-doc --> | ||
216 | * <!-- end-user-doc --> | ||
217 | * @generated | ||
218 | */ | ||
219 | protected IncomeImpl() { | ||
220 | super(); | ||
221 | } | ||
222 | |||
223 | /** | ||
224 | * <!-- begin-user-doc --> | ||
225 | * <!-- end-user-doc --> | ||
226 | * @generated | ||
227 | */ | ||
228 | @Override | ||
229 | protected EClass eStaticClass() { | ||
230 | return TaxationPackage.Literals.INCOME; | ||
231 | } | ||
232 | |||
233 | /** | ||
234 | * <!-- begin-user-doc --> | ||
235 | * <!-- end-user-doc --> | ||
236 | * @generated | ||
237 | */ | ||
238 | @Override | ||
239 | public double getIncome_amount() { | ||
240 | return income_amount; | ||
241 | } | ||
242 | |||
243 | /** | ||
244 | * <!-- begin-user-doc --> | ||
245 | * <!-- end-user-doc --> | ||
246 | * @generated | ||
247 | */ | ||
248 | @Override | ||
249 | public void setIncome_amount(double newIncome_amount) { | ||
250 | double oldIncome_amount = income_amount; | ||
251 | income_amount = newIncome_amount; | ||
252 | if (eNotificationRequired()) | ||
253 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__INCOME_AMOUNT, oldIncome_amount, income_amount)); | ||
254 | } | ||
255 | |||
256 | /** | ||
257 | * <!-- begin-user-doc --> | ||
258 | * <!-- end-user-doc --> | ||
259 | * @generated | ||
260 | */ | ||
261 | @Override | ||
262 | public Income_Type getIncome_type() { | ||
263 | return income_type; | ||
264 | } | ||
265 | |||
266 | /** | ||
267 | * <!-- begin-user-doc --> | ||
268 | * <!-- end-user-doc --> | ||
269 | * @generated | ||
270 | */ | ||
271 | public NotificationChain basicSetIncome_type(Income_Type newIncome_type, NotificationChain msgs) { | ||
272 | Income_Type oldIncome_type = income_type; | ||
273 | income_type = newIncome_type; | ||
274 | if (eNotificationRequired()) { | ||
275 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__INCOME_TYPE, oldIncome_type, newIncome_type); | ||
276 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
277 | } | ||
278 | return msgs; | ||
279 | } | ||
280 | |||
281 | /** | ||
282 | * <!-- begin-user-doc --> | ||
283 | * <!-- end-user-doc --> | ||
284 | * @generated | ||
285 | */ | ||
286 | @Override | ||
287 | public void setIncome_type(Income_Type newIncome_type) { | ||
288 | if (newIncome_type != income_type) { | ||
289 | NotificationChain msgs = null; | ||
290 | if (income_type != null) | ||
291 | msgs = ((InternalEObject)income_type).eInverseRemove(this, TaxationPackage.INCOME_TYPE__INCOME, Income_Type.class, msgs); | ||
292 | if (newIncome_type != null) | ||
293 | msgs = ((InternalEObject)newIncome_type).eInverseAdd(this, TaxationPackage.INCOME_TYPE__INCOME, Income_Type.class, msgs); | ||
294 | msgs = basicSetIncome_type(newIncome_type, msgs); | ||
295 | if (msgs != null) msgs.dispatch(); | ||
296 | } | ||
297 | else if (eNotificationRequired()) | ||
298 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__INCOME_TYPE, newIncome_type, newIncome_type)); | ||
299 | } | ||
300 | |||
301 | /** | ||
302 | * <!-- begin-user-doc --> | ||
303 | * <!-- end-user-doc --> | ||
304 | * @generated | ||
305 | */ | ||
306 | @Override | ||
307 | public Date getStart_date_within_taxation_year() { | ||
308 | return start_date_within_taxation_year; | ||
309 | } | ||
310 | |||
311 | /** | ||
312 | * <!-- begin-user-doc --> | ||
313 | * <!-- end-user-doc --> | ||
314 | * @generated | ||
315 | */ | ||
316 | @Override | ||
317 | public void setStart_date_within_taxation_year(Date newStart_date_within_taxation_year) { | ||
318 | Date oldStart_date_within_taxation_year = start_date_within_taxation_year; | ||
319 | start_date_within_taxation_year = newStart_date_within_taxation_year; | ||
320 | if (eNotificationRequired()) | ||
321 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__START_DATE_WITHIN_TAXATION_YEAR, oldStart_date_within_taxation_year, start_date_within_taxation_year)); | ||
322 | } | ||
323 | |||
324 | /** | ||
325 | * <!-- begin-user-doc --> | ||
326 | * <!-- end-user-doc --> | ||
327 | * @generated | ||
328 | */ | ||
329 | @Override | ||
330 | public Date getStart_date_of_contract() { | ||
331 | return start_date_of_contract; | ||
332 | } | ||
333 | |||
334 | /** | ||
335 | * <!-- begin-user-doc --> | ||
336 | * <!-- end-user-doc --> | ||
337 | * @generated | ||
338 | */ | ||
339 | @Override | ||
340 | public void setStart_date_of_contract(Date newStart_date_of_contract) { | ||
341 | Date oldStart_date_of_contract = start_date_of_contract; | ||
342 | start_date_of_contract = newStart_date_of_contract; | ||
343 | if (eNotificationRequired()) | ||
344 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__START_DATE_OF_CONTRACT, oldStart_date_of_contract, start_date_of_contract)); | ||
345 | } | ||
346 | |||
347 | /** | ||
348 | * <!-- begin-user-doc --> | ||
349 | * <!-- end-user-doc --> | ||
350 | * @generated | ||
351 | */ | ||
352 | @Override | ||
353 | public Date getEnd_date_within_taxation_year() { | ||
354 | return end_date_within_taxation_year; | ||
355 | } | ||
356 | |||
357 | /** | ||
358 | * <!-- begin-user-doc --> | ||
359 | * <!-- end-user-doc --> | ||
360 | * @generated | ||
361 | */ | ||
362 | @Override | ||
363 | public void setEnd_date_within_taxation_year(Date newEnd_date_within_taxation_year) { | ||
364 | Date oldEnd_date_within_taxation_year = end_date_within_taxation_year; | ||
365 | end_date_within_taxation_year = newEnd_date_within_taxation_year; | ||
366 | if (eNotificationRequired()) | ||
367 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__END_DATE_WITHIN_TAXATION_YEAR, oldEnd_date_within_taxation_year, end_date_within_taxation_year)); | ||
368 | } | ||
369 | |||
370 | /** | ||
371 | * <!-- begin-user-doc --> | ||
372 | * <!-- end-user-doc --> | ||
373 | * @generated | ||
374 | */ | ||
375 | @Override | ||
376 | public Tax_Card getTax_card() { | ||
377 | return tax_card; | ||
378 | } | ||
379 | |||
380 | /** | ||
381 | * <!-- begin-user-doc --> | ||
382 | * <!-- end-user-doc --> | ||
383 | * @generated | ||
384 | */ | ||
385 | public NotificationChain basicSetTax_card(Tax_Card newTax_card, NotificationChain msgs) { | ||
386 | Tax_Card oldTax_card = tax_card; | ||
387 | tax_card = newTax_card; | ||
388 | if (eNotificationRequired()) { | ||
389 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__TAX_CARD, oldTax_card, newTax_card); | ||
390 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
391 | } | ||
392 | return msgs; | ||
393 | } | ||
394 | |||
395 | /** | ||
396 | * <!-- begin-user-doc --> | ||
397 | * <!-- end-user-doc --> | ||
398 | * @generated | ||
399 | */ | ||
400 | @Override | ||
401 | public void setTax_card(Tax_Card newTax_card) { | ||
402 | if (newTax_card != tax_card) { | ||
403 | NotificationChain msgs = null; | ||
404 | if (tax_card != null) | ||
405 | msgs = ((InternalEObject)tax_card).eInverseRemove(this, TaxationPackage.TAX_CARD__INCOME, Tax_Card.class, msgs); | ||
406 | if (newTax_card != null) | ||
407 | msgs = ((InternalEObject)newTax_card).eInverseAdd(this, TaxationPackage.TAX_CARD__INCOME, Tax_Card.class, msgs); | ||
408 | msgs = basicSetTax_card(newTax_card, msgs); | ||
409 | if (msgs != null) msgs.dispatch(); | ||
410 | } | ||
411 | else if (eNotificationRequired()) | ||
412 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__TAX_CARD, newTax_card, newTax_card)); | ||
413 | } | ||
414 | |||
415 | /** | ||
416 | * <!-- begin-user-doc --> | ||
417 | * <!-- end-user-doc --> | ||
418 | * @generated | ||
419 | */ | ||
420 | @Override | ||
421 | public double getTax_liability() { | ||
422 | return tax_liability; | ||
423 | } | ||
424 | |||
425 | /** | ||
426 | * <!-- begin-user-doc --> | ||
427 | * <!-- end-user-doc --> | ||
428 | * @generated | ||
429 | */ | ||
430 | @Override | ||
431 | public void setTax_liability(double newTax_liability) { | ||
432 | double oldTax_liability = tax_liability; | ||
433 | tax_liability = newTax_liability; | ||
434 | if (eNotificationRequired()) | ||
435 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__TAX_LIABILITY, oldTax_liability, tax_liability)); | ||
436 | } | ||
437 | |||
438 | /** | ||
439 | * <!-- begin-user-doc --> | ||
440 | * <!-- end-user-doc --> | ||
441 | * @generated | ||
442 | */ | ||
443 | @Override | ||
444 | public Tax_Payer getTaxPayer() { | ||
445 | if (eContainerFeatureID() != TaxationPackage.INCOME__TAX_PAYER) return null; | ||
446 | return (Tax_Payer)eInternalContainer(); | ||
447 | } | ||
448 | |||
449 | /** | ||
450 | * <!-- begin-user-doc --> | ||
451 | * <!-- end-user-doc --> | ||
452 | * @generated | ||
453 | */ | ||
454 | public NotificationChain basicSetTaxPayer(Tax_Payer newTaxPayer, NotificationChain msgs) { | ||
455 | msgs = eBasicSetContainer((InternalEObject)newTaxPayer, TaxationPackage.INCOME__TAX_PAYER, msgs); | ||
456 | return msgs; | ||
457 | } | ||
458 | |||
459 | /** | ||
460 | * <!-- begin-user-doc --> | ||
461 | * <!-- end-user-doc --> | ||
462 | * @generated | ||
463 | */ | ||
464 | @Override | ||
465 | public void setTaxPayer(Tax_Payer newTaxPayer) { | ||
466 | if (newTaxPayer != eInternalContainer() || (eContainerFeatureID() != TaxationPackage.INCOME__TAX_PAYER && newTaxPayer != null)) { | ||
467 | if (EcoreUtil.isAncestor(this, newTaxPayer)) | ||
468 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); | ||
469 | NotificationChain msgs = null; | ||
470 | if (eInternalContainer() != null) | ||
471 | msgs = eBasicRemoveFromContainer(msgs); | ||
472 | if (newTaxPayer != null) | ||
473 | msgs = ((InternalEObject)newTaxPayer).eInverseAdd(this, TaxationPackage.TAX_PAYER__INCOMES, Tax_Payer.class, msgs); | ||
474 | msgs = basicSetTaxPayer(newTaxPayer, msgs); | ||
475 | if (msgs != null) msgs.dispatch(); | ||
476 | } | ||
477 | else if (eNotificationRequired()) | ||
478 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__TAX_PAYER, newTaxPayer, newTaxPayer)); | ||
479 | } | ||
480 | |||
481 | /** | ||
482 | * <!-- begin-user-doc --> | ||
483 | * <!-- end-user-doc --> | ||
484 | * @generated | ||
485 | */ | ||
486 | @Override | ||
487 | public EList<Income_Detail> getDetails() { | ||
488 | if (details == null) { | ||
489 | details = new EObjectContainmentWithInverseEList<Income_Detail>(Income_Detail.class, this, TaxationPackage.INCOME__DETAILS, TaxationPackage.INCOME_DETAIL__INCOME); | ||
490 | } | ||
491 | return details; | ||
492 | } | ||
493 | |||
494 | /** | ||
495 | * <!-- begin-user-doc --> | ||
496 | * <!-- end-user-doc --> | ||
497 | * @generated | ||
498 | */ | ||
499 | @Override | ||
500 | public int getNum() { | ||
501 | return num; | ||
502 | } | ||
503 | |||
504 | /** | ||
505 | * <!-- begin-user-doc --> | ||
506 | * <!-- end-user-doc --> | ||
507 | * @generated | ||
508 | */ | ||
509 | @Override | ||
510 | public void setNum(int newNum) { | ||
511 | int oldNum = num; | ||
512 | num = newNum; | ||
513 | if (eNotificationRequired()) | ||
514 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.INCOME__NUM, oldNum, num)); | ||
515 | } | ||
516 | |||
517 | /** | ||
518 | * <!-- begin-user-doc --> | ||
519 | * <!-- end-user-doc --> | ||
520 | * @generated | ||
521 | */ | ||
522 | @Override | ||
523 | public EList<Expense> getExpenses() { | ||
524 | if (expenses == null) { | ||
525 | expenses = new EObjectContainmentWithInverseEList<Expense>(Expense.class, this, TaxationPackage.INCOME__EXPENSES, TaxationPackage.EXPENSE__INCOME); | ||
526 | } | ||
527 | return expenses; | ||
528 | } | ||
529 | |||
530 | /** | ||
531 | * <!-- begin-user-doc --> | ||
532 | * <!-- end-user-doc --> | ||
533 | * @generated | ||
534 | */ | ||
535 | @SuppressWarnings("unchecked") | ||
536 | @Override | ||
537 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
538 | switch (featureID) { | ||
539 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
540 | if (income_type != null) | ||
541 | msgs = ((InternalEObject)income_type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaxationPackage.INCOME__INCOME_TYPE, null, msgs); | ||
542 | return basicSetIncome_type((Income_Type)otherEnd, msgs); | ||
543 | case TaxationPackage.INCOME__TAX_CARD: | ||
544 | if (tax_card != null) | ||
545 | msgs = ((InternalEObject)tax_card).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaxationPackage.INCOME__TAX_CARD, null, msgs); | ||
546 | return basicSetTax_card((Tax_Card)otherEnd, msgs); | ||
547 | case TaxationPackage.INCOME__TAX_PAYER: | ||
548 | if (eInternalContainer() != null) | ||
549 | msgs = eBasicRemoveFromContainer(msgs); | ||
550 | return basicSetTaxPayer((Tax_Payer)otherEnd, msgs); | ||
551 | case TaxationPackage.INCOME__DETAILS: | ||
552 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getDetails()).basicAdd(otherEnd, msgs); | ||
553 | case TaxationPackage.INCOME__EXPENSES: | ||
554 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getExpenses()).basicAdd(otherEnd, msgs); | ||
555 | } | ||
556 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
557 | } | ||
558 | |||
559 | /** | ||
560 | * <!-- begin-user-doc --> | ||
561 | * <!-- end-user-doc --> | ||
562 | * @generated | ||
563 | */ | ||
564 | @Override | ||
565 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
566 | switch (featureID) { | ||
567 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
568 | return basicSetIncome_type(null, msgs); | ||
569 | case TaxationPackage.INCOME__TAX_CARD: | ||
570 | return basicSetTax_card(null, msgs); | ||
571 | case TaxationPackage.INCOME__TAX_PAYER: | ||
572 | return basicSetTaxPayer(null, msgs); | ||
573 | case TaxationPackage.INCOME__DETAILS: | ||
574 | return ((InternalEList<?>)getDetails()).basicRemove(otherEnd, msgs); | ||
575 | case TaxationPackage.INCOME__EXPENSES: | ||
576 | return ((InternalEList<?>)getExpenses()).basicRemove(otherEnd, msgs); | ||
577 | } | ||
578 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
579 | } | ||
580 | |||
581 | /** | ||
582 | * <!-- begin-user-doc --> | ||
583 | * <!-- end-user-doc --> | ||
584 | * @generated | ||
585 | */ | ||
586 | @Override | ||
587 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { | ||
588 | switch (eContainerFeatureID()) { | ||
589 | case TaxationPackage.INCOME__TAX_PAYER: | ||
590 | return eInternalContainer().eInverseRemove(this, TaxationPackage.TAX_PAYER__INCOMES, Tax_Payer.class, msgs); | ||
591 | } | ||
592 | return super.eBasicRemoveFromContainerFeature(msgs); | ||
593 | } | ||
594 | |||
595 | /** | ||
596 | * <!-- begin-user-doc --> | ||
597 | * <!-- end-user-doc --> | ||
598 | * @generated | ||
599 | */ | ||
600 | @Override | ||
601 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
602 | switch (featureID) { | ||
603 | case TaxationPackage.INCOME__INCOME_AMOUNT: | ||
604 | return getIncome_amount(); | ||
605 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
606 | return getIncome_type(); | ||
607 | case TaxationPackage.INCOME__START_DATE_WITHIN_TAXATION_YEAR: | ||
608 | return getStart_date_within_taxation_year(); | ||
609 | case TaxationPackage.INCOME__START_DATE_OF_CONTRACT: | ||
610 | return getStart_date_of_contract(); | ||
611 | case TaxationPackage.INCOME__END_DATE_WITHIN_TAXATION_YEAR: | ||
612 | return getEnd_date_within_taxation_year(); | ||
613 | case TaxationPackage.INCOME__TAX_CARD: | ||
614 | return getTax_card(); | ||
615 | case TaxationPackage.INCOME__TAX_LIABILITY: | ||
616 | return getTax_liability(); | ||
617 | case TaxationPackage.INCOME__TAX_PAYER: | ||
618 | return getTaxPayer(); | ||
619 | case TaxationPackage.INCOME__DETAILS: | ||
620 | return getDetails(); | ||
621 | case TaxationPackage.INCOME__NUM: | ||
622 | return getNum(); | ||
623 | case TaxationPackage.INCOME__EXPENSES: | ||
624 | return getExpenses(); | ||
625 | } | ||
626 | return super.eGet(featureID, resolve, coreType); | ||
627 | } | ||
628 | |||
629 | /** | ||
630 | * <!-- begin-user-doc --> | ||
631 | * <!-- end-user-doc --> | ||
632 | * @generated | ||
633 | */ | ||
634 | @SuppressWarnings("unchecked") | ||
635 | @Override | ||
636 | public void eSet(int featureID, Object newValue) { | ||
637 | switch (featureID) { | ||
638 | case TaxationPackage.INCOME__INCOME_AMOUNT: | ||
639 | setIncome_amount((Double)newValue); | ||
640 | return; | ||
641 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
642 | setIncome_type((Income_Type)newValue); | ||
643 | return; | ||
644 | case TaxationPackage.INCOME__START_DATE_WITHIN_TAXATION_YEAR: | ||
645 | setStart_date_within_taxation_year((Date)newValue); | ||
646 | return; | ||
647 | case TaxationPackage.INCOME__START_DATE_OF_CONTRACT: | ||
648 | setStart_date_of_contract((Date)newValue); | ||
649 | return; | ||
650 | case TaxationPackage.INCOME__END_DATE_WITHIN_TAXATION_YEAR: | ||
651 | setEnd_date_within_taxation_year((Date)newValue); | ||
652 | return; | ||
653 | case TaxationPackage.INCOME__TAX_CARD: | ||
654 | setTax_card((Tax_Card)newValue); | ||
655 | return; | ||
656 | case TaxationPackage.INCOME__TAX_LIABILITY: | ||
657 | setTax_liability((Double)newValue); | ||
658 | return; | ||
659 | case TaxationPackage.INCOME__TAX_PAYER: | ||
660 | setTaxPayer((Tax_Payer)newValue); | ||
661 | return; | ||
662 | case TaxationPackage.INCOME__DETAILS: | ||
663 | getDetails().clear(); | ||
664 | getDetails().addAll((Collection<? extends Income_Detail>)newValue); | ||
665 | return; | ||
666 | case TaxationPackage.INCOME__NUM: | ||
667 | setNum((Integer)newValue); | ||
668 | return; | ||
669 | case TaxationPackage.INCOME__EXPENSES: | ||
670 | getExpenses().clear(); | ||
671 | getExpenses().addAll((Collection<? extends Expense>)newValue); | ||
672 | return; | ||
673 | } | ||
674 | super.eSet(featureID, newValue); | ||
675 | } | ||
676 | |||
677 | /** | ||
678 | * <!-- begin-user-doc --> | ||
679 | * <!-- end-user-doc --> | ||
680 | * @generated | ||
681 | */ | ||
682 | @Override | ||
683 | public void eUnset(int featureID) { | ||
684 | switch (featureID) { | ||
685 | case TaxationPackage.INCOME__INCOME_AMOUNT: | ||
686 | setIncome_amount(INCOME_AMOUNT_EDEFAULT); | ||
687 | return; | ||
688 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
689 | setIncome_type((Income_Type)null); | ||
690 | return; | ||
691 | case TaxationPackage.INCOME__START_DATE_WITHIN_TAXATION_YEAR: | ||
692 | setStart_date_within_taxation_year(START_DATE_WITHIN_TAXATION_YEAR_EDEFAULT); | ||
693 | return; | ||
694 | case TaxationPackage.INCOME__START_DATE_OF_CONTRACT: | ||
695 | setStart_date_of_contract(START_DATE_OF_CONTRACT_EDEFAULT); | ||
696 | return; | ||
697 | case TaxationPackage.INCOME__END_DATE_WITHIN_TAXATION_YEAR: | ||
698 | setEnd_date_within_taxation_year(END_DATE_WITHIN_TAXATION_YEAR_EDEFAULT); | ||
699 | return; | ||
700 | case TaxationPackage.INCOME__TAX_CARD: | ||
701 | setTax_card((Tax_Card)null); | ||
702 | return; | ||
703 | case TaxationPackage.INCOME__TAX_LIABILITY: | ||
704 | setTax_liability(TAX_LIABILITY_EDEFAULT); | ||
705 | return; | ||
706 | case TaxationPackage.INCOME__TAX_PAYER: | ||
707 | setTaxPayer((Tax_Payer)null); | ||
708 | return; | ||
709 | case TaxationPackage.INCOME__DETAILS: | ||
710 | getDetails().clear(); | ||
711 | return; | ||
712 | case TaxationPackage.INCOME__NUM: | ||
713 | setNum(NUM_EDEFAULT); | ||
714 | return; | ||
715 | case TaxationPackage.INCOME__EXPENSES: | ||
716 | getExpenses().clear(); | ||
717 | return; | ||
718 | } | ||
719 | super.eUnset(featureID); | ||
720 | } | ||
721 | |||
722 | /** | ||
723 | * <!-- begin-user-doc --> | ||
724 | * <!-- end-user-doc --> | ||
725 | * @generated | ||
726 | */ | ||
727 | @Override | ||
728 | public boolean eIsSet(int featureID) { | ||
729 | switch (featureID) { | ||
730 | case TaxationPackage.INCOME__INCOME_AMOUNT: | ||
731 | return income_amount != INCOME_AMOUNT_EDEFAULT; | ||
732 | case TaxationPackage.INCOME__INCOME_TYPE: | ||
733 | return income_type != null; | ||
734 | case TaxationPackage.INCOME__START_DATE_WITHIN_TAXATION_YEAR: | ||
735 | return START_DATE_WITHIN_TAXATION_YEAR_EDEFAULT == null ? start_date_within_taxation_year != null : !START_DATE_WITHIN_TAXATION_YEAR_EDEFAULT.equals(start_date_within_taxation_year); | ||
736 | case TaxationPackage.INCOME__START_DATE_OF_CONTRACT: | ||
737 | return START_DATE_OF_CONTRACT_EDEFAULT == null ? start_date_of_contract != null : !START_DATE_OF_CONTRACT_EDEFAULT.equals(start_date_of_contract); | ||
738 | case TaxationPackage.INCOME__END_DATE_WITHIN_TAXATION_YEAR: | ||
739 | return END_DATE_WITHIN_TAXATION_YEAR_EDEFAULT == null ? end_date_within_taxation_year != null : !END_DATE_WITHIN_TAXATION_YEAR_EDEFAULT.equals(end_date_within_taxation_year); | ||
740 | case TaxationPackage.INCOME__TAX_CARD: | ||
741 | return tax_card != null; | ||
742 | case TaxationPackage.INCOME__TAX_LIABILITY: | ||
743 | return tax_liability != TAX_LIABILITY_EDEFAULT; | ||
744 | case TaxationPackage.INCOME__TAX_PAYER: | ||
745 | return getTaxPayer() != null; | ||
746 | case TaxationPackage.INCOME__DETAILS: | ||
747 | return details != null && !details.isEmpty(); | ||
748 | case TaxationPackage.INCOME__NUM: | ||
749 | return num != NUM_EDEFAULT; | ||
750 | case TaxationPackage.INCOME__EXPENSES: | ||
751 | return expenses != null && !expenses.isEmpty(); | ||
752 | } | ||
753 | return super.eIsSet(featureID); | ||
754 | } | ||
755 | |||
756 | /** | ||
757 | * <!-- begin-user-doc --> | ||
758 | * <!-- end-user-doc --> | ||
759 | * @generated | ||
760 | */ | ||
761 | @Override | ||
762 | public String toString() { | ||
763 | if (eIsProxy()) return super.toString(); | ||
764 | |||
765 | StringBuilder result = new StringBuilder(super.toString()); | ||
766 | result.append(" (income_amount: "); | ||
767 | result.append(income_amount); | ||
768 | result.append(", start_date_within_taxation_year: "); | ||
769 | result.append(start_date_within_taxation_year); | ||
770 | result.append(", start_date_of_contract: "); | ||
771 | result.append(start_date_of_contract); | ||
772 | result.append(", end_date_within_taxation_year: "); | ||
773 | result.append(end_date_within_taxation_year); | ||
774 | result.append(", tax_liability: "); | ||
775 | result.append(tax_liability); | ||
776 | result.append(", num: "); | ||
777 | result.append(num); | ||
778 | result.append(')'); | ||
779 | return result.toString(); | ||
780 | } | ||
781 | |||
782 | } //IncomeImpl | ||