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.EndPoint;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.RecordTypeType;
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>End Point</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.EndPointImpl#getEndPointName <em>End Point Name</em>}</li>
027: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.EndPointImpl#getCharset <em>Charset</em>}</li>
028: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.EndPointImpl#getRecordType <em>Record Type</em>}</li>
029: * </ul>
030: * </p>
031: *
032: * @generated
033: */
034: public class EndPointImpl extends EObjectImpl implements EndPoint {
035: /**
036: * <!-- begin-user-doc -->
037: * <!-- end-user-doc -->
038: * @generated
039: */
040: public static final String copyright = "Copyright, Bostech Corp.";
041:
042: /**
043: * The default value of the '{@link #getEndPointName() <em>End Point Name</em>}' attribute.
044: * <!-- begin-user-doc -->
045: * <!-- end-user-doc -->
046: * @see #getEndPointName()
047: * @generated
048: * @ordered
049: */
050: protected static final String END_POINT_NAME_EDEFAULT = null;
051:
052: /**
053: * The cached value of the '{@link #getEndPointName() <em>End Point Name</em>}' attribute.
054: * <!-- begin-user-doc -->
055: * <!-- end-user-doc -->
056: * @see #getEndPointName()
057: * @generated
058: * @ordered
059: */
060: protected String endPointName = END_POINT_NAME_EDEFAULT;
061:
062: /**
063: * The default value of the '{@link #getCharset() <em>Charset</em>}' attribute.
064: * <!-- begin-user-doc -->
065: * <!-- end-user-doc -->
066: * @see #getCharset()
067: * @generated
068: * @ordered
069: */
070: protected static final String CHARSET_EDEFAULT = "SYSTEM_DEFAULT";
071:
072: /**
073: * The cached value of the '{@link #getCharset() <em>Charset</em>}' attribute.
074: * <!-- begin-user-doc -->
075: * <!-- end-user-doc -->
076: * @see #getCharset()
077: * @generated
078: * @ordered
079: */
080: protected String charset = CHARSET_EDEFAULT;
081:
082: /**
083: * The default value of the '{@link #getRecordType() <em>Record Type</em>}' attribute.
084: * <!-- begin-user-doc -->
085: * <!-- end-user-doc -->
086: * @see #getRecordType()
087: * @generated
088: * @ordered
089: */
090: protected static final RecordTypeType RECORD_TYPE_EDEFAULT = RecordTypeType.STRING_LITERAL;
091:
092: /**
093: * The cached value of the '{@link #getRecordType() <em>Record Type</em>}' attribute.
094: * <!-- begin-user-doc -->
095: * <!-- end-user-doc -->
096: * @see #getRecordType()
097: * @generated
098: * @ordered
099: */
100: protected RecordTypeType recordType = RECORD_TYPE_EDEFAULT;
101:
102: /**
103: * <!-- begin-user-doc -->
104: * <!-- end-user-doc -->
105: * @generated
106: */
107: protected EndPointImpl() {
108: super ();
109: }
110:
111: /**
112: * <!-- begin-user-doc -->
113: * <!-- end-user-doc -->
114: * @generated
115: */
116: protected EClass eStaticClass() {
117: return componentflowPackage.Literals.END_POINT;
118: }
119:
120: /**
121: * <!-- begin-user-doc -->
122: * <!-- end-user-doc -->
123: * @generated
124: */
125: public String getEndPointName() {
126: return endPointName;
127: }
128:
129: /**
130: * <!-- begin-user-doc -->
131: * <!-- end-user-doc -->
132: * @generated
133: */
134: public void setEndPointName(String newEndPointName) {
135: String oldEndPointName = endPointName;
136: endPointName = newEndPointName;
137: if (eNotificationRequired())
138: eNotify(new ENotificationImpl(this , Notification.SET,
139: componentflowPackage.END_POINT__END_POINT_NAME,
140: oldEndPointName, endPointName));
141: }
142:
143: /**
144: * <!-- begin-user-doc -->
145: * <!-- end-user-doc -->
146: * @generated
147: */
148: public String getCharset() {
149: return charset;
150: }
151:
152: /**
153: * <!-- begin-user-doc -->
154: * <!-- end-user-doc -->
155: * @generated
156: */
157: public void setCharset(String newCharset) {
158: String oldCharset = charset;
159: charset = newCharset;
160: if (eNotificationRequired())
161: eNotify(new ENotificationImpl(this , Notification.SET,
162: componentflowPackage.END_POINT__CHARSET,
163: oldCharset, charset));
164: }
165:
166: /**
167: * <!-- begin-user-doc -->
168: * <!-- end-user-doc -->
169: * @generated
170: */
171: public RecordTypeType getRecordType() {
172: return recordType;
173: }
174:
175: /**
176: * <!-- begin-user-doc -->
177: * <!-- end-user-doc -->
178: * @generated
179: */
180: public void setRecordType(RecordTypeType newRecordType) {
181: RecordTypeType oldRecordType = recordType;
182: recordType = newRecordType == null ? RECORD_TYPE_EDEFAULT
183: : newRecordType;
184: if (eNotificationRequired())
185: eNotify(new ENotificationImpl(this , Notification.SET,
186: componentflowPackage.END_POINT__RECORD_TYPE,
187: oldRecordType, recordType));
188: }
189:
190: /**
191: * <!-- begin-user-doc -->
192: * <!-- end-user-doc -->
193: * @generated
194: */
195: public Object eGet(int featureID, boolean resolve, boolean coreType) {
196: switch (featureID) {
197: case componentflowPackage.END_POINT__END_POINT_NAME:
198: return getEndPointName();
199: case componentflowPackage.END_POINT__CHARSET:
200: return getCharset();
201: case componentflowPackage.END_POINT__RECORD_TYPE:
202: return getRecordType();
203: }
204: return super .eGet(featureID, resolve, coreType);
205: }
206:
207: /**
208: * <!-- begin-user-doc -->
209: * <!-- end-user-doc -->
210: * @generated
211: */
212: public void eSet(int featureID, Object newValue) {
213: switch (featureID) {
214: case componentflowPackage.END_POINT__END_POINT_NAME:
215: setEndPointName((String) newValue);
216: return;
217: case componentflowPackage.END_POINT__CHARSET:
218: setCharset((String) newValue);
219: return;
220: case componentflowPackage.END_POINT__RECORD_TYPE:
221: setRecordType((RecordTypeType) newValue);
222: return;
223: }
224: super .eSet(featureID, newValue);
225: }
226:
227: /**
228: * <!-- begin-user-doc -->
229: * <!-- end-user-doc -->
230: * @generated
231: */
232: public void eUnset(int featureID) {
233: switch (featureID) {
234: case componentflowPackage.END_POINT__END_POINT_NAME:
235: setEndPointName(END_POINT_NAME_EDEFAULT);
236: return;
237: case componentflowPackage.END_POINT__CHARSET:
238: setCharset(CHARSET_EDEFAULT);
239: return;
240: case componentflowPackage.END_POINT__RECORD_TYPE:
241: setRecordType(RECORD_TYPE_EDEFAULT);
242: return;
243: }
244: super .eUnset(featureID);
245: }
246:
247: /**
248: * <!-- begin-user-doc -->
249: * <!-- end-user-doc -->
250: * @generated
251: */
252: public boolean eIsSet(int featureID) {
253: switch (featureID) {
254: case componentflowPackage.END_POINT__END_POINT_NAME:
255: return END_POINT_NAME_EDEFAULT == null ? endPointName != null
256: : !END_POINT_NAME_EDEFAULT.equals(endPointName);
257: case componentflowPackage.END_POINT__CHARSET:
258: return CHARSET_EDEFAULT == null ? charset != null
259: : !CHARSET_EDEFAULT.equals(charset);
260: case componentflowPackage.END_POINT__RECORD_TYPE:
261: return recordType != RECORD_TYPE_EDEFAULT;
262: }
263: return super .eIsSet(featureID);
264: }
265:
266: /**
267: * <!-- begin-user-doc -->
268: * <!-- end-user-doc -->
269: * @generated
270: */
271: public String toString() {
272: if (eIsProxy())
273: return super .toString();
274:
275: StringBuffer result = new StringBuffer(super .toString());
276: result.append(" (endPointName: ");
277: result.append(endPointName);
278: result.append(", charset: ");
279: result.append(charset);
280: result.append(", recordType: ");
281: result.append(recordType);
282: result.append(')');
283: return result.toString();
284: }
285:
286: } //EndPointImpl
|