KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > impl > TargetColumnTypeImpl


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

7 package Olj.impl;
8
9 import Olj.OljPackage;
10 import Olj.TargetColumnType;
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>Target Column Type</b></em>'.
23  * <!-- end-user-doc -->
24  * <p>
25  * The following features are implemented:
26  * <ul>
27  * <li>{@link Olj.impl.TargetColumnTypeImpl#getName <em>Name</em>}</li>
28  * <li>{@link Olj.impl.TargetColumnTypeImpl#getTableID <em>Table ID</em>}</li>
29  * <li>{@link Olj.impl.TargetColumnTypeImpl#getTableName <em>Table Name</em>}</li>
30  * <li>{@link Olj.impl.TargetColumnTypeImpl#getValueMode <em>Value Mode</em>}</li>
31  * </ul>
32  * </p>
33  *
34  * @generated
35  */

36 public class TargetColumnTypeImpl extends EObjectImpl implements TargetColumnType {
37     /**
38      * The default value of the '{@link #getName() <em>Name</em>}' attribute.
39      * <!-- begin-user-doc -->
40      * <!-- end-user-doc -->
41      * @see #getName()
42      * @generated
43      * @ordered
44      */

45     protected static final String JavaDoc NAME_EDEFAULT = null;
46
47     /**
48      * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
49      * <!-- begin-user-doc -->
50      * <!-- end-user-doc -->
51      * @see #getName()
52      * @generated
53      * @ordered
54      */

55     protected String JavaDoc name = NAME_EDEFAULT;
56
57     /**
58      * The default value of the '{@link #getTableID() <em>Table ID</em>}' attribute.
59      * <!-- begin-user-doc -->
60      * <!-- end-user-doc -->
61      * @see #getTableID()
62      * @generated
63      * @ordered
64      */

65     protected static final String JavaDoc TABLE_ID_EDEFAULT = null;
66
67     /**
68      * The cached value of the '{@link #getTableID() <em>Table ID</em>}' attribute.
69      * <!-- begin-user-doc -->
70      * <!-- end-user-doc -->
71      * @see #getTableID()
72      * @generated
73      * @ordered
74      */

75     protected String JavaDoc tableID = TABLE_ID_EDEFAULT;
76
77     /**
78      * The default value of the '{@link #getTableName() <em>Table Name</em>}' attribute.
79      * <!-- begin-user-doc -->
80      * <!-- end-user-doc -->
81      * @see #getTableName()
82      * @generated
83      * @ordered
84      */

85     protected static final String JavaDoc TABLE_NAME_EDEFAULT = null;
86
87     /**
88      * The cached value of the '{@link #getTableName() <em>Table Name</em>}' attribute.
89      * <!-- begin-user-doc -->
90      * <!-- end-user-doc -->
91      * @see #getTableName()
92      * @generated
93      * @ordered
94      */

95     protected String JavaDoc tableName = TABLE_NAME_EDEFAULT;
96
97     /**
98      * The default value of the '{@link #getValueMode() <em>Value Mode</em>}' attribute.
99      * <!-- begin-user-doc -->
100      * <!-- end-user-doc -->
101      * @see #getValueMode()
102      * @generated
103      * @ordered
104      */

105     protected static final String JavaDoc VALUE_MODE_EDEFAULT = null;
106
107     /**
108      * The cached value of the '{@link #getValueMode() <em>Value Mode</em>}' attribute.
109      * <!-- begin-user-doc -->
110      * <!-- end-user-doc -->
111      * @see #getValueMode()
112      * @generated
113      * @ordered
114      */

115     protected String JavaDoc valueMode = VALUE_MODE_EDEFAULT;
116
117     /**
118      * <!-- begin-user-doc -->
119      * <!-- end-user-doc -->
120      * @generated
121      */

122     protected TargetColumnTypeImpl() {
123         super();
124     }
125
126     /**
127      * <!-- begin-user-doc -->
128      * <!-- end-user-doc -->
129      * @generated
130      */

131     protected EClass eStaticClass() {
132         return OljPackage.eINSTANCE.getTargetColumnType();
133     }
134
135     /**
136      * <!-- begin-user-doc -->
137      * <!-- end-user-doc -->
138      * @generated
139      */

140     public String JavaDoc getName() {
141         return name;
142     }
143
144     /**
145      * <!-- begin-user-doc -->
146      * <!-- end-user-doc -->
147      * @generated
148      */

149     public void setName(String JavaDoc newName) {
150         String JavaDoc oldName = name;
151         name = newName;
152         if (eNotificationRequired())
153             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TARGET_COLUMN_TYPE__NAME, oldName, name));
154     }
155
156     /**
157      * <!-- begin-user-doc -->
158      * <!-- end-user-doc -->
159      * @generated
160      */

161     public String JavaDoc getTableID() {
162         return tableID;
163     }
164
165     /**
166      * <!-- begin-user-doc -->
167      * <!-- end-user-doc -->
168      * @generated
169      */

170     public void setTableID(String JavaDoc newTableID) {
171         String JavaDoc oldTableID = tableID;
172         tableID = newTableID;
173         if (eNotificationRequired())
174             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TARGET_COLUMN_TYPE__TABLE_ID, oldTableID, tableID));
175     }
176
177     /**
178      * <!-- begin-user-doc -->
179      * <!-- end-user-doc -->
180      * @generated
181      */

182     public String JavaDoc getTableName() {
183         return tableName;
184     }
185
186     /**
187      * <!-- begin-user-doc -->
188      * <!-- end-user-doc -->
189      * @generated
190      */

191     public void setTableName(String JavaDoc newTableName) {
192         String JavaDoc oldTableName = tableName;
193         tableName = newTableName;
194         if (eNotificationRequired())
195             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TARGET_COLUMN_TYPE__TABLE_NAME, oldTableName, tableName));
196     }
197
198     /**
199      * <!-- begin-user-doc -->
200      * <!-- end-user-doc -->
201      * @generated
202      */

203     public String JavaDoc getValueMode() {
204         return valueMode;
205     }
206
207     /**
208      * <!-- begin-user-doc -->
209      * <!-- end-user-doc -->
210      * @generated
211      */

212     public void setValueMode(String JavaDoc newValueMode) {
213         String JavaDoc oldValueMode = valueMode;
214         valueMode = newValueMode;
215         if (eNotificationRequired())
216             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TARGET_COLUMN_TYPE__VALUE_MODE, oldValueMode, valueMode));
217     }
218
219     /**
220      * <!-- begin-user-doc -->
221      * <!-- end-user-doc -->
222      * @generated
223      */

224     public Object JavaDoc eGet(EStructuralFeature eFeature, boolean resolve) {
225         switch (eDerivedStructuralFeatureID(eFeature)) {
226             case OljPackage.TARGET_COLUMN_TYPE__NAME:
227                 return getName();
228             case OljPackage.TARGET_COLUMN_TYPE__TABLE_ID:
229                 return getTableID();
230             case OljPackage.TARGET_COLUMN_TYPE__TABLE_NAME:
231                 return getTableName();
232             case OljPackage.TARGET_COLUMN_TYPE__VALUE_MODE:
233                 return getValueMode();
234         }
235         return eDynamicGet(eFeature, resolve);
236     }
237
238     /**
239      * <!-- begin-user-doc -->
240      * <!-- end-user-doc -->
241      * @generated
242      */

243     public void eSet(EStructuralFeature eFeature, Object JavaDoc newValue) {
244         switch (eDerivedStructuralFeatureID(eFeature)) {
245             case OljPackage.TARGET_COLUMN_TYPE__NAME:
246                 setName((String JavaDoc)newValue);
247                 return;
248             case OljPackage.TARGET_COLUMN_TYPE__TABLE_ID:
249                 setTableID((String JavaDoc)newValue);
250                 return;
251             case OljPackage.TARGET_COLUMN_TYPE__TABLE_NAME:
252                 setTableName((String JavaDoc)newValue);
253                 return;
254             case OljPackage.TARGET_COLUMN_TYPE__VALUE_MODE:
255                 setValueMode((String JavaDoc)newValue);
256                 return;
257         }
258         eDynamicSet(eFeature, newValue);
259     }
260
261     /**
262      * <!-- begin-user-doc -->
263      * <!-- end-user-doc -->
264      * @generated
265      */

266     public void eUnset(EStructuralFeature eFeature) {
267         switch (eDerivedStructuralFeatureID(eFeature)) {
268             case OljPackage.TARGET_COLUMN_TYPE__NAME:
269                 setName(NAME_EDEFAULT);
270                 return;
271             case OljPackage.TARGET_COLUMN_TYPE__TABLE_ID:
272                 setTableID(TABLE_ID_EDEFAULT);
273                 return;
274             case OljPackage.TARGET_COLUMN_TYPE__TABLE_NAME:
275                 setTableName(TABLE_NAME_EDEFAULT);
276                 return;
277             case OljPackage.TARGET_COLUMN_TYPE__VALUE_MODE:
278                 setValueMode(VALUE_MODE_EDEFAULT);
279                 return;
280         }
281         eDynamicUnset(eFeature);
282     }
283
284     /**
285      * <!-- begin-user-doc -->
286      * <!-- end-user-doc -->
287      * @generated
288      */

289     public boolean eIsSet(EStructuralFeature eFeature) {
290         switch (eDerivedStructuralFeatureID(eFeature)) {
291             case OljPackage.TARGET_COLUMN_TYPE__NAME:
292                 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
293             case OljPackage.TARGET_COLUMN_TYPE__TABLE_ID:
294                 return TABLE_ID_EDEFAULT == null ? tableID != null : !TABLE_ID_EDEFAULT.equals(tableID);
295             case OljPackage.TARGET_COLUMN_TYPE__TABLE_NAME:
296                 return TABLE_NAME_EDEFAULT == null ? tableName != null : !TABLE_NAME_EDEFAULT.equals(tableName);
297             case OljPackage.TARGET_COLUMN_TYPE__VALUE_MODE:
298                 return VALUE_MODE_EDEFAULT == null ? valueMode != null : !VALUE_MODE_EDEFAULT.equals(valueMode);
299         }
300         return eDynamicIsSet(eFeature);
301     }
302
303     /**
304      * <!-- begin-user-doc -->
305      * <!-- end-user-doc -->
306      * @generated
307      */

308     public String JavaDoc toString() {
309         if (eIsProxy()) return super.toString();
310
311         StringBuffer JavaDoc result = new StringBuffer JavaDoc(super.toString());
312         result.append(" (name: ");
313         result.append(name);
314         result.append(", tableID: ");
315         result.append(tableID);
316         result.append(", tableName: ");
317         result.append(tableName);
318         result.append(", valueMode: ");
319         result.append(valueMode);
320         result.append(')');
321         return result.toString();
322     }
323
324 } //TargetColumnTypeImpl
325
Popular Tags