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.Consumer;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.DefaultMepType;
010: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.RecordTypeType;
011: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
012:
013: import org.eclipse.emf.common.notify.Notification;
014:
015: import org.eclipse.emf.ecore.EClass;
016:
017: import org.eclipse.emf.ecore.impl.ENotificationImpl;
018:
019: /**
020: * <!-- begin-user-doc -->
021: * An implementation of the model object '<em><b>Consumer</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.ConsumerImpl#getDefaultMep <em>Default Mep</em>}</li>
027: * </ul>
028: * </p>
029: *
030: * @generated
031: */
032: public class ConsumerImpl extends EndPointImpl implements Consumer {
033: /**
034: * <!-- begin-user-doc -->
035: * <!-- end-user-doc -->
036: * @generated
037: */
038: public static final String copyright = "Copyright, Bostech Corp.";
039:
040: /**
041: * The default value of the '{@link #getDefaultMep() <em>Default Mep</em>}' attribute.
042: * <!-- begin-user-doc -->
043: * <!-- end-user-doc -->
044: * @see #getDefaultMep()
045: * @generated
046: * @ordered
047: */
048: protected static final DefaultMepType DEFAULT_MEP_EDEFAULT = DefaultMepType.INONLY_LITERAL;
049:
050: /**
051: * The cached value of the '{@link #getDefaultMep() <em>Default Mep</em>}' attribute.
052: * <!-- begin-user-doc -->
053: * <!-- end-user-doc -->
054: * @see #getDefaultMep()
055: * @generated
056: * @ordered
057: */
058: protected DefaultMepType defaultMep = DEFAULT_MEP_EDEFAULT;
059:
060: /**
061: * <!-- begin-user-doc -->
062: * <!-- end-user-doc -->
063: * @generated
064: */
065: protected ConsumerImpl() {
066: super ();
067: }
068:
069: /**
070: * <!-- begin-user-doc -->
071: * <!-- end-user-doc -->
072: * @generated
073: */
074: protected EClass eStaticClass() {
075: return componentflowPackage.Literals.CONSUMER;
076: }
077:
078: /**
079: * <!-- begin-user-doc -->
080: * <!-- end-user-doc -->
081: * @generated
082: */
083: public DefaultMepType getDefaultMep() {
084: return defaultMep;
085: }
086:
087: /**
088: * <!-- begin-user-doc -->
089: * <!-- end-user-doc -->
090: * @generated
091: */
092: public void setDefaultMep(DefaultMepType newDefaultMep) {
093: DefaultMepType oldDefaultMep = defaultMep;
094: defaultMep = newDefaultMep == null ? DEFAULT_MEP_EDEFAULT
095: : newDefaultMep;
096: if (eNotificationRequired())
097: eNotify(new ENotificationImpl(this , Notification.SET,
098: componentflowPackage.CONSUMER__DEFAULT_MEP,
099: oldDefaultMep, defaultMep));
100: }
101:
102: /**
103: * <!-- begin-user-doc -->
104: * <!-- end-user-doc -->
105: * @generated
106: */
107: public Object eGet(int featureID, boolean resolve, boolean coreType) {
108: switch (featureID) {
109: case componentflowPackage.CONSUMER__DEFAULT_MEP:
110: return getDefaultMep();
111: }
112: return super .eGet(featureID, resolve, coreType);
113: }
114:
115: /**
116: * <!-- begin-user-doc -->
117: * <!-- end-user-doc -->
118: * @generated
119: */
120: public void eSet(int featureID, Object newValue) {
121: switch (featureID) {
122: case componentflowPackage.CONSUMER__DEFAULT_MEP:
123: setDefaultMep((DefaultMepType) newValue);
124: return;
125: }
126: super .eSet(featureID, newValue);
127: }
128:
129: /**
130: * <!-- begin-user-doc -->
131: * <!-- end-user-doc -->
132: * @generated
133: */
134: public void eUnset(int featureID) {
135: switch (featureID) {
136: case componentflowPackage.CONSUMER__DEFAULT_MEP:
137: setDefaultMep(DEFAULT_MEP_EDEFAULT);
138: return;
139: }
140: super .eUnset(featureID);
141: }
142:
143: /**
144: * <!-- begin-user-doc -->
145: * <!-- end-user-doc -->
146: * @generated
147: */
148: public boolean eIsSet(int featureID) {
149: switch (featureID) {
150: case componentflowPackage.CONSUMER__DEFAULT_MEP:
151: return defaultMep != DEFAULT_MEP_EDEFAULT;
152: }
153: return super .eIsSet(featureID);
154: }
155:
156: /**
157: * <!-- begin-user-doc -->
158: * <!-- end-user-doc -->
159: * @generated
160: */
161: public String toString() {
162: if (eIsProxy())
163: return super .toString();
164:
165: StringBuffer result = new StringBuffer(super .toString());
166: result.append(" (defaultMep: ");
167: result.append(defaultMep);
168: result.append(')');
169: return result.toString();
170: }
171:
172: } //ConsumerImpl
|