1 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 38 public class JdbcDefaultParametersTypeImpl extends EObjectImpl implements JdbcDefaultParametersType { 39 47 protected JdbcSourceParametersType jdbcSourceParameters = null; 48 49 57 protected JdbcTargetParametersType jdbcTargetParameters = null; 58 59 64 protected JdbcDefaultParametersTypeImpl() { 65 super(); 66 } 67 68 73 protected EClass eStaticClass() { 74 return OljPackage.eINSTANCE.getJdbcDefaultParametersType(); 75 } 76 77 82 public JdbcSourceParametersType getJdbcSourceParameters() { 83 return jdbcSourceParameters; 84 } 85 86 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 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 125 public JdbcTargetParametersType getJdbcTargetParameters() { 126 return jdbcTargetParameters; 127 } 128 129 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 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 168 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class 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 187 public Object 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 202 public void eSet(EStructuralFeature eFeature, Object 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 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 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 } | Popular Tags |