1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package LqnCore.impl; |
8 | |
9 | import LqnCore.LqnCorePackage; |
10 | import LqnCore.ParaType; |
11 | import LqnCore.RunControlType; |
12 | |
13 | import java.util.Collection; |
14 | |
15 | import org.eclipse.emf.common.notify.NotificationChain; |
16 | |
17 | import org.eclipse.emf.common.util.EList; |
18 | |
19 | import org.eclipse.emf.ecore.EClass; |
20 | import org.eclipse.emf.ecore.InternalEObject; |
21 | |
22 | import org.eclipse.emf.ecore.impl.EObjectImpl; |
23 | |
24 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
25 | import org.eclipse.emf.ecore.util.InternalEList; |
26 | |
27 | /** |
28 | * <!-- begin-user-doc --> |
29 | * An implementation of the model object '<em><b>Run Control Type</b></em>'. |
30 | * <!-- end-user-doc --> |
31 | * <p> |
32 | * The following features are implemented: |
33 | * <ul> |
34 | * <li>{@link LqnCore.impl.RunControlTypeImpl#getPara <em>Para</em>}</li> |
35 | * </ul> |
36 | * </p> |
37 | * |
38 | * @generated |
39 | */ |
40 | public class RunControlTypeImpl extends EObjectImpl implements RunControlType { |
41 | /** |
42 | * The cached value of the '{@link #getPara() <em>Para</em>}' containment reference list. |
43 | * <!-- begin-user-doc --> |
44 | * <!-- end-user-doc --> |
45 | * @see #getPara() |
46 | * @generated |
47 | * @ordered |
48 | */ |
49 | protected EList<ParaType> para; |
50 | |
51 | /** |
52 | * <!-- begin-user-doc --> |
53 | * <!-- end-user-doc --> |
54 | * @generated |
55 | */ |
56 | protected RunControlTypeImpl() { |
57 | super(); |
58 | } |
59 | |
60 | /** |
61 | * <!-- begin-user-doc --> |
62 | * <!-- end-user-doc --> |
63 | * @generated |
64 | */ |
65 | @Override |
66 | protected EClass eStaticClass() { |
67 | return LqnCorePackage.Literals.RUN_CONTROL_TYPE; |
68 | } |
69 | |
70 | /** |
71 | * <!-- begin-user-doc --> |
72 | * <!-- end-user-doc --> |
73 | * @generated |
74 | */ |
75 | public EList<ParaType> getPara() { |
76 | if (para == null) { |
77 | para = new EObjectContainmentEList<ParaType>(ParaType.class, this, LqnCorePackage.RUN_CONTROL_TYPE__PARA); |
78 | } |
79 | return para; |
80 | } |
81 | |
82 | /** |
83 | * <!-- begin-user-doc --> |
84 | * <!-- end-user-doc --> |
85 | * @generated |
86 | */ |
87 | @Override |
88 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
89 | switch (featureID) { |
90 | case LqnCorePackage.RUN_CONTROL_TYPE__PARA: |
91 | return ((InternalEList<?>)getPara()).basicRemove(otherEnd, msgs); |
92 | } |
93 | return super.eInverseRemove(otherEnd, featureID, msgs); |
94 | } |
95 | |
96 | /** |
97 | * <!-- begin-user-doc --> |
98 | * <!-- end-user-doc --> |
99 | * @generated |
100 | */ |
101 | @Override |
102 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
103 | switch (featureID) { |
104 | case LqnCorePackage.RUN_CONTROL_TYPE__PARA: |
105 | return getPara(); |
106 | } |
107 | return super.eGet(featureID, resolve, coreType); |
108 | } |
109 | |
110 | /** |
111 | * <!-- begin-user-doc --> |
112 | * <!-- end-user-doc --> |
113 | * @generated |
114 | */ |
115 | @SuppressWarnings("unchecked") |
116 | @Override |
117 | public void eSet(int featureID, Object newValue) { |
118 | switch (featureID) { |
119 | case LqnCorePackage.RUN_CONTROL_TYPE__PARA: |
120 | getPara().clear(); |
121 | getPara().addAll((Collection<? extends ParaType>)newValue); |
122 | return; |
123 | } |
124 | super.eSet(featureID, newValue); |
125 | } |
126 | |
127 | /** |
128 | * <!-- begin-user-doc --> |
129 | * <!-- end-user-doc --> |
130 | * @generated |
131 | */ |
132 | @Override |
133 | public void eUnset(int featureID) { |
134 | switch (featureID) { |
135 | case LqnCorePackage.RUN_CONTROL_TYPE__PARA: |
136 | getPara().clear(); |
137 | return; |
138 | } |
139 | super.eUnset(featureID); |
140 | } |
141 | |
142 | /** |
143 | * <!-- begin-user-doc --> |
144 | * <!-- end-user-doc --> |
145 | * @generated |
146 | */ |
147 | @Override |
148 | public boolean eIsSet(int featureID) { |
149 | switch (featureID) { |
150 | case LqnCorePackage.RUN_CONTROL_TYPE__PARA: |
151 | return para != null && !para.isEmpty(); |
152 | } |
153 | return super.eIsSet(featureID); |
154 | } |
155 | |
156 | } //RunControlTypeImpl |