diff options
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/DonationImpl.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/DonationImpl.java | 220 |
1 files changed, 220 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/DonationImpl.java b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/DonationImpl.java new file mode 100644 index 00000000..50e05d9f --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/DonationImpl.java | |||
@@ -0,0 +1,220 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package TaxationWithRoot.impl; | ||
4 | |||
5 | import TaxationWithRoot.Donation; | ||
6 | import TaxationWithRoot.TaxationWithRootPackage; | ||
7 | |||
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>Donation</b></em>'. | ||
17 | * <!-- end-user-doc --> | ||
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link TaxationWithRoot.impl.DonationImpl#getBeneficiary1 <em>Beneficiary1</em>}</li> | ||
23 | * <li>{@link TaxationWithRoot.impl.DonationImpl#isIs_donation_reported <em>Is donation reported</em>}</li> | ||
24 | * </ul> | ||
25 | * | ||
26 | * @generated | ||
27 | */ | ||
28 | public class DonationImpl extends Special_Expense_DSImpl implements Donation { | ||
29 | /** | ||
30 | * The default value of the '{@link #getBeneficiary1() <em>Beneficiary1</em>}' attribute. | ||
31 | * <!-- begin-user-doc --> | ||
32 | * <!-- end-user-doc --> | ||
33 | * @see #getBeneficiary1() | ||
34 | * @generated | ||
35 | * @ordered | ||
36 | */ | ||
37 | protected static final String BENEFICIARY1_EDEFAULT = null; | ||
38 | |||
39 | /** | ||
40 | * The cached value of the '{@link #getBeneficiary1() <em>Beneficiary1</em>}' attribute. | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @see #getBeneficiary1() | ||
44 | * @generated | ||
45 | * @ordered | ||
46 | */ | ||
47 | protected String beneficiary1 = BENEFICIARY1_EDEFAULT; | ||
48 | |||
49 | /** | ||
50 | * The default value of the '{@link #isIs_donation_reported() <em>Is donation reported</em>}' attribute. | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @see #isIs_donation_reported() | ||
54 | * @generated | ||
55 | * @ordered | ||
56 | */ | ||
57 | protected static final boolean IS_DONATION_REPORTED_EDEFAULT = false; | ||
58 | |||
59 | /** | ||
60 | * The cached value of the '{@link #isIs_donation_reported() <em>Is donation reported</em>}' attribute. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @see #isIs_donation_reported() | ||
64 | * @generated | ||
65 | * @ordered | ||
66 | */ | ||
67 | protected boolean is_donation_reported = IS_DONATION_REPORTED_EDEFAULT; | ||
68 | |||
69 | /** | ||
70 | * <!-- begin-user-doc --> | ||
71 | * <!-- end-user-doc --> | ||
72 | * @generated | ||
73 | */ | ||
74 | protected DonationImpl() { | ||
75 | super(); | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | @Override | ||
84 | protected EClass eStaticClass() { | ||
85 | return TaxationWithRootPackage.Literals.DONATION; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | */ | ||
93 | @Override | ||
94 | public String getBeneficiary1() { | ||
95 | return beneficiary1; | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @generated | ||
102 | */ | ||
103 | @Override | ||
104 | public void setBeneficiary1(String newBeneficiary1) { | ||
105 | String oldBeneficiary1 = beneficiary1; | ||
106 | beneficiary1 = newBeneficiary1; | ||
107 | if (eNotificationRequired()) | ||
108 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.DONATION__BENEFICIARY1, oldBeneficiary1, beneficiary1)); | ||
109 | } | ||
110 | |||
111 | /** | ||
112 | * <!-- begin-user-doc --> | ||
113 | * <!-- end-user-doc --> | ||
114 | * @generated | ||
115 | */ | ||
116 | @Override | ||
117 | public boolean isIs_donation_reported() { | ||
118 | return is_donation_reported; | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | @Override | ||
127 | public void setIs_donation_reported(boolean newIs_donation_reported) { | ||
128 | boolean oldIs_donation_reported = is_donation_reported; | ||
129 | is_donation_reported = newIs_donation_reported; | ||
130 | if (eNotificationRequired()) | ||
131 | eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.DONATION__IS_DONATION_REPORTED, oldIs_donation_reported, is_donation_reported)); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | */ | ||
139 | @Override | ||
140 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
141 | switch (featureID) { | ||
142 | case TaxationWithRootPackage.DONATION__BENEFICIARY1: | ||
143 | return getBeneficiary1(); | ||
144 | case TaxationWithRootPackage.DONATION__IS_DONATION_REPORTED: | ||
145 | return isIs_donation_reported(); | ||
146 | } | ||
147 | return super.eGet(featureID, resolve, coreType); | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * <!-- begin-user-doc --> | ||
152 | * <!-- end-user-doc --> | ||
153 | * @generated | ||
154 | */ | ||
155 | @Override | ||
156 | public void eSet(int featureID, Object newValue) { | ||
157 | switch (featureID) { | ||
158 | case TaxationWithRootPackage.DONATION__BENEFICIARY1: | ||
159 | setBeneficiary1((String)newValue); | ||
160 | return; | ||
161 | case TaxationWithRootPackage.DONATION__IS_DONATION_REPORTED: | ||
162 | setIs_donation_reported((Boolean)newValue); | ||
163 | return; | ||
164 | } | ||
165 | super.eSet(featureID, newValue); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | @Override | ||
174 | public void eUnset(int featureID) { | ||
175 | switch (featureID) { | ||
176 | case TaxationWithRootPackage.DONATION__BENEFICIARY1: | ||
177 | setBeneficiary1(BENEFICIARY1_EDEFAULT); | ||
178 | return; | ||
179 | case TaxationWithRootPackage.DONATION__IS_DONATION_REPORTED: | ||
180 | setIs_donation_reported(IS_DONATION_REPORTED_EDEFAULT); | ||
181 | return; | ||
182 | } | ||
183 | super.eUnset(featureID); | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * <!-- begin-user-doc --> | ||
188 | * <!-- end-user-doc --> | ||
189 | * @generated | ||
190 | */ | ||
191 | @Override | ||
192 | public boolean eIsSet(int featureID) { | ||
193 | switch (featureID) { | ||
194 | case TaxationWithRootPackage.DONATION__BENEFICIARY1: | ||
195 | return BENEFICIARY1_EDEFAULT == null ? beneficiary1 != null : !BENEFICIARY1_EDEFAULT.equals(beneficiary1); | ||
196 | case TaxationWithRootPackage.DONATION__IS_DONATION_REPORTED: | ||
197 | return is_donation_reported != IS_DONATION_REPORTED_EDEFAULT; | ||
198 | } | ||
199 | return super.eIsSet(featureID); | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <!-- begin-user-doc --> | ||
204 | * <!-- end-user-doc --> | ||
205 | * @generated | ||
206 | */ | ||
207 | @Override | ||
208 | public String toString() { | ||
209 | if (eIsProxy()) return super.toString(); | ||
210 | |||
211 | StringBuilder result = new StringBuilder(super.toString()); | ||
212 | result.append(" (beneficiary1: "); | ||
213 | result.append(beneficiary1); | ||
214 | result.append(", is_donation_reported: "); | ||
215 | result.append(is_donation_reported); | ||
216 | result.append(')'); | ||
217 | return result.toString(); | ||
218 | } | ||
219 | |||
220 | } //DonationImpl | ||