blob: a417039ad6b9946c9438584f2ec1f9c73afbc828 [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.Code;
import org.eclipse.mdht.uml.fhir.core.datatype.Decimal;
import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl;
import org.eclipse.mdht.uml.fhir.core.resource.BundleEntrySearch;
import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Bundle Entry Search</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.BundleEntrySearchImpl#getMode <em>Mode</em>}</li>
* <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.BundleEntrySearchImpl#getScore <em>Score</em>}</li>
* </ul>
*
* @generated
*/
public class BundleEntrySearchImpl extends BackboneElementImpl implements BundleEntrySearch {
/**
* The cached value of the '{@link #getMode() <em>Mode</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMode()
* @generated
* @ordered
*/
protected Code mode;
/**
* The cached value of the '{@link #getScore() <em>Score</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getScore()
* @generated
* @ordered
*/
protected Decimal score;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected BundleEntrySearchImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirResourcePackage.eINSTANCE.getBundleEntrySearch();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Code getMode() {
if (mode != null && mode.eIsProxy()) {
InternalEObject oldMode = (InternalEObject)mode;
mode = (Code)eResolveProxy(oldMode);
if (mode != oldMode) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.BUNDLE_ENTRY_SEARCH__MODE, oldMode, mode));
}
}
return mode;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Code basicGetMode() {
return mode;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMode(Code newMode) {
Code oldMode = mode;
mode = newMode;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.BUNDLE_ENTRY_SEARCH__MODE, oldMode, mode));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Decimal getScore() {
if (score != null && score.eIsProxy()) {
InternalEObject oldScore = (InternalEObject)score;
score = (Decimal)eResolveProxy(oldScore);
if (score != oldScore) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.BUNDLE_ENTRY_SEARCH__SCORE, oldScore, score));
}
}
return score;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Decimal basicGetScore() {
return score;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setScore(Decimal newScore) {
Decimal oldScore = score;
score = newScore;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.BUNDLE_ENTRY_SEARCH__SCORE, oldScore, score));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FhirResourcePackage.BUNDLE_ENTRY_SEARCH__MODE:
if (resolve) return getMode();
return basicGetMode();
case FhirResourcePackage.BUNDLE_ENTRY_SEARCH__SCORE:
if (resolve) return getScore();
return basicGetScore();
}
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.BUNDLE_ENTRY_SEARCH__MODE:
setMode((Code)newValue);
return;
case FhirResourcePackage.BUNDLE_ENTRY_SEARCH__SCORE:
setScore((Decimal)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirResourcePackage.BUNDLE_ENTRY_SEARCH__MODE:
setMode((Code)null);
return;
case FhirResourcePackage.BUNDLE_ENTRY_SEARCH__SCORE:
setScore((Decimal)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirResourcePackage.BUNDLE_ENTRY_SEARCH__MODE:
return mode != null;
case FhirResourcePackage.BUNDLE_ENTRY_SEARCH__SCORE:
return score != null;
}
return super.eIsSet(featureID);
}
} //BundleEntrySearchImpl