| /** |
| */ |
| 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.ImmunizationPerformer; |
| import org.hl7.fhir.Reference; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Immunization Performer</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.hl7.fhir.impl.ImmunizationPerformerImpl#getFunction <em>Function</em>}</li> |
| * <li>{@link org.hl7.fhir.impl.ImmunizationPerformerImpl#getActor <em>Actor</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ImmunizationPerformerImpl extends BackboneElementImpl implements ImmunizationPerformer { |
| /** |
| * The cached value of the '{@link #getFunction() <em>Function</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getFunction() |
| * @generated |
| * @ordered |
| */ |
| protected CodeableConcept function; |
| |
| /** |
| * 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 ImmunizationPerformerImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirPackage.eINSTANCE.getImmunizationPerformer(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CodeableConcept getFunction() { |
| return function; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public NotificationChain basicSetFunction(CodeableConcept newFunction, NotificationChain msgs) { |
| CodeableConcept oldFunction = function; |
| function = newFunction; |
| if (eNotificationRequired()) { |
| ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.IMMUNIZATION_PERFORMER__FUNCTION, oldFunction, newFunction); |
| if (msgs == null) msgs = notification; else msgs.add(notification); |
| } |
| return msgs; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setFunction(CodeableConcept newFunction) { |
| if (newFunction != function) { |
| NotificationChain msgs = null; |
| if (function != null) |
| msgs = ((InternalEObject)function).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.IMMUNIZATION_PERFORMER__FUNCTION, null, msgs); |
| if (newFunction != null) |
| msgs = ((InternalEObject)newFunction).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.IMMUNIZATION_PERFORMER__FUNCTION, null, msgs); |
| msgs = basicSetFunction(newFunction, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.IMMUNIZATION_PERFORMER__FUNCTION, newFunction, newFunction)); |
| } |
| |
| /** |
| * <!-- 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.IMMUNIZATION_PERFORMER__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.IMMUNIZATION_PERFORMER__ACTOR, null, msgs); |
| if (newActor != null) |
| msgs = ((InternalEObject)newActor).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.IMMUNIZATION_PERFORMER__ACTOR, null, msgs); |
| msgs = basicSetActor(newActor, msgs); |
| if (msgs != null) msgs.dispatch(); |
| } |
| else if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.IMMUNIZATION_PERFORMER__ACTOR, newActor, newActor)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirPackage.IMMUNIZATION_PERFORMER__FUNCTION: |
| return basicSetFunction(null, msgs); |
| case FhirPackage.IMMUNIZATION_PERFORMER__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.IMMUNIZATION_PERFORMER__FUNCTION: |
| return getFunction(); |
| case FhirPackage.IMMUNIZATION_PERFORMER__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.IMMUNIZATION_PERFORMER__FUNCTION: |
| setFunction((CodeableConcept)newValue); |
| return; |
| case FhirPackage.IMMUNIZATION_PERFORMER__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.IMMUNIZATION_PERFORMER__FUNCTION: |
| setFunction((CodeableConcept)null); |
| return; |
| case FhirPackage.IMMUNIZATION_PERFORMER__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.IMMUNIZATION_PERFORMER__FUNCTION: |
| return function != null; |
| case FhirPackage.IMMUNIZATION_PERFORMER__ACTOR: |
| return actor != null; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ImmunizationPerformerImpl |