blob: 2c9fe8404547282544318ab9d8f8239347ec32f1 [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.CodeableConcept;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.MeasureReportPopulation1;
import org.hl7.fhir.Reference;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Measure Report Population1</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.MeasureReportPopulation1Impl#getCode <em>Code</em>}</li>
* <li>{@link org.hl7.fhir.impl.MeasureReportPopulation1Impl#getCount <em>Count</em>}</li>
* <li>{@link org.hl7.fhir.impl.MeasureReportPopulation1Impl#getSubjectResults <em>Subject Results</em>}</li>
* </ul>
*
* @generated
*/
public class MeasureReportPopulation1Impl extends BackboneElementImpl implements MeasureReportPopulation1 {
/**
* The cached value of the '{@link #getCode() <em>Code</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCode()
* @generated
* @ordered
*/
protected CodeableConcept code;
/**
* The cached value of the '{@link #getCount() <em>Count</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCount()
* @generated
* @ordered
*/
protected org.hl7.fhir.Integer count;
/**
* The cached value of the '{@link #getSubjectResults() <em>Subject Results</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSubjectResults()
* @generated
* @ordered
*/
protected Reference subjectResults;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MeasureReportPopulation1Impl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getMeasureReportPopulation1();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept getCode() {
return code;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetCode(CodeableConcept newCode, NotificationChain msgs) {
CodeableConcept oldCode = code;
code = newCode;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.MEASURE_REPORT_POPULATION1__CODE, oldCode, newCode);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCode(CodeableConcept newCode) {
if (newCode != code) {
NotificationChain msgs = null;
if (code != null)
msgs = ((InternalEObject)code).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MEASURE_REPORT_POPULATION1__CODE, null, msgs);
if (newCode != null)
msgs = ((InternalEObject)newCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MEASURE_REPORT_POPULATION1__CODE, null, msgs);
msgs = basicSetCode(newCode, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.MEASURE_REPORT_POPULATION1__CODE, newCode, newCode));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public org.hl7.fhir.Integer getCount() {
return count;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetCount(org.hl7.fhir.Integer newCount, NotificationChain msgs) {
org.hl7.fhir.Integer oldCount = count;
count = newCount;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.MEASURE_REPORT_POPULATION1__COUNT, oldCount, newCount);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCount(org.hl7.fhir.Integer newCount) {
if (newCount != count) {
NotificationChain msgs = null;
if (count != null)
msgs = ((InternalEObject)count).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MEASURE_REPORT_POPULATION1__COUNT, null, msgs);
if (newCount != null)
msgs = ((InternalEObject)newCount).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MEASURE_REPORT_POPULATION1__COUNT, null, msgs);
msgs = basicSetCount(newCount, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.MEASURE_REPORT_POPULATION1__COUNT, newCount, newCount));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Reference getSubjectResults() {
return subjectResults;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSubjectResults(Reference newSubjectResults, NotificationChain msgs) {
Reference oldSubjectResults = subjectResults;
subjectResults = newSubjectResults;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.MEASURE_REPORT_POPULATION1__SUBJECT_RESULTS, oldSubjectResults, newSubjectResults);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSubjectResults(Reference newSubjectResults) {
if (newSubjectResults != subjectResults) {
NotificationChain msgs = null;
if (subjectResults != null)
msgs = ((InternalEObject)subjectResults).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MEASURE_REPORT_POPULATION1__SUBJECT_RESULTS, null, msgs);
if (newSubjectResults != null)
msgs = ((InternalEObject)newSubjectResults).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.MEASURE_REPORT_POPULATION1__SUBJECT_RESULTS, null, msgs);
msgs = basicSetSubjectResults(newSubjectResults, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.MEASURE_REPORT_POPULATION1__SUBJECT_RESULTS, newSubjectResults, newSubjectResults));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.MEASURE_REPORT_POPULATION1__CODE:
return basicSetCode(null, msgs);
case FhirPackage.MEASURE_REPORT_POPULATION1__COUNT:
return basicSetCount(null, msgs);
case FhirPackage.MEASURE_REPORT_POPULATION1__SUBJECT_RESULTS:
return basicSetSubjectResults(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.MEASURE_REPORT_POPULATION1__CODE:
return getCode();
case FhirPackage.MEASURE_REPORT_POPULATION1__COUNT:
return getCount();
case FhirPackage.MEASURE_REPORT_POPULATION1__SUBJECT_RESULTS:
return getSubjectResults();
}
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.MEASURE_REPORT_POPULATION1__CODE:
setCode((CodeableConcept)newValue);
return;
case FhirPackage.MEASURE_REPORT_POPULATION1__COUNT:
setCount((org.hl7.fhir.Integer)newValue);
return;
case FhirPackage.MEASURE_REPORT_POPULATION1__SUBJECT_RESULTS:
setSubjectResults((Reference)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirPackage.MEASURE_REPORT_POPULATION1__CODE:
setCode((CodeableConcept)null);
return;
case FhirPackage.MEASURE_REPORT_POPULATION1__COUNT:
setCount((org.hl7.fhir.Integer)null);
return;
case FhirPackage.MEASURE_REPORT_POPULATION1__SUBJECT_RESULTS:
setSubjectResults((Reference)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirPackage.MEASURE_REPORT_POPULATION1__CODE:
return code != null;
case FhirPackage.MEASURE_REPORT_POPULATION1__COUNT:
return count != null;
case FhirPackage.MEASURE_REPORT_POPULATION1__SUBJECT_RESULTS:
return subjectResults != null;
}
return super.eIsSet(featureID);
}
} //MeasureReportPopulation1Impl