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