| 1 | /** |
| 2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
| 3 | * |
| 4 | * $Id$ |
| 5 | */ |
| 6 | package de.uka.ipd.sdq.pcm.seff.seff_reliability.impl; |
| 7 | |
| 8 | import java.util.Collection; |
| 9 | |
| 10 | import org.eclipse.emf.common.util.EList; |
| 11 | import org.eclipse.emf.ecore.EClass; |
| 12 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
| 13 | |
| 14 | import de.uka.ipd.sdq.pcm.core.entity.impl.EntityImpl; |
| 15 | import de.uka.ipd.sdq.pcm.reliability.FailureType; |
| 16 | import de.uka.ipd.sdq.pcm.seff.seff_reliability.FailureHandlingEntity; |
| 17 | import de.uka.ipd.sdq.pcm.seff.seff_reliability.Seff_reliabilityPackage; |
| 18 | |
| 19 | /** |
| 20 | * <!-- begin-user-doc --> |
| 21 | * An implementation of the model object '<em><b>Failure Handling Entity</b></em>'. |
| 22 | * <!-- end-user-doc --> |
| 23 | * <p> |
| 24 | * The following features are implemented: |
| 25 | * <ul> |
| 26 | * <li>{@link de.uka.ipd.sdq.pcm.seff.seff_reliability.impl.FailureHandlingEntityImpl#getFailureTypes_FailureHandlingEntity <em>Failure Types Failure Handling Entity</em>}</li> |
| 27 | * </ul> |
| 28 | * </p> |
| 29 | * |
| 30 | * @generated |
| 31 | */ |
| 32 | public abstract class FailureHandlingEntityImpl extends EntityImpl implements FailureHandlingEntity { |
| 33 | /** |
| 34 | * <!-- begin-user-doc --> |
| 35 | * <!-- end-user-doc --> |
| 36 | * @generated |
| 37 | */ |
| 38 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
| 39 | |
| 40 | /** |
| 41 | * The cached value of the '{@link #getFailureTypes_FailureHandlingEntity() <em>Failure Types Failure Handling Entity</em>}' reference list. |
| 42 | * <!-- begin-user-doc --> |
| 43 | * <!-- end-user-doc --> |
| 44 | * @see #getFailureTypes_FailureHandlingEntity() |
| 45 | * @generated |
| 46 | * @ordered |
| 47 | */ |
| 48 | protected EList<FailureType> failureTypes_FailureHandlingEntity; |
| 49 | |
| 50 | /** |
| 51 | * <!-- begin-user-doc --> |
| 52 | * <!-- end-user-doc --> |
| 53 | * @generated |
| 54 | */ |
| 55 | protected FailureHandlingEntityImpl() { |
| 56 | super(); |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * <!-- begin-user-doc --> |
| 61 | * <!-- end-user-doc --> |
| 62 | * @generated |
| 63 | */ |
| 64 | @Override |
| 65 | protected EClass eStaticClass() { |
| 66 | return Seff_reliabilityPackage.Literals.FAILURE_HANDLING_ENTITY; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * <!-- begin-user-doc --> |
| 71 | * <!-- end-user-doc --> |
| 72 | * @generated |
| 73 | */ |
| 74 | public EList<FailureType> getFailureTypes_FailureHandlingEntity() { |
| 75 | if (failureTypes_FailureHandlingEntity == null) { |
| 76 | failureTypes_FailureHandlingEntity = new EObjectResolvingEList<FailureType>(FailureType.class, this, Seff_reliabilityPackage.FAILURE_HANDLING_ENTITY__FAILURE_TYPES_FAILURE_HANDLING_ENTITY); |
| 77 | } |
| 78 | return failureTypes_FailureHandlingEntity; |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * <!-- begin-user-doc --> |
| 83 | * <!-- end-user-doc --> |
| 84 | * @generated |
| 85 | */ |
| 86 | @Override |
| 87 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| 88 | switch (featureID) { |
| 89 | case Seff_reliabilityPackage.FAILURE_HANDLING_ENTITY__FAILURE_TYPES_FAILURE_HANDLING_ENTITY: |
| 90 | return getFailureTypes_FailureHandlingEntity(); |
| 91 | } |
| 92 | return super.eGet(featureID, resolve, coreType); |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * <!-- begin-user-doc --> |
| 97 | * <!-- end-user-doc --> |
| 98 | * @generated |
| 99 | */ |
| 100 | @SuppressWarnings("unchecked") |
| 101 | @Override |
| 102 | public void eSet(int featureID, Object newValue) { |
| 103 | switch (featureID) { |
| 104 | case Seff_reliabilityPackage.FAILURE_HANDLING_ENTITY__FAILURE_TYPES_FAILURE_HANDLING_ENTITY: |
| 105 | getFailureTypes_FailureHandlingEntity().clear(); |
| 106 | getFailureTypes_FailureHandlingEntity().addAll((Collection<? extends FailureType>)newValue); |
| 107 | return; |
| 108 | } |
| 109 | super.eSet(featureID, newValue); |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * <!-- begin-user-doc --> |
| 114 | * <!-- end-user-doc --> |
| 115 | * @generated |
| 116 | */ |
| 117 | @Override |
| 118 | public void eUnset(int featureID) { |
| 119 | switch (featureID) { |
| 120 | case Seff_reliabilityPackage.FAILURE_HANDLING_ENTITY__FAILURE_TYPES_FAILURE_HANDLING_ENTITY: |
| 121 | getFailureTypes_FailureHandlingEntity().clear(); |
| 122 | return; |
| 123 | } |
| 124 | super.eUnset(featureID); |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * <!-- begin-user-doc --> |
| 129 | * <!-- end-user-doc --> |
| 130 | * @generated |
| 131 | */ |
| 132 | @Override |
| 133 | public boolean eIsSet(int featureID) { |
| 134 | switch (featureID) { |
| 135 | case Seff_reliabilityPackage.FAILURE_HANDLING_ENTITY__FAILURE_TYPES_FAILURE_HANDLING_ENTITY: |
| 136 | return failureTypes_FailureHandlingEntity != null && !failureTypes_FailureHandlingEntity.isEmpty(); |
| 137 | } |
| 138 | return super.eIsSet(featureID); |
| 139 | } |
| 140 | |
| 141 | } //FailureHandlingEntityImpl |