KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > impl > JdbcParametersTypeImpl


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

7 package Olj.impl;
8
9 import Olj.JdbcParametersType;
10 import Olj.JdbcSourceParametersType;
11 import Olj.JdbcSourceTargetParametersType;
12 import Olj.JdbcTargetParametersType;
13 import Olj.OljPackage;
14
15 import org.eclipse.emf.common.notify.Notification;
16 import org.eclipse.emf.common.notify.NotificationChain;
17
18 import org.eclipse.emf.ecore.EClass;
19 import org.eclipse.emf.ecore.EStructuralFeature;
20 import org.eclipse.emf.ecore.InternalEObject;
21
22 import org.eclipse.emf.ecore.impl.ENotificationImpl;
23 import org.eclipse.emf.ecore.impl.EObjectImpl;
24
25 /**
26  * <!-- begin-user-doc -->
27  * An implementation of the model object '<em><b>Jdbc Parameters Type</b></em>'.
28  * <!-- end-user-doc -->
29  * <p>
30  * The following features are implemented:
31  * <ul>
32  * <li>{@link Olj.impl.JdbcParametersTypeImpl#getJdbcSourceTargetParameters <em>Jdbc Source Target Parameters</em>}</li>
33  * <li>{@link Olj.impl.JdbcParametersTypeImpl#getJdbcSourceParameters <em>Jdbc Source Parameters</em>}</li>
34  * <li>{@link Olj.impl.JdbcParametersTypeImpl#getJdbcTargetParameters <em>Jdbc Target Parameters</em>}</li>
35  * </ul>
36  * </p>
37  *
38  * @generated
39  */

40 public class JdbcParametersTypeImpl extends EObjectImpl implements JdbcParametersType {
41     /**
42      * The cached value of the '{@link #getJdbcSourceTargetParameters() <em>Jdbc Source Target Parameters</em>}' containment reference.
43      * <!-- begin-user-doc -->
44      * <!-- end-user-doc -->
45      * @see #getJdbcSourceTargetParameters()
46      * @generated
47      * @ordered
48      */

49     protected JdbcSourceTargetParametersType jdbcSourceTargetParameters = null;
50
51     /**
52      * The cached value of the '{@link #getJdbcSourceParameters() <em>Jdbc Source Parameters</em>}' containment reference.
53      * <!-- begin-user-doc -->
54      * <!-- end-user-doc -->
55      * @see #getJdbcSourceParameters()
56      * @generated
57      * @ordered
58      */

59     protected JdbcSourceParametersType jdbcSourceParameters = null;
60
61     /**
62      * The cached value of the '{@link #getJdbcTargetParameters() <em>Jdbc Target Parameters</em>}' containment reference.
63      * <!-- begin-user-doc -->
64      * <!-- end-user-doc -->
65      * @see #getJdbcTargetParameters()
66      * @generated
67      * @ordered
68      */

69     protected JdbcTargetParametersType jdbcTargetParameters = null;
70
71     /**
72      * <!-- begin-user-doc -->
73      * <!-- end-user-doc -->
74      * @generated
75      */

76     protected JdbcParametersTypeImpl() {
77         super();
78     }
79
80     /**
81      * <!-- begin-user-doc -->
82      * <!-- end-user-doc -->
83      * @generated
84      */

85     protected EClass eStaticClass() {
86         return OljPackage.eINSTANCE.getJdbcParametersType();
87     }
88
89     /**
90      * <!-- begin-user-doc -->
91      * <!-- end-user-doc -->
92      * @generated
93      */

94     public JdbcSourceTargetParametersType getJdbcSourceTargetParameters() {
95         return jdbcSourceTargetParameters;
96     }
97
98     /**
99      * <!-- begin-user-doc -->
100      * <!-- end-user-doc -->
101      * @generated
102      */

103     public NotificationChain basicSetJdbcSourceTargetParameters(JdbcSourceTargetParametersType newJdbcSourceTargetParameters, NotificationChain msgs) {
104         JdbcSourceTargetParametersType oldJdbcSourceTargetParameters = jdbcSourceTargetParameters;
105         jdbcSourceTargetParameters = newJdbcSourceTargetParameters;
106         if (eNotificationRequired()) {
107             ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_TARGET_PARAMETERS, oldJdbcSourceTargetParameters, newJdbcSourceTargetParameters);
108             if (msgs == null) msgs = notification; else msgs.add(notification);
109         }
110         return msgs;
111     }
112
113     /**
114      * <!-- begin-user-doc -->
115      * <!-- end-user-doc -->
116      * @generated
117      */

118     public void setJdbcSourceTargetParameters(JdbcSourceTargetParametersType newJdbcSourceTargetParameters) {
119         if (newJdbcSourceTargetParameters != jdbcSourceTargetParameters) {
120             NotificationChain msgs = null;
121             if (jdbcSourceTargetParameters != null)
122                 msgs = ((InternalEObject)jdbcSourceTargetParameters).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_TARGET_PARAMETERS, null, msgs);
123             if (newJdbcSourceTargetParameters != null)
124                 msgs = ((InternalEObject)newJdbcSourceTargetParameters).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_TARGET_PARAMETERS, null, msgs);
125             msgs = basicSetJdbcSourceTargetParameters(newJdbcSourceTargetParameters, msgs);
126             if (msgs != null) msgs.dispatch();
127         }
128         else if (eNotificationRequired())
129             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_TARGET_PARAMETERS, newJdbcSourceTargetParameters, newJdbcSourceTargetParameters));
130     }
131
132     /**
133      * <!-- begin-user-doc -->
134      * <!-- end-user-doc -->
135      * @generated
136      */

137     public JdbcSourceParametersType getJdbcSourceParameters() {
138         return jdbcSourceParameters;
139     }
140
141     /**
142      * <!-- begin-user-doc -->
143      * <!-- end-user-doc -->
144      * @generated
145      */

146     public NotificationChain basicSetJdbcSourceParameters(JdbcSourceParametersType newJdbcSourceParameters, NotificationChain msgs) {
147         JdbcSourceParametersType oldJdbcSourceParameters = jdbcSourceParameters;
148         jdbcSourceParameters = newJdbcSourceParameters;
149         if (eNotificationRequired()) {
150             ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS, oldJdbcSourceParameters, newJdbcSourceParameters);
151             if (msgs == null) msgs = notification; else msgs.add(notification);
152         }
153         return msgs;
154     }
155
156     /**
157      * <!-- begin-user-doc -->
158      * <!-- end-user-doc -->
159      * @generated
160      */

161     public void setJdbcSourceParameters(JdbcSourceParametersType newJdbcSourceParameters) {
162         if (newJdbcSourceParameters != jdbcSourceParameters) {
163             NotificationChain msgs = null;
164             if (jdbcSourceParameters != null)
165                 msgs = ((InternalEObject)jdbcSourceParameters).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS, null, msgs);
166             if (newJdbcSourceParameters != null)
167                 msgs = ((InternalEObject)newJdbcSourceParameters).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS, null, msgs);
168             msgs = basicSetJdbcSourceParameters(newJdbcSourceParameters, msgs);
169             if (msgs != null) msgs.dispatch();
170         }
171         else if (eNotificationRequired())
172             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS, newJdbcSourceParameters, newJdbcSourceParameters));
173     }
174
175     /**
176      * <!-- begin-user-doc -->
177      * <!-- end-user-doc -->
178      * @generated
179      */

180     public JdbcTargetParametersType getJdbcTargetParameters() {
181         return jdbcTargetParameters;
182     }
183
184     /**
185      * <!-- begin-user-doc -->
186      * <!-- end-user-doc -->
187      * @generated
188      */

189     public NotificationChain basicSetJdbcTargetParameters(JdbcTargetParametersType newJdbcTargetParameters, NotificationChain msgs) {
190         JdbcTargetParametersType oldJdbcTargetParameters = jdbcTargetParameters;
191         jdbcTargetParameters = newJdbcTargetParameters;
192         if (eNotificationRequired()) {
193             ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS, oldJdbcTargetParameters, newJdbcTargetParameters);
194             if (msgs == null) msgs = notification; else msgs.add(notification);
195         }
196         return msgs;
197     }
198
199     /**
200      * <!-- begin-user-doc -->
201      * <!-- end-user-doc -->
202      * @generated
203      */

204     public void setJdbcTargetParameters(JdbcTargetParametersType newJdbcTargetParameters) {
205         if (newJdbcTargetParameters != jdbcTargetParameters) {
206             NotificationChain msgs = null;
207             if (jdbcTargetParameters != null)
208                 msgs = ((InternalEObject)jdbcTargetParameters).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS, null, msgs);
209             if (newJdbcTargetParameters != null)
210                 msgs = ((InternalEObject)newJdbcTargetParameters).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS, null, msgs);
211             msgs = basicSetJdbcTargetParameters(newJdbcTargetParameters, msgs);
212             if (msgs != null) msgs.dispatch();
213         }
214         else if (eNotificationRequired())
215             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS, newJdbcTargetParameters, newJdbcTargetParameters));
216     }
217
218     /**
219      * <!-- begin-user-doc -->
220      * <!-- end-user-doc -->
221      * @generated
222      */

223     public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class JavaDoc baseClass, NotificationChain msgs) {
224         if (featureID >= 0) {
225             switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
226                 case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_TARGET_PARAMETERS:
227                     return basicSetJdbcSourceTargetParameters(null, msgs);
228                 case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
229                     return basicSetJdbcSourceParameters(null, msgs);
230                 case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
231                     return basicSetJdbcTargetParameters(null, msgs);
232                 default:
233                     return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
234             }
235         }
236         return eBasicSetContainer(null, featureID, msgs);
237     }
238
239     /**
240      * <!-- begin-user-doc -->
241      * <!-- end-user-doc -->
242      * @generated
243      */

244     public Object JavaDoc eGet(EStructuralFeature eFeature, boolean resolve) {
245         switch (eDerivedStructuralFeatureID(eFeature)) {
246             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_TARGET_PARAMETERS:
247                 return getJdbcSourceTargetParameters();
248             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
249                 return getJdbcSourceParameters();
250             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
251                 return getJdbcTargetParameters();
252         }
253         return eDynamicGet(eFeature, resolve);
254     }
255
256     /**
257      * <!-- begin-user-doc -->
258      * <!-- end-user-doc -->
259      * @generated
260      */

261     public void eSet(EStructuralFeature eFeature, Object JavaDoc newValue) {
262         switch (eDerivedStructuralFeatureID(eFeature)) {
263             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_TARGET_PARAMETERS:
264                 setJdbcSourceTargetParameters((JdbcSourceTargetParametersType)newValue);
265                 return;
266             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
267                 setJdbcSourceParameters((JdbcSourceParametersType)newValue);
268                 return;
269             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
270                 setJdbcTargetParameters((JdbcTargetParametersType)newValue);
271                 return;
272         }
273         eDynamicSet(eFeature, newValue);
274     }
275
276     /**
277      * <!-- begin-user-doc -->
278      * <!-- end-user-doc -->
279      * @generated
280      */

281     public void eUnset(EStructuralFeature eFeature) {
282         switch (eDerivedStructuralFeatureID(eFeature)) {
283             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_TARGET_PARAMETERS:
284                 setJdbcSourceTargetParameters((JdbcSourceTargetParametersType)null);
285                 return;
286             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
287                 setJdbcSourceParameters((JdbcSourceParametersType)null);
288                 return;
289             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
290                 setJdbcTargetParameters((JdbcTargetParametersType)null);
291                 return;
292         }
293         eDynamicUnset(eFeature);
294     }
295
296     /**
297      * <!-- begin-user-doc -->
298      * <!-- end-user-doc -->
299      * @generated
300      */

301     public boolean eIsSet(EStructuralFeature eFeature) {
302         switch (eDerivedStructuralFeatureID(eFeature)) {
303             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_TARGET_PARAMETERS:
304                 return jdbcSourceTargetParameters != null;
305             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
306                 return jdbcSourceParameters != null;
307             case OljPackage.JDBC_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
308                 return jdbcTargetParameters != null;
309         }
310         return eDynamicIsSet(eFeature);
311     }
312
313 } //JdbcParametersTypeImpl
314
Popular Tags