작업중 https://github.com/hangum/TadpoleForDBTools/issues/1069
[Tadpole.git] / com.hangum.tadpole.rdb.model / src / com / hangum / tadpole / rdb / model / impl / ViewImpl.java
blob011383cf74c14a84f2a34f85c6987129af642292
1 /*******************************************************************************
2 * Copyright (c) 2013 hangum.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the GNU Lesser Public License v2.1
5 * which accompanies this distribution, and is available at
6 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
7 *
8 * Contributors:
9 * hangum - initial API and implementation
10 ******************************************************************************/
11 /**
13 package com.hangum.tadpole.rdb.model.impl;
15 import com.hangum.tadpole.rdb.model.RdbPackage;
16 import com.hangum.tadpole.rdb.model.Table;
17 import com.hangum.tadpole.rdb.model.View;
19 import org.eclipse.emf.common.notify.Notification;
21 import org.eclipse.emf.ecore.EClass;
22 import org.eclipse.emf.ecore.InternalEObject;
24 import org.eclipse.emf.ecore.impl.ENotificationImpl;
26 /**
27 * <!-- begin-user-doc -->
28 * An implementation of the model object '<em><b>View</b></em>'.
29 * <!-- end-user-doc -->
30 * <p>
31 * The following features are implemented:
32 * </p>
33 * <ul>
34 * <li>{@link com.hangum.tadpole.rdb.model.impl.ViewImpl#getTableName <em>Table Name</em>}</li>
35 * </ul>
37 * @generated
39 public class ViewImpl extends TableImpl implements View {
40 /**
41 * The cached value of the '{@link #getTableName() <em>Table Name</em>}' reference.
42 * <!-- begin-user-doc -->
43 * <!-- end-user-doc -->
44 * @see #getTableName()
45 * @generated
46 * @ordered
48 protected Table tableName;
50 /**
51 * <!-- begin-user-doc -->
52 * <!-- end-user-doc -->
53 * @generated
55 protected ViewImpl() {
56 super();
59 /**
60 * <!-- begin-user-doc -->
61 * <!-- end-user-doc -->
62 * @generated
64 @Override
65 protected EClass eStaticClass() {
66 return RdbPackage.Literals.VIEW;
69 /**
70 * <!-- begin-user-doc -->
71 * <!-- end-user-doc -->
72 * @generated
74 public Table getTableName() {
75 if (tableName != null && tableName.eIsProxy()) {
76 InternalEObject oldTableName = (InternalEObject)tableName;
77 tableName = (Table)eResolveProxy(oldTableName);
78 if (tableName != oldTableName) {
79 if (eNotificationRequired())
80 eNotify(new ENotificationImpl(this, Notification.RESOLVE, RdbPackage.VIEW__TABLE_NAME, oldTableName, tableName));
83 return tableName;
86 /**
87 * <!-- begin-user-doc -->
88 * <!-- end-user-doc -->
89 * @generated
91 public Table basicGetTableName() {
92 return tableName;
95 /**
96 * <!-- begin-user-doc -->
97 * <!-- end-user-doc -->
98 * @generated
100 public void setTableName(Table newTableName) {
101 Table oldTableName = tableName;
102 tableName = newTableName;
103 if (eNotificationRequired())
104 eNotify(new ENotificationImpl(this, Notification.SET, RdbPackage.VIEW__TABLE_NAME, oldTableName, tableName));
108 * <!-- begin-user-doc -->
109 * <!-- end-user-doc -->
110 * @generated
112 @Override
113 public Object eGet(int featureID, boolean resolve, boolean coreType) {
114 switch (featureID) {
115 case RdbPackage.VIEW__TABLE_NAME:
116 if (resolve) return getTableName();
117 return basicGetTableName();
119 return super.eGet(featureID, resolve, coreType);
123 * <!-- begin-user-doc -->
124 * <!-- end-user-doc -->
125 * @generated
127 @Override
128 public void eSet(int featureID, Object newValue) {
129 switch (featureID) {
130 case RdbPackage.VIEW__TABLE_NAME:
131 setTableName((Table)newValue);
132 return;
134 super.eSet(featureID, newValue);
138 * <!-- begin-user-doc -->
139 * <!-- end-user-doc -->
140 * @generated
142 @Override
143 public void eUnset(int featureID) {
144 switch (featureID) {
145 case RdbPackage.VIEW__TABLE_NAME:
146 setTableName((Table)null);
147 return;
149 super.eUnset(featureID);
153 * <!-- begin-user-doc -->
154 * <!-- end-user-doc -->
155 * @generated
157 @Override
158 public boolean eIsSet(int featureID) {
159 switch (featureID) {
160 case RdbPackage.VIEW__TABLE_NAME:
161 return tableName != null;
163 return super.eIsSet(featureID);
166 } //ViewImpl