| /******************************************************************************* |
| * 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 java.util.Collection; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.common.notify.NotificationChain; |
| |
| import org.eclipse.emf.common.util.EList; |
| |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.InternalEObject; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| import org.eclipse.mdht.uml.fhir.core.datatype.PositiveInt; |
| |
| import org.eclipse.mdht.uml.fhir.core.datatype.impl.BackboneElementImpl; |
| |
| import org.eclipse.mdht.uml.fhir.core.resource.ClaimResponseItemsItemDetailSubDetail; |
| import org.eclipse.mdht.uml.fhir.core.resource.ClaimResponseItemsItemDetailSubDetailSubdetailAdjudication; |
| import org.eclipse.mdht.uml.fhir.core.resource.FhirResourcePackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Claim Response Items Item Detail Sub Detail</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ClaimResponseItemsItemDetailSubDetailImpl#getSequenceLinkId <em>Sequence Link Id</em>}</li> |
| * <li>{@link org.eclipse.mdht.uml.fhir.core.resource.impl.ClaimResponseItemsItemDetailSubDetailImpl#getAdjudications <em>Adjudication</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ClaimResponseItemsItemDetailSubDetailImpl extends BackboneElementImpl implements ClaimResponseItemsItemDetailSubDetail { |
| /** |
| * The cached value of the '{@link #getSequenceLinkId() <em>Sequence Link Id</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getSequenceLinkId() |
| * @generated |
| * @ordered |
| */ |
| protected PositiveInt sequenceLinkId; |
| |
| /** |
| * The cached value of the '{@link #getAdjudications() <em>Adjudication</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAdjudications() |
| * @generated |
| * @ordered |
| */ |
| protected EList<ClaimResponseItemsItemDetailSubDetailSubdetailAdjudication> adjudications; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ClaimResponseItemsItemDetailSubDetailImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return FhirResourcePackage.eINSTANCE.getClaimResponseItemsItemDetailSubDetail(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public PositiveInt getSequenceLinkId() { |
| if (sequenceLinkId != null && sequenceLinkId.eIsProxy()) { |
| InternalEObject oldSequenceLinkId = (InternalEObject)sequenceLinkId; |
| sequenceLinkId = (PositiveInt)eResolveProxy(oldSequenceLinkId); |
| if (sequenceLinkId != oldSequenceLinkId) { |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.RESOLVE, FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__SEQUENCE_LINK_ID, oldSequenceLinkId, sequenceLinkId)); |
| } |
| } |
| return sequenceLinkId; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public PositiveInt basicGetSequenceLinkId() { |
| return sequenceLinkId; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setSequenceLinkId(PositiveInt newSequenceLinkId) { |
| PositiveInt oldSequenceLinkId = sequenceLinkId; |
| sequenceLinkId = newSequenceLinkId; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__SEQUENCE_LINK_ID, oldSequenceLinkId, sequenceLinkId)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<ClaimResponseItemsItemDetailSubDetailSubdetailAdjudication> getAdjudications() { |
| if (adjudications == null) { |
| adjudications = new EObjectContainmentEList<ClaimResponseItemsItemDetailSubDetailSubdetailAdjudication>(ClaimResponseItemsItemDetailSubDetailSubdetailAdjudication.class, this, FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__ADJUDICATION); |
| } |
| return adjudications; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| switch (featureID) { |
| case FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__ADJUDICATION: |
| return ((InternalEList<?>)getAdjudications()).basicRemove(otherEnd, 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 FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__SEQUENCE_LINK_ID: |
| if (resolve) return getSequenceLinkId(); |
| return basicGetSequenceLinkId(); |
| case FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__ADJUDICATION: |
| return getAdjudications(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__SEQUENCE_LINK_ID: |
| setSequenceLinkId((PositiveInt)newValue); |
| return; |
| case FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__ADJUDICATION: |
| getAdjudications().clear(); |
| getAdjudications().addAll((Collection<? extends ClaimResponseItemsItemDetailSubDetailSubdetailAdjudication>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__SEQUENCE_LINK_ID: |
| setSequenceLinkId((PositiveInt)null); |
| return; |
| case FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__ADJUDICATION: |
| getAdjudications().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__SEQUENCE_LINK_ID: |
| return sequenceLinkId != null; |
| case FhirResourcePackage.CLAIM_RESPONSE_ITEMS_ITEM_DETAIL_SUB_DETAIL__ADJUDICATION: |
| return adjudications != null && !adjudications.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ClaimResponseItemsItemDetailSubDetailImpl |