| /** |
| */ |
| package org.hl7.fhir.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.common.notify.NotificationChain; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.hl7.fhir.Coding; |
| import org.hl7.fhir.Decimal; |
| import org.hl7.fhir.ExplanationOfBenefitAdjudication2; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.Money; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Explanation Of Benefit Adjudication2</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ExplanationOfBenefitAdjudication2Impl#getCode <em>Code</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ExplanationOfBenefitAdjudication2Impl#getReason <em>Reason</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ExplanationOfBenefitAdjudication2Impl#getAmount <em>Amount</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ExplanationOfBenefitAdjudication2Impl#getValue <em>Value</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ExplanationOfBenefitAdjudication2Impl extends BackboneElementImpl implements ExplanationOfBenefitAdjudication2 { |
| /** |
| * The cached value of the '{@link #getCode() <em>Code</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCode() |
| * @generated |
| * @ordered |
| */ |
| protected Coding code; |
| |
| /** |
| * The cached value of the '{@link #getReason() <em>Reason</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getReason() |
| * @generated |
| * @ordered |
| */ |
| protected Coding reason; |
| |
| /** |
| * The cached value of the '{@link #getAmount() <em>Amount</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAmount() |
| * @generated |
| * @ordered |
| */ |
| protected Money amount; |
| |
| /** |
| * The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getValue() |
| * @generated |
| * @ordered |
| */ |
| protected Decimal value; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ExplanationOfBenefitAdjudication2Impl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getExplanationOfBenefitAdjudication2(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Coding getCode() { |
| return code; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetCode(Coding newCode, NotificationChain msgs) { |
| Coding oldCode = code; |
| code = newCode; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__CODE, oldCode, newCode); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setCode(Coding newCode) { |
| if (newCode != code) { |
| NotificationChain msgs = null; |
| if (code != null) |
| msgs = ((InternalEObject)code).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__CODE, null, msgs); |
| if (newCode != null) |
| msgs = ((InternalEObject)newCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__CODE, null, msgs); |
| msgs = basicSetCode(newCode, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__CODE, newCode, newCode)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Coding getReason() { |
| return reason; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetReason(Coding newReason, NotificationChain msgs) { |
| Coding oldReason = reason; |
| reason = newReason; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__REASON, oldReason, newReason); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setReason(Coding newReason) { |
| if (newReason != reason) { |
| NotificationChain msgs = null; |
| if (reason != null) |
| msgs = ((InternalEObject)reason).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__REASON, null, msgs); |
| if (newReason != null) |
| msgs = ((InternalEObject)newReason).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__REASON, null, msgs); |
| msgs = basicSetReason(newReason, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__REASON, newReason, newReason)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Money getAmount() { |
| return amount; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetAmount(Money newAmount, NotificationChain msgs) { |
| Money oldAmount = amount; |
| amount = newAmount; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__AMOUNT, oldAmount, newAmount); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setAmount(Money newAmount) { |
| if (newAmount != amount) { |
| NotificationChain msgs = null; |
| if (amount != null) |
| msgs = ((InternalEObject)amount).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__AMOUNT, null, msgs); |
| if (newAmount != null) |
| msgs = ((InternalEObject)newAmount).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__AMOUNT, null, msgs); |
| msgs = basicSetAmount(newAmount, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__AMOUNT, newAmount, newAmount)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Decimal getValue() { |
| return value; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetValue(Decimal newValue, NotificationChain msgs) { |
| Decimal oldValue = value; |
| value = newValue; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__VALUE, oldValue, newValue); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setValue(Decimal newValue) { |
| if (newValue != value) { |
| NotificationChain msgs = null; |
| if (value != null) |
| msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__VALUE, null, msgs); |
| if (newValue != null) |
| msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__VALUE, null, msgs); |
| msgs = basicSetValue(newValue, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__VALUE, newValue, newValue)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__CODE: |
| return basicSetCode(null, msgs); |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__REASON: |
| return basicSetReason(null, msgs); |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__AMOUNT: |
| return basicSetAmount(null, msgs); |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__VALUE: |
| return basicSetValue(null, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__CODE: |
| return getCode(); |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__REASON: |
| return getReason(); |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__AMOUNT: |
| return getAmount(); |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__VALUE: |
| return getValue(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__CODE: |
| setCode((Coding)newValue); |
| return; |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__REASON: |
| setReason((Coding)newValue); |
| return; |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__AMOUNT: |
| setAmount((Money)newValue); |
| return; |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__VALUE: |
| setValue((Decimal)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__CODE: |
| setCode((Coding)null); |
| return; |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__REASON: |
| setReason((Coding)null); |
| return; |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__AMOUNT: |
| setAmount((Money)null); |
| return; |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__VALUE: |
| setValue((Decimal)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__CODE: |
| return code != null; |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__REASON: |
| return reason != null; |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__AMOUNT: |
| return amount != null; |
| case FhirPackage.EXPLANATION_OF_BENEFIT_ADJUDICATION2__VALUE: |
| return value != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ExplanationOfBenefitAdjudication2Impl |