1 7 package Olj.impl; 8 9 import Olj.JdbcSourceParameterType; 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 34 public class JdbcSourceParameterTypeImpl extends EObjectImpl implements JdbcSourceParameterType { 35 43 protected static final String NAME_EDEFAULT = null; 44 45 53 protected String name = NAME_EDEFAULT; 54 55 63 protected static final String VALUE_EDEFAULT = null; 64 65 73 protected String value = VALUE_EDEFAULT; 74 75 80 protected JdbcSourceParameterTypeImpl() { 81 super(); 82 } 83 84 89 protected EClass eStaticClass() { 90 return OljPackage.eINSTANCE.getJdbcSourceParameterType(); 91 } 92 93 98 public String getName() { 99 return name; 100 } 101 102 107 public void setName(String newName) { 108 String oldName = name; 109 name = newName; 110 if (eNotificationRequired()) 111 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_SOURCE_PARAMETER_TYPE__NAME, oldName, name)); 112 } 113 114 119 public String getValue() { 120 return value; 121 } 122 123 128 public void setValue(String newValue) { 129 String oldValue = value; 130 value = newValue; 131 if (eNotificationRequired()) 132 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.JDBC_SOURCE_PARAMETER_TYPE__VALUE, oldValue, value)); 133 } 134 135 140 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 141 switch (eDerivedStructuralFeatureID(eFeature)) { 142 case OljPackage.JDBC_SOURCE_PARAMETER_TYPE__NAME: 143 return getName(); 144 case OljPackage.JDBC_SOURCE_PARAMETER_TYPE__VALUE: 145 return getValue(); 146 } 147 return eDynamicGet(eFeature, resolve); 148 } 149 150 155 public void eSet(EStructuralFeature eFeature, Object newValue) { 156 switch (eDerivedStructuralFeatureID(eFeature)) { 157 case OljPackage.JDBC_SOURCE_PARAMETER_TYPE__NAME: 158 setName((String )newValue); 159 return; 160 case OljPackage.JDBC_SOURCE_PARAMETER_TYPE__VALUE: 161 setValue((String )newValue); 162 return; 163 } 164 eDynamicSet(eFeature, newValue); 165 } 166 167 172 public void eUnset(EStructuralFeature eFeature) { 173 switch (eDerivedStructuralFeatureID(eFeature)) { 174 case OljPackage.JDBC_SOURCE_PARAMETER_TYPE__NAME: 175 setName(NAME_EDEFAULT); 176 return; 177 case OljPackage.JDBC_SOURCE_PARAMETER_TYPE__VALUE: 178 setValue(VALUE_EDEFAULT); 179 return; 180 } 181 eDynamicUnset(eFeature); 182 } 183 184 189 public boolean eIsSet(EStructuralFeature eFeature) { 190 switch (eDerivedStructuralFeatureID(eFeature)) { 191 case OljPackage.JDBC_SOURCE_PARAMETER_TYPE__NAME: 192 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); 193 case OljPackage.JDBC_SOURCE_PARAMETER_TYPE__VALUE: 194 return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); 195 } 196 return eDynamicIsSet(eFeature); 197 } 198 199 204 public String toString() { 205 if (eIsProxy()) return super.toString(); 206 207 StringBuffer result = new StringBuffer (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 } | Popular Tags |