blob: bd80f47ad0f2cf5e341f419cdc695d4d1e6cb0b8 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 David Carlson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* David Carlson (Clinical Cloud Solutions, LLC) - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.mdht.uml.fhir.core.resource.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.mdht.uml.fhir.core.datatype.Base;
import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl;
import org.eclipse.mdht.uml.fhir.core.resource.CommunicationRequestPayload;
import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Communication Request Payload</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.CommunicationRequestPayloadImpl#getContentx <em>Contentx</em>}</li>
* </ul>
*
* @generated
*/
public class CommunicationRequestPayloadImpl extends BackboneElementImpl implements CommunicationRequestPayload {
/**
* The cached value of the '{@link #getContentx() <em>Contentx</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getContentx()
* @generated
* @ordered
*/
protected Base contentx;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CommunicationRequestPayloadImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getCommunicationRequestPayload();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Base getContentx() {
if (contentx != null && contentx.eIsProxy()) {
InternalEObject oldContentx = (InternalEObject)contentx;
contentx = (Base)eResolveProxy(oldContentx);
if (contentx != oldContentx) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.COMMUNICATION_REQUEST_PAYLOAD__CONTENTX, oldContentx, contentx));
}
}
return contentx;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Base basicGetContentx() {
return contentx;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setContentx(Base newContentx) {
Base oldContentx = contentx;
contentx = newContentx;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.COMMUNICATION_REQUEST_PAYLOAD__CONTENTX, oldContentx, contentx));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.COMMUNICATION_REQUEST_PAYLOAD__CONTENTX:
if (resolve) return getContentx();
return basicGetContentx();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FhirResourcePackage.COMMUNICATION_REQUEST_PAYLOAD__CONTENTX:
setContentx((Base)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.COMMUNICATION_REQUEST_PAYLOAD__CONTENTX:
setContentx((Base)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.COMMUNICATION_REQUEST_PAYLOAD__CONTENTX:
return contentx != null;
}
return super.eIsSet(featureID);
}
} //CommunicationRequestPayloadImpl