| /** |
| */ |
| 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.ClaimRelated; |
| import org.hl7.fhir.CodeableConcept; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.Identifier; |
| import org.hl7.fhir.Reference; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Claim Related</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ClaimRelatedImpl#getClaim <em>Claim</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ClaimRelatedImpl#getRelationship <em>Relationship</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ClaimRelatedImpl#getReference <em>Reference</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ClaimRelatedImpl extends BackboneElementImpl implements ClaimRelated { |
| /** |
| * The cached value of the '{@link #getClaim() <em>Claim</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getClaim() |
| * @generated |
| * @ordered |
| */ |
| protected Reference claim; |
| |
| /** |
| * The cached value of the '{@link #getRelationship() <em>Relationship</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getRelationship() |
| * @generated |
| * @ordered |
| */ |
| protected CodeableConcept relationship; |
| |
| /** |
| * The cached value of the '{@link #getReference() <em>Reference</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getReference() |
| * @generated |
| * @ordered |
| */ |
| protected Identifier reference; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ClaimRelatedImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getClaimRelated(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getClaim() { |
| return claim; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetClaim(Reference newClaim, NotificationChain msgs) { |
| Reference oldClaim = claim; |
| claim = newClaim; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RELATED__CLAIM, oldClaim, newClaim); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setClaim(Reference newClaim) { |
| if (newClaim != claim) { |
| NotificationChain msgs = null; |
| if (claim != null) |
| msgs = ((InternalEObject)claim).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RELATED__CLAIM, null, msgs); |
| if (newClaim != null) |
| msgs = ((InternalEObject)newClaim).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RELATED__CLAIM, null, msgs); |
| msgs = basicSetClaim(newClaim, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RELATED__CLAIM, newClaim, newClaim)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept getRelationship() { |
| return relationship; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetRelationship(CodeableConcept newRelationship, NotificationChain msgs) { |
| CodeableConcept oldRelationship = relationship; |
| relationship = newRelationship; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RELATED__RELATIONSHIP, oldRelationship, newRelationship); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setRelationship(CodeableConcept newRelationship) { |
| if (newRelationship != relationship) { |
| NotificationChain msgs = null; |
| if (relationship != null) |
| msgs = ((InternalEObject)relationship).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RELATED__RELATIONSHIP, null, msgs); |
| if (newRelationship != null) |
| msgs = ((InternalEObject)newRelationship).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RELATED__RELATIONSHIP, null, msgs); |
| msgs = basicSetRelationship(newRelationship, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RELATED__RELATIONSHIP, newRelationship, newRelationship)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Identifier getReference() { |
| return reference; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetReference(Identifier newReference, NotificationChain msgs) { |
| Identifier oldReference = reference; |
| reference = newReference; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RELATED__REFERENCE, oldReference, newReference); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setReference(Identifier newReference) { |
| if (newReference != reference) { |
| NotificationChain msgs = null; |
| if (reference != null) |
| msgs = ((InternalEObject)reference).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RELATED__REFERENCE, null, msgs); |
| if (newReference != null) |
| msgs = ((InternalEObject)newReference).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RELATED__REFERENCE, null, msgs); |
| msgs = basicSetReference(newReference, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RELATED__REFERENCE, newReference, newReference)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.CLAIM_RELATED__CLAIM: |
| return basicSetClaim(null, msgs); |
| case FhirPackage.CLAIM_RELATED__RELATIONSHIP: |
| return basicSetRelationship(null, msgs); |
| case FhirPackage.CLAIM_RELATED__REFERENCE: |
| return basicSetReference(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.CLAIM_RELATED__CLAIM: |
| return getClaim(); |
| case FhirPackage.CLAIM_RELATED__RELATIONSHIP: |
| return getRelationship(); |
| case FhirPackage.CLAIM_RELATED__REFERENCE: |
| return getReference(); |
| } |
| 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.CLAIM_RELATED__CLAIM: |
| setClaim((Reference)newValue); |
| return; |
| case FhirPackage.CLAIM_RELATED__RELATIONSHIP: |
| setRelationship((CodeableConcept)newValue); |
| return; |
| case FhirPackage.CLAIM_RELATED__REFERENCE: |
| setReference((Identifier)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.CLAIM_RELATED__CLAIM: |
| setClaim((Reference)null); |
| return; |
| case FhirPackage.CLAIM_RELATED__RELATIONSHIP: |
| setRelationship((CodeableConcept)null); |
| return; |
| case FhirPackage.CLAIM_RELATED__REFERENCE: |
| setReference((Identifier)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.CLAIM_RELATED__CLAIM: |
| return claim != null; |
| case FhirPackage.CLAIM_RELATED__RELATIONSHIP: |
| return relationship != null; |
| case FhirPackage.CLAIM_RELATED__REFERENCE: |
| return reference != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ClaimRelatedImpl |