001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id$
006: */package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl;
007:
008: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.ScriptType;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.UpocBase;
010: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
011:
012: import org.eclipse.emf.common.notify.Notification;
013:
014: import org.eclipse.emf.ecore.EClass;
015:
016: import org.eclipse.emf.ecore.impl.ENotificationImpl;
017: import org.eclipse.emf.ecore.impl.EObjectImpl;
018:
019: /**
020: * <!-- begin-user-doc -->
021: * An implementation of the model object '<em><b>Upoc Base</b></em>'.
022: * <!-- end-user-doc -->
023: * <p>
024: * The following features are implemented:
025: * <ul>
026: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocBaseImpl#getType <em>Type</em>}</li>
027: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocBaseImpl#getClass_ <em>Class </em>}</li>
028: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocBaseImpl#getClassDescription <em>Class Description</em>}</li>
029: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocBaseImpl#getMethod <em>Method</em>}</li>
030: * </ul>
031: * </p>
032: *
033: * @generated
034: */
035: public class UpocBaseImpl extends EObjectImpl implements UpocBase {
036: /**
037: * <!-- begin-user-doc -->
038: * <!-- end-user-doc -->
039: * @generated
040: */
041: public static final String copyright = "Copyright, Bostech Corp.";
042:
043: /**
044: * The default value of the '{@link #getType() <em>Type</em>}' attribute.
045: * <!-- begin-user-doc -->
046: * <!-- end-user-doc -->
047: * @see #getType()
048: * @generated
049: * @ordered
050: */
051: protected static final ScriptType TYPE_EDEFAULT = ScriptType.GROOVY_LITERAL;
052:
053: /**
054: * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
055: * <!-- begin-user-doc -->
056: * <!-- end-user-doc -->
057: * @see #getType()
058: * @generated
059: * @ordered
060: */
061: protected ScriptType type = TYPE_EDEFAULT;
062:
063: /**
064: * The default value of the '{@link #getClass_() <em>Class </em>}' attribute.
065: * <!-- begin-user-doc -->
066: * <!-- end-user-doc -->
067: * @see #getClass_()
068: * @generated
069: * @ordered
070: */
071: protected static final String CLASS__EDEFAULT = "";
072:
073: /**
074: * The cached value of the '{@link #getClass_() <em>Class </em>}' attribute.
075: * <!-- begin-user-doc -->
076: * <!-- end-user-doc -->
077: * @see #getClass_()
078: * @generated
079: * @ordered
080: */
081: protected String class_ = CLASS__EDEFAULT;
082:
083: /**
084: * The default value of the '{@link #getClassDescription() <em>Class Description</em>}' attribute.
085: * <!-- begin-user-doc -->
086: * <!-- end-user-doc -->
087: * @see #getClassDescription()
088: * @generated
089: * @ordered
090: */
091: protected static final String CLASS_DESCRIPTION_EDEFAULT = null;
092:
093: /**
094: * The cached value of the '{@link #getClassDescription() <em>Class Description</em>}' attribute.
095: * <!-- begin-user-doc -->
096: * <!-- end-user-doc -->
097: * @see #getClassDescription()
098: * @generated
099: * @ordered
100: */
101: protected String classDescription = CLASS_DESCRIPTION_EDEFAULT;
102:
103: /**
104: * The default value of the '{@link #getMethod() <em>Method</em>}' attribute.
105: * <!-- begin-user-doc -->
106: * <!-- end-user-doc -->
107: * @see #getMethod()
108: * @generated
109: * @ordered
110: */
111: protected static final String METHOD_EDEFAULT = null;
112:
113: /**
114: * The cached value of the '{@link #getMethod() <em>Method</em>}' attribute.
115: * <!-- begin-user-doc -->
116: * <!-- end-user-doc -->
117: * @see #getMethod()
118: * @generated
119: * @ordered
120: */
121: protected String method = METHOD_EDEFAULT;
122:
123: /**
124: * <!-- begin-user-doc -->
125: * <!-- end-user-doc -->
126: * @generated
127: */
128: protected UpocBaseImpl() {
129: super ();
130: }
131:
132: /**
133: * <!-- begin-user-doc -->
134: * <!-- end-user-doc -->
135: * @generated
136: */
137: protected EClass eStaticClass() {
138: return componentflowPackage.Literals.UPOC_BASE;
139: }
140:
141: /**
142: * <!-- begin-user-doc -->
143: * <!-- end-user-doc -->
144: * @generated
145: */
146: public ScriptType getType() {
147: return type;
148: }
149:
150: /**
151: * <!-- begin-user-doc -->
152: * <!-- end-user-doc -->
153: * @generated
154: */
155: public void setType(ScriptType newType) {
156: ScriptType oldType = type;
157: type = newType == null ? TYPE_EDEFAULT : newType;
158: if (eNotificationRequired())
159: eNotify(new ENotificationImpl(this , Notification.SET,
160: componentflowPackage.UPOC_BASE__TYPE, oldType, type));
161: }
162:
163: /**
164: * <!-- begin-user-doc -->
165: * <!-- end-user-doc -->
166: * @generated
167: */
168: public String getClass_() {
169: return class_;
170: }
171:
172: /**
173: * <!-- begin-user-doc -->
174: * <!-- end-user-doc -->
175: * @generated
176: */
177: public void setClass_(String newClass_) {
178: String oldClass_ = class_;
179: class_ = newClass_;
180: if (eNotificationRequired())
181: eNotify(new ENotificationImpl(this , Notification.SET,
182: componentflowPackage.UPOC_BASE__CLASS_, oldClass_,
183: class_));
184: }
185:
186: /**
187: * <!-- begin-user-doc -->
188: * <!-- end-user-doc -->
189: * @generated
190: */
191: public String getClassDescription() {
192: return classDescription;
193: }
194:
195: /**
196: * <!-- begin-user-doc -->
197: * <!-- end-user-doc -->
198: * @generated
199: */
200: public void setClassDescription(String newClassDescription) {
201: String oldClassDescription = classDescription;
202: classDescription = newClassDescription;
203: if (eNotificationRequired())
204: eNotify(new ENotificationImpl(this , Notification.SET,
205: componentflowPackage.UPOC_BASE__CLASS_DESCRIPTION,
206: oldClassDescription, classDescription));
207: }
208:
209: /**
210: * <!-- begin-user-doc -->
211: * <!-- end-user-doc -->
212: * @generated
213: */
214: public String getMethod() {
215: return method;
216: }
217:
218: /**
219: * <!-- begin-user-doc -->
220: * <!-- end-user-doc -->
221: * @generated
222: */
223: public void setMethod(String newMethod) {
224: String oldMethod = method;
225: method = newMethod;
226: if (eNotificationRequired())
227: eNotify(new ENotificationImpl(this , Notification.SET,
228: componentflowPackage.UPOC_BASE__METHOD, oldMethod,
229: method));
230: }
231:
232: /**
233: * <!-- begin-user-doc -->
234: * <!-- end-user-doc -->
235: * @generated
236: */
237: public Object eGet(int featureID, boolean resolve, boolean coreType) {
238: switch (featureID) {
239: case componentflowPackage.UPOC_BASE__TYPE:
240: return getType();
241: case componentflowPackage.UPOC_BASE__CLASS_:
242: return getClass_();
243: case componentflowPackage.UPOC_BASE__CLASS_DESCRIPTION:
244: return getClassDescription();
245: case componentflowPackage.UPOC_BASE__METHOD:
246: return getMethod();
247: }
248: return super .eGet(featureID, resolve, coreType);
249: }
250:
251: /**
252: * <!-- begin-user-doc -->
253: * <!-- end-user-doc -->
254: * @generated
255: */
256: public void eSet(int featureID, Object newValue) {
257: switch (featureID) {
258: case componentflowPackage.UPOC_BASE__TYPE:
259: setType((ScriptType) newValue);
260: return;
261: case componentflowPackage.UPOC_BASE__CLASS_:
262: setClass_((String) newValue);
263: return;
264: case componentflowPackage.UPOC_BASE__CLASS_DESCRIPTION:
265: setClassDescription((String) newValue);
266: return;
267: case componentflowPackage.UPOC_BASE__METHOD:
268: setMethod((String) newValue);
269: return;
270: }
271: super .eSet(featureID, newValue);
272: }
273:
274: /**
275: * <!-- begin-user-doc -->
276: * <!-- end-user-doc -->
277: * @generated
278: */
279: public void eUnset(int featureID) {
280: switch (featureID) {
281: case componentflowPackage.UPOC_BASE__TYPE:
282: setType(TYPE_EDEFAULT);
283: return;
284: case componentflowPackage.UPOC_BASE__CLASS_:
285: setClass_(CLASS__EDEFAULT);
286: return;
287: case componentflowPackage.UPOC_BASE__CLASS_DESCRIPTION:
288: setClassDescription(CLASS_DESCRIPTION_EDEFAULT);
289: return;
290: case componentflowPackage.UPOC_BASE__METHOD:
291: setMethod(METHOD_EDEFAULT);
292: return;
293: }
294: super .eUnset(featureID);
295: }
296:
297: /**
298: * <!-- begin-user-doc -->
299: * <!-- end-user-doc -->
300: * @generated
301: */
302: public boolean eIsSet(int featureID) {
303: switch (featureID) {
304: case componentflowPackage.UPOC_BASE__TYPE:
305: return type != TYPE_EDEFAULT;
306: case componentflowPackage.UPOC_BASE__CLASS_:
307: return CLASS__EDEFAULT == null ? class_ != null
308: : !CLASS__EDEFAULT.equals(class_);
309: case componentflowPackage.UPOC_BASE__CLASS_DESCRIPTION:
310: return CLASS_DESCRIPTION_EDEFAULT == null ? classDescription != null
311: : !CLASS_DESCRIPTION_EDEFAULT
312: .equals(classDescription);
313: case componentflowPackage.UPOC_BASE__METHOD:
314: return METHOD_EDEFAULT == null ? method != null
315: : !METHOD_EDEFAULT.equals(method);
316: }
317: return super .eIsSet(featureID);
318: }
319:
320: /**
321: * <!-- begin-user-doc -->
322: * <!-- end-user-doc -->
323: * @generated
324: */
325: public String toString() {
326: if (eIsProxy())
327: return super .toString();
328:
329: StringBuffer result = new StringBuffer(super .toString());
330: result.append(" (type: ");
331: result.append(type);
332: result.append(", class_: ");
333: result.append(class_);
334: result.append(", classDescription: ");
335: result.append(classDescription);
336: result.append(", method: ");
337: result.append(method);
338: result.append(')');
339: return result.toString();
340: }
341:
342: } //UpocBaseImpl
|