blob: d4e4cdce9100cd7255872a15d8bf2f20a1d2eee1 [file] [log] [blame]
/**
*/
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.ClaimResponseAdjudication3;
import org.hl7.fhir.Coding;
import org.hl7.fhir.Decimal;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.Money;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Claim Response Adjudication3</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.ClaimResponseAdjudication3Impl#getCode <em>Code</em>}</li>
* <li>{@link org.hl7.fhir.impl.ClaimResponseAdjudication3Impl#getAmount <em>Amount</em>}</li>
* <li>{@link org.hl7.fhir.impl.ClaimResponseAdjudication3Impl#getValue <em>Value</em>}</li>
* </ul>
*
* @generated
*/
public class ClaimResponseAdjudication3Impl extends BackboneElementImpl implements ClaimResponseAdjudication3 {
/**
* The cached value of the '{@link #getCode() <em>Code</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCode()
* @generated
* @ordered
*/
protected Coding code;
/**
* The cached value of the '{@link #getAmount() <em>Amount</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAmount()
* @generated
* @ordered
*/
protected Money amount;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected Decimal value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ClaimResponseAdjudication3Impl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getClaimResponseAdjudication3();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Coding getCode() {
return code;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetCode(Coding newCode, NotificationChain msgs) {
Coding oldCode = code;
code = newCode;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__CODE, oldCode, newCode);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCode(Coding newCode) {
if (newCode != code) {
NotificationChain msgs = null;
if (code != null)
msgs = ((InternalEObject)code).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__CODE, null, msgs);
if (newCode != null)
msgs = ((InternalEObject)newCode).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__CODE, null, msgs);
msgs = basicSetCode(newCode, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__CODE, newCode, newCode));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Money getAmount() {
return amount;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetAmount(Money newAmount, NotificationChain msgs) {
Money oldAmount = amount;
amount = newAmount;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__AMOUNT, oldAmount, newAmount);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setAmount(Money newAmount) {
if (newAmount != amount) {
NotificationChain msgs = null;
if (amount != null)
msgs = ((InternalEObject)amount).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__AMOUNT, null, msgs);
if (newAmount != null)
msgs = ((InternalEObject)newAmount).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__AMOUNT, null, msgs);
msgs = basicSetAmount(newAmount, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__AMOUNT, newAmount, newAmount));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Decimal getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetValue(Decimal newValue, NotificationChain msgs) {
Decimal oldValue = value;
value = newValue;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__VALUE, oldValue, newValue);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(Decimal newValue) {
if (newValue != value) {
NotificationChain msgs = null;
if (value != null)
msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__VALUE, null, msgs);
if (newValue != null)
msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__VALUE, null, msgs);
msgs = basicSetValue(newValue, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__VALUE, newValue, newValue));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__CODE:
return basicSetCode(null, msgs);
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__AMOUNT:
return basicSetAmount(null, msgs);
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__VALUE:
return basicSetValue(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.CLAIM_RESPONSE_ADJUDICATION3__CODE:
return getCode();
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__AMOUNT:
return getAmount();
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__VALUE:
return getValue();
}
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.CLAIM_RESPONSE_ADJUDICATION3__CODE:
setCode((Coding)newValue);
return;
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__AMOUNT:
setAmount((Money)newValue);
return;
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__VALUE:
setValue((Decimal)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__CODE:
setCode((Coding)null);
return;
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__AMOUNT:
setAmount((Money)null);
return;
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__VALUE:
setValue((Decimal)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__CODE:
return code != null;
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__AMOUNT:
return amount != null;
case FhirPackage.CLAIM_RESPONSE_ADJUDICATION3__VALUE:
return value != null;
}
return super.eIsSet(featureID);
}
} //ClaimResponseAdjudication3Impl