1 7 package Olj.impl; 8 9 import Olj.CounterColumnType; 10 import Olj.CounterStartValueResetType; 11 import Olj.OljPackage; 12 import Olj.ValueModeType; 13 14 import org.eclipse.emf.common.notify.Notification; 15 16 import org.eclipse.emf.ecore.EClass; 17 import org.eclipse.emf.ecore.EStructuralFeature; 18 19 import org.eclipse.emf.ecore.impl.ENotificationImpl; 20 import org.eclipse.emf.ecore.impl.EObjectImpl; 21 22 42 public class CounterColumnTypeImpl extends EObjectImpl implements CounterColumnType { 43 51 protected static final String COUNTER_INCREMENT_EDEFAULT = null; 52 53 61 protected String counterIncrement = COUNTER_INCREMENT_EDEFAULT; 62 63 71 protected static final String COUNTER_NAME_EDEFAULT = null; 72 73 81 protected String counterName = COUNTER_NAME_EDEFAULT; 82 83 91 protected static final String COUNTER_START_VALUE_EDEFAULT = null; 92 93 101 protected String counterStartValue = COUNTER_START_VALUE_EDEFAULT; 102 103 111 protected static final CounterStartValueResetType COUNTER_START_VALUE_RESET_EDEFAULT = CounterStartValueResetType.TRUE_LITERAL; 112 113 121 protected CounterStartValueResetType counterStartValueReset = COUNTER_START_VALUE_RESET_EDEFAULT; 122 123 130 protected boolean counterStartValueResetESet = false; 131 132 140 protected static final String TARGET_COLUMN_NAME_EDEFAULT = null; 141 142 150 protected String targetColumnName = TARGET_COLUMN_NAME_EDEFAULT; 151 152 160 protected static final String TARGET_TABLE_ID_EDEFAULT = null; 161 162 170 protected String targetTableID = TARGET_TABLE_ID_EDEFAULT; 171 172 180 protected static final String TARGET_TABLE_NAME_EDEFAULT = null; 181 182 190 protected String targetTableName = TARGET_TABLE_NAME_EDEFAULT; 191 192 200 protected static final ValueModeType VALUE_MODE_EDEFAULT = ValueModeType.SET_IF_CREATED_LITERAL; 201 202 210 protected ValueModeType valueMode = VALUE_MODE_EDEFAULT; 211 212 219 protected boolean valueModeESet = false; 220 221 226 protected CounterColumnTypeImpl() { 227 super(); 228 } 229 230 235 protected EClass eStaticClass() { 236 return OljPackage.eINSTANCE.getCounterColumnType(); 237 } 238 239 244 public String getCounterIncrement() { 245 return counterIncrement; 246 } 247 248 253 public void setCounterIncrement(String newCounterIncrement) { 254 String oldCounterIncrement = counterIncrement; 255 counterIncrement = newCounterIncrement; 256 if (eNotificationRequired()) 257 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMN_TYPE__COUNTER_INCREMENT, oldCounterIncrement, counterIncrement)); 258 } 259 260 265 public String getCounterName() { 266 return counterName; 267 } 268 269 274 public void setCounterName(String newCounterName) { 275 String oldCounterName = counterName; 276 counterName = newCounterName; 277 if (eNotificationRequired()) 278 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMN_TYPE__COUNTER_NAME, oldCounterName, counterName)); 279 } 280 281 286 public String getCounterStartValue() { 287 return counterStartValue; 288 } 289 290 295 public void setCounterStartValue(String newCounterStartValue) { 296 String oldCounterStartValue = counterStartValue; 297 counterStartValue = newCounterStartValue; 298 if (eNotificationRequired()) 299 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE, oldCounterStartValue, counterStartValue)); 300 } 301 302 307 public CounterStartValueResetType getCounterStartValueReset() { 308 return counterStartValueReset; 309 } 310 311 316 public void setCounterStartValueReset(CounterStartValueResetType newCounterStartValueReset) { 317 CounterStartValueResetType oldCounterStartValueReset = counterStartValueReset; 318 counterStartValueReset = newCounterStartValueReset == null ? COUNTER_START_VALUE_RESET_EDEFAULT : newCounterStartValueReset; 319 boolean oldCounterStartValueResetESet = counterStartValueResetESet; 320 counterStartValueResetESet = true; 321 if (eNotificationRequired()) 322 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE_RESET, oldCounterStartValueReset, counterStartValueReset, !oldCounterStartValueResetESet)); 323 } 324 325 330 public void unsetCounterStartValueReset() { 331 CounterStartValueResetType oldCounterStartValueReset = counterStartValueReset; 332 boolean oldCounterStartValueResetESet = counterStartValueResetESet; 333 counterStartValueReset = COUNTER_START_VALUE_RESET_EDEFAULT; 334 counterStartValueResetESet = false; 335 if (eNotificationRequired()) 336 eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE_RESET, oldCounterStartValueReset, COUNTER_START_VALUE_RESET_EDEFAULT, oldCounterStartValueResetESet)); 337 } 338 339 344 public boolean isSetCounterStartValueReset() { 345 return counterStartValueResetESet; 346 } 347 348 353 public String getTargetColumnName() { 354 return targetColumnName; 355 } 356 357 362 public void setTargetColumnName(String newTargetColumnName) { 363 String oldTargetColumnName = targetColumnName; 364 targetColumnName = newTargetColumnName; 365 if (eNotificationRequired()) 366 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMN_TYPE__TARGET_COLUMN_NAME, oldTargetColumnName, targetColumnName)); 367 } 368 369 374 public String getTargetTableID() { 375 return targetTableID; 376 } 377 378 383 public void setTargetTableID(String newTargetTableID) { 384 String oldTargetTableID = targetTableID; 385 targetTableID = newTargetTableID; 386 if (eNotificationRequired()) 387 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_ID, oldTargetTableID, targetTableID)); 388 } 389 390 395 public String getTargetTableName() { 396 return targetTableName; 397 } 398 399 404 public void setTargetTableName(String newTargetTableName) { 405 String oldTargetTableName = targetTableName; 406 targetTableName = newTargetTableName; 407 if (eNotificationRequired()) 408 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_NAME, oldTargetTableName, targetTableName)); 409 } 410 411 416 public ValueModeType getValueMode() { 417 return valueMode; 418 } 419 420 425 public void setValueMode(ValueModeType newValueMode) { 426 ValueModeType oldValueMode = valueMode; 427 valueMode = newValueMode == null ? VALUE_MODE_EDEFAULT : newValueMode; 428 boolean oldValueModeESet = valueModeESet; 429 valueModeESet = true; 430 if (eNotificationRequired()) 431 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COUNTER_COLUMN_TYPE__VALUE_MODE, oldValueMode, valueMode, !oldValueModeESet)); 432 } 433 434 439 public void unsetValueMode() { 440 ValueModeType oldValueMode = valueMode; 441 boolean oldValueModeESet = valueModeESet; 442 valueMode = VALUE_MODE_EDEFAULT; 443 valueModeESet = false; 444 if (eNotificationRequired()) 445 eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.COUNTER_COLUMN_TYPE__VALUE_MODE, oldValueMode, VALUE_MODE_EDEFAULT, oldValueModeESet)); 446 } 447 448 453 public boolean isSetValueMode() { 454 return valueModeESet; 455 } 456 457 462 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 463 switch (eDerivedStructuralFeatureID(eFeature)) { 464 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_INCREMENT: 465 return getCounterIncrement(); 466 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_NAME: 467 return getCounterName(); 468 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE: 469 return getCounterStartValue(); 470 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE_RESET: 471 return getCounterStartValueReset(); 472 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_COLUMN_NAME: 473 return getTargetColumnName(); 474 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_ID: 475 return getTargetTableID(); 476 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_NAME: 477 return getTargetTableName(); 478 case OljPackage.COUNTER_COLUMN_TYPE__VALUE_MODE: 479 return getValueMode(); 480 } 481 return eDynamicGet(eFeature, resolve); 482 } 483 484 489 public void eSet(EStructuralFeature eFeature, Object newValue) { 490 switch (eDerivedStructuralFeatureID(eFeature)) { 491 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_INCREMENT: 492 setCounterIncrement((String )newValue); 493 return; 494 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_NAME: 495 setCounterName((String )newValue); 496 return; 497 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE: 498 setCounterStartValue((String )newValue); 499 return; 500 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE_RESET: 501 setCounterStartValueReset((CounterStartValueResetType)newValue); 502 return; 503 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_COLUMN_NAME: 504 setTargetColumnName((String )newValue); 505 return; 506 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_ID: 507 setTargetTableID((String )newValue); 508 return; 509 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_NAME: 510 setTargetTableName((String )newValue); 511 return; 512 case OljPackage.COUNTER_COLUMN_TYPE__VALUE_MODE: 513 setValueMode((ValueModeType)newValue); 514 return; 515 } 516 eDynamicSet(eFeature, newValue); 517 } 518 519 524 public void eUnset(EStructuralFeature eFeature) { 525 switch (eDerivedStructuralFeatureID(eFeature)) { 526 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_INCREMENT: 527 setCounterIncrement(COUNTER_INCREMENT_EDEFAULT); 528 return; 529 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_NAME: 530 setCounterName(COUNTER_NAME_EDEFAULT); 531 return; 532 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE: 533 setCounterStartValue(COUNTER_START_VALUE_EDEFAULT); 534 return; 535 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE_RESET: 536 unsetCounterStartValueReset(); 537 return; 538 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_COLUMN_NAME: 539 setTargetColumnName(TARGET_COLUMN_NAME_EDEFAULT); 540 return; 541 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_ID: 542 setTargetTableID(TARGET_TABLE_ID_EDEFAULT); 543 return; 544 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_NAME: 545 setTargetTableName(TARGET_TABLE_NAME_EDEFAULT); 546 return; 547 case OljPackage.COUNTER_COLUMN_TYPE__VALUE_MODE: 548 unsetValueMode(); 549 return; 550 } 551 eDynamicUnset(eFeature); 552 } 553 554 559 public boolean eIsSet(EStructuralFeature eFeature) { 560 switch (eDerivedStructuralFeatureID(eFeature)) { 561 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_INCREMENT: 562 return COUNTER_INCREMENT_EDEFAULT == null ? counterIncrement != null : !COUNTER_INCREMENT_EDEFAULT.equals(counterIncrement); 563 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_NAME: 564 return COUNTER_NAME_EDEFAULT == null ? counterName != null : !COUNTER_NAME_EDEFAULT.equals(counterName); 565 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE: 566 return COUNTER_START_VALUE_EDEFAULT == null ? counterStartValue != null : !COUNTER_START_VALUE_EDEFAULT.equals(counterStartValue); 567 case OljPackage.COUNTER_COLUMN_TYPE__COUNTER_START_VALUE_RESET: 568 return isSetCounterStartValueReset(); 569 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_COLUMN_NAME: 570 return TARGET_COLUMN_NAME_EDEFAULT == null ? targetColumnName != null : !TARGET_COLUMN_NAME_EDEFAULT.equals(targetColumnName); 571 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_ID: 572 return TARGET_TABLE_ID_EDEFAULT == null ? targetTableID != null : !TARGET_TABLE_ID_EDEFAULT.equals(targetTableID); 573 case OljPackage.COUNTER_COLUMN_TYPE__TARGET_TABLE_NAME: 574 return TARGET_TABLE_NAME_EDEFAULT == null ? targetTableName != null : !TARGET_TABLE_NAME_EDEFAULT.equals(targetTableName); 575 case OljPackage.COUNTER_COLUMN_TYPE__VALUE_MODE: 576 return isSetValueMode(); 577 } 578 return eDynamicIsSet(eFeature); 579 } 580 581 586 public String toString() { 587 if (eIsProxy()) return super.toString(); 588 589 StringBuffer result = new StringBuffer (super.toString()); 590 result.append(" (counterIncrement: "); 591 result.append(counterIncrement); 592 result.append(", counterName: "); 593 result.append(counterName); 594 result.append(", counterStartValue: "); 595 result.append(counterStartValue); 596 result.append(", counterStartValueReset: "); 597 if (counterStartValueResetESet) result.append(counterStartValueReset); else result.append("<unset>"); 598 result.append(", targetColumnName: "); 599 result.append(targetColumnName); 600 result.append(", targetTableID: "); 601 result.append(targetTableID); 602 result.append(", targetTableName: "); 603 result.append(targetTableName); 604 result.append(", valueMode: "); 605 if (valueModeESet) result.append(valueMode); else result.append("<unset>"); 606 result.append(')'); 607 return result.toString(); 608 } 609 610 } | Popular Tags |