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.PropertyObject;
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>Property Object</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.PropertyObjectImpl#getName <em>Name</em>}</li>
026: * <li>{@link com.bostechcorp.cbesb.ui.componentflow.componentFlowEditor.impl.PropertyObjectImpl#getValue <em>Value</em>}</li>
027: * </ul>
028: * </p>
029: *
030: * @generated
031: */
032: public class PropertyObjectImpl extends EObjectImpl implements
033: PropertyObject {
034: /**
035: * <!-- begin-user-doc -->
036: * <!-- end-user-doc -->
037: * @generated
038: */
039: public static final String copyright = "Copyright, Bostech Corp.";
040:
041: /**
042: * The default value of the '{@link #getName() <em>Name</em>}' attribute.
043: * <!-- begin-user-doc -->
044: * <!-- end-user-doc -->
045: * @see #getName()
046: * @generated
047: * @ordered
048: */
049: protected static final String NAME_EDEFAULT = null;
050:
051: /**
052: * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
053: * <!-- begin-user-doc -->
054: * <!-- end-user-doc -->
055: * @see #getName()
056: * @generated
057: * @ordered
058: */
059: protected String name = NAME_EDEFAULT;
060:
061: /**
062: * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
063: * <!-- begin-user-doc -->
064: * <!-- end-user-doc -->
065: * @see #getValue()
066: * @generated
067: * @ordered
068: */
069: protected static final String VALUE_EDEFAULT = null;
070:
071: /**
072: * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
073: * <!-- begin-user-doc -->
074: * <!-- end-user-doc -->
075: * @see #getValue()
076: * @generated
077: * @ordered
078: */
079: protected String value = VALUE_EDEFAULT;
080:
081: /**
082: * <!-- begin-user-doc -->
083: * <!-- end-user-doc -->
084: * @generated
085: */
086: protected PropertyObjectImpl() {
087: super ();
088: }
089:
090: /**
091: * <!-- begin-user-doc -->
092: * <!-- end-user-doc -->
093: * @generated
094: */
095: protected EClass eStaticClass() {
096: return componentflowPackage.Literals.PROPERTY_OBJECT;
097: }
098:
099: /**
100: * <!-- begin-user-doc -->
101: * <!-- end-user-doc -->
102: * @generated
103: */
104: public String getName() {
105: return name;
106: }
107:
108: /**
109: * <!-- begin-user-doc -->
110: * <!-- end-user-doc -->
111: * @generated
112: */
113: public void setName(String newName) {
114: String oldName = name;
115: name = newName;
116: if (eNotificationRequired())
117: eNotify(new ENotificationImpl(this , Notification.SET,
118: componentflowPackage.PROPERTY_OBJECT__NAME,
119: oldName, name));
120: }
121:
122: /**
123: * <!-- begin-user-doc -->
124: * <!-- end-user-doc -->
125: * @generated
126: */
127: public String getValue() {
128: return value;
129: }
130:
131: /**
132: * <!-- begin-user-doc -->
133: * <!-- end-user-doc -->
134: * @generated
135: */
136: public void setValue(String newValue) {
137: String oldValue = value;
138: value = newValue;
139: if (eNotificationRequired())
140: eNotify(new ENotificationImpl(this , Notification.SET,
141: componentflowPackage.PROPERTY_OBJECT__VALUE,
142: oldValue, value));
143: }
144:
145: /**
146: * <!-- begin-user-doc -->
147: * <!-- end-user-doc -->
148: * @generated
149: */
150: public Object eGet(int featureID, boolean resolve, boolean coreType) {
151: switch (featureID) {
152: case componentflowPackage.PROPERTY_OBJECT__NAME:
153: return getName();
154: case componentflowPackage.PROPERTY_OBJECT__VALUE:
155: return getValue();
156: }
157: return super .eGet(featureID, resolve, coreType);
158: }
159:
160: /**
161: * <!-- begin-user-doc -->
162: * <!-- end-user-doc -->
163: * @generated
164: */
165: public void eSet(int featureID, Object newValue) {
166: switch (featureID) {
167: case componentflowPackage.PROPERTY_OBJECT__NAME:
168: setName((String) newValue);
169: return;
170: case componentflowPackage.PROPERTY_OBJECT__VALUE:
171: setValue((String) newValue);
172: return;
173: }
174: super .eSet(featureID, newValue);
175: }
176:
177: /**
178: * <!-- begin-user-doc -->
179: * <!-- end-user-doc -->
180: * @generated
181: */
182: public void eUnset(int featureID) {
183: switch (featureID) {
184: case componentflowPackage.PROPERTY_OBJECT__NAME:
185: setName(NAME_EDEFAULT);
186: return;
187: case componentflowPackage.PROPERTY_OBJECT__VALUE:
188: setValue(VALUE_EDEFAULT);
189: return;
190: }
191: super .eUnset(featureID);
192: }
193:
194: /**
195: * <!-- begin-user-doc -->
196: * <!-- end-user-doc -->
197: * @generated
198: */
199: public boolean eIsSet(int featureID) {
200: switch (featureID) {
201: case componentflowPackage.PROPERTY_OBJECT__NAME:
202: return NAME_EDEFAULT == null ? name != null
203: : !NAME_EDEFAULT.equals(name);
204: case componentflowPackage.PROPERTY_OBJECT__VALUE:
205: return VALUE_EDEFAULT == null ? value != null
206: : !VALUE_EDEFAULT.equals(value);
207: }
208: return super .eIsSet(featureID);
209: }
210:
211: /**
212: * <!-- begin-user-doc -->
213: * <!-- end-user-doc -->
214: * @generated
215: */
216: public String toString() {
217: if (eIsProxy())
218: return super .toString();
219:
220: StringBuffer result = new StringBuffer(super .toString());
221: result.append(" (Name: ");
222: result.append(name);
223: result.append(", Value: ");
224: result.append(value);
225: result.append(')');
226: return result.toString();
227: }
228:
229: } //PropertyObjectImpl
|