1 7 package Olj.impl; 8 9 import Olj.OljPackage; 10 import Olj.TimeStampColumnType; 11 import Olj.ValueModeType4; 12 13 import org.eclipse.emf.common.notify.Notification; 14 15 import org.eclipse.emf.ecore.EClass; 16 import org.eclipse.emf.ecore.EStructuralFeature; 17 18 import org.eclipse.emf.ecore.impl.ENotificationImpl; 19 import org.eclipse.emf.ecore.impl.EObjectImpl; 20 21 38 public class TimeStampColumnTypeImpl extends EObjectImpl implements TimeStampColumnType { 39 47 protected static final String NAME_EDEFAULT = null; 48 49 57 protected String name = NAME_EDEFAULT; 58 59 67 protected static final String TARGET_COLUMN_NAME_EDEFAULT = null; 68 69 77 protected String targetColumnName = TARGET_COLUMN_NAME_EDEFAULT; 78 79 87 protected static final String TARGET_TABLE_ID_EDEFAULT = null; 88 89 97 protected String targetTableID = TARGET_TABLE_ID_EDEFAULT; 98 99 107 protected static final String TARGET_TABLE_NAME_EDEFAULT = null; 108 109 117 protected String targetTableName = TARGET_TABLE_NAME_EDEFAULT; 118 119 127 protected static final ValueModeType4 VALUE_MODE_EDEFAULT = ValueModeType4.OVERWRITE_LITERAL; 128 129 137 protected ValueModeType4 valueMode = VALUE_MODE_EDEFAULT; 138 139 146 protected boolean valueModeESet = false; 147 148 153 protected TimeStampColumnTypeImpl() { 154 super(); 155 } 156 157 162 protected EClass eStaticClass() { 163 return OljPackage.eINSTANCE.getTimeStampColumnType(); 164 } 165 166 171 public String getName() { 172 return name; 173 } 174 175 180 public void setName(String newName) { 181 String oldName = name; 182 name = newName; 183 if (eNotificationRequired()) 184 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TIME_STAMP_COLUMN_TYPE__NAME, oldName, name)); 185 } 186 187 192 public String getTargetColumnName() { 193 return targetColumnName; 194 } 195 196 201 public void setTargetColumnName(String newTargetColumnName) { 202 String oldTargetColumnName = targetColumnName; 203 targetColumnName = newTargetColumnName; 204 if (eNotificationRequired()) 205 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_COLUMN_NAME, oldTargetColumnName, targetColumnName)); 206 } 207 208 213 public String getTargetTableID() { 214 return targetTableID; 215 } 216 217 222 public void setTargetTableID(String newTargetTableID) { 223 String oldTargetTableID = targetTableID; 224 targetTableID = newTargetTableID; 225 if (eNotificationRequired()) 226 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_ID, oldTargetTableID, targetTableID)); 227 } 228 229 234 public String getTargetTableName() { 235 return targetTableName; 236 } 237 238 243 public void setTargetTableName(String newTargetTableName) { 244 String oldTargetTableName = targetTableName; 245 targetTableName = newTargetTableName; 246 if (eNotificationRequired()) 247 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_NAME, oldTargetTableName, targetTableName)); 248 } 249 250 255 public ValueModeType4 getValueMode() { 256 return valueMode; 257 } 258 259 264 public void setValueMode(ValueModeType4 newValueMode) { 265 ValueModeType4 oldValueMode = valueMode; 266 valueMode = newValueMode == null ? VALUE_MODE_EDEFAULT : newValueMode; 267 boolean oldValueModeESet = valueModeESet; 268 valueModeESet = true; 269 if (eNotificationRequired()) 270 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.TIME_STAMP_COLUMN_TYPE__VALUE_MODE, oldValueMode, valueMode, !oldValueModeESet)); 271 } 272 273 278 public void unsetValueMode() { 279 ValueModeType4 oldValueMode = valueMode; 280 boolean oldValueModeESet = valueModeESet; 281 valueMode = VALUE_MODE_EDEFAULT; 282 valueModeESet = false; 283 if (eNotificationRequired()) 284 eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.TIME_STAMP_COLUMN_TYPE__VALUE_MODE, oldValueMode, VALUE_MODE_EDEFAULT, oldValueModeESet)); 285 } 286 287 292 public boolean isSetValueMode() { 293 return valueModeESet; 294 } 295 296 301 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 302 switch (eDerivedStructuralFeatureID(eFeature)) { 303 case OljPackage.TIME_STAMP_COLUMN_TYPE__NAME: 304 return getName(); 305 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_COLUMN_NAME: 306 return getTargetColumnName(); 307 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_ID: 308 return getTargetTableID(); 309 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_NAME: 310 return getTargetTableName(); 311 case OljPackage.TIME_STAMP_COLUMN_TYPE__VALUE_MODE: 312 return getValueMode(); 313 } 314 return eDynamicGet(eFeature, resolve); 315 } 316 317 322 public void eSet(EStructuralFeature eFeature, Object newValue) { 323 switch (eDerivedStructuralFeatureID(eFeature)) { 324 case OljPackage.TIME_STAMP_COLUMN_TYPE__NAME: 325 setName((String )newValue); 326 return; 327 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_COLUMN_NAME: 328 setTargetColumnName((String )newValue); 329 return; 330 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_ID: 331 setTargetTableID((String )newValue); 332 return; 333 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_NAME: 334 setTargetTableName((String )newValue); 335 return; 336 case OljPackage.TIME_STAMP_COLUMN_TYPE__VALUE_MODE: 337 setValueMode((ValueModeType4)newValue); 338 return; 339 } 340 eDynamicSet(eFeature, newValue); 341 } 342 343 348 public void eUnset(EStructuralFeature eFeature) { 349 switch (eDerivedStructuralFeatureID(eFeature)) { 350 case OljPackage.TIME_STAMP_COLUMN_TYPE__NAME: 351 setName(NAME_EDEFAULT); 352 return; 353 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_COLUMN_NAME: 354 setTargetColumnName(TARGET_COLUMN_NAME_EDEFAULT); 355 return; 356 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_ID: 357 setTargetTableID(TARGET_TABLE_ID_EDEFAULT); 358 return; 359 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_NAME: 360 setTargetTableName(TARGET_TABLE_NAME_EDEFAULT); 361 return; 362 case OljPackage.TIME_STAMP_COLUMN_TYPE__VALUE_MODE: 363 unsetValueMode(); 364 return; 365 } 366 eDynamicUnset(eFeature); 367 } 368 369 374 public boolean eIsSet(EStructuralFeature eFeature) { 375 switch (eDerivedStructuralFeatureID(eFeature)) { 376 case OljPackage.TIME_STAMP_COLUMN_TYPE__NAME: 377 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); 378 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_COLUMN_NAME: 379 return TARGET_COLUMN_NAME_EDEFAULT == null ? targetColumnName != null : !TARGET_COLUMN_NAME_EDEFAULT.equals(targetColumnName); 380 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_ID: 381 return TARGET_TABLE_ID_EDEFAULT == null ? targetTableID != null : !TARGET_TABLE_ID_EDEFAULT.equals(targetTableID); 382 case OljPackage.TIME_STAMP_COLUMN_TYPE__TARGET_TABLE_NAME: 383 return TARGET_TABLE_NAME_EDEFAULT == null ? targetTableName != null : !TARGET_TABLE_NAME_EDEFAULT.equals(targetTableName); 384 case OljPackage.TIME_STAMP_COLUMN_TYPE__VALUE_MODE: 385 return isSetValueMode(); 386 } 387 return eDynamicIsSet(eFeature); 388 } 389 390 395 public String toString() { 396 if (eIsProxy()) return super.toString(); 397 398 StringBuffer result = new StringBuffer (super.toString()); 399 result.append(" (name: "); 400 result.append(name); 401 result.append(", targetColumnName: "); 402 result.append(targetColumnName); 403 result.append(", targetTableID: "); 404 result.append(targetTableID); 405 result.append(", targetTableName: "); 406 result.append(targetTableName); 407 result.append(", valueMode: "); 408 if (valueModeESet) result.append(valueMode); else result.append("<unset>"); 409 result.append(')'); 410 return result.toString(); 411 } 412 413 } | Popular Tags |