KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > impl > SourceColumnsTypeImpl


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

7 package Olj.impl;
8
9 import Olj.OljPackage;
10 import Olj.SourceColumnType;
11 import Olj.SourceColumnsType;
12
13 import java.util.Collection JavaDoc;
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.EStructuralFeature;
21 import org.eclipse.emf.ecore.InternalEObject;
22
23 import org.eclipse.emf.ecore.impl.EObjectImpl;
24
25 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
26 import org.eclipse.emf.ecore.util.InternalEList;
27
28 /**
29  * <!-- begin-user-doc -->
30  * An implementation of the model object '<em><b>Source Columns Type</b></em>'.
31  * <!-- end-user-doc -->
32  * <p>
33  * The following features are implemented:
34  * <ul>
35  * <li>{@link Olj.impl.SourceColumnsTypeImpl#getSourceColumn <em>Source Column</em>}</li>
36  * </ul>
37  * </p>
38  *
39  * @generated
40  */

41 public class SourceColumnsTypeImpl extends EObjectImpl implements SourceColumnsType {
42     /**
43      * The cached value of the '{@link #getSourceColumn() <em>Source Column</em>}' containment reference list.
44      * <!-- begin-user-doc -->
45      * <!-- end-user-doc -->
46      * @see #getSourceColumn()
47      * @generated
48      * @ordered
49      */

50     protected EList sourceColumn = null;
51
52     /**
53      * <!-- begin-user-doc -->
54      * <!-- end-user-doc -->
55      * @generated
56      */

57     protected SourceColumnsTypeImpl() {
58         super();
59     }
60
61     /**
62      * <!-- begin-user-doc -->
63      * <!-- end-user-doc -->
64      * @generated
65      */

66     protected EClass eStaticClass() {
67         return OljPackage.eINSTANCE.getSourceColumnsType();
68     }
69
70     /**
71      * <!-- begin-user-doc -->
72      * <!-- end-user-doc -->
73      * @generated
74      */

75     public EList getSourceColumn() {
76         if (sourceColumn == null) {
77             sourceColumn = new EObjectContainmentEList(SourceColumnType.class, this, OljPackage.SOURCE_COLUMNS_TYPE__SOURCE_COLUMN);
78         }
79         return sourceColumn;
80     }
81
82     /**
83      * <!-- begin-user-doc -->
84      * <!-- end-user-doc -->
85      * @generated
86      */

87     public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class JavaDoc baseClass, NotificationChain msgs) {
88         if (featureID >= 0) {
89             switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
90                 case OljPackage.SOURCE_COLUMNS_TYPE__SOURCE_COLUMN:
91                     return ((InternalEList)getSourceColumn()).basicRemove(otherEnd, msgs);
92                 default:
93                     return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
94             }
95         }
96         return eBasicSetContainer(null, featureID, msgs);
97     }
98
99     /**
100      * <!-- begin-user-doc -->
101      * <!-- end-user-doc -->
102      * @generated
103      */

104     public Object JavaDoc eGet(EStructuralFeature eFeature, boolean resolve) {
105         switch (eDerivedStructuralFeatureID(eFeature)) {
106             case OljPackage.SOURCE_COLUMNS_TYPE__SOURCE_COLUMN:
107                 return getSourceColumn();
108         }
109         return eDynamicGet(eFeature, resolve);
110     }
111
112     /**
113      * <!-- begin-user-doc -->
114      * <!-- end-user-doc -->
115      * @generated
116      */

117     public void eSet(EStructuralFeature eFeature, Object JavaDoc newValue) {
118         switch (eDerivedStructuralFeatureID(eFeature)) {
119             case OljPackage.SOURCE_COLUMNS_TYPE__SOURCE_COLUMN:
120                 getSourceColumn().clear();
121                 getSourceColumn().addAll((Collection JavaDoc)newValue);
122                 return;
123         }
124         eDynamicSet(eFeature, newValue);
125     }
126
127     /**
128      * <!-- begin-user-doc -->
129      * <!-- end-user-doc -->
130      * @generated
131      */

132     public void eUnset(EStructuralFeature eFeature) {
133         switch (eDerivedStructuralFeatureID(eFeature)) {
134             case OljPackage.SOURCE_COLUMNS_TYPE__SOURCE_COLUMN:
135                 getSourceColumn().clear();
136                 return;
137         }
138         eDynamicUnset(eFeature);
139     }
140
141     /**
142      * <!-- begin-user-doc -->
143      * <!-- end-user-doc -->
144      * @generated
145      */

146     public boolean eIsSet(EStructuralFeature eFeature) {
147         switch (eDerivedStructuralFeatureID(eFeature)) {
148             case OljPackage.SOURCE_COLUMNS_TYPE__SOURCE_COLUMN:
149                 return sourceColumn != null && !sourceColumn.isEmpty();
150         }
151         return eDynamicIsSet(eFeature);
152     }
153
154 } //SourceColumnsTypeImpl
155
Popular Tags