diff options
author | ArenBabikian <aren.babikian@mail.mcgill.ca> | 2020-05-13 00:16:27 -0400 |
---|---|---|
committer | ArenBabikian <aren.babikian@mail.mcgill.ca> | 2020-05-13 00:16:27 -0400 |
commit | 5fd28fe3201ad6e316fea3688bd89130bc29bc13 (patch) | |
tree | f8cc7181b1eadec0f2e1d69d4cdac9e4938e07df /Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/ExpenseImpl.java | |
parent | memory cleaning message between tasks (diff) | |
download | VIATRA-Generator-5fd28fe3201ad6e316fea3688bd89130bc29bc13.tar.gz VIATRA-Generator-5fd28fe3201ad6e316fea3688bd89130bc29bc13.tar.zst VIATRA-Generator-5fd28fe3201ad6e316fea3688bd89130bc29bc13.zip |
Adjust FamilyTree MM. Add new Taxation MM with possible Multiple Roots
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/ExpenseImpl.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/ExpenseImpl.java | 654 |
1 files changed, 654 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/ExpenseImpl.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/ExpenseImpl.java new file mode 100644 index 00000000..7aaf4b51 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/TaxationWithRoot/impl/ExpenseImpl.java | |||
@@ -0,0 +1,654 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package TaxationWithRoot.impl; | ||
4 | |||
5 | import TaxationWithRoot.Dependent; | ||
6 | import TaxationWithRoot.Expense; | ||
7 | import TaxationWithRoot.Expense_Purpose; | ||
8 | import TaxationWithRoot.FromAgent; | ||
9 | import TaxationWithRoot.Income; | ||
10 | import TaxationWithRoot.Physical_Person; | ||
11 | import TaxationWithRoot.TaxationPackage; | ||
12 | |||
13 | import org.eclipse.emf.common.notify.Notification; | ||
14 | import org.eclipse.emf.common.notify.NotificationChain; | ||
15 | |||
16 | import org.eclipse.emf.ecore.EClass; | ||
17 | import org.eclipse.emf.ecore.InternalEObject; | ||
18 | |||
19 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
20 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
21 | |||
22 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
23 | |||
24 | /** | ||
25 | * <!-- begin-user-doc --> | ||
26 | * An implementation of the model object '<em><b>Expense</b></em>'. | ||
27 | * <!-- end-user-doc --> | ||
28 | * <p> | ||
29 | * The following features are implemented: | ||
30 | * </p> | ||
31 | * <ul> | ||
32 | * <li>{@link TaxationWithRoot.impl.ExpenseImpl#getDeclared_amount <em>Declared amount</em>}</li> | ||
33 | * <li>{@link TaxationWithRoot.impl.ExpenseImpl#getExpense_purpose <em>Expense purpose</em>}</li> | ||
34 | * <li>{@link TaxationWithRoot.impl.ExpenseImpl#getDependent <em>Dependent</em>}</li> | ||
35 | * <li>{@link TaxationWithRoot.impl.ExpenseImpl#getFrom_agent <em>From agent</em>}</li> | ||
36 | * <li>{@link TaxationWithRoot.impl.ExpenseImpl#getIncome <em>Income</em>}</li> | ||
37 | * <li>{@link TaxationWithRoot.impl.ExpenseImpl#getId4 <em>Id4</em>}</li> | ||
38 | * <li>{@link TaxationWithRoot.impl.ExpenseImpl#getBeneficiary <em>Beneficiary</em>}</li> | ||
39 | * </ul> | ||
40 | * | ||
41 | * @generated | ||
42 | */ | ||
43 | public class ExpenseImpl extends MinimalEObjectImpl.Container implements Expense { | ||
44 | /** | ||
45 | * The default value of the '{@link #getDeclared_amount() <em>Declared amount</em>}' attribute. | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @see #getDeclared_amount() | ||
49 | * @generated | ||
50 | * @ordered | ||
51 | */ | ||
52 | protected static final double DECLARED_AMOUNT_EDEFAULT = 0.0; | ||
53 | |||
54 | /** | ||
55 | * The cached value of the '{@link #getDeclared_amount() <em>Declared amount</em>}' attribute. | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @see #getDeclared_amount() | ||
59 | * @generated | ||
60 | * @ordered | ||
61 | */ | ||
62 | protected double declared_amount = DECLARED_AMOUNT_EDEFAULT; | ||
63 | |||
64 | /** | ||
65 | * The default value of the '{@link #getExpense_purpose() <em>Expense purpose</em>}' attribute. | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @see #getExpense_purpose() | ||
69 | * @generated | ||
70 | * @ordered | ||
71 | */ | ||
72 | protected static final Expense_Purpose EXPENSE_PURPOSE_EDEFAULT = Expense_Purpose.OTHER; | ||
73 | |||
74 | /** | ||
75 | * The cached value of the '{@link #getExpense_purpose() <em>Expense purpose</em>}' attribute. | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @see #getExpense_purpose() | ||
79 | * @generated | ||
80 | * @ordered | ||
81 | */ | ||
82 | protected Expense_Purpose expense_purpose = EXPENSE_PURPOSE_EDEFAULT; | ||
83 | |||
84 | /** | ||
85 | * The cached value of the '{@link #getDependent() <em>Dependent</em>}' reference. | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @see #getDependent() | ||
89 | * @generated | ||
90 | * @ordered | ||
91 | */ | ||
92 | protected Dependent dependent; | ||
93 | |||
94 | /** | ||
95 | * The cached value of the '{@link #getFrom_agent() <em>From agent</em>}' reference. | ||
96 | * <!-- begin-user-doc --> | ||
97 | * <!-- end-user-doc --> | ||
98 | * @see #getFrom_agent() | ||
99 | * @generated | ||
100 | * @ordered | ||
101 | */ | ||
102 | protected FromAgent from_agent; | ||
103 | |||
104 | /** | ||
105 | * The default value of the '{@link #getId4() <em>Id4</em>}' attribute. | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @see #getId4() | ||
109 | * @generated | ||
110 | * @ordered | ||
111 | */ | ||
112 | protected static final String ID4_EDEFAULT = null; | ||
113 | |||
114 | /** | ||
115 | * The cached value of the '{@link #getId4() <em>Id4</em>}' attribute. | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @see #getId4() | ||
119 | * @generated | ||
120 | * @ordered | ||
121 | */ | ||
122 | protected String id4 = ID4_EDEFAULT; | ||
123 | |||
124 | /** | ||
125 | * The cached value of the '{@link #getBeneficiary() <em>Beneficiary</em>}' reference. | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @see #getBeneficiary() | ||
129 | * @generated | ||
130 | * @ordered | ||
131 | */ | ||
132 | protected Physical_Person beneficiary; | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | protected ExpenseImpl() { | ||
140 | super(); | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | @Override | ||
149 | protected EClass eStaticClass() { | ||
150 | return TaxationPackage.Literals.EXPENSE; | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | */ | ||
158 | @Override | ||
159 | public double getDeclared_amount() { | ||
160 | return declared_amount; | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | @Override | ||
169 | public void setDeclared_amount(double newDeclared_amount) { | ||
170 | double oldDeclared_amount = declared_amount; | ||
171 | declared_amount = newDeclared_amount; | ||
172 | if (eNotificationRequired()) | ||
173 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__DECLARED_AMOUNT, oldDeclared_amount, declared_amount)); | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | @Override | ||
182 | public Expense_Purpose getExpense_purpose() { | ||
183 | return expense_purpose; | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * <!-- begin-user-doc --> | ||
188 | * <!-- end-user-doc --> | ||
189 | * @generated | ||
190 | */ | ||
191 | @Override | ||
192 | public void setExpense_purpose(Expense_Purpose newExpense_purpose) { | ||
193 | Expense_Purpose oldExpense_purpose = expense_purpose; | ||
194 | expense_purpose = newExpense_purpose == null ? EXPENSE_PURPOSE_EDEFAULT : newExpense_purpose; | ||
195 | if (eNotificationRequired()) | ||
196 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__EXPENSE_PURPOSE, oldExpense_purpose, expense_purpose)); | ||
197 | } | ||
198 | |||
199 | /** | ||
200 | * <!-- begin-user-doc --> | ||
201 | * <!-- end-user-doc --> | ||
202 | * @generated | ||
203 | */ | ||
204 | @Override | ||
205 | public Dependent getDependent() { | ||
206 | if (dependent != null && dependent.eIsProxy()) { | ||
207 | InternalEObject oldDependent = (InternalEObject)dependent; | ||
208 | dependent = (Dependent)eResolveProxy(oldDependent); | ||
209 | if (dependent != oldDependent) { | ||
210 | if (eNotificationRequired()) | ||
211 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaxationPackage.EXPENSE__DEPENDENT, oldDependent, dependent)); | ||
212 | } | ||
213 | } | ||
214 | return dependent; | ||
215 | } | ||
216 | |||
217 | /** | ||
218 | * <!-- begin-user-doc --> | ||
219 | * <!-- end-user-doc --> | ||
220 | * @generated | ||
221 | */ | ||
222 | public Dependent basicGetDependent() { | ||
223 | return dependent; | ||
224 | } | ||
225 | |||
226 | /** | ||
227 | * <!-- begin-user-doc --> | ||
228 | * <!-- end-user-doc --> | ||
229 | * @generated | ||
230 | */ | ||
231 | public NotificationChain basicSetDependent(Dependent newDependent, NotificationChain msgs) { | ||
232 | Dependent oldDependent = dependent; | ||
233 | dependent = newDependent; | ||
234 | if (eNotificationRequired()) { | ||
235 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__DEPENDENT, oldDependent, newDependent); | ||
236 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
237 | } | ||
238 | return msgs; | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * <!-- begin-user-doc --> | ||
243 | * <!-- end-user-doc --> | ||
244 | * @generated | ||
245 | */ | ||
246 | @Override | ||
247 | public void setDependent(Dependent newDependent) { | ||
248 | if (newDependent != dependent) { | ||
249 | NotificationChain msgs = null; | ||
250 | if (dependent != null) | ||
251 | msgs = ((InternalEObject)dependent).eInverseRemove(this, TaxationPackage.DEPENDENT__EXPENSE, Dependent.class, msgs); | ||
252 | if (newDependent != null) | ||
253 | msgs = ((InternalEObject)newDependent).eInverseAdd(this, TaxationPackage.DEPENDENT__EXPENSE, Dependent.class, msgs); | ||
254 | msgs = basicSetDependent(newDependent, msgs); | ||
255 | if (msgs != null) msgs.dispatch(); | ||
256 | } | ||
257 | else if (eNotificationRequired()) | ||
258 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__DEPENDENT, newDependent, newDependent)); | ||
259 | } | ||
260 | |||
261 | /** | ||
262 | * <!-- begin-user-doc --> | ||
263 | * <!-- end-user-doc --> | ||
264 | * @generated | ||
265 | */ | ||
266 | @Override | ||
267 | public FromAgent getFrom_agent() { | ||
268 | if (from_agent != null && from_agent.eIsProxy()) { | ||
269 | InternalEObject oldFrom_agent = (InternalEObject)from_agent; | ||
270 | from_agent = (FromAgent)eResolveProxy(oldFrom_agent); | ||
271 | if (from_agent != oldFrom_agent) { | ||
272 | if (eNotificationRequired()) | ||
273 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaxationPackage.EXPENSE__FROM_AGENT, oldFrom_agent, from_agent)); | ||
274 | } | ||
275 | } | ||
276 | return from_agent; | ||
277 | } | ||
278 | |||
279 | /** | ||
280 | * <!-- begin-user-doc --> | ||
281 | * <!-- end-user-doc --> | ||
282 | * @generated | ||
283 | */ | ||
284 | public FromAgent basicGetFrom_agent() { | ||
285 | return from_agent; | ||
286 | } | ||
287 | |||
288 | /** | ||
289 | * <!-- begin-user-doc --> | ||
290 | * <!-- end-user-doc --> | ||
291 | * @generated | ||
292 | */ | ||
293 | public NotificationChain basicSetFrom_agent(FromAgent newFrom_agent, NotificationChain msgs) { | ||
294 | FromAgent oldFrom_agent = from_agent; | ||
295 | from_agent = newFrom_agent; | ||
296 | if (eNotificationRequired()) { | ||
297 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__FROM_AGENT, oldFrom_agent, newFrom_agent); | ||
298 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
299 | } | ||
300 | return msgs; | ||
301 | } | ||
302 | |||
303 | /** | ||
304 | * <!-- begin-user-doc --> | ||
305 | * <!-- end-user-doc --> | ||
306 | * @generated | ||
307 | */ | ||
308 | @Override | ||
309 | public void setFrom_agent(FromAgent newFrom_agent) { | ||
310 | if (newFrom_agent != from_agent) { | ||
311 | NotificationChain msgs = null; | ||
312 | if (from_agent != null) | ||
313 | msgs = ((InternalEObject)from_agent).eInverseRemove(this, TaxationPackage.FROM_AGENT__EXPENSE, FromAgent.class, msgs); | ||
314 | if (newFrom_agent != null) | ||
315 | msgs = ((InternalEObject)newFrom_agent).eInverseAdd(this, TaxationPackage.FROM_AGENT__EXPENSE, FromAgent.class, msgs); | ||
316 | msgs = basicSetFrom_agent(newFrom_agent, msgs); | ||
317 | if (msgs != null) msgs.dispatch(); | ||
318 | } | ||
319 | else if (eNotificationRequired()) | ||
320 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__FROM_AGENT, newFrom_agent, newFrom_agent)); | ||
321 | } | ||
322 | |||
323 | /** | ||
324 | * <!-- begin-user-doc --> | ||
325 | * <!-- end-user-doc --> | ||
326 | * @generated | ||
327 | */ | ||
328 | @Override | ||
329 | public Income getIncome() { | ||
330 | if (eContainerFeatureID() != TaxationPackage.EXPENSE__INCOME) return null; | ||
331 | return (Income)eInternalContainer(); | ||
332 | } | ||
333 | |||
334 | /** | ||
335 | * <!-- begin-user-doc --> | ||
336 | * <!-- end-user-doc --> | ||
337 | * @generated | ||
338 | */ | ||
339 | public NotificationChain basicSetIncome(Income newIncome, NotificationChain msgs) { | ||
340 | msgs = eBasicSetContainer((InternalEObject)newIncome, TaxationPackage.EXPENSE__INCOME, msgs); | ||
341 | return msgs; | ||
342 | } | ||
343 | |||
344 | /** | ||
345 | * <!-- begin-user-doc --> | ||
346 | * <!-- end-user-doc --> | ||
347 | * @generated | ||
348 | */ | ||
349 | @Override | ||
350 | public void setIncome(Income newIncome) { | ||
351 | if (newIncome != eInternalContainer() || (eContainerFeatureID() != TaxationPackage.EXPENSE__INCOME && newIncome != null)) { | ||
352 | if (EcoreUtil.isAncestor(this, newIncome)) | ||
353 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); | ||
354 | NotificationChain msgs = null; | ||
355 | if (eInternalContainer() != null) | ||
356 | msgs = eBasicRemoveFromContainer(msgs); | ||
357 | if (newIncome != null) | ||
358 | msgs = ((InternalEObject)newIncome).eInverseAdd(this, TaxationPackage.INCOME__EXPENSES, Income.class, msgs); | ||
359 | msgs = basicSetIncome(newIncome, msgs); | ||
360 | if (msgs != null) msgs.dispatch(); | ||
361 | } | ||
362 | else if (eNotificationRequired()) | ||
363 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__INCOME, newIncome, newIncome)); | ||
364 | } | ||
365 | |||
366 | /** | ||
367 | * <!-- begin-user-doc --> | ||
368 | * <!-- end-user-doc --> | ||
369 | * @generated | ||
370 | */ | ||
371 | @Override | ||
372 | public String getId4() { | ||
373 | return id4; | ||
374 | } | ||
375 | |||
376 | /** | ||
377 | * <!-- begin-user-doc --> | ||
378 | * <!-- end-user-doc --> | ||
379 | * @generated | ||
380 | */ | ||
381 | @Override | ||
382 | public void setId4(String newId4) { | ||
383 | String oldId4 = id4; | ||
384 | id4 = newId4; | ||
385 | if (eNotificationRequired()) | ||
386 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__ID4, oldId4, id4)); | ||
387 | } | ||
388 | |||
389 | /** | ||
390 | * <!-- begin-user-doc --> | ||
391 | * <!-- end-user-doc --> | ||
392 | * @generated | ||
393 | */ | ||
394 | @Override | ||
395 | public Physical_Person getBeneficiary() { | ||
396 | if (beneficiary != null && beneficiary.eIsProxy()) { | ||
397 | InternalEObject oldBeneficiary = (InternalEObject)beneficiary; | ||
398 | beneficiary = (Physical_Person)eResolveProxy(oldBeneficiary); | ||
399 | if (beneficiary != oldBeneficiary) { | ||
400 | if (eNotificationRequired()) | ||
401 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaxationPackage.EXPENSE__BENEFICIARY, oldBeneficiary, beneficiary)); | ||
402 | } | ||
403 | } | ||
404 | return beneficiary; | ||
405 | } | ||
406 | |||
407 | /** | ||
408 | * <!-- begin-user-doc --> | ||
409 | * <!-- end-user-doc --> | ||
410 | * @generated | ||
411 | */ | ||
412 | public Physical_Person basicGetBeneficiary() { | ||
413 | return beneficiary; | ||
414 | } | ||
415 | |||
416 | /** | ||
417 | * <!-- begin-user-doc --> | ||
418 | * <!-- end-user-doc --> | ||
419 | * @generated | ||
420 | */ | ||
421 | public NotificationChain basicSetBeneficiary(Physical_Person newBeneficiary, NotificationChain msgs) { | ||
422 | Physical_Person oldBeneficiary = beneficiary; | ||
423 | beneficiary = newBeneficiary; | ||
424 | if (eNotificationRequired()) { | ||
425 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__BENEFICIARY, oldBeneficiary, newBeneficiary); | ||
426 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
427 | } | ||
428 | return msgs; | ||
429 | } | ||
430 | |||
431 | /** | ||
432 | * <!-- begin-user-doc --> | ||
433 | * <!-- end-user-doc --> | ||
434 | * @generated | ||
435 | */ | ||
436 | @Override | ||
437 | public void setBeneficiary(Physical_Person newBeneficiary) { | ||
438 | if (newBeneficiary != beneficiary) { | ||
439 | NotificationChain msgs = null; | ||
440 | if (beneficiary != null) | ||
441 | msgs = ((InternalEObject)beneficiary).eInverseRemove(this, TaxationPackage.PHYSICAL_PERSON__EXPENSES, Physical_Person.class, msgs); | ||
442 | if (newBeneficiary != null) | ||
443 | msgs = ((InternalEObject)newBeneficiary).eInverseAdd(this, TaxationPackage.PHYSICAL_PERSON__EXPENSES, Physical_Person.class, msgs); | ||
444 | msgs = basicSetBeneficiary(newBeneficiary, msgs); | ||
445 | if (msgs != null) msgs.dispatch(); | ||
446 | } | ||
447 | else if (eNotificationRequired()) | ||
448 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.EXPENSE__BENEFICIARY, newBeneficiary, newBeneficiary)); | ||
449 | } | ||
450 | |||
451 | /** | ||
452 | * <!-- begin-user-doc --> | ||
453 | * <!-- end-user-doc --> | ||
454 | * @generated | ||
455 | */ | ||
456 | @Override | ||
457 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
458 | switch (featureID) { | ||
459 | case TaxationPackage.EXPENSE__DEPENDENT: | ||
460 | if (dependent != null) | ||
461 | msgs = ((InternalEObject)dependent).eInverseRemove(this, TaxationPackage.DEPENDENT__EXPENSE, Dependent.class, msgs); | ||
462 | return basicSetDependent((Dependent)otherEnd, msgs); | ||
463 | case TaxationPackage.EXPENSE__FROM_AGENT: | ||
464 | if (from_agent != null) | ||
465 | msgs = ((InternalEObject)from_agent).eInverseRemove(this, TaxationPackage.FROM_AGENT__EXPENSE, FromAgent.class, msgs); | ||
466 | return basicSetFrom_agent((FromAgent)otherEnd, msgs); | ||
467 | case TaxationPackage.EXPENSE__INCOME: | ||
468 | if (eInternalContainer() != null) | ||
469 | msgs = eBasicRemoveFromContainer(msgs); | ||
470 | return basicSetIncome((Income)otherEnd, msgs); | ||
471 | case TaxationPackage.EXPENSE__BENEFICIARY: | ||
472 | if (beneficiary != null) | ||
473 | msgs = ((InternalEObject)beneficiary).eInverseRemove(this, TaxationPackage.PHYSICAL_PERSON__EXPENSES, Physical_Person.class, msgs); | ||
474 | return basicSetBeneficiary((Physical_Person)otherEnd, msgs); | ||
475 | } | ||
476 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
477 | } | ||
478 | |||
479 | /** | ||
480 | * <!-- begin-user-doc --> | ||
481 | * <!-- end-user-doc --> | ||
482 | * @generated | ||
483 | */ | ||
484 | @Override | ||
485 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
486 | switch (featureID) { | ||
487 | case TaxationPackage.EXPENSE__DEPENDENT: | ||
488 | return basicSetDependent(null, msgs); | ||
489 | case TaxationPackage.EXPENSE__FROM_AGENT: | ||
490 | return basicSetFrom_agent(null, msgs); | ||
491 | case TaxationPackage.EXPENSE__INCOME: | ||
492 | return basicSetIncome(null, msgs); | ||
493 | case TaxationPackage.EXPENSE__BENEFICIARY: | ||
494 | return basicSetBeneficiary(null, msgs); | ||
495 | } | ||
496 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
497 | } | ||
498 | |||
499 | /** | ||
500 | * <!-- begin-user-doc --> | ||
501 | * <!-- end-user-doc --> | ||
502 | * @generated | ||
503 | */ | ||
504 | @Override | ||
505 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { | ||
506 | switch (eContainerFeatureID()) { | ||
507 | case TaxationPackage.EXPENSE__INCOME: | ||
508 | return eInternalContainer().eInverseRemove(this, TaxationPackage.INCOME__EXPENSES, Income.class, msgs); | ||
509 | } | ||
510 | return super.eBasicRemoveFromContainerFeature(msgs); | ||
511 | } | ||
512 | |||
513 | /** | ||
514 | * <!-- begin-user-doc --> | ||
515 | * <!-- end-user-doc --> | ||
516 | * @generated | ||
517 | */ | ||
518 | @Override | ||
519 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
520 | switch (featureID) { | ||
521 | case TaxationPackage.EXPENSE__DECLARED_AMOUNT: | ||
522 | return getDeclared_amount(); | ||
523 | case TaxationPackage.EXPENSE__EXPENSE_PURPOSE: | ||
524 | return getExpense_purpose(); | ||
525 | case TaxationPackage.EXPENSE__DEPENDENT: | ||
526 | if (resolve) return getDependent(); | ||
527 | return basicGetDependent(); | ||
528 | case TaxationPackage.EXPENSE__FROM_AGENT: | ||
529 | if (resolve) return getFrom_agent(); | ||
530 | return basicGetFrom_agent(); | ||
531 | case TaxationPackage.EXPENSE__INCOME: | ||
532 | return getIncome(); | ||
533 | case TaxationPackage.EXPENSE__ID4: | ||
534 | return getId4(); | ||
535 | case TaxationPackage.EXPENSE__BENEFICIARY: | ||
536 | if (resolve) return getBeneficiary(); | ||
537 | return basicGetBeneficiary(); | ||
538 | } | ||
539 | return super.eGet(featureID, resolve, coreType); | ||
540 | } | ||
541 | |||
542 | /** | ||
543 | * <!-- begin-user-doc --> | ||
544 | * <!-- end-user-doc --> | ||
545 | * @generated | ||
546 | */ | ||
547 | @Override | ||
548 | public void eSet(int featureID, Object newValue) { | ||
549 | switch (featureID) { | ||
550 | case TaxationPackage.EXPENSE__DECLARED_AMOUNT: | ||
551 | setDeclared_amount((Double)newValue); | ||
552 | return; | ||
553 | case TaxationPackage.EXPENSE__EXPENSE_PURPOSE: | ||
554 | setExpense_purpose((Expense_Purpose)newValue); | ||
555 | return; | ||
556 | case TaxationPackage.EXPENSE__DEPENDENT: | ||
557 | setDependent((Dependent)newValue); | ||
558 | return; | ||
559 | case TaxationPackage.EXPENSE__FROM_AGENT: | ||
560 | setFrom_agent((FromAgent)newValue); | ||
561 | return; | ||
562 | case TaxationPackage.EXPENSE__INCOME: | ||
563 | setIncome((Income)newValue); | ||
564 | return; | ||
565 | case TaxationPackage.EXPENSE__ID4: | ||
566 | setId4((String)newValue); | ||
567 | return; | ||
568 | case TaxationPackage.EXPENSE__BENEFICIARY: | ||
569 | setBeneficiary((Physical_Person)newValue); | ||
570 | return; | ||
571 | } | ||
572 | super.eSet(featureID, newValue); | ||
573 | } | ||
574 | |||
575 | /** | ||
576 | * <!-- begin-user-doc --> | ||
577 | * <!-- end-user-doc --> | ||
578 | * @generated | ||
579 | */ | ||
580 | @Override | ||
581 | public void eUnset(int featureID) { | ||
582 | switch (featureID) { | ||
583 | case TaxationPackage.EXPENSE__DECLARED_AMOUNT: | ||
584 | setDeclared_amount(DECLARED_AMOUNT_EDEFAULT); | ||
585 | return; | ||
586 | case TaxationPackage.EXPENSE__EXPENSE_PURPOSE: | ||
587 | setExpense_purpose(EXPENSE_PURPOSE_EDEFAULT); | ||
588 | return; | ||
589 | case TaxationPackage.EXPENSE__DEPENDENT: | ||
590 | setDependent((Dependent)null); | ||
591 | return; | ||
592 | case TaxationPackage.EXPENSE__FROM_AGENT: | ||
593 | setFrom_agent((FromAgent)null); | ||
594 | return; | ||
595 | case TaxationPackage.EXPENSE__INCOME: | ||
596 | setIncome((Income)null); | ||
597 | return; | ||
598 | case TaxationPackage.EXPENSE__ID4: | ||
599 | setId4(ID4_EDEFAULT); | ||
600 | return; | ||
601 | case TaxationPackage.EXPENSE__BENEFICIARY: | ||
602 | setBeneficiary((Physical_Person)null); | ||
603 | return; | ||
604 | } | ||
605 | super.eUnset(featureID); | ||
606 | } | ||
607 | |||
608 | /** | ||
609 | * <!-- begin-user-doc --> | ||
610 | * <!-- end-user-doc --> | ||
611 | * @generated | ||
612 | */ | ||
613 | @Override | ||
614 | public boolean eIsSet(int featureID) { | ||
615 | switch (featureID) { | ||
616 | case TaxationPackage.EXPENSE__DECLARED_AMOUNT: | ||
617 | return declared_amount != DECLARED_AMOUNT_EDEFAULT; | ||
618 | case TaxationPackage.EXPENSE__EXPENSE_PURPOSE: | ||
619 | return expense_purpose != EXPENSE_PURPOSE_EDEFAULT; | ||
620 | case TaxationPackage.EXPENSE__DEPENDENT: | ||
621 | return dependent != null; | ||
622 | case TaxationPackage.EXPENSE__FROM_AGENT: | ||
623 | return from_agent != null; | ||
624 | case TaxationPackage.EXPENSE__INCOME: | ||
625 | return getIncome() != null; | ||
626 | case TaxationPackage.EXPENSE__ID4: | ||
627 | return ID4_EDEFAULT == null ? id4 != null : !ID4_EDEFAULT.equals(id4); | ||
628 | case TaxationPackage.EXPENSE__BENEFICIARY: | ||
629 | return beneficiary != null; | ||
630 | } | ||
631 | return super.eIsSet(featureID); | ||
632 | } | ||
633 | |||
634 | /** | ||
635 | * <!-- begin-user-doc --> | ||
636 | * <!-- end-user-doc --> | ||
637 | * @generated | ||
638 | */ | ||
639 | @Override | ||
640 | public String toString() { | ||
641 | if (eIsProxy()) return super.toString(); | ||
642 | |||
643 | StringBuilder result = new StringBuilder(super.toString()); | ||
644 | result.append(" (declared_amount: "); | ||
645 | result.append(declared_amount); | ||
646 | result.append(", expense_purpose: "); | ||
647 | result.append(expense_purpose); | ||
648 | result.append(", id4: "); | ||
649 | result.append(id4); | ||
650 | result.append(')'); | ||
651 | return result.toString(); | ||
652 | } | ||
653 | |||
654 | } //ExpenseImpl | ||