| /** |
| */ |
| 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.Period; |
| import org.hl7.fhir.Reference; |
| import org.hl7.fhir.SupplyDelivery; |
| import org.hl7.fhir.SupplyDeliveryStatus; |
| import org.hl7.fhir.SupplyDeliverySuppliedItem; |
| import org.hl7.fhir.Timing; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Supply Delivery</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getIdentifier <em>Identifier</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getBasedOn <em>Based On</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getPartOf <em>Part Of</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getStatus <em>Status</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getPatient <em>Patient</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getType <em>Type</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getSuppliedItem <em>Supplied Item</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getOccurrenceDateTime <em>Occurrence Date Time</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getOccurrencePeriod <em>Occurrence Period</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getOccurrenceTiming <em>Occurrence Timing</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getSupplier <em>Supplier</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getDestination <em>Destination</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.SupplyDeliveryImpl#getReceiver <em>Receiver</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class SupplyDeliveryImpl extends DomainResourceImpl implements SupplyDelivery { |
| /** |
| * The cached value of the '{@link #getIdentifier() <em>Identifier</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getIdentifier() |
| * @generated |
| * @ordered |
| */ |
| protected EList<Identifier> identifier; |
| |
| /** |
| * The cached value of the '{@link #getBasedOn() <em>Based On</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getBasedOn() |
| * @generated |
| * @ordered |
| */ |
| protected EList<Reference> basedOn; |
| |
| /** |
| * The cached value of the '{@link #getPartOf() <em>Part Of</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getPartOf() |
| * @generated |
| * @ordered |
| */ |
| protected EList<Reference> partOf; |
| |
| /** |
| * The cached value of the '{@link #getStatus() <em>Status</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getStatus() |
| * @generated |
| * @ordered |
| */ |
| protected SupplyDeliveryStatus status; |
| |
| /** |
| * 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 #getType() <em>Type</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getType() |
| * @generated |
| * @ordered |
| */ |
| protected CodeableConcept type; |
| |
| /** |
| * The cached value of the '{@link #getSuppliedItem() <em>Supplied Item</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getSuppliedItem() |
| * @generated |
| * @ordered |
| */ |
| protected SupplyDeliverySuppliedItem suppliedItem; |
| |
| /** |
| * The cached value of the '{@link #getOccurrenceDateTime() <em>Occurrence Date Time</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOccurrenceDateTime() |
| * @generated |
| * @ordered |
| */ |
| protected DateTime occurrenceDateTime; |
| |
| /** |
| * The cached value of the '{@link #getOccurrencePeriod() <em>Occurrence Period</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOccurrencePeriod() |
| * @generated |
| * @ordered |
| */ |
| protected Period occurrencePeriod; |
| |
| /** |
| * The cached value of the '{@link #getOccurrenceTiming() <em>Occurrence Timing</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getOccurrenceTiming() |
| * @generated |
| * @ordered |
| */ |
| protected Timing occurrenceTiming; |
| |
| /** |
| * The cached value of the '{@link #getSupplier() <em>Supplier</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getSupplier() |
| * @generated |
| * @ordered |
| */ |
| protected Reference supplier; |
| |
| /** |
| * The cached value of the '{@link #getDestination() <em>Destination</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getDestination() |
| * @generated |
| * @ordered |
| */ |
| protected Reference destination; |
| |
| /** |
| * The cached value of the '{@link #getReceiver() <em>Receiver</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getReceiver() |
| * @generated |
| * @ordered |
| */ |
| protected EList<Reference> receiver; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected SupplyDeliveryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getSupplyDelivery(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<Identifier> getIdentifier() { |
| if (identifier == null) { |
| identifier = new EObjectContainmentEList<Identifier>(Identifier.class, this, FhirPackage.SUPPLY_DELIVERY__IDENTIFIER); |
| } |
| return identifier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<Reference> getBasedOn() { |
| if (basedOn == null) { |
| basedOn = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.SUPPLY_DELIVERY__BASED_ON); |
| } |
| return basedOn; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<Reference> getPartOf() { |
| if (partOf == null) { |
| partOf = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.SUPPLY_DELIVERY__PART_OF); |
| } |
| return partOf; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SupplyDeliveryStatus getStatus() { |
| return status; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetStatus(SupplyDeliveryStatus newStatus, NotificationChain msgs) { |
| SupplyDeliveryStatus oldStatus = status; |
| status = newStatus; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__STATUS, oldStatus, newStatus); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setStatus(SupplyDeliveryStatus newStatus) { |
| if (newStatus != status) { |
| NotificationChain msgs = null; |
| if (status != null) |
| msgs = ((InternalEObject)status).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__STATUS, null, msgs); |
| if (newStatus != null) |
| msgs = ((InternalEObject)newStatus).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__STATUS, null, msgs); |
| msgs = basicSetStatus(newStatus, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__STATUS, newStatus, newStatus)); |
| } |
| |
| /** |
| * <!-- 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_DELIVERY__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_DELIVERY__PATIENT, null, msgs); |
| if (newPatient != null) |
| msgs = ((InternalEObject)newPatient).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__PATIENT, null, msgs); |
| msgs = basicSetPatient(newPatient, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__PATIENT, newPatient, newPatient)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept getType() { |
| return type; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetType(CodeableConcept newType, NotificationChain msgs) { |
| CodeableConcept oldType = type; |
| type = newType; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__TYPE, oldType, newType); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setType(CodeableConcept newType) { |
| if (newType != type) { |
| NotificationChain msgs = null; |
| if (type != null) |
| msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__TYPE, null, msgs); |
| if (newType != null) |
| msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__TYPE, null, msgs); |
| msgs = basicSetType(newType, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__TYPE, newType, newType)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SupplyDeliverySuppliedItem getSuppliedItem() { |
| return suppliedItem; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetSuppliedItem(SupplyDeliverySuppliedItem newSuppliedItem, NotificationChain msgs) { |
| SupplyDeliverySuppliedItem oldSuppliedItem = suppliedItem; |
| suppliedItem = newSuppliedItem; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__SUPPLIED_ITEM, oldSuppliedItem, newSuppliedItem); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setSuppliedItem(SupplyDeliverySuppliedItem newSuppliedItem) { |
| if (newSuppliedItem != suppliedItem) { |
| NotificationChain msgs = null; |
| if (suppliedItem != null) |
| msgs = ((InternalEObject)suppliedItem).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__SUPPLIED_ITEM, null, msgs); |
| if (newSuppliedItem != null) |
| msgs = ((InternalEObject)newSuppliedItem).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__SUPPLIED_ITEM, null, msgs); |
| msgs = basicSetSuppliedItem(newSuppliedItem, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__SUPPLIED_ITEM, newSuppliedItem, newSuppliedItem)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public DateTime getOccurrenceDateTime() { |
| return occurrenceDateTime; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetOccurrenceDateTime(DateTime newOccurrenceDateTime, NotificationChain msgs) { |
| DateTime oldOccurrenceDateTime = occurrenceDateTime; |
| occurrenceDateTime = newOccurrenceDateTime; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_DATE_TIME, oldOccurrenceDateTime, newOccurrenceDateTime); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setOccurrenceDateTime(DateTime newOccurrenceDateTime) { |
| if (newOccurrenceDateTime != occurrenceDateTime) { |
| NotificationChain msgs = null; |
| if (occurrenceDateTime != null) |
| msgs = ((InternalEObject)occurrenceDateTime).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_DATE_TIME, null, msgs); |
| if (newOccurrenceDateTime != null) |
| msgs = ((InternalEObject)newOccurrenceDateTime).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_DATE_TIME, null, msgs); |
| msgs = basicSetOccurrenceDateTime(newOccurrenceDateTime, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_DATE_TIME, newOccurrenceDateTime, newOccurrenceDateTime)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Period getOccurrencePeriod() { |
| return occurrencePeriod; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetOccurrencePeriod(Period newOccurrencePeriod, NotificationChain msgs) { |
| Period oldOccurrencePeriod = occurrencePeriod; |
| occurrencePeriod = newOccurrencePeriod; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_PERIOD, oldOccurrencePeriod, newOccurrencePeriod); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setOccurrencePeriod(Period newOccurrencePeriod) { |
| if (newOccurrencePeriod != occurrencePeriod) { |
| NotificationChain msgs = null; |
| if (occurrencePeriod != null) |
| msgs = ((InternalEObject)occurrencePeriod).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_PERIOD, null, msgs); |
| if (newOccurrencePeriod != null) |
| msgs = ((InternalEObject)newOccurrencePeriod).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_PERIOD, null, msgs); |
| msgs = basicSetOccurrencePeriod(newOccurrencePeriod, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_PERIOD, newOccurrencePeriod, newOccurrencePeriod)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Timing getOccurrenceTiming() { |
| return occurrenceTiming; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetOccurrenceTiming(Timing newOccurrenceTiming, NotificationChain msgs) { |
| Timing oldOccurrenceTiming = occurrenceTiming; |
| occurrenceTiming = newOccurrenceTiming; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_TIMING, oldOccurrenceTiming, newOccurrenceTiming); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setOccurrenceTiming(Timing newOccurrenceTiming) { |
| if (newOccurrenceTiming != occurrenceTiming) { |
| NotificationChain msgs = null; |
| if (occurrenceTiming != null) |
| msgs = ((InternalEObject)occurrenceTiming).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_TIMING, null, msgs); |
| if (newOccurrenceTiming != null) |
| msgs = ((InternalEObject)newOccurrenceTiming).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_TIMING, null, msgs); |
| msgs = basicSetOccurrenceTiming(newOccurrenceTiming, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_TIMING, newOccurrenceTiming, newOccurrenceTiming)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getSupplier() { |
| return supplier; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetSupplier(Reference newSupplier, NotificationChain msgs) { |
| Reference oldSupplier = supplier; |
| supplier = newSupplier; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__SUPPLIER, oldSupplier, newSupplier); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setSupplier(Reference newSupplier) { |
| if (newSupplier != supplier) { |
| NotificationChain msgs = null; |
| if (supplier != null) |
| msgs = ((InternalEObject)supplier).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__SUPPLIER, null, msgs); |
| if (newSupplier != null) |
| msgs = ((InternalEObject)newSupplier).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__SUPPLIER, null, msgs); |
| msgs = basicSetSupplier(newSupplier, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__SUPPLIER, newSupplier, newSupplier)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Reference getDestination() { |
| return destination; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetDestination(Reference newDestination, NotificationChain msgs) { |
| Reference oldDestination = destination; |
| destination = newDestination; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__DESTINATION, oldDestination, newDestination); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setDestination(Reference newDestination) { |
| if (newDestination != destination) { |
| NotificationChain msgs = null; |
| if (destination != null) |
| msgs = ((InternalEObject)destination).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__DESTINATION, null, msgs); |
| if (newDestination != null) |
| msgs = ((InternalEObject)newDestination).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.SUPPLY_DELIVERY__DESTINATION, null, msgs); |
| msgs = basicSetDestination(newDestination, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.SUPPLY_DELIVERY__DESTINATION, newDestination, newDestination)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<Reference> getReceiver() { |
| if (receiver == null) { |
| receiver = new EObjectContainmentEList<Reference>(Reference.class, this, FhirPackage.SUPPLY_DELIVERY__RECEIVER); |
| } |
| return receiver; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.SUPPLY_DELIVERY__IDENTIFIER: |
| return ((InternalEList<?>)getIdentifier()).basicRemove(otherEnd, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__BASED_ON: |
| return ((InternalEList<?>)getBasedOn()).basicRemove(otherEnd, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__PART_OF: |
| return ((InternalEList<?>)getPartOf()).basicRemove(otherEnd, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__STATUS: |
| return basicSetStatus(null, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__PATIENT: |
| return basicSetPatient(null, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__TYPE: |
| return basicSetType(null, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIED_ITEM: |
| return basicSetSuppliedItem(null, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_DATE_TIME: |
| return basicSetOccurrenceDateTime(null, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_PERIOD: |
| return basicSetOccurrencePeriod(null, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_TIMING: |
| return basicSetOccurrenceTiming(null, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIER: |
| return basicSetSupplier(null, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__DESTINATION: |
| return basicSetDestination(null, msgs); |
| case FhirPackage.SUPPLY_DELIVERY__RECEIVER: |
| return ((InternalEList<?>)getReceiver()).basicRemove(otherEnd, 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_DELIVERY__IDENTIFIER: |
| return getIdentifier(); |
| case FhirPackage.SUPPLY_DELIVERY__BASED_ON: |
| return getBasedOn(); |
| case FhirPackage.SUPPLY_DELIVERY__PART_OF: |
| return getPartOf(); |
| case FhirPackage.SUPPLY_DELIVERY__STATUS: |
| return getStatus(); |
| case FhirPackage.SUPPLY_DELIVERY__PATIENT: |
| return getPatient(); |
| case FhirPackage.SUPPLY_DELIVERY__TYPE: |
| return getType(); |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIED_ITEM: |
| return getSuppliedItem(); |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_DATE_TIME: |
| return getOccurrenceDateTime(); |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_PERIOD: |
| return getOccurrencePeriod(); |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_TIMING: |
| return getOccurrenceTiming(); |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIER: |
| return getSupplier(); |
| case FhirPackage.SUPPLY_DELIVERY__DESTINATION: |
| return getDestination(); |
| case FhirPackage.SUPPLY_DELIVERY__RECEIVER: |
| return getReceiver(); |
| } |
| 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_DELIVERY__IDENTIFIER: |
| getIdentifier().clear(); |
| getIdentifier().addAll((Collection<? extends Identifier>)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__BASED_ON: |
| getBasedOn().clear(); |
| getBasedOn().addAll((Collection<? extends Reference>)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__PART_OF: |
| getPartOf().clear(); |
| getPartOf().addAll((Collection<? extends Reference>)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__STATUS: |
| setStatus((SupplyDeliveryStatus)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__PATIENT: |
| setPatient((Reference)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__TYPE: |
| setType((CodeableConcept)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIED_ITEM: |
| setSuppliedItem((SupplyDeliverySuppliedItem)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_DATE_TIME: |
| setOccurrenceDateTime((DateTime)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_PERIOD: |
| setOccurrencePeriod((Period)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_TIMING: |
| setOccurrenceTiming((Timing)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIER: |
| setSupplier((Reference)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__DESTINATION: |
| setDestination((Reference)newValue); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__RECEIVER: |
| getReceiver().clear(); |
| getReceiver().addAll((Collection<? extends Reference>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirPackage.SUPPLY_DELIVERY__IDENTIFIER: |
| getIdentifier().clear(); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__BASED_ON: |
| getBasedOn().clear(); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__PART_OF: |
| getPartOf().clear(); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__STATUS: |
| setStatus((SupplyDeliveryStatus)null); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__PATIENT: |
| setPatient((Reference)null); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__TYPE: |
| setType((CodeableConcept)null); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIED_ITEM: |
| setSuppliedItem((SupplyDeliverySuppliedItem)null); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_DATE_TIME: |
| setOccurrenceDateTime((DateTime)null); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_PERIOD: |
| setOccurrencePeriod((Period)null); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_TIMING: |
| setOccurrenceTiming((Timing)null); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIER: |
| setSupplier((Reference)null); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__DESTINATION: |
| setDestination((Reference)null); |
| return; |
| case FhirPackage.SUPPLY_DELIVERY__RECEIVER: |
| getReceiver().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirPackage.SUPPLY_DELIVERY__IDENTIFIER: |
| return identifier != null && !identifier.isEmpty(); |
| case FhirPackage.SUPPLY_DELIVERY__BASED_ON: |
| return basedOn != null && !basedOn.isEmpty(); |
| case FhirPackage.SUPPLY_DELIVERY__PART_OF: |
| return partOf != null && !partOf.isEmpty(); |
| case FhirPackage.SUPPLY_DELIVERY__STATUS: |
| return status != null; |
| case FhirPackage.SUPPLY_DELIVERY__PATIENT: |
| return patient != null; |
| case FhirPackage.SUPPLY_DELIVERY__TYPE: |
| return type != null; |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIED_ITEM: |
| return suppliedItem != null; |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_DATE_TIME: |
| return occurrenceDateTime != null; |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_PERIOD: |
| return occurrencePeriod != null; |
| case FhirPackage.SUPPLY_DELIVERY__OCCURRENCE_TIMING: |
| return occurrenceTiming != null; |
| case FhirPackage.SUPPLY_DELIVERY__SUPPLIER: |
| return supplier != null; |
| case FhirPackage.SUPPLY_DELIVERY__DESTINATION: |
| return destination != null; |
| case FhirPackage.SUPPLY_DELIVERY__RECEIVER: |
| return receiver != null && !receiver.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //SupplyDeliveryImpl |