KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > impl > VariableColumnsTypeImpl


1 /**
2  * <copyright>
3  * </copyright>
4  *
5  * $Id$
6  */

7 package Olj.impl;
8
9 import Olj.OljPackage;
10 import Olj.VariableColumnsType;
11
12 import java.util.Collection JavaDoc;
13
14 import org.eclipse.emf.common.notify.NotificationChain;
15
16 import org.eclipse.emf.common.util.EList;
17
18 import org.eclipse.emf.ecore.EClass;
19 import org.eclipse.emf.ecore.EStructuralFeature;
20 import org.eclipse.emf.ecore.InternalEObject;
21
22 import org.eclipse.emf.ecore.impl.EObjectImpl;
23
24 import org.eclipse.emf.ecore.util.BasicFeatureMap;
25 import org.eclipse.emf.ecore.util.FeatureMap;
26 import org.eclipse.emf.ecore.util.InternalEList;
27
28 /**
29  * <!-- begin-user-doc -->
30  * An implementation of the model object '<em><b>Variable Columns Type</b></em>'.
31  * <!-- end-user-doc -->
32  * <p>
33  * The following features are implemented:
34  * <ul>
35  * <li>{@link Olj.impl.VariableColumnsTypeImpl#getGroup <em>Group</em>}</li>
36  * <li>{@link Olj.impl.VariableColumnsTypeImpl#getVariableColumn <em>Variable Column</em>}</li>
37  * <li>{@link Olj.impl.VariableColumnsTypeImpl#getUserIDColumn <em>User ID Column</em>}</li>
38  * <li>{@link Olj.impl.VariableColumnsTypeImpl#getTimeStampColumn <em>Time Stamp Column</em>}</li>
39  * </ul>
40  * </p>
41  *
42  * @generated
43  */

44 public class VariableColumnsTypeImpl extends EObjectImpl implements VariableColumnsType {
45     /**
46      * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
47      * <!-- begin-user-doc -->
48      * <!-- end-user-doc -->
49      * @see #getGroup()
50      * @generated
51      * @ordered
52      */

53     protected FeatureMap group = null;
54
55     /**
56      * <!-- begin-user-doc -->
57      * <!-- end-user-doc -->
58      * @generated
59      */

60     protected VariableColumnsTypeImpl() {
61         super();
62     }
63
64     /**
65      * <!-- begin-user-doc -->
66      * <!-- end-user-doc -->
67      * @generated
68      */

69     protected EClass eStaticClass() {
70         return OljPackage.eINSTANCE.getVariableColumnsType();
71     }
72
73     /**
74      * <!-- begin-user-doc -->
75      * <!-- end-user-doc -->
76      * @generated
77      */

78     public FeatureMap getGroup() {
79         if (group == null) {
80             group = new BasicFeatureMap(this, OljPackage.VARIABLE_COLUMNS_TYPE__GROUP);
81         }
82         return group;
83     }
84
85     /**
86      * <!-- begin-user-doc -->
87      * <!-- end-user-doc -->
88      * @generated
89      */

90     public EList getVariableColumn() {
91         return ((FeatureMap)getGroup()).list(OljPackage.eINSTANCE.getVariableColumnsType_VariableColumn());
92     }
93
94     /**
95      * <!-- begin-user-doc -->
96      * <!-- end-user-doc -->
97      * @generated
98      */

99     public EList getUserIDColumn() {
100         return ((FeatureMap)getGroup()).list(OljPackage.eINSTANCE.getVariableColumnsType_UserIDColumn());
101     }
102
103     /**
104      * <!-- begin-user-doc -->
105      * <!-- end-user-doc -->
106      * @generated
107      */

108     public EList getTimeStampColumn() {
109         return ((FeatureMap)getGroup()).list(OljPackage.eINSTANCE.getVariableColumnsType_TimeStampColumn());
110     }
111
112     /**
113      * <!-- begin-user-doc -->
114      * <!-- end-user-doc -->
115      * @generated
116      */

117     public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class JavaDoc baseClass, NotificationChain msgs) {
118         if (featureID >= 0) {
119             switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
120                 case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP:
121                     return ((InternalEList)getGroup()).basicRemove(otherEnd, msgs);
122                 case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN:
123                     return ((InternalEList)getVariableColumn()).basicRemove(otherEnd, msgs);
124                 case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN:
125                     return ((InternalEList)getUserIDColumn()).basicRemove(otherEnd, msgs);
126                 case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN:
127                     return ((InternalEList)getTimeStampColumn()).basicRemove(otherEnd, msgs);
128                 default:
129                     return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
130             }
131         }
132         return eBasicSetContainer(null, featureID, msgs);
133     }
134
135     /**
136      * <!-- begin-user-doc -->
137      * <!-- end-user-doc -->
138      * @generated
139      */

140     public Object JavaDoc eGet(EStructuralFeature eFeature, boolean resolve) {
141         switch (eDerivedStructuralFeatureID(eFeature)) {
142             case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP:
143                 return getGroup();
144             case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN:
145                 return getVariableColumn();
146             case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN:
147                 return getUserIDColumn();
148             case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN:
149                 return getTimeStampColumn();
150         }
151         return eDynamicGet(eFeature, resolve);
152     }
153
154     /**
155      * <!-- begin-user-doc -->
156      * <!-- end-user-doc -->
157      * @generated
158      */

159     public void eSet(EStructuralFeature eFeature, Object JavaDoc newValue) {
160         switch (eDerivedStructuralFeatureID(eFeature)) {
161             case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP:
162                 getGroup().clear();
163                 getGroup().addAll((Collection JavaDoc)newValue);
164                 return;
165             case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN:
166                 getVariableColumn().clear();
167                 getVariableColumn().addAll((Collection JavaDoc)newValue);
168                 return;
169             case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN:
170                 getUserIDColumn().clear();
171                 getUserIDColumn().addAll((Collection JavaDoc)newValue);
172                 return;
173             case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN:
174                 getTimeStampColumn().clear();
175                 getTimeStampColumn().addAll((Collection JavaDoc)newValue);
176                 return;
177         }
178         eDynamicSet(eFeature, newValue);
179     }
180
181     /**
182      * <!-- begin-user-doc -->
183      * <!-- end-user-doc -->
184      * @generated
185      */

186     public void eUnset(EStructuralFeature eFeature) {
187         switch (eDerivedStructuralFeatureID(eFeature)) {
188             case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP:
189                 getGroup().clear();
190                 return;
191             case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN:
192                 getVariableColumn().clear();
193                 return;
194             case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN:
195                 getUserIDColumn().clear();
196                 return;
197             case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN:
198                 getTimeStampColumn().clear();
199                 return;
200         }
201         eDynamicUnset(eFeature);
202     }
203
204     /**
205      * <!-- begin-user-doc -->
206      * <!-- end-user-doc -->
207      * @generated
208      */

209     public boolean eIsSet(EStructuralFeature eFeature) {
210         switch (eDerivedStructuralFeatureID(eFeature)) {
211             case OljPackage.VARIABLE_COLUMNS_TYPE__GROUP:
212                 return group != null && !group.isEmpty();
213             case OljPackage.VARIABLE_COLUMNS_TYPE__VARIABLE_COLUMN:
214                 return !getVariableColumn().isEmpty();
215             case OljPackage.VARIABLE_COLUMNS_TYPE__USER_ID_COLUMN:
216                 return !getUserIDColumn().isEmpty();
217             case OljPackage.VARIABLE_COLUMNS_TYPE__TIME_STAMP_COLUMN:
218                 return !getTimeStampColumn().isEmpty();
219         }
220         return eDynamicIsSet(eFeature);
221     }
222
223     /**
224      * <!-- begin-user-doc -->
225      * <!-- end-user-doc -->
226      * @generated
227      */

228     public String JavaDoc toString() {
229         if (eIsProxy()) return super.toString();
230
231         StringBuffer JavaDoc result = new StringBuffer JavaDoc(super.toString());
232         result.append(" (group: ");
233         result.append(group);
234         result.append(')');
235         return result.toString();
236     }
237
238 } //VariableColumnsTypeImpl
239
Popular Tags