KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > impl > SubCounterKeyColumnTypeImpl


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

7 package Olj.impl;
8
9 import Olj.OljPackage;
10 import Olj.SubCounterKeyColumnType;
11
12 import org.eclipse.emf.common.notify.Notification;
13
14 import org.eclipse.emf.ecore.EClass;
15 import org.eclipse.emf.ecore.EStructuralFeature;
16
17 import org.eclipse.emf.ecore.impl.ENotificationImpl;
18 import org.eclipse.emf.ecore.impl.EObjectImpl;
19
20 /**
21  * <!-- begin-user-doc -->
22  * An implementation of the model object '<em><b>Sub Counter Key Column Type</b></em>'.
23  * <!-- end-user-doc -->
24  * <p>
25  * The following features are implemented:
26  * <ul>
27  * <li>{@link Olj.impl.SubCounterKeyColumnTypeImpl#getKeyColumnName <em>Key Column Name</em>}</li>
28  * </ul>
29  * </p>
30  *
31  * @generated
32  */

33 public class SubCounterKeyColumnTypeImpl extends EObjectImpl implements SubCounterKeyColumnType {
34     /**
35      * The default value of the '{@link #getKeyColumnName() <em>Key Column Name</em>}' attribute.
36      * <!-- begin-user-doc -->
37      * <!-- end-user-doc -->
38      * @see #getKeyColumnName()
39      * @generated
40      * @ordered
41      */

42     protected static final String JavaDoc KEY_COLUMN_NAME_EDEFAULT = null;
43
44     /**
45      * The cached value of the '{@link #getKeyColumnName() <em>Key Column Name</em>}' attribute.
46      * <!-- begin-user-doc -->
47      * <!-- end-user-doc -->
48      * @see #getKeyColumnName()
49      * @generated
50      * @ordered
51      */

52     protected String JavaDoc keyColumnName = KEY_COLUMN_NAME_EDEFAULT;
53
54     /**
55      * <!-- begin-user-doc -->
56      * <!-- end-user-doc -->
57      * @generated
58      */

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

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

77     public String JavaDoc getKeyColumnName() {
78         return keyColumnName;
79     }
80
81     /**
82      * <!-- begin-user-doc -->
83      * <!-- end-user-doc -->
84      * @generated
85      */

86     public void setKeyColumnName(String JavaDoc newKeyColumnName) {
87         String JavaDoc oldKeyColumnName = keyColumnName;
88         keyColumnName = newKeyColumnName;
89         if (eNotificationRequired())
90             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.SUB_COUNTER_KEY_COLUMN_TYPE__KEY_COLUMN_NAME, oldKeyColumnName, keyColumnName));
91     }
92
93     /**
94      * <!-- begin-user-doc -->
95      * <!-- end-user-doc -->
96      * @generated
97      */

98     public Object JavaDoc eGet(EStructuralFeature eFeature, boolean resolve) {
99         switch (eDerivedStructuralFeatureID(eFeature)) {
100             case OljPackage.SUB_COUNTER_KEY_COLUMN_TYPE__KEY_COLUMN_NAME:
101                 return getKeyColumnName();
102         }
103         return eDynamicGet(eFeature, resolve);
104     }
105
106     /**
107      * <!-- begin-user-doc -->
108      * <!-- end-user-doc -->
109      * @generated
110      */

111     public void eSet(EStructuralFeature eFeature, Object JavaDoc newValue) {
112         switch (eDerivedStructuralFeatureID(eFeature)) {
113             case OljPackage.SUB_COUNTER_KEY_COLUMN_TYPE__KEY_COLUMN_NAME:
114                 setKeyColumnName((String JavaDoc)newValue);
115                 return;
116         }
117         eDynamicSet(eFeature, newValue);
118     }
119
120     /**
121      * <!-- begin-user-doc -->
122      * <!-- end-user-doc -->
123      * @generated
124      */

125     public void eUnset(EStructuralFeature eFeature) {
126         switch (eDerivedStructuralFeatureID(eFeature)) {
127             case OljPackage.SUB_COUNTER_KEY_COLUMN_TYPE__KEY_COLUMN_NAME:
128                 setKeyColumnName(KEY_COLUMN_NAME_EDEFAULT);
129                 return;
130         }
131         eDynamicUnset(eFeature);
132     }
133
134     /**
135      * <!-- begin-user-doc -->
136      * <!-- end-user-doc -->
137      * @generated
138      */

139     public boolean eIsSet(EStructuralFeature eFeature) {
140         switch (eDerivedStructuralFeatureID(eFeature)) {
141             case OljPackage.SUB_COUNTER_KEY_COLUMN_TYPE__KEY_COLUMN_NAME:
142                 return KEY_COLUMN_NAME_EDEFAULT == null ? keyColumnName != null : !KEY_COLUMN_NAME_EDEFAULT.equals(keyColumnName);
143         }
144         return eDynamicIsSet(eFeature);
145     }
146
147     /**
148      * <!-- begin-user-doc -->
149      * <!-- end-user-doc -->
150      * @generated
151      */

152     public String JavaDoc toString() {
153         if (eIsProxy()) return super.toString();
154
155         StringBuffer JavaDoc result = new StringBuffer JavaDoc(super.toString());
156         result.append(" (keyColumnName: ");
157         result.append(keyColumnName);
158         result.append(')');
159         return result.toString();
160     }
161
162 } //SubCounterKeyColumnTypeImpl
163
Popular Tags