blob: 890b6d65146ec5940336536ae6e185cd60fb2685 [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.Coding;
import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl;
import org.eclipse.mdht.uml.fhir.core.resource.EligibilityResponseErrors;
import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Eligibility Response Errors</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.EligibilityResponseErrorsImpl#getCode <em>Code</em>}</li>
* </ul>
*
* @generated
*/
public class EligibilityResponseErrorsImpl extends BackboneElementImpl implements EligibilityResponseErrors {
/**
* The cached value of the '{@link #getCode() <em>Code</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCode()
* @generated
* @ordered
*/
protected Coding code;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EligibilityResponseErrorsImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getEligibilityResponseErrors();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Coding getCode() {
if (code != null && code.eIsProxy()) {
InternalEObject oldCode = (InternalEObject)code;
code = (Coding)eResolveProxy(oldCode);
if (code != oldCode) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.ELIGIBILITY_RESPONSE_ERRORS__CODE, oldCode, code));
}
}
return code;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Coding basicGetCode() {
return code;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCode(Coding newCode) {
Coding oldCode = code;
code = newCode;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.ELIGIBILITY_RESPONSE_ERRORS__CODE, oldCode, code));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.ELIGIBILITY_RESPONSE_ERRORS__CODE:
if (resolve) return getCode();
return basicGetCode();
}
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.ELIGIBILITY_RESPONSE_ERRORS__CODE:
setCode((Coding)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.ELIGIBILITY_RESPONSE_ERRORS__CODE:
setCode((Coding)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.ELIGIBILITY_RESPONSE_ERRORS__CODE:
return code != null;
}
return super.eIsSet(featureID);
}
} //EligibilityResponseErrorsImpl