blob: 54feb5a16b116e40b8e1fd699f33d7d8e2bc0860 [file] [log] [blame]
/**
*/
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.Date;
import org.hl7.fhir.ExplanationOfBenefitProsthesis;
import org.hl7.fhir.FhirPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Explanation Of Benefit Prosthesis</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.ExplanationOfBenefitProsthesisImpl#getInitial <em>Initial</em>}</li>
* <li>{@link org.hl7.fhir.impl.ExplanationOfBenefitProsthesisImpl#getPriorDate <em>Prior Date</em>}</li>
* <li>{@link org.hl7.fhir.impl.ExplanationOfBenefitProsthesisImpl#getPriorMaterial <em>Prior Material</em>}</li>
* </ul>
*
* @generated
*/
public class ExplanationOfBenefitProsthesisImpl extends BackboneElementImpl implements ExplanationOfBenefitProsthesis {
/**
* The cached value of the '{@link #getInitial() <em>Initial</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getInitial()
* @generated
* @ordered
*/
protected org.hl7.fhir.Boolean initial;
/**
* The cached value of the '{@link #getPriorDate() <em>Prior Date</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPriorDate()
* @generated
* @ordered
*/
protected Date priorDate;
/**
* The cached value of the '{@link #getPriorMaterial() <em>Prior Material</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPriorMaterial()
* @generated
* @ordered
*/
protected Coding priorMaterial;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ExplanationOfBenefitProsthesisImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getExplanationOfBenefitProsthesis();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.Boolean getInitial() {
return initial;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetInitial(org.hl7.fhir.Boolean newInitial, NotificationChain msgs) {
org.hl7.fhir.Boolean oldInitial = initial;
initial = newInitial;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__INITIAL, oldInitial, newInitial);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setInitial(org.hl7.fhir.Boolean newInitial) {
if (newInitial != initial) {
NotificationChain msgs = null;
if (initial != null)
msgs = ((InternalEObject)initial).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__INITIAL, null, msgs);
if (newInitial != null)
msgs = ((InternalEObject)newInitial).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__INITIAL, null, msgs);
msgs = basicSetInitial(newInitial, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__INITIAL, newInitial, newInitial));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Date getPriorDate() {
return priorDate;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetPriorDate(Date newPriorDate, NotificationChain msgs) {
Date oldPriorDate = priorDate;
priorDate = newPriorDate;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_DATE, oldPriorDate, newPriorDate);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPriorDate(Date newPriorDate) {
if (newPriorDate != priorDate) {
NotificationChain msgs = null;
if (priorDate != null)
msgs = ((InternalEObject)priorDate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_DATE, null, msgs);
if (newPriorDate != null)
msgs = ((InternalEObject)newPriorDate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_DATE, null, msgs);
msgs = basicSetPriorDate(newPriorDate, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_DATE, newPriorDate, newPriorDate));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Coding getPriorMaterial() {
return priorMaterial;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetPriorMaterial(Coding newPriorMaterial, NotificationChain msgs) {
Coding oldPriorMaterial = priorMaterial;
priorMaterial = newPriorMaterial;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_MATERIAL, oldPriorMaterial, newPriorMaterial);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPriorMaterial(Coding newPriorMaterial) {
if (newPriorMaterial != priorMaterial) {
NotificationChain msgs = null;
if (priorMaterial != null)
msgs = ((InternalEObject)priorMaterial).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_MATERIAL, null, msgs);
if (newPriorMaterial != null)
msgs = ((InternalEObject)newPriorMaterial).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_MATERIAL, null, msgs);
msgs = basicSetPriorMaterial(newPriorMaterial, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_MATERIAL, newPriorMaterial, newPriorMaterial));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__INITIAL:
return basicSetInitial(null, msgs);
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_DATE:
return basicSetPriorDate(null, msgs);
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_MATERIAL:
return basicSetPriorMaterial(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_PROSTHESIS__INITIAL:
return getInitial();
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_DATE:
return getPriorDate();
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_MATERIAL:
return getPriorMaterial();
}
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_PROSTHESIS__INITIAL:
setInitial((org.hl7.fhir.Boolean)newValue);
return;
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_DATE:
setPriorDate((Date)newValue);
return;
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_MATERIAL:
setPriorMaterial((Coding)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_PROSTHESIS__INITIAL:
setInitial((org.hl7.fhir.Boolean)null);
return;
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_DATE:
setPriorDate((Date)null);
return;
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_MATERIAL:
setPriorMaterial((Coding)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_PROSTHESIS__INITIAL:
return initial != null;
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_DATE:
return priorDate != null;
case FhirPackage.EXPLANATION_OF_BENEFIT_PROSTHESIS__PRIOR_MATERIAL:
return priorMaterial != null;
}
return super.eIsSet(featureID);
}
} //ExplanationOfBenefitProsthesisImpl