/**
*/
package Taxation.impl;
import Taxation.Donation;
import Taxation.TaxationPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
*
* An implementation of the model object 'Donation'.
*
*
* The following features are implemented:
*
*
* - {@link Taxation.impl.DonationImpl#getBeneficiary1 Beneficiary1}
* - {@link Taxation.impl.DonationImpl#isIs_beneficiary_eligible Is beneficiary eligible}
* - {@link Taxation.impl.DonationImpl#isIs_donation_reported Is donation reported}
*
*
* @generated
*/
public class DonationImpl extends Special_Expense_DSImpl implements Donation {
/**
* The default value of the '{@link #getBeneficiary1() Beneficiary1}' attribute.
*
*
* @see #getBeneficiary1()
* @generated
* @ordered
*/
protected static final String BENEFICIARY1_EDEFAULT = null;
/**
* The cached value of the '{@link #getBeneficiary1() Beneficiary1}' attribute.
*
*
* @see #getBeneficiary1()
* @generated
* @ordered
*/
protected String beneficiary1 = BENEFICIARY1_EDEFAULT;
/**
* The default value of the '{@link #isIs_beneficiary_eligible() Is beneficiary eligible}' attribute.
*
*
* @see #isIs_beneficiary_eligible()
* @generated
* @ordered
*/
protected static final boolean IS_BENEFICIARY_ELIGIBLE_EDEFAULT = false;
/**
* The cached value of the '{@link #isIs_beneficiary_eligible() Is beneficiary eligible}' attribute.
*
*
* @see #isIs_beneficiary_eligible()
* @generated
* @ordered
*/
protected boolean is_beneficiary_eligible = IS_BENEFICIARY_ELIGIBLE_EDEFAULT;
/**
* The default value of the '{@link #isIs_donation_reported() Is donation reported}' attribute.
*
*
* @see #isIs_donation_reported()
* @generated
* @ordered
*/
protected static final boolean IS_DONATION_REPORTED_EDEFAULT = false;
/**
* The cached value of the '{@link #isIs_donation_reported() Is donation reported}' attribute.
*
*
* @see #isIs_donation_reported()
* @generated
* @ordered
*/
protected boolean is_donation_reported = IS_DONATION_REPORTED_EDEFAULT;
/**
*
*
* @generated
*/
protected DonationImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return TaxationPackage.Literals.DONATION;
}
/**
*
*
* @generated
*/
@Override
public String getBeneficiary1() {
return beneficiary1;
}
/**
*
*
* @generated
*/
@Override
public void setBeneficiary1(String newBeneficiary1) {
String oldBeneficiary1 = beneficiary1;
beneficiary1 = newBeneficiary1;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.DONATION__BENEFICIARY1, oldBeneficiary1, beneficiary1));
}
/**
*
*
* @generated
*/
@Override
public boolean isIs_beneficiary_eligible() {
return is_beneficiary_eligible;
}
/**
*
*
* @generated
*/
@Override
public void setIs_beneficiary_eligible(boolean newIs_beneficiary_eligible) {
boolean oldIs_beneficiary_eligible = is_beneficiary_eligible;
is_beneficiary_eligible = newIs_beneficiary_eligible;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.DONATION__IS_BENEFICIARY_ELIGIBLE, oldIs_beneficiary_eligible, is_beneficiary_eligible));
}
/**
*
*
* @generated
*/
@Override
public boolean isIs_donation_reported() {
return is_donation_reported;
}
/**
*
*
* @generated
*/
@Override
public void setIs_donation_reported(boolean newIs_donation_reported) {
boolean oldIs_donation_reported = is_donation_reported;
is_donation_reported = newIs_donation_reported;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, TaxationPackage.DONATION__IS_DONATION_REPORTED, oldIs_donation_reported, is_donation_reported));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case TaxationPackage.DONATION__BENEFICIARY1:
return getBeneficiary1();
case TaxationPackage.DONATION__IS_BENEFICIARY_ELIGIBLE:
return isIs_beneficiary_eligible();
case TaxationPackage.DONATION__IS_DONATION_REPORTED:
return isIs_donation_reported();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case TaxationPackage.DONATION__BENEFICIARY1:
setBeneficiary1((String)newValue);
return;
case TaxationPackage.DONATION__IS_BENEFICIARY_ELIGIBLE:
setIs_beneficiary_eligible((Boolean)newValue);
return;
case TaxationPackage.DONATION__IS_DONATION_REPORTED:
setIs_donation_reported((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case TaxationPackage.DONATION__BENEFICIARY1:
setBeneficiary1(BENEFICIARY1_EDEFAULT);
return;
case TaxationPackage.DONATION__IS_BENEFICIARY_ELIGIBLE:
setIs_beneficiary_eligible(IS_BENEFICIARY_ELIGIBLE_EDEFAULT);
return;
case TaxationPackage.DONATION__IS_DONATION_REPORTED:
setIs_donation_reported(IS_DONATION_REPORTED_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case TaxationPackage.DONATION__BENEFICIARY1:
return BENEFICIARY1_EDEFAULT == null ? beneficiary1 != null : !BENEFICIARY1_EDEFAULT.equals(beneficiary1);
case TaxationPackage.DONATION__IS_BENEFICIARY_ELIGIBLE:
return is_beneficiary_eligible != IS_BENEFICIARY_ELIGIBLE_EDEFAULT;
case TaxationPackage.DONATION__IS_DONATION_REPORTED:
return is_donation_reported != IS_DONATION_REPORTED_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (beneficiary1: ");
result.append(beneficiary1);
result.append(", is_beneficiary_eligible: ");
result.append(is_beneficiary_eligible);
result.append(", is_donation_reported: ");
result.append(is_donation_reported);
result.append(')');
return result.toString();
}
} //DonationImpl