KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > impl > JdbcTargetParameterTypeImpl


1 /**
2  * <copyright>
3  * </copyright>
4  *
5  * $Id$
6  */

7 package Olj.impl;
8
9 import Olj.JdbcTargetParameterType;
10 import Olj.OljPackage;
11
12 import org.eclipse.emf.common.notify.Notification;
13
14 import org.eclipse.emf.ecore.EClass;
15 import org.eclipse.emf.ecore.EStructuralFeature;
16
17 import org.eclipse.emf.ecore.impl.ENotificationImpl;
18 import org.eclipse.emf.ecore.impl.EObjectImpl;
19
20 /**
21  * <!-- begin-user-doc -->
22  * An implementation of the model object '<em><b>Jdbc Target Parameter Type</b></em>'.
23  * <!-- end-user-doc -->
24  * <p>
25  * The following features are implemented:
26  * <ul>
27  * <li>{@link Olj.impl.JdbcTargetParameterTypeImpl#getName <em>Name</em>}</li>
28  * <li>{@link Olj.impl.JdbcTargetParameterTypeImpl#getValue <em>Value</em>}</li>
29  * </ul>
30  * </p>
31  *
32  * @generated
33  */

34 public class JdbcTargetParameterTypeImpl extends EObjectImpl implements JdbcTargetParameterType {
35     /**
36      * The default value of the '{@link #getName() <em>Name</em>}' attribute.
37      * <!-- begin-user-doc -->
38      * <!-- end-user-doc -->
39      * @see #getName()
40      * @generated
41      * @ordered
42      */

43     protected static final String JavaDoc NAME_EDEFAULT = null;
44
45     /**
46      * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
47      * <!-- begin-user-doc -->
48      * <!-- end-user-doc -->
49      * @see #getName()
50      * @generated
51      * @ordered
52      */

53     protected String JavaDoc name = NAME_EDEFAULT;
54
55     /**
56      * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
57      * <!-- begin-user-doc -->
58      * <!-- end-user-doc -->
59      * @see #getValue()
60      * @generated
61      * @ordered
62      */

63     protected static final String JavaDoc VALUE_EDEFAULT = null;
64
65     /**
66      * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
67      * <!-- begin-user-doc -->
68      * <!-- end-user-doc -->
69      * @see #getValue()
70      * @generated
71      * @ordered
72      */

73     protected String JavaDoc value = VALUE_EDEFAULT;
74
75     /**
76      * <!-- begin-user-doc -->
77      * <!-- end-user-doc -->
78      * @generated
79      */

80     protected JdbcTargetParameterTypeImpl() {
81         super();
82     }
83
84     /**
85      * <!-- begin-user-doc -->
86      * <!-- end-user-doc -->
87      * @generated
88      */

89     protected EClass eStaticClass() {
90         return OljPackage.eINSTANCE.getJdbcTargetParameterType();
91     }
92
93     /**
94      * <!-- begin-user-doc -->
95      * <!-- end-user-doc -->
96      * @generated
97      */

98     public String JavaDoc getName() {
99         return name;
100     }
101
102     /**
103      * <!-- begin-user-doc -->
104      * <!-- end-user-doc -->
105      * @generated
106      */

107     public void setName(String JavaDoc newName) {
108         String JavaDoc oldName = name;
109         name = newName;
110         if (eNotificationRequired())
111             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_TARGET_PARAMETER_TYPE__NAME, oldName, name));
112     }
113
114     /**
115      * <!-- begin-user-doc -->
116      * <!-- end-user-doc -->
117      * @generated
118      */

119     public String JavaDoc getValue() {
120         return value;
121     }
122
123     /**
124      * <!-- begin-user-doc -->
125      * <!-- end-user-doc -->
126      * @generated
127      */

128     public void setValue(String JavaDoc newValue) {
129         String JavaDoc oldValue = value;
130         value = newValue;
131         if (eNotificationRequired())
132             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_TARGET_PARAMETER_TYPE__VALUE, oldValue, value));
133     }
134
135     /**
136      * <!-- begin-user-doc -->
137      * <!-- end-user-doc -->
138      * @generated
139      */

140     public Object JavaDoc eGet(EStructuralFeature eFeature, boolean resolve) {
141         switch (eDerivedStructuralFeatureID(eFeature)) {
142             case OljPackage.JDBC_TARGET_PARAMETER_TYPE__NAME:
143                 return getName();
144             case OljPackage.JDBC_TARGET_PARAMETER_TYPE__VALUE:
145                 return getValue();
146         }
147         return eDynamicGet(eFeature, resolve);
148     }
149
150     /**
151      * <!-- begin-user-doc -->
152      * <!-- end-user-doc -->
153      * @generated
154      */

155     public void eSet(EStructuralFeature eFeature, Object JavaDoc newValue) {
156         switch (eDerivedStructuralFeatureID(eFeature)) {
157             case OljPackage.JDBC_TARGET_PARAMETER_TYPE__NAME:
158                 setName((String JavaDoc)newValue);
159                 return;
160             case OljPackage.JDBC_TARGET_PARAMETER_TYPE__VALUE:
161                 setValue((String JavaDoc)newValue);
162                 return;
163         }
164         eDynamicSet(eFeature, newValue);
165     }
166
167     /**
168      * <!-- begin-user-doc -->
169      * <!-- end-user-doc -->
170      * @generated
171      */

172     public void eUnset(EStructuralFeature eFeature) {
173         switch (eDerivedStructuralFeatureID(eFeature)) {
174             case OljPackage.JDBC_TARGET_PARAMETER_TYPE__NAME:
175                 setName(NAME_EDEFAULT);
176                 return;
177             case OljPackage.JDBC_TARGET_PARAMETER_TYPE__VALUE:
178                 setValue(VALUE_EDEFAULT);
179                 return;
180         }
181         eDynamicUnset(eFeature);
182     }
183
184     /**
185      * <!-- begin-user-doc -->
186      * <!-- end-user-doc -->
187      * @generated
188      */

189     public boolean eIsSet(EStructuralFeature eFeature) {
190         switch (eDerivedStructuralFeatureID(eFeature)) {
191             case OljPackage.JDBC_TARGET_PARAMETER_TYPE__NAME:
192                 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
193             case OljPackage.JDBC_TARGET_PARAMETER_TYPE__VALUE:
194                 return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
195         }
196         return eDynamicIsSet(eFeature);
197     }
198
199     /**
200      * <!-- begin-user-doc -->
201      * <!-- end-user-doc -->
202      * @generated
203      */

204     public String JavaDoc toString() {
205         if (eIsProxy()) return super.toString();
206
207         StringBuffer JavaDoc result = new StringBuffer JavaDoc(super.toString());
208         result.append(" (name: ");
209         result.append(name);
210         result.append(", value: ");
211         result.append(value);
212         result.append(')');
213         return result.toString();
214     }
215
216 } //JdbcTargetParameterTypeImpl
217
Popular Tags