| /** |
| */ |
| 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.ClaimResponseNote; |
| import org.hl7.fhir.Coding; |
| import org.hl7.fhir.FhirPackage; |
| import org.hl7.fhir.PositiveInt; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Claim Response Note</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ClaimResponseNoteImpl#getNumber <em>Number</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ClaimResponseNoteImpl#getType <em>Type</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ClaimResponseNoteImpl#getText <em>Text</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ClaimResponseNoteImpl extends BackboneElementImpl implements ClaimResponseNote { |
| /** |
| * The cached value of the '{@link #getNumber() <em>Number</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getNumber() |
| * @generated |
| * @ordered |
| */ |
| protected PositiveInt number; |
| |
| /** |
| * 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 #getText() <em>Text</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getText() |
| * @generated |
| * @ordered |
| */ |
| protected org.hl7.fhir.String text; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ClaimResponseNoteImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getClaimResponseNote(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public PositiveInt getNumber() { |
| return number; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetNumber(PositiveInt newNumber, NotificationChain msgs) { |
| PositiveInt oldNumber = number; |
| number = newNumber; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_NOTE__NUMBER, oldNumber, newNumber); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setNumber(PositiveInt newNumber) { |
| if (newNumber != number) { |
| NotificationChain msgs = null; |
| if (number != null) |
| msgs = ((InternalEObject)number).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_NOTE__NUMBER, null, msgs); |
| if (newNumber != null) |
| msgs = ((InternalEObject)newNumber).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_NOTE__NUMBER, null, msgs); |
| msgs = basicSetNumber(newNumber, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_NOTE__NUMBER, newNumber, newNumber)); |
| } |
| |
| /** |
| * <!-- 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_RESPONSE_NOTE__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_RESPONSE_NOTE__TYPE, null, msgs); |
| if (newType != null) |
| msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_NOTE__TYPE, null, msgs); |
| msgs = basicSetType(newType, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_NOTE__TYPE, newType, newType)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public org.hl7.fhir.String getText() { |
| return text; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetText(org.hl7.fhir.String newText, NotificationChain msgs) { |
| org.hl7.fhir.String oldText = text; |
| text = newText; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_NOTE__TEXT, oldText, newText); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setText(org.hl7.fhir.String newText) { |
| if (newText != text) { |
| NotificationChain msgs = null; |
| if (text != null) |
| msgs = ((InternalEObject)text).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_NOTE__TEXT, null, msgs); |
| if (newText != null) |
| msgs = ((InternalEObject)newText).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_NOTE__TEXT, null, msgs); |
| msgs = basicSetText(newText, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_NOTE__TEXT, newText, newText)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.CLAIM_RESPONSE_NOTE__NUMBER: |
| return basicSetNumber(null, msgs); |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TYPE: |
| return basicSetType(null, msgs); |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TEXT: |
| return basicSetText(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_RESPONSE_NOTE__NUMBER: |
| return getNumber(); |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TYPE: |
| return getType(); |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TEXT: |
| return getText(); |
| } |
| 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_RESPONSE_NOTE__NUMBER: |
| setNumber((PositiveInt)newValue); |
| return; |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TYPE: |
| setType((Coding)newValue); |
| return; |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TEXT: |
| setText((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.CLAIM_RESPONSE_NOTE__NUMBER: |
| setNumber((PositiveInt)null); |
| return; |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TYPE: |
| setType((Coding)null); |
| return; |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TEXT: |
| setText((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.CLAIM_RESPONSE_NOTE__NUMBER: |
| return number != null; |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TYPE: |
| return type != null; |
| case FhirPackage.CLAIM_RESPONSE_NOTE__TEXT: |
| return text != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ClaimResponseNoteImpl |