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