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.ARSchedule;
009: import com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.componentflowPackage;
010:
011: import org.eclipse.emf.common.notify.Notification;
012:
013: import org.eclipse.emf.ecore.EClass;
014:
015: import org.eclipse.emf.ecore.impl.ENotificationImpl;
016:
017: /**
018: * <!-- begin-user-doc -->
019: * An implementation of the model object '<em><b>AR Schedule</b></em>'.
020: * <!-- end-user-doc -->
021: * <p>
022: * The following features are implemented:
023: * <ul>
024: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.ARScheduleImpl#getStartTime <em>Start Time</em>}</li>
025: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.ARScheduleImpl#getEndTime <em>End Time</em>}</li>
026: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.ARScheduleImpl#getRetryInterval <em>Retry Interval</em>}</li>
027: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.ARScheduleImpl#getSuccessNotification <em>Success Notification</em>}</li>
028: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.ARScheduleImpl#getFailureNotification <em>Failure Notification</em>}</li>
029: * </ul>
030: * </p>
031: *
032: * @generated
033: */
034: public class ARScheduleImpl extends CommonScheduleImpl implements
035: ARSchedule {
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 #getStartTime() <em>Start Time</em>}' attribute.
045: * <!-- begin-user-doc -->
046: * <!-- end-user-doc -->
047: * @see #getStartTime()
048: * @generated
049: * @ordered
050: */
051: protected static final String START_TIME_EDEFAULT = null;
052:
053: /**
054: * The cached value of the '{@link #getStartTime() <em>Start Time</em>}' attribute.
055: * <!-- begin-user-doc -->
056: * <!-- end-user-doc -->
057: * @see #getStartTime()
058: * @generated
059: * @ordered
060: */
061: protected String startTime = START_TIME_EDEFAULT;
062:
063: /**
064: * The default value of the '{@link #getEndTime() <em>End Time</em>}' attribute.
065: * <!-- begin-user-doc -->
066: * <!-- end-user-doc -->
067: * @see #getEndTime()
068: * @generated
069: * @ordered
070: */
071: protected static final String END_TIME_EDEFAULT = null;
072:
073: /**
074: * The cached value of the '{@link #getEndTime() <em>End Time</em>}' attribute.
075: * <!-- begin-user-doc -->
076: * <!-- end-user-doc -->
077: * @see #getEndTime()
078: * @generated
079: * @ordered
080: */
081: protected String endTime = END_TIME_EDEFAULT;
082:
083: /**
084: * The default value of the '{@link #getRetryInterval() <em>Retry Interval</em>}' attribute.
085: * <!-- begin-user-doc -->
086: * <!-- end-user-doc -->
087: * @see #getRetryInterval()
088: * @generated
089: * @ordered
090: */
091: protected static final int RETRY_INTERVAL_EDEFAULT = 0;
092:
093: /**
094: * The cached value of the '{@link #getRetryInterval() <em>Retry Interval</em>}' attribute.
095: * <!-- begin-user-doc -->
096: * <!-- end-user-doc -->
097: * @see #getRetryInterval()
098: * @generated
099: * @ordered
100: */
101: protected int retryInterval = RETRY_INTERVAL_EDEFAULT;
102:
103: /**
104: * The default value of the '{@link #getSuccessNotification() <em>Success Notification</em>}' attribute.
105: * <!-- begin-user-doc -->
106: * <!-- end-user-doc -->
107: * @see #getSuccessNotification()
108: * @generated
109: * @ordered
110: */
111: protected static final String SUCCESS_NOTIFICATION_EDEFAULT = null;
112:
113: /**
114: * The cached value of the '{@link #getSuccessNotification() <em>Success Notification</em>}' attribute.
115: * <!-- begin-user-doc -->
116: * <!-- end-user-doc -->
117: * @see #getSuccessNotification()
118: * @generated
119: * @ordered
120: */
121: protected String successNotification = SUCCESS_NOTIFICATION_EDEFAULT;
122:
123: /**
124: * The default value of the '{@link #getFailureNotification() <em>Failure Notification</em>}' attribute.
125: * <!-- begin-user-doc -->
126: * <!-- end-user-doc -->
127: * @see #getFailureNotification()
128: * @generated
129: * @ordered
130: */
131: protected static final String FAILURE_NOTIFICATION_EDEFAULT = null;
132:
133: /**
134: * The cached value of the '{@link #getFailureNotification() <em>Failure Notification</em>}' attribute.
135: * <!-- begin-user-doc -->
136: * <!-- end-user-doc -->
137: * @see #getFailureNotification()
138: * @generated
139: * @ordered
140: */
141: protected String failureNotification = FAILURE_NOTIFICATION_EDEFAULT;
142:
143: /**
144: * <!-- begin-user-doc -->
145: * <!-- end-user-doc -->
146: * @generated
147: */
148: protected ARScheduleImpl() {
149: super ();
150: }
151:
152: /**
153: * <!-- begin-user-doc -->
154: * <!-- end-user-doc -->
155: * @generated
156: */
157: protected EClass eStaticClass() {
158: return componentflowPackage.Literals.AR_SCHEDULE;
159: }
160:
161: /**
162: * <!-- begin-user-doc -->
163: * <!-- end-user-doc -->
164: * @generated
165: */
166: public String getStartTime() {
167: return startTime;
168: }
169:
170: /**
171: * <!-- begin-user-doc -->
172: * <!-- end-user-doc -->
173: * @generated
174: */
175: public void setStartTime(String newStartTime) {
176: String oldStartTime = startTime;
177: startTime = newStartTime;
178: if (eNotificationRequired())
179: eNotify(new ENotificationImpl(this , Notification.SET,
180: componentflowPackage.AR_SCHEDULE__START_TIME,
181: oldStartTime, startTime));
182: }
183:
184: /**
185: * <!-- begin-user-doc -->
186: * <!-- end-user-doc -->
187: * @generated
188: */
189: public String getEndTime() {
190: return endTime;
191: }
192:
193: /**
194: * <!-- begin-user-doc -->
195: * <!-- end-user-doc -->
196: * @generated
197: */
198: public void setEndTime(String newEndTime) {
199: String oldEndTime = endTime;
200: endTime = newEndTime;
201: if (eNotificationRequired())
202: eNotify(new ENotificationImpl(this , Notification.SET,
203: componentflowPackage.AR_SCHEDULE__END_TIME,
204: oldEndTime, endTime));
205: }
206:
207: /**
208: * <!-- begin-user-doc -->
209: * <!-- end-user-doc -->
210: * @generated
211: */
212: public int getRetryInterval() {
213: return retryInterval;
214: }
215:
216: /**
217: * <!-- begin-user-doc -->
218: * <!-- end-user-doc -->
219: * @generated
220: */
221: public void setRetryInterval(int newRetryInterval) {
222: int oldRetryInterval = retryInterval;
223: retryInterval = newRetryInterval;
224: if (eNotificationRequired())
225: eNotify(new ENotificationImpl(this , Notification.SET,
226: componentflowPackage.AR_SCHEDULE__RETRY_INTERVAL,
227: oldRetryInterval, retryInterval));
228: }
229:
230: /**
231: * <!-- begin-user-doc -->
232: * <!-- end-user-doc -->
233: * @generated
234: */
235: public String getSuccessNotification() {
236: return successNotification;
237: }
238:
239: /**
240: * <!-- begin-user-doc -->
241: * <!-- end-user-doc -->
242: * @generated
243: */
244: public void setSuccessNotification(String newSuccessNotification) {
245: String oldSuccessNotification = successNotification;
246: successNotification = newSuccessNotification;
247: if (eNotificationRequired())
248: eNotify(new ENotificationImpl(
249: this ,
250: Notification.SET,
251: componentflowPackage.AR_SCHEDULE__SUCCESS_NOTIFICATION,
252: oldSuccessNotification, successNotification));
253: }
254:
255: /**
256: * <!-- begin-user-doc -->
257: * <!-- end-user-doc -->
258: * @generated
259: */
260: public String getFailureNotification() {
261: return failureNotification;
262: }
263:
264: /**
265: * <!-- begin-user-doc -->
266: * <!-- end-user-doc -->
267: * @generated
268: */
269: public void setFailureNotification(String newFailureNotification) {
270: String oldFailureNotification = failureNotification;
271: failureNotification = newFailureNotification;
272: if (eNotificationRequired())
273: eNotify(new ENotificationImpl(
274: this ,
275: Notification.SET,
276: componentflowPackage.AR_SCHEDULE__FAILURE_NOTIFICATION,
277: oldFailureNotification, failureNotification));
278: }
279:
280: /**
281: * <!-- begin-user-doc -->
282: * <!-- end-user-doc -->
283: * @generated
284: */
285: public Object eGet(int featureID, boolean resolve, boolean coreType) {
286: switch (featureID) {
287: case componentflowPackage.AR_SCHEDULE__START_TIME:
288: return getStartTime();
289: case componentflowPackage.AR_SCHEDULE__END_TIME:
290: return getEndTime();
291: case componentflowPackage.AR_SCHEDULE__RETRY_INTERVAL:
292: return new Integer(getRetryInterval());
293: case componentflowPackage.AR_SCHEDULE__SUCCESS_NOTIFICATION:
294: return getSuccessNotification();
295: case componentflowPackage.AR_SCHEDULE__FAILURE_NOTIFICATION:
296: return getFailureNotification();
297: }
298: return super .eGet(featureID, resolve, coreType);
299: }
300:
301: /**
302: * <!-- begin-user-doc -->
303: * <!-- end-user-doc -->
304: * @generated
305: */
306: public void eSet(int featureID, Object newValue) {
307: switch (featureID) {
308: case componentflowPackage.AR_SCHEDULE__START_TIME:
309: setStartTime((String) newValue);
310: return;
311: case componentflowPackage.AR_SCHEDULE__END_TIME:
312: setEndTime((String) newValue);
313: return;
314: case componentflowPackage.AR_SCHEDULE__RETRY_INTERVAL:
315: setRetryInterval(((Integer) newValue).intValue());
316: return;
317: case componentflowPackage.AR_SCHEDULE__SUCCESS_NOTIFICATION:
318: setSuccessNotification((String) newValue);
319: return;
320: case componentflowPackage.AR_SCHEDULE__FAILURE_NOTIFICATION:
321: setFailureNotification((String) newValue);
322: return;
323: }
324: super .eSet(featureID, newValue);
325: }
326:
327: /**
328: * <!-- begin-user-doc -->
329: * <!-- end-user-doc -->
330: * @generated
331: */
332: public void eUnset(int featureID) {
333: switch (featureID) {
334: case componentflowPackage.AR_SCHEDULE__START_TIME:
335: setStartTime(START_TIME_EDEFAULT);
336: return;
337: case componentflowPackage.AR_SCHEDULE__END_TIME:
338: setEndTime(END_TIME_EDEFAULT);
339: return;
340: case componentflowPackage.AR_SCHEDULE__RETRY_INTERVAL:
341: setRetryInterval(RETRY_INTERVAL_EDEFAULT);
342: return;
343: case componentflowPackage.AR_SCHEDULE__SUCCESS_NOTIFICATION:
344: setSuccessNotification(SUCCESS_NOTIFICATION_EDEFAULT);
345: return;
346: case componentflowPackage.AR_SCHEDULE__FAILURE_NOTIFICATION:
347: setFailureNotification(FAILURE_NOTIFICATION_EDEFAULT);
348: return;
349: }
350: super .eUnset(featureID);
351: }
352:
353: /**
354: * <!-- begin-user-doc -->
355: * <!-- end-user-doc -->
356: * @generated
357: */
358: public boolean eIsSet(int featureID) {
359: switch (featureID) {
360: case componentflowPackage.AR_SCHEDULE__START_TIME:
361: return START_TIME_EDEFAULT == null ? startTime != null
362: : !START_TIME_EDEFAULT.equals(startTime);
363: case componentflowPackage.AR_SCHEDULE__END_TIME:
364: return END_TIME_EDEFAULT == null ? endTime != null
365: : !END_TIME_EDEFAULT.equals(endTime);
366: case componentflowPackage.AR_SCHEDULE__RETRY_INTERVAL:
367: return retryInterval != RETRY_INTERVAL_EDEFAULT;
368: case componentflowPackage.AR_SCHEDULE__SUCCESS_NOTIFICATION:
369: return SUCCESS_NOTIFICATION_EDEFAULT == null ? successNotification != null
370: : !SUCCESS_NOTIFICATION_EDEFAULT
371: .equals(successNotification);
372: case componentflowPackage.AR_SCHEDULE__FAILURE_NOTIFICATION:
373: return FAILURE_NOTIFICATION_EDEFAULT == null ? failureNotification != null
374: : !FAILURE_NOTIFICATION_EDEFAULT
375: .equals(failureNotification);
376: }
377: return super .eIsSet(featureID);
378: }
379:
380: /**
381: * <!-- begin-user-doc -->
382: * <!-- end-user-doc -->
383: * @generated NOT
384: */
385: public String toString() {
386: if (eIsProxy())
387: return super .toString();
388: StringBuffer result = new StringBuffer("");
389: result.append(" (StartTime: ");
390: result.append(startTime);
391: result.append(", EndTime: ");
392: result.append(endTime);
393: result.append(", RetryInterval: ");
394: result.append(retryInterval);
395: result.append(", SuccessNotification: ");
396: result.append(successNotification);
397: result.append(", FailureNotification: ");
398: result.append(failureNotification);
399: result.append(')');
400: return result.toString();
401: }
402:
403: } //ARScheduleImpl
|