KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Olj > impl > JdbcDefaultParametersTypeImpl


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

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

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

47     protected JdbcSourceParametersType jdbcSourceParameters = null;
48
49     /**
50      * The cached value of the '{@link #getJdbcTargetParameters() <em>Jdbc Target Parameters</em>}' containment reference.
51      * <!-- begin-user-doc -->
52      * <!-- end-user-doc -->
53      * @see #getJdbcTargetParameters()
54      * @generated
55      * @ordered
56      */

57     protected JdbcTargetParametersType jdbcTargetParameters = null;
58
59     /**
60      * <!-- begin-user-doc -->
61      * <!-- end-user-doc -->
62      * @generated
63      */

64     protected JdbcDefaultParametersTypeImpl() {
65         super();
66     }
67
68     /**
69      * <!-- begin-user-doc -->
70      * <!-- end-user-doc -->
71      * @generated
72      */

73     protected EClass eStaticClass() {
74         return OljPackage.eINSTANCE.getJdbcDefaultParametersType();
75     }
76
77     /**
78      * <!-- begin-user-doc -->
79      * <!-- end-user-doc -->
80      * @generated
81      */

82     public JdbcSourceParametersType getJdbcSourceParameters() {
83         return jdbcSourceParameters;
84     }
85
86     /**
87      * <!-- begin-user-doc -->
88      * <!-- end-user-doc -->
89      * @generated
90      */

91     public NotificationChain basicSetJdbcSourceParameters(JdbcSourceParametersType newJdbcSourceParameters, NotificationChain msgs) {
92         JdbcSourceParametersType oldJdbcSourceParameters = jdbcSourceParameters;
93         jdbcSourceParameters = newJdbcSourceParameters;
94         if (eNotificationRequired()) {
95             ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS, oldJdbcSourceParameters, newJdbcSourceParameters);
96             if (msgs == null) msgs = notification; else msgs.add(notification);
97         }
98         return msgs;
99     }
100
101     /**
102      * <!-- begin-user-doc -->
103      * <!-- end-user-doc -->
104      * @generated
105      */

106     public void setJdbcSourceParameters(JdbcSourceParametersType newJdbcSourceParameters) {
107         if (newJdbcSourceParameters != jdbcSourceParameters) {
108             NotificationChain msgs = null;
109             if (jdbcSourceParameters != null)
110                 msgs = ((InternalEObject)jdbcSourceParameters).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS, null, msgs);
111             if (newJdbcSourceParameters != null)
112                 msgs = ((InternalEObject)newJdbcSourceParameters).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS, null, msgs);
113             msgs = basicSetJdbcSourceParameters(newJdbcSourceParameters, msgs);
114             if (msgs != null) msgs.dispatch();
115         }
116         else if (eNotificationRequired())
117             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS, newJdbcSourceParameters, newJdbcSourceParameters));
118     }
119
120     /**
121      * <!-- begin-user-doc -->
122      * <!-- end-user-doc -->
123      * @generated
124      */

125     public JdbcTargetParametersType getJdbcTargetParameters() {
126         return jdbcTargetParameters;
127     }
128
129     /**
130      * <!-- begin-user-doc -->
131      * <!-- end-user-doc -->
132      * @generated
133      */

134     public NotificationChain basicSetJdbcTargetParameters(JdbcTargetParametersType newJdbcTargetParameters, NotificationChain msgs) {
135         JdbcTargetParametersType oldJdbcTargetParameters = jdbcTargetParameters;
136         jdbcTargetParameters = newJdbcTargetParameters;
137         if (eNotificationRequired()) {
138             ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS, oldJdbcTargetParameters, newJdbcTargetParameters);
139             if (msgs == null) msgs = notification; else msgs.add(notification);
140         }
141         return msgs;
142     }
143
144     /**
145      * <!-- begin-user-doc -->
146      * <!-- end-user-doc -->
147      * @generated
148      */

149     public void setJdbcTargetParameters(JdbcTargetParametersType newJdbcTargetParameters) {
150         if (newJdbcTargetParameters != jdbcTargetParameters) {
151             NotificationChain msgs = null;
152             if (jdbcTargetParameters != null)
153                 msgs = ((InternalEObject)jdbcTargetParameters).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS, null, msgs);
154             if (newJdbcTargetParameters != null)
155                 msgs = ((InternalEObject)newJdbcTargetParameters).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS, null, msgs);
156             msgs = basicSetJdbcTargetParameters(newJdbcTargetParameters, msgs);
157             if (msgs != null) msgs.dispatch();
158         }
159         else if (eNotificationRequired())
160             eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS, newJdbcTargetParameters, newJdbcTargetParameters));
161     }
162
163     /**
164      * <!-- begin-user-doc -->
165      * <!-- end-user-doc -->
166      * @generated
167      */

168     public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class JavaDoc baseClass, NotificationChain msgs) {
169         if (featureID >= 0) {
170             switch (eDerivedStructuralFeatureID(featureID, baseClass)) {
171                 case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
172                     return basicSetJdbcSourceParameters(null, msgs);
173                 case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
174                     return basicSetJdbcTargetParameters(null, msgs);
175                 default:
176                     return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs);
177             }
178         }
179         return eBasicSetContainer(null, featureID, msgs);
180     }
181
182     /**
183      * <!-- begin-user-doc -->
184      * <!-- end-user-doc -->
185      * @generated
186      */

187     public Object JavaDoc eGet(EStructuralFeature eFeature, boolean resolve) {
188         switch (eDerivedStructuralFeatureID(eFeature)) {
189             case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
190                 return getJdbcSourceParameters();
191             case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
192                 return getJdbcTargetParameters();
193         }
194         return eDynamicGet(eFeature, resolve);
195     }
196
197     /**
198      * <!-- begin-user-doc -->
199      * <!-- end-user-doc -->
200      * @generated
201      */

202     public void eSet(EStructuralFeature eFeature, Object JavaDoc newValue) {
203         switch (eDerivedStructuralFeatureID(eFeature)) {
204             case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
205                 setJdbcSourceParameters((JdbcSourceParametersType)newValue);
206                 return;
207             case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
208                 setJdbcTargetParameters((JdbcTargetParametersType)newValue);
209                 return;
210         }
211         eDynamicSet(eFeature, newValue);
212     }
213
214     /**
215      * <!-- begin-user-doc -->
216      * <!-- end-user-doc -->
217      * @generated
218      */

219     public void eUnset(EStructuralFeature eFeature) {
220         switch (eDerivedStructuralFeatureID(eFeature)) {
221             case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
222                 setJdbcSourceParameters((JdbcSourceParametersType)null);
223                 return;
224             case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
225                 setJdbcTargetParameters((JdbcTargetParametersType)null);
226                 return;
227         }
228         eDynamicUnset(eFeature);
229     }
230
231     /**
232      * <!-- begin-user-doc -->
233      * <!-- end-user-doc -->
234      * @generated
235      */

236     public boolean eIsSet(EStructuralFeature eFeature) {
237         switch (eDerivedStructuralFeatureID(eFeature)) {
238             case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_SOURCE_PARAMETERS:
239                 return jdbcSourceParameters != null;
240             case OljPackage.JDBC_DEFAULT_PARAMETERS_TYPE__JDBC_TARGET_PARAMETERS:
241                 return jdbcTargetParameters != null;
242         }
243         return eDynamicIsSet(eFeature);
244     }
245
246 } //JdbcDefaultParametersTypeImpl
247
Popular Tags