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.CommonSchedule;
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: import org.eclipse.emf.ecore.impl.EObjectImpl;
017:
018: /**
019: * <!-- begin-user-doc -->
020: * An implementation of the model object '<em><b>Common Schedule</b></em>'.
021: * <!-- end-user-doc -->
022: * <p>
023: * The following features are implemented:
024: * <ul>
025: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CommonScheduleImpl#getDayofMonth <em>Dayof Month</em>}</li>
026: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CommonScheduleImpl#getMonth <em>Month</em>}</li>
027: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CommonScheduleImpl#getDayofWeek <em>Dayof Week</em>}</li>
028: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.CommonScheduleImpl#getHolidaySchedule <em>Holiday Schedule</em>}</li>
029: * </ul>
030: * </p>
031: *
032: * @generated
033: */
034: public class CommonScheduleImpl extends EObjectImpl implements
035: CommonSchedule {
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 #getDayofMonth() <em>Dayof Month</em>}' attribute.
045: * <!-- begin-user-doc -->
046: * <!-- end-user-doc -->
047: * @see #getDayofMonth()
048: * @generated
049: * @ordered
050: */
051: protected static final String DAYOF_MONTH_EDEFAULT = null;
052:
053: /**
054: * The cached value of the '{@link #getDayofMonth() <em>Dayof Month</em>}' attribute.
055: * <!-- begin-user-doc -->
056: * <!-- end-user-doc -->
057: * @see #getDayofMonth()
058: * @generated
059: * @ordered
060: */
061: protected String dayofMonth = DAYOF_MONTH_EDEFAULT;
062:
063: /**
064: * The default value of the '{@link #getMonth() <em>Month</em>}' attribute.
065: * <!-- begin-user-doc -->
066: * <!-- end-user-doc -->
067: * @see #getMonth()
068: * @generated
069: * @ordered
070: */
071: protected static final String MONTH_EDEFAULT = null;
072:
073: /**
074: * The cached value of the '{@link #getMonth() <em>Month</em>}' attribute.
075: * <!-- begin-user-doc -->
076: * <!-- end-user-doc -->
077: * @see #getMonth()
078: * @generated
079: * @ordered
080: */
081: protected String month = MONTH_EDEFAULT;
082:
083: /**
084: * The default value of the '{@link #getDayofWeek() <em>Dayof Week</em>}' attribute.
085: * <!-- begin-user-doc -->
086: * <!-- end-user-doc -->
087: * @see #getDayofWeek()
088: * @generated
089: * @ordered
090: */
091: protected static final String DAYOF_WEEK_EDEFAULT = null;
092:
093: /**
094: * The cached value of the '{@link #getDayofWeek() <em>Dayof Week</em>}' attribute.
095: * <!-- begin-user-doc -->
096: * <!-- end-user-doc -->
097: * @see #getDayofWeek()
098: * @generated
099: * @ordered
100: */
101: protected String dayofWeek = DAYOF_WEEK_EDEFAULT;
102:
103: /**
104: * The default value of the '{@link #getHolidaySchedule() <em>Holiday Schedule</em>}' attribute.
105: * <!-- begin-user-doc -->
106: * <!-- end-user-doc -->
107: * @see #getHolidaySchedule()
108: * @generated
109: * @ordered
110: */
111: protected static final String HOLIDAY_SCHEDULE_EDEFAULT = null;
112:
113: /**
114: * The cached value of the '{@link #getHolidaySchedule() <em>Holiday Schedule</em>}' attribute.
115: * <!-- begin-user-doc -->
116: * <!-- end-user-doc -->
117: * @see #getHolidaySchedule()
118: * @generated
119: * @ordered
120: */
121: protected String holidaySchedule = HOLIDAY_SCHEDULE_EDEFAULT;
122:
123: /**
124: * <!-- begin-user-doc -->
125: * <!-- end-user-doc -->
126: * @generated
127: */
128: protected CommonScheduleImpl() {
129: super ();
130: }
131:
132: /**
133: * <!-- begin-user-doc -->
134: * <!-- end-user-doc -->
135: * @generated
136: */
137: protected EClass eStaticClass() {
138: return componentflowPackage.Literals.COMMON_SCHEDULE;
139: }
140:
141: /**
142: * <!-- begin-user-doc -->
143: * <!-- end-user-doc -->
144: * @generated
145: */
146: public String getDayofMonth() {
147: return dayofMonth;
148: }
149:
150: /**
151: * <!-- begin-user-doc -->
152: * <!-- end-user-doc -->
153: * @generated
154: */
155: public void setDayofMonth(String newDayofMonth) {
156: String oldDayofMonth = dayofMonth;
157: dayofMonth = newDayofMonth;
158: if (eNotificationRequired())
159: eNotify(new ENotificationImpl(this , Notification.SET,
160: componentflowPackage.COMMON_SCHEDULE__DAYOF_MONTH,
161: oldDayofMonth, dayofMonth));
162: }
163:
164: /**
165: * <!-- begin-user-doc -->
166: * <!-- end-user-doc -->
167: * @generated
168: */
169: public String getMonth() {
170: return month;
171: }
172:
173: /**
174: * <!-- begin-user-doc -->
175: * <!-- end-user-doc -->
176: * @generated
177: */
178: public void setMonth(String newMonth) {
179: String oldMonth = month;
180: month = newMonth;
181: if (eNotificationRequired())
182: eNotify(new ENotificationImpl(this , Notification.SET,
183: componentflowPackage.COMMON_SCHEDULE__MONTH,
184: oldMonth, month));
185: }
186:
187: /**
188: * <!-- begin-user-doc -->
189: * <!-- end-user-doc -->
190: * @generated
191: */
192: public String getDayofWeek() {
193: return dayofWeek;
194: }
195:
196: /**
197: * <!-- begin-user-doc -->
198: * <!-- end-user-doc -->
199: * @generated
200: */
201: public void setDayofWeek(String newDayofWeek) {
202: String oldDayofWeek = dayofWeek;
203: dayofWeek = newDayofWeek;
204: if (eNotificationRequired())
205: eNotify(new ENotificationImpl(this , Notification.SET,
206: componentflowPackage.COMMON_SCHEDULE__DAYOF_WEEK,
207: oldDayofWeek, dayofWeek));
208: }
209:
210: /**
211: * <!-- begin-user-doc -->
212: * <!-- end-user-doc -->
213: * @generated
214: */
215: public String getHolidaySchedule() {
216: return holidaySchedule;
217: }
218:
219: /**
220: * <!-- begin-user-doc -->
221: * <!-- end-user-doc -->
222: * @generated
223: */
224: public void setHolidaySchedule(String newHolidaySchedule) {
225: String oldHolidaySchedule = holidaySchedule;
226: holidaySchedule = newHolidaySchedule;
227: if (eNotificationRequired())
228: eNotify(new ENotificationImpl(
229: this ,
230: Notification.SET,
231: componentflowPackage.COMMON_SCHEDULE__HOLIDAY_SCHEDULE,
232: oldHolidaySchedule, holidaySchedule));
233: }
234:
235: /**
236: * <!-- begin-user-doc -->
237: * <!-- end-user-doc -->
238: * @generated
239: */
240: public Object eGet(int featureID, boolean resolve, boolean coreType) {
241: switch (featureID) {
242: case componentflowPackage.COMMON_SCHEDULE__DAYOF_MONTH:
243: return getDayofMonth();
244: case componentflowPackage.COMMON_SCHEDULE__MONTH:
245: return getMonth();
246: case componentflowPackage.COMMON_SCHEDULE__DAYOF_WEEK:
247: return getDayofWeek();
248: case componentflowPackage.COMMON_SCHEDULE__HOLIDAY_SCHEDULE:
249: return getHolidaySchedule();
250: }
251: return super .eGet(featureID, resolve, coreType);
252: }
253:
254: /**
255: * <!-- begin-user-doc -->
256: * <!-- end-user-doc -->
257: * @generated
258: */
259: public void eSet(int featureID, Object newValue) {
260: switch (featureID) {
261: case componentflowPackage.COMMON_SCHEDULE__DAYOF_MONTH:
262: setDayofMonth((String) newValue);
263: return;
264: case componentflowPackage.COMMON_SCHEDULE__MONTH:
265: setMonth((String) newValue);
266: return;
267: case componentflowPackage.COMMON_SCHEDULE__DAYOF_WEEK:
268: setDayofWeek((String) newValue);
269: return;
270: case componentflowPackage.COMMON_SCHEDULE__HOLIDAY_SCHEDULE:
271: setHolidaySchedule((String) newValue);
272: return;
273: }
274: super .eSet(featureID, newValue);
275: }
276:
277: /**
278: * <!-- begin-user-doc -->
279: * <!-- end-user-doc -->
280: * @generated
281: */
282: public void eUnset(int featureID) {
283: switch (featureID) {
284: case componentflowPackage.COMMON_SCHEDULE__DAYOF_MONTH:
285: setDayofMonth(DAYOF_MONTH_EDEFAULT);
286: return;
287: case componentflowPackage.COMMON_SCHEDULE__MONTH:
288: setMonth(MONTH_EDEFAULT);
289: return;
290: case componentflowPackage.COMMON_SCHEDULE__DAYOF_WEEK:
291: setDayofWeek(DAYOF_WEEK_EDEFAULT);
292: return;
293: case componentflowPackage.COMMON_SCHEDULE__HOLIDAY_SCHEDULE:
294: setHolidaySchedule(HOLIDAY_SCHEDULE_EDEFAULT);
295: return;
296: }
297: super .eUnset(featureID);
298: }
299:
300: /**
301: * <!-- begin-user-doc -->
302: * <!-- end-user-doc -->
303: * @generated
304: */
305: public boolean eIsSet(int featureID) {
306: switch (featureID) {
307: case componentflowPackage.COMMON_SCHEDULE__DAYOF_MONTH:
308: return DAYOF_MONTH_EDEFAULT == null ? dayofMonth != null
309: : !DAYOF_MONTH_EDEFAULT.equals(dayofMonth);
310: case componentflowPackage.COMMON_SCHEDULE__MONTH:
311: return MONTH_EDEFAULT == null ? month != null
312: : !MONTH_EDEFAULT.equals(month);
313: case componentflowPackage.COMMON_SCHEDULE__DAYOF_WEEK:
314: return DAYOF_WEEK_EDEFAULT == null ? dayofWeek != null
315: : !DAYOF_WEEK_EDEFAULT.equals(dayofWeek);
316: case componentflowPackage.COMMON_SCHEDULE__HOLIDAY_SCHEDULE:
317: return HOLIDAY_SCHEDULE_EDEFAULT == null ? holidaySchedule != null
318: : !HOLIDAY_SCHEDULE_EDEFAULT
319: .equals(holidaySchedule);
320: }
321: return super .eIsSet(featureID);
322: }
323:
324: /**
325: * <!-- begin-user-doc -->
326: * <!-- end-user-doc -->
327: * @generated
328: */
329: public String toString() {
330: if (eIsProxy())
331: return super .toString();
332:
333: StringBuffer result = new StringBuffer(super .toString());
334: result.append(" (DayofMonth: ");
335: result.append(dayofMonth);
336: result.append(", Month: ");
337: result.append(month);
338: result.append(", DayofWeek: ");
339: result.append(dayofWeek);
340: result.append(", HolidaySchedule: ");
341: result.append(holidaySchedule);
342: result.append(')');
343: return result.toString();
344: }
345:
346: } //CommonScheduleImpl
|