001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id$
006: */package com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl;
007:
008: import org.eclipse.emf.common.notify.Notification;
009: import org.eclipse.emf.common.notify.NotificationChain;
010: import org.eclipse.emf.ecore.EClass;
011: import org.eclipse.emf.ecore.InternalEObject;
012: import org.eclipse.emf.ecore.impl.ENotificationImpl;
013: import org.eclipse.emf.ecore.impl.EObjectImpl;
014:
015: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.Upoc;
016: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.UpocPostaccept;
017: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.UpocPostsend;
018: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.UpocPresend;
019: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
020: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowFactory;
021:
022: /**
023: * <!-- begin-user-doc -->
024: * An implementation of the model object '<em><b>Upoc</b></em>'.
025: * <!-- end-user-doc -->
026: * <p>
027: * The following features are implemented:
028: * <ul>
029: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocImpl#getUsePresend <em>Use Presend</em>}</li>
030: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocImpl#getPresend <em>Presend</em>}</li>
031: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocImpl#getUsePostsend <em>Use Postsend</em>}</li>
032: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocImpl#getPostsend <em>Postsend</em>}</li>
033: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocImpl#getUsePostaccept <em>Use Postaccept</em>}</li>
034: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.UpocImpl#getPostaccept <em>Postaccept</em>}</li>
035: * </ul>
036: * </p>
037: *
038: * @generated
039: */
040: public class UpocImpl extends EObjectImpl implements Upoc {
041: /**
042: * <!-- begin-user-doc -->
043: * <!-- end-user-doc -->
044: * @generated
045: */
046: public static final String copyright = "Copyright, Bostech Corp.";
047:
048: /**
049: * The default value of the '{@link #getUsePresend() <em>Use Presend</em>}' attribute.
050: * <!-- begin-user-doc -->
051: * <!-- end-user-doc -->
052: * @see #getUsePresend()
053: * @generated
054: * @ordered
055: */
056: protected static final Boolean USE_PRESEND_EDEFAULT = Boolean.FALSE;
057:
058: /**
059: * The cached value of the '{@link #getUsePresend() <em>Use Presend</em>}' attribute.
060: * <!-- begin-user-doc -->
061: * <!-- end-user-doc -->
062: * @see #getUsePresend()
063: * @generated
064: * @ordered
065: */
066: protected Boolean usePresend = USE_PRESEND_EDEFAULT;
067:
068: /**
069: * The cached value of the '{@link #getPresend() <em>Presend</em>}' containment reference.
070: * <!-- begin-user-doc -->
071: * <!-- end-user-doc -->
072: * @see #getPresend()
073: * @generated
074: * @ordered
075: */
076: protected UpocPresend presend = null;
077:
078: /**
079: * The default value of the '{@link #getUsePostsend() <em>Use Postsend</em>}' attribute.
080: * <!-- begin-user-doc -->
081: * <!-- end-user-doc -->
082: * @see #getUsePostsend()
083: * @generated
084: * @ordered
085: */
086: protected static final Boolean USE_POSTSEND_EDEFAULT = Boolean.FALSE;
087:
088: /**
089: * The cached value of the '{@link #getUsePostsend() <em>Use Postsend</em>}' attribute.
090: * <!-- begin-user-doc -->
091: * <!-- end-user-doc -->
092: * @see #getUsePostsend()
093: * @generated
094: * @ordered
095: */
096: protected Boolean usePostsend = USE_POSTSEND_EDEFAULT;
097:
098: /**
099: * The cached value of the '{@link #getPostsend() <em>Postsend</em>}' containment reference.
100: * <!-- begin-user-doc -->
101: * <!-- end-user-doc -->
102: * @see #getPostsend()
103: * @generated
104: * @ordered
105: */
106: protected UpocPostsend postsend = null;
107:
108: /**
109: * The default value of the '{@link #getUsePostaccept() <em>Use Postaccept</em>}' attribute.
110: * <!-- begin-user-doc -->
111: * <!-- end-user-doc -->
112: * @see #getUsePostaccept()
113: * @generated
114: * @ordered
115: */
116: protected static final Boolean USE_POSTACCEPT_EDEFAULT = Boolean.FALSE;
117:
118: /**
119: * The cached value of the '{@link #getUsePostaccept() <em>Use Postaccept</em>}' attribute.
120: * <!-- begin-user-doc -->
121: * <!-- end-user-doc -->
122: * @see #getUsePostaccept()
123: * @generated
124: * @ordered
125: */
126: protected Boolean usePostaccept = USE_POSTACCEPT_EDEFAULT;
127:
128: /**
129: * The cached value of the '{@link #getPostaccept() <em>Postaccept</em>}' containment reference.
130: * <!-- begin-user-doc -->
131: * <!-- end-user-doc -->
132: * @see #getPostaccept()
133: * @generated
134: * @ordered
135: */
136: protected UpocPostaccept postaccept = null;
137:
138: /**
139: * <!-- begin-user-doc -->
140: * <!-- end-user-doc -->
141: * @generated NOT
142: */
143: protected UpocImpl() {
144: super ();
145:
146: UpocPresend conPresend = componentflowFactory.eINSTANCE
147: .createUpocPresend();
148: UpocPostsend conPostsend = componentflowFactory.eINSTANCE
149: .createUpocPostsend();
150: UpocPostaccept conPostaccept = componentflowFactory.eINSTANCE
151: .createUpocPostaccept();
152:
153: setPresend(conPresend);
154: setPostsend(conPostsend);
155: setPostaccept(conPostaccept);
156: }
157:
158: /**
159: * <!-- begin-user-doc -->
160: * <!-- end-user-doc -->
161: * @generated
162: */
163: protected EClass eStaticClass() {
164: return componentflowPackage.Literals.UPOC;
165: }
166:
167: /**
168: * <!-- begin-user-doc -->
169: * <!-- end-user-doc -->
170: * @generated
171: */
172: public Boolean getUsePresend() {
173: return usePresend;
174: }
175:
176: /**
177: * <!-- begin-user-doc -->
178: * <!-- end-user-doc -->
179: * @generated
180: */
181: public void setUsePresend(Boolean newUsePresend) {
182: Boolean oldUsePresend = usePresend;
183: usePresend = newUsePresend;
184: if (eNotificationRequired())
185: eNotify(new ENotificationImpl(this , Notification.SET,
186: componentflowPackage.UPOC__USE_PRESEND,
187: oldUsePresend, usePresend));
188: }
189:
190: /**
191: * <!-- begin-user-doc -->
192: * <!-- end-user-doc -->
193: * @generated
194: */
195: public UpocPresend getPresend() {
196: return presend;
197: }
198:
199: /**
200: * <!-- begin-user-doc -->
201: * <!-- end-user-doc -->
202: * @generated
203: */
204: public NotificationChain basicSetPresend(UpocPresend newPresend,
205: NotificationChain msgs) {
206: UpocPresend oldPresend = presend;
207: presend = newPresend;
208: if (eNotificationRequired()) {
209: ENotificationImpl notification = new ENotificationImpl(
210: this , Notification.SET,
211: componentflowPackage.UPOC__PRESEND, oldPresend,
212: newPresend);
213: if (msgs == null)
214: msgs = notification;
215: else
216: msgs.add(notification);
217: }
218: return msgs;
219: }
220:
221: /**
222: * <!-- begin-user-doc -->
223: * <!-- end-user-doc -->
224: * @generated
225: */
226: public void setPresend(UpocPresend newPresend) {
227: if (newPresend != presend) {
228: NotificationChain msgs = null;
229: if (presend != null)
230: msgs = ((InternalEObject) presend).eInverseRemove(this ,
231: EOPPOSITE_FEATURE_BASE
232: - componentflowPackage.UPOC__PRESEND,
233: null, msgs);
234: if (newPresend != null)
235: msgs = ((InternalEObject) newPresend).eInverseAdd(this ,
236: EOPPOSITE_FEATURE_BASE
237: - componentflowPackage.UPOC__PRESEND,
238: null, msgs);
239: msgs = basicSetPresend(newPresend, msgs);
240: if (msgs != null)
241: msgs.dispatch();
242: } else if (eNotificationRequired())
243: eNotify(new ENotificationImpl(this , Notification.SET,
244: componentflowPackage.UPOC__PRESEND, newPresend,
245: newPresend));
246: }
247:
248: /**
249: * <!-- begin-user-doc -->
250: * <!-- end-user-doc -->
251: * @generated
252: */
253: public Boolean getUsePostsend() {
254: return usePostsend;
255: }
256:
257: /**
258: * <!-- begin-user-doc -->
259: * <!-- end-user-doc -->
260: * @generated
261: */
262: public void setUsePostsend(Boolean newUsePostsend) {
263: Boolean oldUsePostsend = usePostsend;
264: usePostsend = newUsePostsend;
265: if (eNotificationRequired())
266: eNotify(new ENotificationImpl(this , Notification.SET,
267: componentflowPackage.UPOC__USE_POSTSEND,
268: oldUsePostsend, usePostsend));
269: }
270:
271: /**
272: * <!-- begin-user-doc -->
273: * <!-- end-user-doc -->
274: * @generated
275: */
276: public UpocPostsend getPostsend() {
277: return postsend;
278: }
279:
280: /**
281: * <!-- begin-user-doc -->
282: * <!-- end-user-doc -->
283: * @generated
284: */
285: public NotificationChain basicSetPostsend(UpocPostsend newPostsend,
286: NotificationChain msgs) {
287: UpocPostsend oldPostsend = postsend;
288: postsend = newPostsend;
289: if (eNotificationRequired()) {
290: ENotificationImpl notification = new ENotificationImpl(
291: this , Notification.SET,
292: componentflowPackage.UPOC__POSTSEND, oldPostsend,
293: newPostsend);
294: if (msgs == null)
295: msgs = notification;
296: else
297: msgs.add(notification);
298: }
299: return msgs;
300: }
301:
302: /**
303: * <!-- begin-user-doc -->
304: * <!-- end-user-doc -->
305: * @generated
306: */
307: public void setPostsend(UpocPostsend newPostsend) {
308: if (newPostsend != postsend) {
309: NotificationChain msgs = null;
310: if (postsend != null)
311: msgs = ((InternalEObject) postsend).eInverseRemove(
312: this , EOPPOSITE_FEATURE_BASE
313: - componentflowPackage.UPOC__POSTSEND,
314: null, msgs);
315: if (newPostsend != null)
316: msgs = ((InternalEObject) newPostsend).eInverseAdd(
317: this , EOPPOSITE_FEATURE_BASE
318: - componentflowPackage.UPOC__POSTSEND,
319: null, msgs);
320: msgs = basicSetPostsend(newPostsend, msgs);
321: if (msgs != null)
322: msgs.dispatch();
323: } else if (eNotificationRequired())
324: eNotify(new ENotificationImpl(this , Notification.SET,
325: componentflowPackage.UPOC__POSTSEND, newPostsend,
326: newPostsend));
327: }
328:
329: /**
330: * <!-- begin-user-doc -->
331: * <!-- end-user-doc -->
332: * @generated
333: */
334: public Boolean getUsePostaccept() {
335: return usePostaccept;
336: }
337:
338: /**
339: * <!-- begin-user-doc -->
340: * <!-- end-user-doc -->
341: * @generated
342: */
343: public void setUsePostaccept(Boolean newUsePostaccept) {
344: Boolean oldUsePostaccept = usePostaccept;
345: usePostaccept = newUsePostaccept;
346: if (eNotificationRequired())
347: eNotify(new ENotificationImpl(this , Notification.SET,
348: componentflowPackage.UPOC__USE_POSTACCEPT,
349: oldUsePostaccept, usePostaccept));
350: }
351:
352: /**
353: * <!-- begin-user-doc -->
354: * <!-- end-user-doc -->
355: * @generated
356: */
357: public UpocPostaccept getPostaccept() {
358: return postaccept;
359: }
360:
361: /**
362: * <!-- begin-user-doc -->
363: * <!-- end-user-doc -->
364: * @generated
365: */
366: public NotificationChain basicSetPostaccept(
367: UpocPostaccept newPostaccept, NotificationChain msgs) {
368: UpocPostaccept oldPostaccept = postaccept;
369: postaccept = newPostaccept;
370: if (eNotificationRequired()) {
371: ENotificationImpl notification = new ENotificationImpl(
372: this , Notification.SET,
373: componentflowPackage.UPOC__POSTACCEPT,
374: oldPostaccept, newPostaccept);
375: if (msgs == null)
376: msgs = notification;
377: else
378: msgs.add(notification);
379: }
380: return msgs;
381: }
382:
383: /**
384: * <!-- begin-user-doc -->
385: * <!-- end-user-doc -->
386: * @generated
387: */
388: public void setPostaccept(UpocPostaccept newPostaccept) {
389: if (newPostaccept != postaccept) {
390: NotificationChain msgs = null;
391: if (postaccept != null)
392: msgs = ((InternalEObject) postaccept)
393: .eInverseRemove(
394: this ,
395: EOPPOSITE_FEATURE_BASE
396: - componentflowPackage.UPOC__POSTACCEPT,
397: null, msgs);
398: if (newPostaccept != null)
399: msgs = ((InternalEObject) newPostaccept)
400: .eInverseAdd(
401: this ,
402: EOPPOSITE_FEATURE_BASE
403: - componentflowPackage.UPOC__POSTACCEPT,
404: null, msgs);
405: msgs = basicSetPostaccept(newPostaccept, msgs);
406: if (msgs != null)
407: msgs.dispatch();
408: } else if (eNotificationRequired())
409: eNotify(new ENotificationImpl(this , Notification.SET,
410: componentflowPackage.UPOC__POSTACCEPT,
411: newPostaccept, newPostaccept));
412: }
413:
414: /**
415: * <!-- begin-user-doc -->
416: * <!-- end-user-doc -->
417: * @generated
418: */
419: public NotificationChain eInverseRemove(InternalEObject otherEnd,
420: int featureID, NotificationChain msgs) {
421: switch (featureID) {
422: case componentflowPackage.UPOC__PRESEND:
423: return basicSetPresend(null, msgs);
424: case componentflowPackage.UPOC__POSTSEND:
425: return basicSetPostsend(null, msgs);
426: case componentflowPackage.UPOC__POSTACCEPT:
427: return basicSetPostaccept(null, msgs);
428: }
429: return super .eInverseRemove(otherEnd, featureID, msgs);
430: }
431:
432: /**
433: * <!-- begin-user-doc -->
434: * <!-- end-user-doc -->
435: * @generated
436: */
437: public Object eGet(int featureID, boolean resolve, boolean coreType) {
438: switch (featureID) {
439: case componentflowPackage.UPOC__USE_PRESEND:
440: return getUsePresend();
441: case componentflowPackage.UPOC__PRESEND:
442: return getPresend();
443: case componentflowPackage.UPOC__USE_POSTSEND:
444: return getUsePostsend();
445: case componentflowPackage.UPOC__POSTSEND:
446: return getPostsend();
447: case componentflowPackage.UPOC__USE_POSTACCEPT:
448: return getUsePostaccept();
449: case componentflowPackage.UPOC__POSTACCEPT:
450: return getPostaccept();
451: }
452: return super .eGet(featureID, resolve, coreType);
453: }
454:
455: /**
456: * <!-- begin-user-doc -->
457: * <!-- end-user-doc -->
458: * @generated
459: */
460: public void eSet(int featureID, Object newValue) {
461: switch (featureID) {
462: case componentflowPackage.UPOC__USE_PRESEND:
463: setUsePresend((Boolean) newValue);
464: return;
465: case componentflowPackage.UPOC__PRESEND:
466: setPresend((UpocPresend) newValue);
467: return;
468: case componentflowPackage.UPOC__USE_POSTSEND:
469: setUsePostsend((Boolean) newValue);
470: return;
471: case componentflowPackage.UPOC__POSTSEND:
472: setPostsend((UpocPostsend) newValue);
473: return;
474: case componentflowPackage.UPOC__USE_POSTACCEPT:
475: setUsePostaccept((Boolean) newValue);
476: return;
477: case componentflowPackage.UPOC__POSTACCEPT:
478: setPostaccept((UpocPostaccept) newValue);
479: return;
480: }
481: super .eSet(featureID, newValue);
482: }
483:
484: /**
485: * <!-- begin-user-doc -->
486: * <!-- end-user-doc -->
487: * @generated
488: */
489: public void eUnset(int featureID) {
490: switch (featureID) {
491: case componentflowPackage.UPOC__USE_PRESEND:
492: setUsePresend(USE_PRESEND_EDEFAULT);
493: return;
494: case componentflowPackage.UPOC__PRESEND:
495: setPresend((UpocPresend) null);
496: return;
497: case componentflowPackage.UPOC__USE_POSTSEND:
498: setUsePostsend(USE_POSTSEND_EDEFAULT);
499: return;
500: case componentflowPackage.UPOC__POSTSEND:
501: setPostsend((UpocPostsend) null);
502: return;
503: case componentflowPackage.UPOC__USE_POSTACCEPT:
504: setUsePostaccept(USE_POSTACCEPT_EDEFAULT);
505: return;
506: case componentflowPackage.UPOC__POSTACCEPT:
507: setPostaccept((UpocPostaccept) null);
508: return;
509: }
510: super .eUnset(featureID);
511: }
512:
513: /**
514: * <!-- begin-user-doc -->
515: * <!-- end-user-doc -->
516: * @generated
517: */
518: public boolean eIsSet(int featureID) {
519: switch (featureID) {
520: case componentflowPackage.UPOC__USE_PRESEND:
521: return USE_PRESEND_EDEFAULT == null ? usePresend != null
522: : !USE_PRESEND_EDEFAULT.equals(usePresend);
523: case componentflowPackage.UPOC__PRESEND:
524: return presend != null;
525: case componentflowPackage.UPOC__USE_POSTSEND:
526: return USE_POSTSEND_EDEFAULT == null ? usePostsend != null
527: : !USE_POSTSEND_EDEFAULT.equals(usePostsend);
528: case componentflowPackage.UPOC__POSTSEND:
529: return postsend != null;
530: case componentflowPackage.UPOC__USE_POSTACCEPT:
531: return USE_POSTACCEPT_EDEFAULT == null ? usePostaccept != null
532: : !USE_POSTACCEPT_EDEFAULT.equals(usePostaccept);
533: case componentflowPackage.UPOC__POSTACCEPT:
534: return postaccept != null;
535: }
536: return super .eIsSet(featureID);
537: }
538:
539: /**
540: * <!-- begin-user-doc -->
541: * <!-- end-user-doc -->
542: * @generated
543: */
544: public String toString() {
545: if (eIsProxy())
546: return super .toString();
547:
548: StringBuffer result = new StringBuffer(super .toString());
549: result.append(" (UsePresend: ");
550: result.append(usePresend);
551: result.append(", UsePostsend: ");
552: result.append(usePostsend);
553: result.append(", UsePostaccept: ");
554: result.append(usePostaccept);
555: result.append(')');
556: return result.toString();
557: }
558:
559: } //UpocImpl
|