| /** |
| */ |
| 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.ClaimPayee; |
| import org.hl7.fhir.Coding; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.Reference; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Claim Payee</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ClaimPayeeImpl#getType <em>Type</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ClaimPayeeImpl#getProvider <em>Provider</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ClaimPayeeImpl#getOrganization <em>Organization</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ClaimPayeeImpl#getPerson <em>Person</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ClaimPayeeImpl extends BackboneElementImpl implements ClaimPayee { |
| /** |
| * The cached value of the '{@link #getType() <em>Type</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getType() |
| * @generated |
| * @ordered |
| */ |
| protected Coding type; |
| |
| /** |
| * The cached value of the '{@link #getProvider() <em>Provider</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getProvider() |
| * @generated |
| * @ordered |
| */ |
| protected Reference provider; |
| |
| /** |
| * The cached value of the '{@link #getOrganization() <em>Organization</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOrganization() |
| * @generated |
| * @ordered |
| */ |
| protected Reference organization; |
| |
| /** |
| * The cached value of the '{@link #getPerson() <em>Person</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPerson() |
| * @generated |
| * @ordered |
| */ |
| protected Reference person; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ClaimPayeeImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getClaimPayee(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Coding getType() { |
| return type; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetType(Coding newType, NotificationChain msgs) { |
| Coding oldType = type; |
| type = newType; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_PAYEE__TYPE, oldType, newType); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setType(Coding newType) { |
| if (newType != type) { |
| NotificationChain msgs = null; |
| if (type != null) |
| msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_PAYEE__TYPE, null, msgs); |
| if (newType != null) |
| msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_PAYEE__TYPE, null, msgs); |
| msgs = basicSetType(newType, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_PAYEE__TYPE, newType, newType)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getProvider() { |
| return provider; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetProvider(Reference newProvider, NotificationChain msgs) { |
| Reference oldProvider = provider; |
| provider = newProvider; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_PAYEE__PROVIDER, oldProvider, newProvider); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setProvider(Reference newProvider) { |
| if (newProvider != provider) { |
| NotificationChain msgs = null; |
| if (provider != null) |
| msgs = ((InternalEObject)provider).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_PAYEE__PROVIDER, null, msgs); |
| if (newProvider != null) |
| msgs = ((InternalEObject)newProvider).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_PAYEE__PROVIDER, null, msgs); |
| msgs = basicSetProvider(newProvider, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_PAYEE__PROVIDER, newProvider, newProvider)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getOrganization() { |
| return organization; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetOrganization(Reference newOrganization, NotificationChain msgs) { |
| Reference oldOrganization = organization; |
| organization = newOrganization; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_PAYEE__ORGANIZATION, oldOrganization, newOrganization); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setOrganization(Reference newOrganization) { |
| if (newOrganization != organization) { |
| NotificationChain msgs = null; |
| if (organization != null) |
| msgs = ((InternalEObject)organization).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_PAYEE__ORGANIZATION, null, msgs); |
| if (newOrganization != null) |
| msgs = ((InternalEObject)newOrganization).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_PAYEE__ORGANIZATION, null, msgs); |
| msgs = basicSetOrganization(newOrganization, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_PAYEE__ORGANIZATION, newOrganization, newOrganization)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getPerson() { |
| return person; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetPerson(Reference newPerson, NotificationChain msgs) { |
| Reference oldPerson = person; |
| person = newPerson; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_PAYEE__PERSON, oldPerson, newPerson); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setPerson(Reference newPerson) { |
| if (newPerson != person) { |
| NotificationChain msgs = null; |
| if (person != null) |
| msgs = ((InternalEObject)person).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_PAYEE__PERSON, null, msgs); |
| if (newPerson != null) |
| msgs = ((InternalEObject)newPerson).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_PAYEE__PERSON, null, msgs); |
| msgs = basicSetPerson(newPerson, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_PAYEE__PERSON, newPerson, newPerson)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.CLAIM_PAYEE__TYPE: |
| return basicSetType(null, msgs); |
| case FhirPackage.CLAIM_PAYEE__PROVIDER: |
| return basicSetProvider(null, msgs); |
| case FhirPackage.CLAIM_PAYEE__ORGANIZATION: |
| return basicSetOrganization(null, msgs); |
| case FhirPackage.CLAIM_PAYEE__PERSON: |
| return basicSetPerson(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_PAYEE__TYPE: |
| return getType(); |
| case FhirPackage.CLAIM_PAYEE__PROVIDER: |
| return getProvider(); |
| case FhirPackage.CLAIM_PAYEE__ORGANIZATION: |
| return getOrganization(); |
| case FhirPackage.CLAIM_PAYEE__PERSON: |
| return getPerson(); |
| } |
| 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_PAYEE__TYPE: |
| setType((Coding)newValue); |
| return; |
| case FhirPackage.CLAIM_PAYEE__PROVIDER: |
| setProvider((Reference)newValue); |
| return; |
| case FhirPackage.CLAIM_PAYEE__ORGANIZATION: |
| setOrganization((Reference)newValue); |
| return; |
| case FhirPackage.CLAIM_PAYEE__PERSON: |
| setPerson((Reference)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.CLAIM_PAYEE__TYPE: |
| setType((Coding)null); |
| return; |
| case FhirPackage.CLAIM_PAYEE__PROVIDER: |
| setProvider((Reference)null); |
| return; |
| case FhirPackage.CLAIM_PAYEE__ORGANIZATION: |
| setOrganization((Reference)null); |
| return; |
| case FhirPackage.CLAIM_PAYEE__PERSON: |
| setPerson((Reference)null); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.CLAIM_PAYEE__TYPE: |
| return type != null; |
| case FhirPackage.CLAIM_PAYEE__PROVIDER: |
| return provider != null; |
| case FhirPackage.CLAIM_PAYEE__ORGANIZATION: |
| return organization != null; |
| case FhirPackage.CLAIM_PAYEE__PERSON: |
| return person != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ClaimPayeeImpl |