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/Private_Insurance_and_PlanImpl.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/Private_Insurance_and_PlanImpl.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Private_Insurance_and_PlanImpl.java | 276 |
1 files changed, 276 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Private_Insurance_and_PlanImpl.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Private_Insurance_and_PlanImpl.java new file mode 100644 index 00000000..dfe39a95 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.model/src/Taxation/impl/Private_Insurance_and_PlanImpl.java | |||
@@ -0,0 +1,276 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package Taxation.impl; | ||
4 | |||
5 | import Taxation.Category_of_Private_Insurance_and_Plan; | ||
6 | import Taxation.Private_Insurance_and_Plan; | ||
7 | import Taxation.TaxationPackage; | ||
8 | import org.eclipse.emf.common.notify.Notification; | ||
9 | |||
10 | import org.eclipse.emf.ecore.EClass; | ||
11 | |||
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * An implementation of the model object '<em><b>Private Insurance and Plan</b></em>'. | ||
17 | * <!-- end-user-doc --> | ||
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link Taxation.impl.Private_Insurance_and_PlanImpl#getCategory <em>Category</em>}</li> | ||
23 | * <li>{@link Taxation.impl.Private_Insurance_and_PlanImpl#getDuration_of_contract <em>Duration of contract</em>}</li> | ||
24 | * <li>{@link Taxation.impl.Private_Insurance_and_PlanImpl#isIs_private_insurance_and_plan_eligible_for_deduction <em>Is private insurance and plan eligible for deduction</em>}</li> | ||
25 | * </ul> | ||
26 | * | ||
27 | * @generated | ||
28 | */ | ||
29 | public class Private_Insurance_and_PlanImpl extends Special_Expense_DSImpl implements Private_Insurance_and_Plan { | ||
30 | /** | ||
31 | * The default value of the '{@link #getCategory() <em>Category</em>}' attribute. | ||
32 | * <!-- begin-user-doc --> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @see #getCategory() | ||
35 | * @generated | ||
36 | * @ordered | ||
37 | */ | ||
38 | protected static final Category_of_Private_Insurance_and_Plan CATEGORY_EDEFAULT = Category_of_Private_Insurance_and_Plan.PRIVATE_INSURANCE; | ||
39 | |||
40 | /** | ||
41 | * The cached value of the '{@link #getCategory() <em>Category</em>}' attribute. | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @see #getCategory() | ||
45 | * @generated | ||
46 | * @ordered | ||
47 | */ | ||
48 | protected Category_of_Private_Insurance_and_Plan category = CATEGORY_EDEFAULT; | ||
49 | |||
50 | /** | ||
51 | * The default value of the '{@link #getDuration_of_contract() <em>Duration of contract</em>}' attribute. | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @see #getDuration_of_contract() | ||
55 | * @generated | ||
56 | * @ordered | ||
57 | */ | ||
58 | protected static final int DURATION_OF_CONTRACT_EDEFAULT = 0; | ||
59 | |||
60 | /** | ||
61 | * The cached value of the '{@link #getDuration_of_contract() <em>Duration of contract</em>}' attribute. | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @see #getDuration_of_contract() | ||
65 | * @generated | ||
66 | * @ordered | ||
67 | */ | ||
68 | protected int duration_of_contract = DURATION_OF_CONTRACT_EDEFAULT; | ||
69 | |||
70 | /** | ||
71 | * The default value of the '{@link #isIs_private_insurance_and_plan_eligible_for_deduction() <em>Is private insurance and plan eligible for deduction</em>}' attribute. | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @see #isIs_private_insurance_and_plan_eligible_for_deduction() | ||
75 | * @generated | ||
76 | * @ordered | ||
77 | */ | ||
78 | protected static final boolean IS_PRIVATE_INSURANCE_AND_PLAN_ELIGIBLE_FOR_DEDUCTION_EDEFAULT = false; | ||
79 | |||
80 | /** | ||
81 | * The cached value of the '{@link #isIs_private_insurance_and_plan_eligible_for_deduction() <em>Is private insurance and plan eligible for deduction</em>}' attribute. | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @see #isIs_private_insurance_and_plan_eligible_for_deduction() | ||
85 | * @generated | ||
86 | * @ordered | ||
87 | */ | ||
88 | protected boolean is_private_insurance_and_plan_eligible_for_deduction = IS_PRIVATE_INSURANCE_AND_PLAN_ELIGIBLE_FOR_DEDUCTION_EDEFAULT; | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | protected Private_Insurance_and_PlanImpl() { | ||
96 | super(); | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <!-- end-user-doc --> | ||
102 | * @generated | ||
103 | */ | ||
104 | @Override | ||
105 | protected EClass eStaticClass() { | ||
106 | return TaxationPackage.Literals.PRIVATE_INSURANCE_AND_PLAN; | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * <!-- begin-user-doc --> | ||
111 | * <!-- end-user-doc --> | ||
112 | * @generated | ||
113 | */ | ||
114 | @Override | ||
115 | public Category_of_Private_Insurance_and_Plan getCategory() { | ||
116 | return category; | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | ||
125 | public void setCategory(Category_of_Private_Insurance_and_Plan newCategory) { | ||
126 | Category_of_Private_Insurance_and_Plan oldCategory = category; | ||
127 | category = newCategory == null ? CATEGORY_EDEFAULT : newCategory; | ||
128 | if (eNotificationRequired()) | ||
129 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__CATEGORY, oldCategory, category)); | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * <!-- begin-user-doc --> | ||
134 | * <!-- end-user-doc --> | ||
135 | * @generated | ||
136 | */ | ||
137 | @Override | ||
138 | public int getDuration_of_contract() { | ||
139 | return duration_of_contract; | ||
140 | } | ||
141 | |||
142 | /** | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @generated | ||
146 | */ | ||
147 | @Override | ||
148 | public void setDuration_of_contract(int newDuration_of_contract) { | ||
149 | int oldDuration_of_contract = duration_of_contract; | ||
150 | duration_of_contract = newDuration_of_contract; | ||
151 | if (eNotificationRequired()) | ||
152 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__DURATION_OF_CONTRACT, oldDuration_of_contract, duration_of_contract)); | ||
153 | } | ||
154 | |||
155 | /** | ||
156 | * <!-- begin-user-doc --> | ||
157 | * <!-- end-user-doc --> | ||
158 | * @generated | ||
159 | */ | ||
160 | @Override | ||
161 | public boolean isIs_private_insurance_and_plan_eligible_for_deduction() { | ||
162 | return is_private_insurance_and_plan_eligible_for_deduction; | ||
163 | } | ||
164 | |||
165 | /** | ||
166 | * <!-- begin-user-doc --> | ||
167 | * <!-- end-user-doc --> | ||
168 | * @generated | ||
169 | */ | ||
170 | @Override | ||
171 | public void setIs_private_insurance_and_plan_eligible_for_deduction(boolean newIs_private_insurance_and_plan_eligible_for_deduction) { | ||
172 | boolean oldIs_private_insurance_and_plan_eligible_for_deduction = is_private_insurance_and_plan_eligible_for_deduction; | ||
173 | is_private_insurance_and_plan_eligible_for_deduction = newIs_private_insurance_and_plan_eligible_for_deduction; | ||
174 | if (eNotificationRequired()) | ||
175 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__IS_PRIVATE_INSURANCE_AND_PLAN_ELIGIBLE_FOR_DEDUCTION, oldIs_private_insurance_and_plan_eligible_for_deduction, is_private_insurance_and_plan_eligible_for_deduction)); | ||
176 | } | ||
177 | |||
178 | /** | ||
179 | * <!-- begin-user-doc --> | ||
180 | * <!-- end-user-doc --> | ||
181 | * @generated | ||
182 | */ | ||
183 | @Override | ||
184 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
185 | switch (featureID) { | ||
186 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__CATEGORY: | ||
187 | return getCategory(); | ||
188 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__DURATION_OF_CONTRACT: | ||
189 | return getDuration_of_contract(); | ||
190 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__IS_PRIVATE_INSURANCE_AND_PLAN_ELIGIBLE_FOR_DEDUCTION: | ||
191 | return isIs_private_insurance_and_plan_eligible_for_deduction(); | ||
192 | } | ||
193 | return super.eGet(featureID, resolve, coreType); | ||
194 | } | ||
195 | |||
196 | /** | ||
197 | * <!-- begin-user-doc --> | ||
198 | * <!-- end-user-doc --> | ||
199 | * @generated | ||
200 | */ | ||
201 | @Override | ||
202 | public void eSet(int featureID, Object newValue) { | ||
203 | switch (featureID) { | ||
204 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__CATEGORY: | ||
205 | setCategory((Category_of_Private_Insurance_and_Plan)newValue); | ||
206 | return; | ||
207 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__DURATION_OF_CONTRACT: | ||
208 | setDuration_of_contract((Integer)newValue); | ||
209 | return; | ||
210 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__IS_PRIVATE_INSURANCE_AND_PLAN_ELIGIBLE_FOR_DEDUCTION: | ||
211 | setIs_private_insurance_and_plan_eligible_for_deduction((Boolean)newValue); | ||
212 | return; | ||
213 | } | ||
214 | super.eSet(featureID, newValue); | ||
215 | } | ||
216 | |||
217 | /** | ||
218 | * <!-- begin-user-doc --> | ||
219 | * <!-- end-user-doc --> | ||
220 | * @generated | ||
221 | */ | ||
222 | @Override | ||
223 | public void eUnset(int featureID) { | ||
224 | switch (featureID) { | ||
225 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__CATEGORY: | ||
226 | setCategory(CATEGORY_EDEFAULT); | ||
227 | return; | ||
228 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__DURATION_OF_CONTRACT: | ||
229 | setDuration_of_contract(DURATION_OF_CONTRACT_EDEFAULT); | ||
230 | return; | ||
231 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__IS_PRIVATE_INSURANCE_AND_PLAN_ELIGIBLE_FOR_DEDUCTION: | ||
232 | setIs_private_insurance_and_plan_eligible_for_deduction(IS_PRIVATE_INSURANCE_AND_PLAN_ELIGIBLE_FOR_DEDUCTION_EDEFAULT); | ||
233 | return; | ||
234 | } | ||
235 | super.eUnset(featureID); | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * <!-- begin-user-doc --> | ||
240 | * <!-- end-user-doc --> | ||
241 | * @generated | ||
242 | */ | ||
243 | @Override | ||
244 | public boolean eIsSet(int featureID) { | ||
245 | switch (featureID) { | ||
246 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__CATEGORY: | ||
247 | return category != CATEGORY_EDEFAULT; | ||
248 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__DURATION_OF_CONTRACT: | ||
249 | return duration_of_contract != DURATION_OF_CONTRACT_EDEFAULT; | ||
250 | case TaxationPackage.PRIVATE_INSURANCE_AND_PLAN__IS_PRIVATE_INSURANCE_AND_PLAN_ELIGIBLE_FOR_DEDUCTION: | ||
251 | return is_private_insurance_and_plan_eligible_for_deduction != IS_PRIVATE_INSURANCE_AND_PLAN_ELIGIBLE_FOR_DEDUCTION_EDEFAULT; | ||
252 | } | ||
253 | return super.eIsSet(featureID); | ||
254 | } | ||
255 | |||
256 | /** | ||
257 | * <!-- begin-user-doc --> | ||
258 | * <!-- end-user-doc --> | ||
259 | * @generated | ||
260 | */ | ||
261 | @Override | ||
262 | public String toString() { | ||
263 | if (eIsProxy()) return super.toString(); | ||
264 | |||
265 | StringBuilder result = new StringBuilder(super.toString()); | ||
266 | result.append(" (category: "); | ||
267 | result.append(category); | ||
268 | result.append(", duration_of_contract: "); | ||
269 | result.append(duration_of_contract); | ||
270 | result.append(", is_private_insurance_and_plan_eligible_for_deduction: "); | ||
271 | result.append(is_private_insurance_and_plan_eligible_for_deduction); | ||
272 | result.append(')'); | ||
273 | return result.toString(); | ||
274 | } | ||
275 | |||
276 | } //Private_Insurance_and_PlanImpl | ||