1 7 package Olj.impl; 8 9 import Olj.OljPackage; 10 import Olj.VariableType; 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 42 public class VariableTypeImpl extends EObjectImpl implements VariableType { 43 51 protected static final String DEFAULT_VALUE_EDEFAULT = null; 52 53 61 protected String defaultValue = DEFAULT_VALUE_EDEFAULT; 62 63 71 protected static final String NAME_EDEFAULT = null; 72 73 81 protected String name = NAME_EDEFAULT; 82 83 91 protected static final String OVERRIDE_EDEFAULT = null; 92 93 101 protected String override = OVERRIDE_EDEFAULT; 102 103 111 protected static final String PREFIX_EDEFAULT = null; 112 113 121 protected String prefix = PREFIX_EDEFAULT; 122 123 131 protected static final String REPLACE_IN_CONSTANTS_EDEFAULT = null; 132 133 141 protected String replaceInConstants = REPLACE_IN_CONSTANTS_EDEFAULT; 142 143 151 protected static final String REPLACE_IN_DATA_EDEFAULT = null; 152 153 161 protected String replaceInData = REPLACE_IN_DATA_EDEFAULT; 162 163 171 protected static final String REPLACE_IN_JDBC_EDEFAULT = null; 172 173 181 protected String replaceInJDBC = REPLACE_IN_JDBC_EDEFAULT; 182 183 191 protected static final String REPLACE_IN_SQL_EDEFAULT = null; 192 193 201 protected String replaceInSQL = REPLACE_IN_SQL_EDEFAULT; 202 203 211 protected static final String SUFFIX_EDEFAULT = null; 212 213 221 protected String suffix = SUFFIX_EDEFAULT; 222 223 231 protected static final String VALUE_EDEFAULT = null; 232 233 241 protected String value = VALUE_EDEFAULT; 242 243 248 protected VariableTypeImpl() { 249 super(); 250 } 251 252 257 protected EClass eStaticClass() { 258 return OljPackage.eINSTANCE.getVariableType(); 259 } 260 261 266 public String getDefaultValue() { 267 return defaultValue; 268 } 269 270 275 public void setDefaultValue(String newDefaultValue) { 276 String oldDefaultValue = defaultValue; 277 defaultValue = newDefaultValue; 278 if (eNotificationRequired()) 279 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__DEFAULT_VALUE, oldDefaultValue, defaultValue)); 280 } 281 282 287 public String getName() { 288 return name; 289 } 290 291 296 public void setName(String newName) { 297 String oldName = name; 298 name = newName; 299 if (eNotificationRequired()) 300 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__NAME, oldName, name)); 301 } 302 303 308 public String getOverride() { 309 return override; 310 } 311 312 317 public void setOverride(String newOverride) { 318 String oldOverride = override; 319 override = newOverride; 320 if (eNotificationRequired()) 321 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__OVERRIDE, oldOverride, override)); 322 } 323 324 329 public String getPrefix() { 330 return prefix; 331 } 332 333 338 public void setPrefix(String newPrefix) { 339 String oldPrefix = prefix; 340 prefix = newPrefix; 341 if (eNotificationRequired()) 342 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__PREFIX, oldPrefix, prefix)); 343 } 344 345 350 public String getReplaceInConstants() { 351 return replaceInConstants; 352 } 353 354 359 public void setReplaceInConstants(String newReplaceInConstants) { 360 String oldReplaceInConstants = replaceInConstants; 361 replaceInConstants = newReplaceInConstants; 362 if (eNotificationRequired()) 363 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__REPLACE_IN_CONSTANTS, oldReplaceInConstants, replaceInConstants)); 364 } 365 366 371 public String getReplaceInData() { 372 return replaceInData; 373 } 374 375 380 public void setReplaceInData(String newReplaceInData) { 381 String oldReplaceInData = replaceInData; 382 replaceInData = newReplaceInData; 383 if (eNotificationRequired()) 384 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__REPLACE_IN_DATA, oldReplaceInData, replaceInData)); 385 } 386 387 392 public String getReplaceInJDBC() { 393 return replaceInJDBC; 394 } 395 396 401 public void setReplaceInJDBC(String newReplaceInJDBC) { 402 String oldReplaceInJDBC = replaceInJDBC; 403 replaceInJDBC = newReplaceInJDBC; 404 if (eNotificationRequired()) 405 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__REPLACE_IN_JDBC, oldReplaceInJDBC, replaceInJDBC)); 406 } 407 408 413 public String getReplaceInSQL() { 414 return replaceInSQL; 415 } 416 417 422 public void setReplaceInSQL(String newReplaceInSQL) { 423 String oldReplaceInSQL = replaceInSQL; 424 replaceInSQL = newReplaceInSQL; 425 if (eNotificationRequired()) 426 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__REPLACE_IN_SQL, oldReplaceInSQL, replaceInSQL)); 427 } 428 429 434 public String getSuffix() { 435 return suffix; 436 } 437 438 443 public void setSuffix(String newSuffix) { 444 String oldSuffix = suffix; 445 suffix = newSuffix; 446 if (eNotificationRequired()) 447 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__SUFFIX, oldSuffix, suffix)); 448 } 449 450 455 public String getValue() { 456 return value; 457 } 458 459 464 public void setValue(String newValue) { 465 String oldValue = value; 466 value = newValue; 467 if (eNotificationRequired()) 468 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.VARIABLE_TYPE__VALUE, oldValue, value)); 469 } 470 471 476 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 477 switch (eDerivedStructuralFeatureID(eFeature)) { 478 case OljPackage.VARIABLE_TYPE__DEFAULT_VALUE: 479 return getDefaultValue(); 480 case OljPackage.VARIABLE_TYPE__NAME: 481 return getName(); 482 case OljPackage.VARIABLE_TYPE__OVERRIDE: 483 return getOverride(); 484 case OljPackage.VARIABLE_TYPE__PREFIX: 485 return getPrefix(); 486 case OljPackage.VARIABLE_TYPE__REPLACE_IN_CONSTANTS: 487 return getReplaceInConstants(); 488 case OljPackage.VARIABLE_TYPE__REPLACE_IN_DATA: 489 return getReplaceInData(); 490 case OljPackage.VARIABLE_TYPE__REPLACE_IN_JDBC: 491 return getReplaceInJDBC(); 492 case OljPackage.VARIABLE_TYPE__REPLACE_IN_SQL: 493 return getReplaceInSQL(); 494 case OljPackage.VARIABLE_TYPE__SUFFIX: 495 return getSuffix(); 496 case OljPackage.VARIABLE_TYPE__VALUE: 497 return getValue(); 498 } 499 return eDynamicGet(eFeature, resolve); 500 } 501 502 507 public void eSet(EStructuralFeature eFeature, Object newValue) { 508 switch (eDerivedStructuralFeatureID(eFeature)) { 509 case OljPackage.VARIABLE_TYPE__DEFAULT_VALUE: 510 setDefaultValue((String )newValue); 511 return; 512 case OljPackage.VARIABLE_TYPE__NAME: 513 setName((String )newValue); 514 return; 515 case OljPackage.VARIABLE_TYPE__OVERRIDE: 516 setOverride((String )newValue); 517 return; 518 case OljPackage.VARIABLE_TYPE__PREFIX: 519 setPrefix((String )newValue); 520 return; 521 case OljPackage.VARIABLE_TYPE__REPLACE_IN_CONSTANTS: 522 setReplaceInConstants((String )newValue); 523 return; 524 case OljPackage.VARIABLE_TYPE__REPLACE_IN_DATA: 525 setReplaceInData((String )newValue); 526 return; 527 case OljPackage.VARIABLE_TYPE__REPLACE_IN_JDBC: 528 setReplaceInJDBC((String )newValue); 529 return; 530 case OljPackage.VARIABLE_TYPE__REPLACE_IN_SQL: 531 setReplaceInSQL((String )newValue); 532 return; 533 case OljPackage.VARIABLE_TYPE__SUFFIX: 534 setSuffix((String )newValue); 535 return; 536 case OljPackage.VARIABLE_TYPE__VALUE: 537 setValue((String )newValue); 538 return; 539 } 540 eDynamicSet(eFeature, newValue); 541 } 542 543 548 public void eUnset(EStructuralFeature eFeature) { 549 switch (eDerivedStructuralFeatureID(eFeature)) { 550 case OljPackage.VARIABLE_TYPE__DEFAULT_VALUE: 551 setDefaultValue(DEFAULT_VALUE_EDEFAULT); 552 return; 553 case OljPackage.VARIABLE_TYPE__NAME: 554 setName(NAME_EDEFAULT); 555 return; 556 case OljPackage.VARIABLE_TYPE__OVERRIDE: 557 setOverride(OVERRIDE_EDEFAULT); 558 return; 559 case OljPackage.VARIABLE_TYPE__PREFIX: 560 setPrefix(PREFIX_EDEFAULT); 561 return; 562 case OljPackage.VARIABLE_TYPE__REPLACE_IN_CONSTANTS: 563 setReplaceInConstants(REPLACE_IN_CONSTANTS_EDEFAULT); 564 return; 565 case OljPackage.VARIABLE_TYPE__REPLACE_IN_DATA: 566 setReplaceInData(REPLACE_IN_DATA_EDEFAULT); 567 return; 568 case OljPackage.VARIABLE_TYPE__REPLACE_IN_JDBC: 569 setReplaceInJDBC(REPLACE_IN_JDBC_EDEFAULT); 570 return; 571 case OljPackage.VARIABLE_TYPE__REPLACE_IN_SQL: 572 setReplaceInSQL(REPLACE_IN_SQL_EDEFAULT); 573 return; 574 case OljPackage.VARIABLE_TYPE__SUFFIX: 575 setSuffix(SUFFIX_EDEFAULT); 576 return; 577 case OljPackage.VARIABLE_TYPE__VALUE: 578 setValue(VALUE_EDEFAULT); 579 return; 580 } 581 eDynamicUnset(eFeature); 582 } 583 584 589 public boolean eIsSet(EStructuralFeature eFeature) { 590 switch (eDerivedStructuralFeatureID(eFeature)) { 591 case OljPackage.VARIABLE_TYPE__DEFAULT_VALUE: 592 return DEFAULT_VALUE_EDEFAULT == null ? defaultValue != null : !DEFAULT_VALUE_EDEFAULT.equals(defaultValue); 593 case OljPackage.VARIABLE_TYPE__NAME: 594 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); 595 case OljPackage.VARIABLE_TYPE__OVERRIDE: 596 return OVERRIDE_EDEFAULT == null ? override != null : !OVERRIDE_EDEFAULT.equals(override); 597 case OljPackage.VARIABLE_TYPE__PREFIX: 598 return PREFIX_EDEFAULT == null ? prefix != null : !PREFIX_EDEFAULT.equals(prefix); 599 case OljPackage.VARIABLE_TYPE__REPLACE_IN_CONSTANTS: 600 return REPLACE_IN_CONSTANTS_EDEFAULT == null ? replaceInConstants != null : !REPLACE_IN_CONSTANTS_EDEFAULT.equals(replaceInConstants); 601 case OljPackage.VARIABLE_TYPE__REPLACE_IN_DATA: 602 return REPLACE_IN_DATA_EDEFAULT == null ? replaceInData != null : !REPLACE_IN_DATA_EDEFAULT.equals(replaceInData); 603 case OljPackage.VARIABLE_TYPE__REPLACE_IN_JDBC: 604 return REPLACE_IN_JDBC_EDEFAULT == null ? replaceInJDBC != null : !REPLACE_IN_JDBC_EDEFAULT.equals(replaceInJDBC); 605 case OljPackage.VARIABLE_TYPE__REPLACE_IN_SQL: 606 return REPLACE_IN_SQL_EDEFAULT == null ? replaceInSQL != null : !REPLACE_IN_SQL_EDEFAULT.equals(replaceInSQL); 607 case OljPackage.VARIABLE_TYPE__SUFFIX: 608 return SUFFIX_EDEFAULT == null ? suffix != null : !SUFFIX_EDEFAULT.equals(suffix); 609 case OljPackage.VARIABLE_TYPE__VALUE: 610 return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); 611 } 612 return eDynamicIsSet(eFeature); 613 } 614 615 620 public String toString() { 621 if (eIsProxy()) return super.toString(); 622 623 StringBuffer result = new StringBuffer (super.toString()); 624 result.append(" (defaultValue: "); 625 result.append(defaultValue); 626 result.append(", name: "); 627 result.append(name); 628 result.append(", override: "); 629 result.append(override); 630 result.append(", prefix: "); 631 result.append(prefix); 632 result.append(", replaceInConstants: "); 633 result.append(replaceInConstants); 634 result.append(", replaceInData: "); 635 result.append(replaceInData); 636 result.append(", replaceInJDBC: "); 637 result.append(replaceInJDBC); 638 result.append(", replaceInSQL: "); 639 result.append(replaceInSQL); 640 result.append(", suffix: "); 641 result.append(suffix); 642 result.append(", value: "); 643 result.append(value); 644 result.append(')'); 645 return result.toString(); 646 } 647 648 } | Popular Tags |