blob: 29bcc978cfa65907df62ad0f07fb7cdbabc7577d [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.DateTime;
import org.hl7.fhir.DiagnosticOrderEvent;
import org.hl7.fhir.DiagnosticOrderStatus;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.Reference;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Diagnostic Order Event</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.DiagnosticOrderEventImpl#getStatus <em>Status</em>}</li>
* <li>{@link org.hl7.fhir.impl.DiagnosticOrderEventImpl#getDescription <em>Description</em>}</li>
* <li>{@link org.hl7.fhir.impl.DiagnosticOrderEventImpl#getDateTime <em>Date Time</em>}</li>
* <li>{@link org.hl7.fhir.impl.DiagnosticOrderEventImpl#getActor <em>Actor</em>}</li>
* </ul>
*
* @generated
*/
public class DiagnosticOrderEventImpl extends BackboneElementImpl implements DiagnosticOrderEvent {
/**
* The cached value of the '{@link #getStatus() <em>Status</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStatus()
* @generated
* @ordered
*/
protected DiagnosticOrderStatus status;
/**
* The cached value of the '{@link #getDescription() <em>Description</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDescription()
* @generated
* @ordered
*/
protected CodeableConcept description;
/**
* The cached value of the '{@link #getDateTime() <em>Date Time</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDateTime()
* @generated
* @ordered
*/
protected DateTime dateTime;
/**
* The cached value of the '{@link #getActor() <em>Actor</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getActor()
* @generated
* @ordered
*/
protected Reference actor;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected DiagnosticOrderEventImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getDiagnosticOrderEvent();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DiagnosticOrderStatus getStatus() {
return status;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetStatus(DiagnosticOrderStatus newStatus, NotificationChain msgs) {
DiagnosticOrderStatus oldStatus = status;
status = newStatus;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.DIAGNOSTIC_ORDER_EVENT__STATUS, oldStatus, newStatus);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStatus(DiagnosticOrderStatus newStatus) {
if (newStatus != status) {
NotificationChain msgs = null;
if (status != null)
msgs = ((InternalEObject)status).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.DIAGNOSTIC_ORDER_EVENT__STATUS, null, msgs);
if (newStatus != null)
msgs = ((InternalEObject)newStatus).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.DIAGNOSTIC_ORDER_EVENT__STATUS, null, msgs);
msgs = basicSetStatus(newStatus, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.DIAGNOSTIC_ORDER_EVENT__STATUS, newStatus, newStatus));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept getDescription() {
return description;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetDescription(CodeableConcept newDescription, NotificationChain msgs) {
CodeableConcept oldDescription = description;
description = newDescription;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION, oldDescription, newDescription);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDescription(CodeableConcept newDescription) {
if (newDescription != description) {
NotificationChain msgs = null;
if (description != null)
msgs = ((InternalEObject)description).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION, null, msgs);
if (newDescription != null)
msgs = ((InternalEObject)newDescription).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION, null, msgs);
msgs = basicSetDescription(newDescription, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION, newDescription, newDescription));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DateTime getDateTime() {
return dateTime;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetDateTime(DateTime newDateTime, NotificationChain msgs) {
DateTime oldDateTime = dateTime;
dateTime = newDateTime;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME, oldDateTime, newDateTime);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDateTime(DateTime newDateTime) {
if (newDateTime != dateTime) {
NotificationChain msgs = null;
if (dateTime != null)
msgs = ((InternalEObject)dateTime).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME, null, msgs);
if (newDateTime != null)
msgs = ((InternalEObject)newDateTime).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME, null, msgs);
msgs = basicSetDateTime(newDateTime, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME, newDateTime, newDateTime));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Reference getActor() {
return actor;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetActor(Reference newActor, NotificationChain msgs) {
Reference oldActor = actor;
actor = newActor;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.DIAGNOSTIC_ORDER_EVENT__ACTOR, oldActor, newActor);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setActor(Reference newActor) {
if (newActor != actor) {
NotificationChain msgs = null;
if (actor != null)
msgs = ((InternalEObject)actor).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.DIAGNOSTIC_ORDER_EVENT__ACTOR, null, msgs);
if (newActor != null)
msgs = ((InternalEObject)newActor).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.DIAGNOSTIC_ORDER_EVENT__ACTOR, null, msgs);
msgs = basicSetActor(newActor, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.DIAGNOSTIC_ORDER_EVENT__ACTOR, newActor, newActor));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__STATUS:
return basicSetStatus(null, msgs);
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION:
return basicSetDescription(null, msgs);
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME:
return basicSetDateTime(null, msgs);
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__ACTOR:
return basicSetActor(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.DIAGNOSTIC_ORDER_EVENT__STATUS:
return getStatus();
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION:
return getDescription();
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME:
return getDateTime();
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__ACTOR:
return getActor();
}
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.DIAGNOSTIC_ORDER_EVENT__STATUS:
setStatus((DiagnosticOrderStatus)newValue);
return;
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION:
setDescription((CodeableConcept)newValue);
return;
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME:
setDateTime((DateTime)newValue);
return;
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__ACTOR:
setActor((Reference)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__STATUS:
setStatus((DiagnosticOrderStatus)null);
return;
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION:
setDescription((CodeableConcept)null);
return;
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME:
setDateTime((DateTime)null);
return;
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__ACTOR:
setActor((Reference)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__STATUS:
return status != null;
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DESCRIPTION:
return description != null;
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__DATE_TIME:
return dateTime != null;
case FhirPackage.DIAGNOSTIC_ORDER_EVENT__ACTOR:
return actor != null;
}
return super.eIsSet(featureID);
}
} //DiagnosticOrderEventImpl