1 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 40 public class JdbcParametersTypeImpl extends EObjectImpl implements JdbcParametersType { 41 49 protected JdbcSourceTargetParametersType jdbcSourceTargetParameters = null; 50 51 59 protected JdbcSourceParametersType jdbcSourceParameters = null; 60 61 69 protected JdbcTargetParametersType jdbcTargetParameters = null; 70 71 76 protected JdbcParametersTypeImpl() { 77 super(); 78 } 79 80 85 protected EClass eStaticClass() { 86 return OljPackage.eINSTANCE.getJdbcParametersType(); 87 } 88 89 94 public JdbcSourceTargetParametersType getJdbcSourceTargetParameters() { 95 return jdbcSourceTargetParameters; 96 } 97 98 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 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 137 public JdbcSourceParametersType getJdbcSourceParameters() { 138 return jdbcSourceParameters; 139 } 140 141 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 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 180 public JdbcTargetParametersType getJdbcTargetParameters() { 181 return jdbcTargetParameters; 182 } 183 184 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 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 223 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class 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 244 public Object 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 261 public void eSet(EStructuralFeature eFeature, Object 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 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 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 } | Popular Tags |