KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > impl > TableTypeImpl


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

7 package Olj.impl;
8
9 import Olj.AutoMapColumnsType;
10 import Olj.DefaultModeType;
11 import Olj.InsertType;
12 import Olj.OidLogicType;
13 import Olj.OljPackage;
14 import Olj.TableModeType;
15 import Olj.TableType;
16
17 import org.eclipse.emf.common.notify.Notification;
18
19 import org.eclipse.emf.ecore.EClass;
20 import org.eclipse.emf.ecore.EStructuralFeature;
21
22 import org.eclipse.emf.ecore.impl.ENotificationImpl;
23 import org.eclipse.emf.ecore.impl.EObjectImpl;
24
25 /**
26  * <!-- begin-user-doc -->
27  * An implementation of the model object '<em><b>Table Type</b></em>'.
28  * <!-- end-user-doc -->
29  * <p>
30  * The following features are implemented:
31  * <ul>
32  * <li>{@link Olj.impl.TableTypeImpl#getAutoMapColumns <em>Auto Map Columns</em>}</li>
33  * <li>{@link Olj.impl.TableTypeImpl#getDefaultMode <em>Default Mode</em>}</li>
34  * <li>{@link Olj.impl.TableTypeImpl#getInsert <em>Insert</em>}</li>
35  * <li>{@link Olj.impl.TableTypeImpl#getOidLogic <em>Oid Logic</em>}</li>
36  * <li>{@link Olj.impl.TableTypeImpl#getTableID <em>Table ID</em>}</li>
37  * <li>{@link Olj.impl.TableTypeImpl#getTableMode <em>Table Mode</em>}</li>
38  * <li>{@link Olj.impl.TableTypeImpl#getTableName <em>Table Name</em>}</li>
39  * </ul>
40  * </p>
41  *
42  * @generated
43  */

44 public class TableTypeImpl extends EObjectImpl implements TableType {
45     /**
46      * The default value of the '{@link #getAutoMapColumns() <em>Auto Map Columns</em>}' attribute.
47      * <!-- begin-user-doc -->
48      * <!-- end-user-doc -->
49      * @see #getAutoMapColumns()
50      * @generated
51      * @ordered
52      */

53     protected static final AutoMapColumnsType AUTO_MAP_COLUMNS_EDEFAULT = AutoMapColumnsType.TRUE_LITERAL;
54
55     /**
56      * The cached value of the '{@link #getAutoMapColumns() <em>Auto Map Columns</em>}' attribute.
57      * <!-- begin-user-doc -->
58      * <!-- end-user-doc -->
59      * @see #getAutoMapColumns()
60      * @generated
61      * @ordered
62      */

63     protected AutoMapColumnsType autoMapColumns = AUTO_MAP_COLUMNS_EDEFAULT;
64
65     /**
66      * This is true if the Auto Map Columns attribute has been set.
67      * <!-- begin-user-doc -->
68      * <!-- end-user-doc -->
69      * @generated
70      * @ordered
71      */

72     protected boolean autoMapColumnsESet = false;
73
74     /**
75      * The default value of the '{@link #getDefaultMode() <em>Default Mode</em>}' attribute.
76      * <!-- begin-user-doc -->
77      * <!-- end-user-doc -->
78      * @see #getDefaultMode()
79      * @generated
80      * @ordered
81      */

82     protected static final DefaultModeType DEFAULT_MODE_EDEFAULT = DefaultModeType.OVERWRITE_LITERAL;
83
84     /**
85      * The cached value of the '{@link #getDefaultMode() <em>Default Mode</em>}' attribute.
86      * <!-- begin-user-doc -->
87      * <!-- end-user-doc -->
88      * @see #getDefaultMode()
89      * @generated
90      * @ordered
91      */

92     protected DefaultModeType defaultMode = DEFAULT_MODE_EDEFAULT;
93
94     /**
95      * This is true if the Default Mode attribute has been set.
96      * <!-- begin-user-doc -->
97      * <!-- end-user-doc -->
98      * @generated
99      * @ordered
100      */

101     protected boolean defaultModeESet = false;
102
103     /**
104      * The default value of the '{@link #getInsert() <em>Insert</em>}' attribute.
105      * <!-- begin-user-doc -->
106      * <!-- end-user-doc -->
107      * @see #getInsert()
108      * @generated
109      * @ordered
110      */

111     protected static final InsertType INSERT_EDEFAULT = InsertType.TRUE_LITERAL;
112
113     /**
114      * The cached value of the '{@link #getInsert() <em>Insert</em>}' attribute.
115      * <!-- begin-user-doc -->
116      * <!-- end-user-doc -->
117      * @see #getInsert()
118      * @generated
119      * @ordered
120      */

121     protected InsertType insert = INSERT_EDEFAULT;
122
123     /**
124      * This is true if the Insert attribute has been set.
125      * <!-- begin-user-doc -->
126      * <!-- end-user-doc -->
127      * @generated
128      * @ordered
129      */

130     protected boolean insertESet = false;
131
132     /**
133      * The default value of the '{@link #getOidLogic() <em>Oid Logic</em>}' attribute.
134      * <!-- begin-user-doc -->
135      * <!-- end-user-doc -->
136      * @see #getOidLogic()
137      * @generated
138      * @ordered
139      */

140     protected static final OidLogicType OID_LOGIC_EDEFAULT = OidLogicType.TRUE_LITERAL;
141
142     /**
143      * The cached value of the '{@link #getOidLogic() <em>Oid Logic</em>}' attribute.
144      * <!-- begin-user-doc -->
145      * <!-- end-user-doc -->
146      * @see #getOidLogic()
147      * @generated
148      * @ordered
149      */

150     protected OidLogicType oidLogic = OID_LOGIC_EDEFAULT;
151
152     /**
153      * This is true if the Oid Logic attribute has been set.
154      * <!-- begin-user-doc -->
155      * <!-- end-user-doc -->
156      * @generated
157      * @ordered
158      */

159     protected boolean oidLogicESet = false;
160
161     /**
162      * The default value of the '{@link #getTableID() <em>Table ID</em>}' attribute.
163      * <!-- begin-user-doc -->
164      * <!-- end-user-doc -->
165      * @see #getTableID()
166      * @generated
167      * @ordered
168      */

169     protected static final String JavaDoc TABLE_ID_EDEFAULT = null;
170
171     /**
172      * The cached value of the '{@link #getTableID() <em>Table ID</em>}' attribute.
173      * <!-- begin-user-doc -->
174      * <!-- end-user-doc -->
175      * @see #getTableID()
176      * @generated
177      * @ordered
178      */

179     protected String JavaDoc tableID = TABLE_ID_EDEFAULT;
180
181     /**
182      * The default value of the '{@link #getTableMode() <em>Table Mode</em>}' attribute.
183      * <!-- begin-user-doc -->
184      * <!-- end-user-doc -->
185      * @see #getTableMode()
186      * @generated
187      * @ordered
188      */

189     protected static final TableModeType TABLE_MODE_EDEFAULT = TableModeType.CACHE_LITERAL;
190
191     /**
192      * The cached value of the '{@link #getTableMode() <em>Table Mode</em>}' attribute.
193      * <!-- begin-user-doc -->
194      * <!-- end-user-doc -->
195      * @see #getTableMode()
196      * @generated
197      * @ordered
198      */

199     protected TableModeType tableMode = TABLE_MODE_EDEFAULT;
200
201     /**
202      * This is true if the Table Mode attribute has been set.
203      * <!-- begin-user-doc -->
204      * <!-- end-user-doc -->
205      * @generated
206      * @ordered
207      */

208     protected boolean tableModeESet = false;
209
210     /**
211      * The default value of the '{@link #getTableName() <em>Table Name</em>}' attribute.
212      * <!-- begin-user-doc -->
213      * <!-- end-user-doc -->
214      * @see #getTableName()
215      * @generated
216      * @ordered
217      */

218     protected static final String JavaDoc TABLE_NAME_EDEFAULT = null;
219
220     /**
221      * The cached value of the '{@link #getTableName() <em>Table Name</em>}' attribute.
222      * <!-- begin-user-doc -->
223      * <!-- end-user-doc -->
224      * @see #getTableName()
225      * @generated
226      * @ordered
227      */

228     protected String JavaDoc tableName = TABLE_NAME_EDEFAULT;
229
230     /**
231      * <!-- begin-user-doc -->
232      * <!-- end-user-doc -->
233      * @generated
234      */

235     protected TableTypeImpl() {
236         super();
237     }
238
239     /**
240      * <!-- begin-user-doc -->
241      * <!-- end-user-doc -->
242      * @generated
243      */

244     protected EClass eStaticClass() {
245         return OljPackage.eINSTANCE.getTableType();
246     }
247
248     /**
249      * <!-- begin-user-doc -->
250      * <!-- end-user-doc -->
251      * @generated
252      */

253     public AutoMapColumnsType getAutoMapColumns() {
254         return autoMapColumns;
255     }
256
257     /**
258      * <!-- begin-user-doc -->
259      * <!-- end-user-doc -->
260      * @generated
261      */

262     public void setAutoMapColumns(AutoMapColumnsType newAutoMapColumns) {
263         AutoMapColumnsType oldAutoMapColumns = autoMapColumns;
264         autoMapColumns = newAutoMapColumns == null ? AUTO_MAP_COLUMNS_EDEFAULT : newAutoMapColumns;
265         boolean oldAutoMapColumnsESet = autoMapColumnsESet;
266         autoMapColumnsESet = true;
267         if (eNotificationRequired())
268             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TABLE_TYPE__AUTO_MAP_COLUMNS, oldAutoMapColumns, autoMapColumns, !oldAutoMapColumnsESet));
269     }
270
271     /**
272      * <!-- begin-user-doc -->
273      * <!-- end-user-doc -->
274      * @generated
275      */

276     public void unsetAutoMapColumns() {
277         AutoMapColumnsType oldAutoMapColumns = autoMapColumns;
278         boolean oldAutoMapColumnsESet = autoMapColumnsESet;
279         autoMapColumns = AUTO_MAP_COLUMNS_EDEFAULT;
280         autoMapColumnsESet = false;
281         if (eNotificationRequired())
282             eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.TABLE_TYPE__AUTO_MAP_COLUMNS, oldAutoMapColumns, AUTO_MAP_COLUMNS_EDEFAULT, oldAutoMapColumnsESet));
283     }
284
285     /**
286      * <!-- begin-user-doc -->
287      * <!-- end-user-doc -->
288      * @generated
289      */

290     public boolean isSetAutoMapColumns() {
291         return autoMapColumnsESet;
292     }
293
294     /**
295      * <!-- begin-user-doc -->
296      * <!-- end-user-doc -->
297      * @generated
298      */

299     public DefaultModeType getDefaultMode() {
300         return defaultMode;
301     }
302
303     /**
304      * <!-- begin-user-doc -->
305      * <!-- end-user-doc -->
306      * @generated
307      */

308     public void setDefaultMode(DefaultModeType newDefaultMode) {
309         DefaultModeType oldDefaultMode = defaultMode;
310         defaultMode = newDefaultMode == null ? DEFAULT_MODE_EDEFAULT : newDefaultMode;
311         boolean oldDefaultModeESet = defaultModeESet;
312         defaultModeESet = true;
313         if (eNotificationRequired())
314             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TABLE_TYPE__DEFAULT_MODE, oldDefaultMode, defaultMode, !oldDefaultModeESet));
315     }
316
317     /**
318      * <!-- begin-user-doc -->
319      * <!-- end-user-doc -->
320      * @generated
321      */

322     public void unsetDefaultMode() {
323         DefaultModeType oldDefaultMode = defaultMode;
324         boolean oldDefaultModeESet = defaultModeESet;
325         defaultMode = DEFAULT_MODE_EDEFAULT;
326         defaultModeESet = false;
327         if (eNotificationRequired())
328             eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.TABLE_TYPE__DEFAULT_MODE, oldDefaultMode, DEFAULT_MODE_EDEFAULT, oldDefaultModeESet));
329     }
330
331     /**
332      * <!-- begin-user-doc -->
333      * <!-- end-user-doc -->
334      * @generated
335      */

336     public boolean isSetDefaultMode() {
337         return defaultModeESet;
338     }
339
340     /**
341      * <!-- begin-user-doc -->
342      * <!-- end-user-doc -->
343      * @generated
344      */

345     public InsertType getInsert() {
346         return insert;
347     }
348
349     /**
350      * <!-- begin-user-doc -->
351      * <!-- end-user-doc -->
352      * @generated
353      */

354     public void setInsert(InsertType newInsert) {
355         InsertType oldInsert = insert;
356         insert = newInsert == null ? INSERT_EDEFAULT : newInsert;
357         boolean oldInsertESet = insertESet;
358         insertESet = true;
359         if (eNotificationRequired())
360             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TABLE_TYPE__INSERT, oldInsert, insert, !oldInsertESet));
361     }
362
363     /**
364      * <!-- begin-user-doc -->
365      * <!-- end-user-doc -->
366      * @generated
367      */

368     public void unsetInsert() {
369         InsertType oldInsert = insert;
370         boolean oldInsertESet = insertESet;
371         insert = INSERT_EDEFAULT;
372         insertESet = false;
373         if (eNotificationRequired())
374             eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.TABLE_TYPE__INSERT, oldInsert, INSERT_EDEFAULT, oldInsertESet));
375     }
376
377     /**
378      * <!-- begin-user-doc -->
379      * <!-- end-user-doc -->
380      * @generated
381      */

382     public boolean isSetInsert() {
383         return insertESet;
384     }
385
386     /**
387      * <!-- begin-user-doc -->
388      * <!-- end-user-doc -->
389      * @generated
390      */

391     public OidLogicType getOidLogic() {
392         return oidLogic;
393     }
394
395     /**
396      * <!-- begin-user-doc -->
397      * <!-- end-user-doc -->
398      * @generated
399      */

400     public void setOidLogic(OidLogicType newOidLogic) {
401         OidLogicType oldOidLogic = oidLogic;
402         oidLogic = newOidLogic == null ? OID_LOGIC_EDEFAULT : newOidLogic;
403         boolean oldOidLogicESet = oidLogicESet;
404         oidLogicESet = true;
405         if (eNotificationRequired())
406             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TABLE_TYPE__OID_LOGIC, oldOidLogic, oidLogic, !oldOidLogicESet));
407     }
408
409     /**
410      * <!-- begin-user-doc -->
411      * <!-- end-user-doc -->
412      * @generated
413      */

414     public void unsetOidLogic() {
415         OidLogicType oldOidLogic = oidLogic;
416         boolean oldOidLogicESet = oidLogicESet;
417         oidLogic = OID_LOGIC_EDEFAULT;
418         oidLogicESet = false;
419         if (eNotificationRequired())
420             eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.TABLE_TYPE__OID_LOGIC, oldOidLogic, OID_LOGIC_EDEFAULT, oldOidLogicESet));
421     }
422
423     /**
424      * <!-- begin-user-doc -->
425      * <!-- end-user-doc -->
426      * @generated
427      */

428     public boolean isSetOidLogic() {
429         return oidLogicESet;
430     }
431
432     /**
433      * <!-- begin-user-doc -->
434      * <!-- end-user-doc -->
435      * @generated
436      */

437     public String JavaDoc getTableID() {
438         return tableID;
439     }
440
441     /**
442      * <!-- begin-user-doc -->
443      * <!-- end-user-doc -->
444      * @generated
445      */

446     public void setTableID(String JavaDoc newTableID) {
447         String JavaDoc oldTableID = tableID;
448         tableID = newTableID;
449         if (eNotificationRequired())
450             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TABLE_TYPE__TABLE_ID, oldTableID, tableID));
451     }
452
453     /**
454      * <!-- begin-user-doc -->
455      * <!-- end-user-doc -->
456      * @generated
457      */

458     public TableModeType getTableMode() {
459         return tableMode;
460     }
461
462     /**
463      * <!-- begin-user-doc -->
464      * <!-- end-user-doc -->
465      * @generated
466      */

467     public void setTableMode(TableModeType newTableMode) {
468         TableModeType oldTableMode = tableMode;
469         tableMode = newTableMode == null ? TABLE_MODE_EDEFAULT : newTableMode;
470         boolean oldTableModeESet = tableModeESet;
471         tableModeESet = true;
472         if (eNotificationRequired())
473             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TABLE_TYPE__TABLE_MODE, oldTableMode, tableMode, !oldTableModeESet));
474     }
475
476     /**
477      * <!-- begin-user-doc -->
478      * <!-- end-user-doc -->
479      * @generated
480      */

481     public void unsetTableMode() {
482         TableModeType oldTableMode = tableMode;
483         boolean oldTableModeESet = tableModeESet;
484         tableMode = TABLE_MODE_EDEFAULT;
485         tableModeESet = false;
486         if (eNotificationRequired())
487             eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.TABLE_TYPE__TABLE_MODE, oldTableMode, TABLE_MODE_EDEFAULT, oldTableModeESet));
488     }
489
490     /**
491      * <!-- begin-user-doc -->
492      * <!-- end-user-doc -->
493      * @generated
494      */

495     public boolean isSetTableMode() {
496         return tableModeESet;
497     }
498
499     /**
500      * <!-- begin-user-doc -->
501      * <!-- end-user-doc -->
502      * @generated
503      */

504     public String JavaDoc getTableName() {
505         return tableName;
506     }
507
508     /**
509      * <!-- begin-user-doc -->
510      * <!-- end-user-doc -->
511      * @generated
512      */

513     public void setTableName(String JavaDoc newTableName) {
514         String JavaDoc oldTableName = tableName;
515         tableName = newTableName;
516         if (eNotificationRequired())
517             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TABLE_TYPE__TABLE_NAME, oldTableName, tableName));
518     }
519
520     /**
521      * <!-- begin-user-doc -->
522      * <!-- end-user-doc -->
523      * @generated
524      */

525     public Object JavaDoc eGet(EStructuralFeature eFeature, boolean resolve) {
526         switch (eDerivedStructuralFeatureID(eFeature)) {
527             case OljPackage.TABLE_TYPE__AUTO_MAP_COLUMNS:
528                 return getAutoMapColumns();
529             case OljPackage.TABLE_TYPE__DEFAULT_MODE:
530                 return getDefaultMode();
531             case OljPackage.TABLE_TYPE__INSERT:
532                 return getInsert();
533             case OljPackage.TABLE_TYPE__OID_LOGIC:
534                 return getOidLogic();
535             case OljPackage.TABLE_TYPE__TABLE_ID:
536                 return getTableID();
537             case OljPackage.TABLE_TYPE__TABLE_MODE:
538                 return getTableMode();
539             case OljPackage.TABLE_TYPE__TABLE_NAME:
540                 return getTableName();
541         }
542         return eDynamicGet(eFeature, resolve);
543     }
544
545     /**
546      * <!-- begin-user-doc -->
547      * <!-- end-user-doc -->
548      * @generated
549      */

550     public void eSet(EStructuralFeature eFeature, Object JavaDoc newValue) {
551         switch (eDerivedStructuralFeatureID(eFeature)) {
552             case OljPackage.TABLE_TYPE__AUTO_MAP_COLUMNS:
553                 setAutoMapColumns((AutoMapColumnsType)newValue);
554                 return;
555             case OljPackage.TABLE_TYPE__DEFAULT_MODE:
556                 setDefaultMode((DefaultModeType)newValue);
557                 return;
558             case OljPackage.TABLE_TYPE__INSERT:
559                 setInsert((InsertType)newValue);
560                 return;
561             case OljPackage.TABLE_TYPE__OID_LOGIC:
562                 setOidLogic((OidLogicType)newValue);
563                 return;
564             case OljPackage.TABLE_TYPE__TABLE_ID:
565                 setTableID((String JavaDoc)newValue);
566                 return;
567             case OljPackage.TABLE_TYPE__TABLE_MODE:
568                 setTableMode((TableModeType)newValue);
569                 return;
570             case OljPackage.TABLE_TYPE__TABLE_NAME:
571                 setTableName((String JavaDoc)newValue);
572                 return;
573         }
574         eDynamicSet(eFeature, newValue);
575     }
576
577     /**
578      * <!-- begin-user-doc -->
579      * <!-- end-user-doc -->
580      * @generated
581      */

582     public void eUnset(EStructuralFeature eFeature) {
583         switch (eDerivedStructuralFeatureID(eFeature)) {
584             case OljPackage.TABLE_TYPE__AUTO_MAP_COLUMNS:
585                 unsetAutoMapColumns();
586                 return;
587             case OljPackage.TABLE_TYPE__DEFAULT_MODE:
588                 unsetDefaultMode();
589                 return;
590             case OljPackage.TABLE_TYPE__INSERT:
591                 unsetInsert();
592                 return;
593             case OljPackage.TABLE_TYPE__OID_LOGIC:
594                 unsetOidLogic();
595                 return;
596             case OljPackage.TABLE_TYPE__TABLE_ID:
597                 setTableID(TABLE_ID_EDEFAULT);
598                 return;
599             case OljPackage.TABLE_TYPE__TABLE_MODE:
600                 unsetTableMode();
601                 return;
602             case OljPackage.TABLE_TYPE__TABLE_NAME:
603                 setTableName(TABLE_NAME_EDEFAULT);
604                 return;
605         }
606         eDynamicUnset(eFeature);
607     }
608
609     /**
610      * <!-- begin-user-doc -->
611      * <!-- end-user-doc -->
612      * @generated
613      */

614     public boolean eIsSet(EStructuralFeature eFeature) {
615         switch (eDerivedStructuralFeatureID(eFeature)) {
616             case OljPackage.TABLE_TYPE__AUTO_MAP_COLUMNS:
617                 return isSetAutoMapColumns();
618             case OljPackage.TABLE_TYPE__DEFAULT_MODE:
619                 return isSetDefaultMode();
620             case OljPackage.TABLE_TYPE__INSERT:
621                 return isSetInsert();
622             case OljPackage.TABLE_TYPE__OID_LOGIC:
623                 return isSetOidLogic();
624             case OljPackage.TABLE_TYPE__TABLE_ID:
625                 return TABLE_ID_EDEFAULT == null ? tableID != null : !TABLE_ID_EDEFAULT.equals(tableID);
626             case OljPackage.TABLE_TYPE__TABLE_MODE:
627                 return isSetTableMode();
628             case OljPackage.TABLE_TYPE__TABLE_NAME:
629                 return TABLE_NAME_EDEFAULT == null ? tableName != null : !TABLE_NAME_EDEFAULT.equals(tableName);
630         }
631         return eDynamicIsSet(eFeature);
632     }
633
634     /**
635      * <!-- begin-user-doc -->
636      * <!-- end-user-doc -->
637      * @generated
638      */

639     public String JavaDoc toString() {
640         if (eIsProxy()) return super.toString();
641
642         StringBuffer JavaDoc result = new StringBuffer JavaDoc(super.toString());
643         result.append(" (autoMapColumns: ");
644         if (autoMapColumnsESet) result.append(autoMapColumns); else result.append("<unset>");
645         result.append(", defaultMode: ");
646         if (defaultModeESet) result.append(defaultMode); else result.append("<unset>");
647         result.append(", insert: ");
648         if (insertESet) result.append(insert); else result.append("<unset>");
649         result.append(", oidLogic: ");
650         if (oidLogicESet) result.append(oidLogic); else result.append("<unset>");
651         result.append(", tableID: ");
652         result.append(tableID);
653         result.append(", tableMode: ");
654         if (tableModeESet) result.append(tableMode); else result.append("<unset>");
655         result.append(", tableName: ");
656         result.append(tableName);
657         result.append(')');
658         return result.toString();
659     }
660
661 } //TableTypeImpl
662
Popular Tags