blob: b91080036a4bf579fec6a0c2e913a8004a0f1ac4 [file] [log] [blame]
/**
*/
package org.hl7.fhir.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.hl7.fhir.CodeableConcept;
import org.hl7.fhir.DateTime;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.Identifier;
import org.hl7.fhir.Reference;
import org.hl7.fhir.SupplyRequest;
import org.hl7.fhir.SupplyRequestStatus;
import org.hl7.fhir.SupplyRequestWhen;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Supply Request</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getPatient <em>Patient</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getSource <em>Source</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getDate <em>Date</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getIdentifier <em>Identifier</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getStatus <em>Status</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getKind <em>Kind</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getOrderedItem <em>Ordered Item</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getSupplier <em>Supplier</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getReasonCodeableConcept <em>Reason Codeable Concept</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getReasonReference <em>Reason Reference</em>}</li>
* <li>{@link org.hl7.fhir.impl.SupplyRequestImpl#getWhen <em>When</em>}</li>
* </ul>
*
* @generated
*/
public class SupplyRequestImpl extends DomainResourceImpl implements SupplyRequest {
/**
* The cached value of the '{@link #getPatient() <em>Patient</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPatient()
* @generated
* @ordered
*/
protected Reference patient;
/**
* The cached value of the '{@link #getSource() <em>Source</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSource()
* @generated
* @ordered
*/
protected Reference source;
/**
* The cached value of the '{@link #getDate() <em>Date</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getDate()
* @generated
* @ordered
*/
protected DateTime date;
/**
* The cached value of the '{@link #getIdentifier() <em>Identifier</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIdentifier()
* @generated
* @ordered
*/
protected Identifier identifier;
/**
* The cached value of the '{@link #getStatus() <em>Status</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStatus()
* @generated
* @ordered
*/
protected SupplyRequestStatus status;
/**
* The cached value of the '{@link #getKind() <em>Kind</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKind()
* @generated
* @ordered
*/
protected CodeableConcept kind;
/**
* The cached value of the '{@link #getOrderedItem() <em>Ordered Item</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getOrderedItem()
* @generated
* @ordered
*/
protected Reference orderedItem;
/**
* The cached value of the '{@link #getSupplier() <em>Supplier</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSupplier()
* @generated
* @ordered
*/
protected EList<Reference> supplier;
/**
* The cached value of the '{@link #getReasonCodeableConcept() <em>Reason Codeable Concept</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getReasonCodeableConcept()
* @generated
* @ordered
*/
protected CodeableConcept reasonCodeableConcept;
/**
* The cached value of the '{@link #getReasonReference() <em>Reason Reference</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getReasonReference()
* @generated
* @ordered
*/
protected Reference reasonReference;
/**
* The cached value of the '{@link #getWhen() <em>When</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getWhen()
* @generated
* @ordered
*/
protected SupplyRequestWhen when;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected SupplyRequestImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getSupplyRequest();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Reference getPatient() {
return patient;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetPatient(Reference newPatient, NotificationChain msgs) {
Reference oldPatient = patient;
patient = newPatient;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__PATIENT, oldPatient, newPatient);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPatient(Reference newPatient) {
if (newPatient != patient) {
NotificationChain msgs = null;
if (patient != null)
msgs = ((InternalEObject)patient).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__PATIENT, null, msgs);
if (newPatient != null)
msgs = ((InternalEObject)newPatient).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__PATIENT, null, msgs);
msgs = basicSetPatient(newPatient, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__PATIENT, newPatient, newPatient));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Reference getSource() {
return source;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSource(Reference newSource, NotificationChain msgs) {
Reference oldSource = source;
source = newSource;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__SOURCE, oldSource, newSource);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setSource(Reference newSource) {
if (newSource != source) {
NotificationChain msgs = null;
if (source != null)
msgs = ((InternalEObject)source).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__SOURCE, null, msgs);
if (newSource != null)
msgs = ((InternalEObject)newSource).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__SOURCE, null, msgs);
msgs = basicSetSource(newSource, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__SOURCE, newSource, newSource));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DateTime getDate() {
return date;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetDate(DateTime newDate, NotificationChain msgs) {
DateTime oldDate = date;
date = newDate;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__DATE, oldDate, newDate);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setDate(DateTime newDate) {
if (newDate != date) {
NotificationChain msgs = null;
if (date != null)
msgs = ((InternalEObject)date).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__DATE, null, msgs);
if (newDate != null)
msgs = ((InternalEObject)newDate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__DATE, null, msgs);
msgs = basicSetDate(newDate, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__DATE, newDate, newDate));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Identifier getIdentifier() {
return identifier;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetIdentifier(Identifier newIdentifier, NotificationChain msgs) {
Identifier oldIdentifier = identifier;
identifier = newIdentifier;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__IDENTIFIER, oldIdentifier, newIdentifier);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setIdentifier(Identifier newIdentifier) {
if (newIdentifier != identifier) {
NotificationChain msgs = null;
if (identifier != null)
msgs = ((InternalEObject)identifier).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__IDENTIFIER, null, msgs);
if (newIdentifier != null)
msgs = ((InternalEObject)newIdentifier).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__IDENTIFIER, null, msgs);
msgs = basicSetIdentifier(newIdentifier, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__IDENTIFIER, newIdentifier, newIdentifier));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SupplyRequestStatus getStatus() {
return status;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetStatus(SupplyRequestStatus newStatus, NotificationChain msgs) {
SupplyRequestStatus oldStatus = status;
status = newStatus;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__STATUS, oldStatus, newStatus);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStatus(SupplyRequestStatus newStatus) {
if (newStatus != status) {
NotificationChain msgs = null;
if (status != null)
msgs = ((InternalEObject)status).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__STATUS, null, msgs);
if (newStatus != null)
msgs = ((InternalEObject)newStatus).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__STATUS, null, msgs);
msgs = basicSetStatus(newStatus, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__STATUS, newStatus, newStatus));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept getKind() {
return kind;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetKind(CodeableConcept newKind, NotificationChain msgs) {
CodeableConcept oldKind = kind;
kind = newKind;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__KIND, oldKind, newKind);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setKind(CodeableConcept newKind) {
if (newKind != kind) {
NotificationChain msgs = null;
if (kind != null)
msgs = ((InternalEObject)kind).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__KIND, null, msgs);
if (newKind != null)
msgs = ((InternalEObject)newKind).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__KIND, null, msgs);
msgs = basicSetKind(newKind, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__KIND, newKind, newKind));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Reference getOrderedItem() {
return orderedItem;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetOrderedItem(Reference newOrderedItem, NotificationChain msgs) {
Reference oldOrderedItem = orderedItem;
orderedItem = newOrderedItem;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__ORDERED_ITEM, oldOrderedItem, newOrderedItem);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setOrderedItem(Reference newOrderedItem) {
if (newOrderedItem != orderedItem) {
NotificationChain msgs = null;
if (orderedItem != null)
msgs = ((InternalEObject)orderedItem).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__ORDERED_ITEM, null, msgs);
if (newOrderedItem != null)
msgs = ((InternalEObject)newOrderedItem).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__ORDERED_ITEM, null, msgs);
msgs = basicSetOrderedItem(newOrderedItem, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__ORDERED_ITEM, newOrderedItem, newOrderedItem));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Reference> getSupplier() {
if (supplier == null) {
supplier = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.SUPPLY_REQUEST__SUPPLIER);
}
return supplier;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeableConcept getReasonCodeableConcept() {
return reasonCodeableConcept;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetReasonCodeableConcept(CodeableConcept newReasonCodeableConcept, NotificationChain msgs) {
CodeableConcept oldReasonCodeableConcept = reasonCodeableConcept;
reasonCodeableConcept = newReasonCodeableConcept;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__REASON_CODEABLE_CONCEPT, oldReasonCodeableConcept, newReasonCodeableConcept);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setReasonCodeableConcept(CodeableConcept newReasonCodeableConcept) {
if (newReasonCodeableConcept != reasonCodeableConcept) {
NotificationChain msgs = null;
if (reasonCodeableConcept != null)
msgs = ((InternalEObject)reasonCodeableConcept).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__REASON_CODEABLE_CONCEPT, null, msgs);
if (newReasonCodeableConcept != null)
msgs = ((InternalEObject)newReasonCodeableConcept).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__REASON_CODEABLE_CONCEPT, null, msgs);
msgs = basicSetReasonCodeableConcept(newReasonCodeableConcept, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__REASON_CODEABLE_CONCEPT, newReasonCodeableConcept, newReasonCodeableConcept));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Reference getReasonReference() {
return reasonReference;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetReasonReference(Reference newReasonReference, NotificationChain msgs) {
Reference oldReasonReference = reasonReference;
reasonReference = newReasonReference;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__REASON_REFERENCE, oldReasonReference, newReasonReference);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setReasonReference(Reference newReasonReference) {
if (newReasonReference != reasonReference) {
NotificationChain msgs = null;
if (reasonReference != null)
msgs = ((InternalEObject)reasonReference).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__REASON_REFERENCE, null, msgs);
if (newReasonReference != null)
msgs = ((InternalEObject)newReasonReference).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__REASON_REFERENCE, null, msgs);
msgs = basicSetReasonReference(newReasonReference, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__REASON_REFERENCE, newReasonReference, newReasonReference));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SupplyRequestWhen getWhen() {
return when;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetWhen(SupplyRequestWhen newWhen, NotificationChain msgs) {
SupplyRequestWhen oldWhen = when;
when = newWhen;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__WHEN, oldWhen, newWhen);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setWhen(SupplyRequestWhen newWhen) {
if (newWhen != when) {
NotificationChain msgs = null;
if (when != null)
msgs = ((InternalEObject)when).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__WHEN, null, msgs);
if (newWhen != null)
msgs = ((InternalEObject)newWhen).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_REQUEST__WHEN, null, msgs);
msgs = basicSetWhen(newWhen, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_REQUEST__WHEN, newWhen, newWhen));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.SUPPLY_REQUEST__PATIENT:
return basicSetPatient(null, msgs);
case FhirPackage.SUPPLY_REQUEST__SOURCE:
return basicSetSource(null, msgs);
case FhirPackage.SUPPLY_REQUEST__DATE:
return basicSetDate(null, msgs);
case FhirPackage.SUPPLY_REQUEST__IDENTIFIER:
return basicSetIdentifier(null, msgs);
case FhirPackage.SUPPLY_REQUEST__STATUS:
return basicSetStatus(null, msgs);
case FhirPackage.SUPPLY_REQUEST__KIND:
return basicSetKind(null, msgs);
case FhirPackage.SUPPLY_REQUEST__ORDERED_ITEM:
return basicSetOrderedItem(null, msgs);
case FhirPackage.SUPPLY_REQUEST__SUPPLIER:
return ((InternalEList<?>)getSupplier()).basicRemove(otherEnd, msgs);
case FhirPackage.SUPPLY_REQUEST__REASON_CODEABLE_CONCEPT:
return basicSetReasonCodeableConcept(null, msgs);
case FhirPackage.SUPPLY_REQUEST__REASON_REFERENCE:
return basicSetReasonReference(null, msgs);
case FhirPackage.SUPPLY_REQUEST__WHEN:
return basicSetWhen(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.SUPPLY_REQUEST__PATIENT:
return getPatient();
case FhirPackage.SUPPLY_REQUEST__SOURCE:
return getSource();
case FhirPackage.SUPPLY_REQUEST__DATE:
return getDate();
case FhirPackage.SUPPLY_REQUEST__IDENTIFIER:
return getIdentifier();
case FhirPackage.SUPPLY_REQUEST__STATUS:
return getStatus();
case FhirPackage.SUPPLY_REQUEST__KIND:
return getKind();
case FhirPackage.SUPPLY_REQUEST__ORDERED_ITEM:
return getOrderedItem();
case FhirPackage.SUPPLY_REQUEST__SUPPLIER:
return getSupplier();
case FhirPackage.SUPPLY_REQUEST__REASON_CODEABLE_CONCEPT:
return getReasonCodeableConcept();
case FhirPackage.SUPPLY_REQUEST__REASON_REFERENCE:
return getReasonReference();
case FhirPackage.SUPPLY_REQUEST__WHEN:
return getWhen();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FhirPackage.SUPPLY_REQUEST__PATIENT:
setPatient((Reference)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__SOURCE:
setSource((Reference)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__DATE:
setDate((DateTime)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__IDENTIFIER:
setIdentifier((Identifier)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__STATUS:
setStatus((SupplyRequestStatus)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__KIND:
setKind((CodeableConcept)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__ORDERED_ITEM:
setOrderedItem((Reference)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__SUPPLIER:
getSupplier().clear();
getSupplier().addAll((Collection<? extends Reference>)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__REASON_CODEABLE_CONCEPT:
setReasonCodeableConcept((CodeableConcept)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__REASON_REFERENCE:
setReasonReference((Reference)newValue);
return;
case FhirPackage.SUPPLY_REQUEST__WHEN:
setWhen((SupplyRequestWhen)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirPackage.SUPPLY_REQUEST__PATIENT:
setPatient((Reference)null);
return;
case FhirPackage.SUPPLY_REQUEST__SOURCE:
setSource((Reference)null);
return;
case FhirPackage.SUPPLY_REQUEST__DATE:
setDate((DateTime)null);
return;
case FhirPackage.SUPPLY_REQUEST__IDENTIFIER:
setIdentifier((Identifier)null);
return;
case FhirPackage.SUPPLY_REQUEST__STATUS:
setStatus((SupplyRequestStatus)null);
return;
case FhirPackage.SUPPLY_REQUEST__KIND:
setKind((CodeableConcept)null);
return;
case FhirPackage.SUPPLY_REQUEST__ORDERED_ITEM:
setOrderedItem((Reference)null);
return;
case FhirPackage.SUPPLY_REQUEST__SUPPLIER:
getSupplier().clear();
return;
case FhirPackage.SUPPLY_REQUEST__REASON_CODEABLE_CONCEPT:
setReasonCodeableConcept((CodeableConcept)null);
return;
case FhirPackage.SUPPLY_REQUEST__REASON_REFERENCE:
setReasonReference((Reference)null);
return;
case FhirPackage.SUPPLY_REQUEST__WHEN:
setWhen((SupplyRequestWhen)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirPackage.SUPPLY_REQUEST__PATIENT:
return patient != null;
case FhirPackage.SUPPLY_REQUEST__SOURCE:
return source != null;
case FhirPackage.SUPPLY_REQUEST__DATE:
return date != null;
case FhirPackage.SUPPLY_REQUEST__IDENTIFIER:
return identifier != null;
case FhirPackage.SUPPLY_REQUEST__STATUS:
return status != null;
case FhirPackage.SUPPLY_REQUEST__KIND:
return kind != null;
case FhirPackage.SUPPLY_REQUEST__ORDERED_ITEM:
return orderedItem != null;
case FhirPackage.SUPPLY_REQUEST__SUPPLIER:
return supplier != null && !supplier.isEmpty();
case FhirPackage.SUPPLY_REQUEST__REASON_CODEABLE_CONCEPT:
return reasonCodeableConcept != null;
case FhirPackage.SUPPLY_REQUEST__REASON_REFERENCE:
return reasonReference != null;
case FhirPackage.SUPPLY_REQUEST__WHEN:
return when != null;
}
return super.eIsSet(featureID);
}
} //SupplyRequestImpl