| /** |
| */ |
| 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.CoverageEligibilityRequestInsurance; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.Reference; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Coverage Eligibility Request Insurance</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.CoverageEligibilityRequestInsuranceImpl#getFocal <em>Focal</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.CoverageEligibilityRequestInsuranceImpl#getCoverage <em>Coverage</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.CoverageEligibilityRequestInsuranceImpl#getBusinessArrangement <em>Business Arrangement</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class CoverageEligibilityRequestInsuranceImpl extends BackboneElementImpl implements CoverageEligibilityRequestInsurance { |
| /** |
| * The cached value of the '{@link #getFocal() <em>Focal</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFocal() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.Boolean focal; |
| |
| /** |
| * The cached value of the '{@link #getCoverage() <em>Coverage</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getCoverage() |
| * @generated |
| * @ordered |
| */ |
| protected Reference coverage; |
| |
| /** |
| * The cached value of the '{@link #getBusinessArrangement() <em>Business Arrangement</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getBusinessArrangement() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.String businessArrangement; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected CoverageEligibilityRequestInsuranceImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getCoverageEligibilityRequestInsurance(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.Boolean getFocal() { |
| return focal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetFocal(org.hl7.fhir.Boolean newFocal, NotificationChain msgs) { |
| org.hl7.fhir.Boolean oldFocal = focal; |
| focal = newFocal; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__FOCAL, oldFocal, newFocal); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFocal(org.hl7.fhir.Boolean newFocal) { |
| if (newFocal != focal) { |
| NotificationChain msgs = null; |
| if (focal != null) |
| msgs = ((InternalEObject)focal).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__FOCAL, null, msgs); |
| if (newFocal != null) |
| msgs = ((InternalEObject)newFocal).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__FOCAL, null, msgs); |
| msgs = basicSetFocal(newFocal, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__FOCAL, newFocal, newFocal)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getCoverage() { |
| return coverage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetCoverage(Reference newCoverage, NotificationChain msgs) { |
| Reference oldCoverage = coverage; |
| coverage = newCoverage; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__COVERAGE, oldCoverage, newCoverage); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setCoverage(Reference newCoverage) { |
| if (newCoverage != coverage) { |
| NotificationChain msgs = null; |
| if (coverage != null) |
| msgs = ((InternalEObject)coverage).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__COVERAGE, null, msgs); |
| if (newCoverage != null) |
| msgs = ((InternalEObject)newCoverage).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__COVERAGE, null, msgs); |
| msgs = basicSetCoverage(newCoverage, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__COVERAGE, newCoverage, newCoverage)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.String getBusinessArrangement() { |
| return businessArrangement; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetBusinessArrangement(org.hl7.fhir.String newBusinessArrangement, NotificationChain msgs) { |
| org.hl7.fhir.String oldBusinessArrangement = businessArrangement; |
| businessArrangement = newBusinessArrangement; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__BUSINESS_ARRANGEMENT, oldBusinessArrangement, newBusinessArrangement); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setBusinessArrangement(org.hl7.fhir.String newBusinessArrangement) { |
| if (newBusinessArrangement != businessArrangement) { |
| NotificationChain msgs = null; |
| if (businessArrangement != null) |
| msgs = ((InternalEObject)businessArrangement).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__BUSINESS_ARRANGEMENT, null, msgs); |
| if (newBusinessArrangement != null) |
| msgs = ((InternalEObject)newBusinessArrangement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__BUSINESS_ARRANGEMENT, null, msgs); |
| msgs = basicSetBusinessArrangement(newBusinessArrangement, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__BUSINESS_ARRANGEMENT, newBusinessArrangement, newBusinessArrangement)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__FOCAL: |
| return basicSetFocal(null, msgs); |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__COVERAGE: |
| return basicSetCoverage(null, msgs); |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__BUSINESS_ARRANGEMENT: |
| return basicSetBusinessArrangement(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.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__FOCAL: |
| return getFocal(); |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__COVERAGE: |
| return getCoverage(); |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__BUSINESS_ARRANGEMENT: |
| return getBusinessArrangement(); |
| } |
| 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.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__FOCAL: |
| setFocal((org.hl7.fhir.Boolean)newValue); |
| return; |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__COVERAGE: |
| setCoverage((Reference)newValue); |
| return; |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__BUSINESS_ARRANGEMENT: |
| setBusinessArrangement((org.hl7.fhir.String)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__FOCAL: |
| setFocal((org.hl7.fhir.Boolean)null); |
| return; |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__COVERAGE: |
| setCoverage((Reference)null); |
| return; |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__BUSINESS_ARRANGEMENT: |
| setBusinessArrangement((org.hl7.fhir.String)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__FOCAL: |
| return focal != null; |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__COVERAGE: |
| return coverage != null; |
| case FhirPackage.COVERAGE_ELIGIBILITY_REQUEST_INSURANCE__BUSINESS_ARRANGEMENT: |
| return businessArrangement != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //CoverageEligibilityRequestInsuranceImpl |