1 7 package Olj.impl; 8 9 import Olj.CopyTableType; 10 import Olj.JdbcParametersType; 11 import Olj.LogModeType3; 12 import Olj.OidLogicType1; 13 import Olj.OljPackage; 14 import Olj.OnErrorContinueType2; 15 import Olj.SetCursorNameType2; 16 import Olj.SetFetchSizeType2; 17 18 import org.eclipse.emf.common.notify.Notification; 19 import org.eclipse.emf.common.notify.NotificationChain; 20 21 import org.eclipse.emf.ecore.EClass; 22 import org.eclipse.emf.ecore.EStructuralFeature; 23 import org.eclipse.emf.ecore.InternalEObject; 24 25 import org.eclipse.emf.ecore.impl.ENotificationImpl; 26 import org.eclipse.emf.ecore.impl.EObjectImpl; 27 28 51 public class CopyTableTypeImpl extends EObjectImpl implements CopyTableType { 52 60 protected JdbcParametersType jdbcParameters = null; 61 62 70 protected static final String COMMIT_COUNT_EDEFAULT = null; 71 72 80 protected String commitCount = COMMIT_COUNT_EDEFAULT; 81 82 90 protected static final LogModeType3 LOG_MODE_EDEFAULT = LogModeType3.NONE_LITERAL; 91 92 100 protected LogModeType3 logMode = LOG_MODE_EDEFAULT; 101 102 109 protected boolean logModeESet = false; 110 111 119 protected static final String NAME_EDEFAULT = null; 120 121 129 protected String name = NAME_EDEFAULT; 130 131 139 protected static final String OBJECT_ID_INCREMENT_EDEFAULT = null; 140 141 149 protected String objectIDIncrement = OBJECT_ID_INCREMENT_EDEFAULT; 150 151 159 protected static final OidLogicType1 OID_LOGIC_EDEFAULT = OidLogicType1.TRUE_LITERAL; 160 161 169 protected OidLogicType1 oidLogic = OID_LOGIC_EDEFAULT; 170 171 178 protected boolean oidLogicESet = false; 179 180 188 protected static final OnErrorContinueType2 ON_ERROR_CONTINUE_EDEFAULT = OnErrorContinueType2.TRUE_LITERAL; 189 190 198 protected OnErrorContinueType2 onErrorContinue = ON_ERROR_CONTINUE_EDEFAULT; 199 200 207 protected boolean onErrorContinueESet = false; 208 209 217 protected static final SetCursorNameType2 SET_CURSOR_NAME_EDEFAULT = SetCursorNameType2.TRUE_LITERAL; 218 219 227 protected SetCursorNameType2 setCursorName = SET_CURSOR_NAME_EDEFAULT; 228 229 236 protected boolean setCursorNameESet = false; 237 238 246 protected static final SetFetchSizeType2 SET_FETCH_SIZE_EDEFAULT = SetFetchSizeType2.TRUE_LITERAL; 247 248 256 protected SetFetchSizeType2 setFetchSize = SET_FETCH_SIZE_EDEFAULT; 257 258 265 protected boolean setFetchSizeESet = false; 266 267 275 protected static final String SOURCE_TABLE_NAME_EDEFAULT = null; 276 277 285 protected String sourceTableName = SOURCE_TABLE_NAME_EDEFAULT; 286 287 295 protected static final String TARGET_TABLE_NAME_EDEFAULT = null; 296 297 305 protected String targetTableName = TARGET_TABLE_NAME_EDEFAULT; 306 307 312 protected CopyTableTypeImpl() { 313 super(); 314 } 315 316 321 protected EClass eStaticClass() { 322 return OljPackage.eINSTANCE.getCopyTableType(); 323 } 324 325 330 public JdbcParametersType getJdbcParameters() { 331 return jdbcParameters; 332 } 333 334 339 public NotificationChain basicSetJdbcParameters(JdbcParametersType newJdbcParameters, NotificationChain msgs) { 340 JdbcParametersType oldJdbcParameters = jdbcParameters; 341 jdbcParameters = newJdbcParameters; 342 if (eNotificationRequired()) { 343 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__JDBC_PARAMETERS, oldJdbcParameters, newJdbcParameters); 344 if (msgs == null) msgs = notification; else msgs.add(notification); 345 } 346 return msgs; 347 } 348 349 354 public void setJdbcParameters(JdbcParametersType newJdbcParameters) { 355 if (newJdbcParameters != jdbcParameters) { 356 NotificationChain msgs = null; 357 if (jdbcParameters != null) 358 msgs = ((InternalEObject)jdbcParameters).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - OljPackage.COPY_TABLE_TYPE__JDBC_PARAMETERS, null, msgs); 359 if (newJdbcParameters != null) 360 msgs = ((InternalEObject)newJdbcParameters).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - OljPackage.COPY_TABLE_TYPE__JDBC_PARAMETERS, null, msgs); 361 msgs = basicSetJdbcParameters(newJdbcParameters, msgs); 362 if (msgs != null) msgs.dispatch(); 363 } 364 else if (eNotificationRequired()) 365 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__JDBC_PARAMETERS, newJdbcParameters, newJdbcParameters)); 366 } 367 368 373 public String getCommitCount() { 374 return commitCount; 375 } 376 377 382 public void setCommitCount(String newCommitCount) { 383 String oldCommitCount = commitCount; 384 commitCount = newCommitCount; 385 if (eNotificationRequired()) 386 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__COMMIT_COUNT, oldCommitCount, commitCount)); 387 } 388 389 394 public LogModeType3 getLogMode() { 395 return logMode; 396 } 397 398 403 public void setLogMode(LogModeType3 newLogMode) { 404 LogModeType3 oldLogMode = logMode; 405 logMode = newLogMode == null ? LOG_MODE_EDEFAULT : newLogMode; 406 boolean oldLogModeESet = logModeESet; 407 logModeESet = true; 408 if (eNotificationRequired()) 409 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__LOG_MODE, oldLogMode, logMode, !oldLogModeESet)); 410 } 411 412 417 public void unsetLogMode() { 418 LogModeType3 oldLogMode = logMode; 419 boolean oldLogModeESet = logModeESet; 420 logMode = LOG_MODE_EDEFAULT; 421 logModeESet = false; 422 if (eNotificationRequired()) 423 eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.COPY_TABLE_TYPE__LOG_MODE, oldLogMode, LOG_MODE_EDEFAULT, oldLogModeESet)); 424 } 425 426 431 public boolean isSetLogMode() { 432 return logModeESet; 433 } 434 435 440 public String getName() { 441 return name; 442 } 443 444 449 public void setName(String newName) { 450 String oldName = name; 451 name = newName; 452 if (eNotificationRequired()) 453 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__NAME, oldName, name)); 454 } 455 456 461 public String getObjectIDIncrement() { 462 return objectIDIncrement; 463 } 464 465 470 public void setObjectIDIncrement(String newObjectIDIncrement) { 471 String oldObjectIDIncrement = objectIDIncrement; 472 objectIDIncrement = newObjectIDIncrement; 473 if (eNotificationRequired()) 474 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__OBJECT_ID_INCREMENT, oldObjectIDIncrement, objectIDIncrement)); 475 } 476 477 482 public OidLogicType1 getOidLogic() { 483 return oidLogic; 484 } 485 486 491 public void setOidLogic(OidLogicType1 newOidLogic) { 492 OidLogicType1 oldOidLogic = oidLogic; 493 oidLogic = newOidLogic == null ? OID_LOGIC_EDEFAULT : newOidLogic; 494 boolean oldOidLogicESet = oidLogicESet; 495 oidLogicESet = true; 496 if (eNotificationRequired()) 497 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__OID_LOGIC, oldOidLogic, oidLogic, !oldOidLogicESet)); 498 } 499 500 505 public void unsetOidLogic() { 506 OidLogicType1 oldOidLogic = oidLogic; 507 boolean oldOidLogicESet = oidLogicESet; 508 oidLogic = OID_LOGIC_EDEFAULT; 509 oidLogicESet = false; 510 if (eNotificationRequired()) 511 eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.COPY_TABLE_TYPE__OID_LOGIC, oldOidLogic, OID_LOGIC_EDEFAULT, oldOidLogicESet)); 512 } 513 514 519 public boolean isSetOidLogic() { 520 return oidLogicESet; 521 } 522 523 528 public OnErrorContinueType2 getOnErrorContinue() { 529 return onErrorContinue; 530 } 531 532 537 public void setOnErrorContinue(OnErrorContinueType2 newOnErrorContinue) { 538 OnErrorContinueType2 oldOnErrorContinue = onErrorContinue; 539 onErrorContinue = newOnErrorContinue == null ? ON_ERROR_CONTINUE_EDEFAULT : newOnErrorContinue; 540 boolean oldOnErrorContinueESet = onErrorContinueESet; 541 onErrorContinueESet = true; 542 if (eNotificationRequired()) 543 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__ON_ERROR_CONTINUE, oldOnErrorContinue, onErrorContinue, !oldOnErrorContinueESet)); 544 } 545 546 551 public void unsetOnErrorContinue() { 552 OnErrorContinueType2 oldOnErrorContinue = onErrorContinue; 553 boolean oldOnErrorContinueESet = onErrorContinueESet; 554 onErrorContinue = ON_ERROR_CONTINUE_EDEFAULT; 555 onErrorContinueESet = false; 556 if (eNotificationRequired()) 557 eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.COPY_TABLE_TYPE__ON_ERROR_CONTINUE, oldOnErrorContinue, ON_ERROR_CONTINUE_EDEFAULT, oldOnErrorContinueESet)); 558 } 559 560 565 public boolean isSetOnErrorContinue() { 566 return onErrorContinueESet; 567 } 568 569 574 public SetCursorNameType2 getSetCursorName() { 575 return setCursorName; 576 } 577 578 583 public void setSetCursorName(SetCursorNameType2 newSetCursorName) { 584 SetCursorNameType2 oldSetCursorName = setCursorName; 585 setCursorName = newSetCursorName == null ? SET_CURSOR_NAME_EDEFAULT : newSetCursorName; 586 boolean oldSetCursorNameESet = setCursorNameESet; 587 setCursorNameESet = true; 588 if (eNotificationRequired()) 589 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__SET_CURSOR_NAME, oldSetCursorName, setCursorName, !oldSetCursorNameESet)); 590 } 591 592 597 public void unsetSetCursorName() { 598 SetCursorNameType2 oldSetCursorName = setCursorName; 599 boolean oldSetCursorNameESet = setCursorNameESet; 600 setCursorName = SET_CURSOR_NAME_EDEFAULT; 601 setCursorNameESet = false; 602 if (eNotificationRequired()) 603 eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.COPY_TABLE_TYPE__SET_CURSOR_NAME, oldSetCursorName, SET_CURSOR_NAME_EDEFAULT, oldSetCursorNameESet)); 604 } 605 606 611 public boolean isSetSetCursorName() { 612 return setCursorNameESet; 613 } 614 615 620 public SetFetchSizeType2 getSetFetchSize() { 621 return setFetchSize; 622 } 623 624 629 public void setSetFetchSize(SetFetchSizeType2 newSetFetchSize) { 630 SetFetchSizeType2 oldSetFetchSize = setFetchSize; 631 setFetchSize = newSetFetchSize == null ? SET_FETCH_SIZE_EDEFAULT : newSetFetchSize; 632 boolean oldSetFetchSizeESet = setFetchSizeESet; 633 setFetchSizeESet = true; 634 if (eNotificationRequired()) 635 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__SET_FETCH_SIZE, oldSetFetchSize, setFetchSize, !oldSetFetchSizeESet)); 636 } 637 638 643 public void unsetSetFetchSize() { 644 SetFetchSizeType2 oldSetFetchSize = setFetchSize; 645 boolean oldSetFetchSizeESet = setFetchSizeESet; 646 setFetchSize = SET_FETCH_SIZE_EDEFAULT; 647 setFetchSizeESet = false; 648 if (eNotificationRequired()) 649 eNotify(new ENotificationImpl(this, Notification.UNSET, OljPackage.COPY_TABLE_TYPE__SET_FETCH_SIZE, oldSetFetchSize, SET_FETCH_SIZE_EDEFAULT, oldSetFetchSizeESet)); 650 } 651 652 657 public boolean isSetSetFetchSize() { 658 return setFetchSizeESet; 659 } 660 661 666 public String getSourceTableName() { 667 return sourceTableName; 668 } 669 670 675 public void setSourceTableName(String newSourceTableName) { 676 String oldSourceTableName = sourceTableName; 677 sourceTableName = newSourceTableName; 678 if (eNotificationRequired()) 679 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__SOURCE_TABLE_NAME, oldSourceTableName, sourceTableName)); 680 } 681 682 687 public String getTargetTableName() { 688 return targetTableName; 689 } 690 691 696 public void setTargetTableName(String newTargetTableName) { 697 String oldTargetTableName = targetTableName; 698 targetTableName = newTargetTableName; 699 if (eNotificationRequired()) 700 eNotify(new ENotificationImpl(this, Notification.SET, OljPackage.COPY_TABLE_TYPE__TARGET_TABLE_NAME, oldTargetTableName, targetTableName)); 701 } 702 703 708 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) { 709 if (featureID >= 0) { 710 switch (eDerivedStructuralFeatureID(featureID, baseClass)) { 711 case OljPackage.COPY_TABLE_TYPE__JDBC_PARAMETERS: 712 return basicSetJdbcParameters(null, msgs); 713 default: 714 return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); 715 } 716 } 717 return eBasicSetContainer(null, featureID, msgs); 718 } 719 720 725 public Object eGet(EStructuralFeature eFeature, boolean resolve) { 726 switch (eDerivedStructuralFeatureID(eFeature)) { 727 case OljPackage.COPY_TABLE_TYPE__JDBC_PARAMETERS: 728 return getJdbcParameters(); 729 case OljPackage.COPY_TABLE_TYPE__COMMIT_COUNT: 730 return getCommitCount(); 731 case OljPackage.COPY_TABLE_TYPE__LOG_MODE: 732 return getLogMode(); 733 case OljPackage.COPY_TABLE_TYPE__NAME: 734 return getName(); 735 case OljPackage.COPY_TABLE_TYPE__OBJECT_ID_INCREMENT: 736 return getObjectIDIncrement(); 737 case OljPackage.COPY_TABLE_TYPE__OID_LOGIC: 738 return getOidLogic(); 739 case OljPackage.COPY_TABLE_TYPE__ON_ERROR_CONTINUE: 740 return getOnErrorContinue(); 741 case OljPackage.COPY_TABLE_TYPE__SET_CURSOR_NAME: 742 return getSetCursorName(); 743 case OljPackage.COPY_TABLE_TYPE__SET_FETCH_SIZE: 744 return getSetFetchSize(); 745 case OljPackage.COPY_TABLE_TYPE__SOURCE_TABLE_NAME: 746 return getSourceTableName(); 747 case OljPackage.COPY_TABLE_TYPE__TARGET_TABLE_NAME: 748 return getTargetTableName(); 749 } 750 return eDynamicGet(eFeature, resolve); 751 } 752 753 758 public void eSet(EStructuralFeature eFeature, Object newValue) { 759 switch (eDerivedStructuralFeatureID(eFeature)) { 760 case OljPackage.COPY_TABLE_TYPE__JDBC_PARAMETERS: 761 setJdbcParameters((JdbcParametersType)newValue); 762 return; 763 case OljPackage.COPY_TABLE_TYPE__COMMIT_COUNT: 764 setCommitCount((String )newValue); 765 return; 766 case OljPackage.COPY_TABLE_TYPE__LOG_MODE: 767 setLogMode((LogModeType3)newValue); 768 return; 769 case OljPackage.COPY_TABLE_TYPE__NAME: 770 setName((String )newValue); 771 return; 772 case OljPackage.COPY_TABLE_TYPE__OBJECT_ID_INCREMENT: 773 setObjectIDIncrement((String )newValue); 774 return; 775 case OljPackage.COPY_TABLE_TYPE__OID_LOGIC: 776 setOidLogic((OidLogicType1)newValue); 777 return; 778 case OljPackage.COPY_TABLE_TYPE__ON_ERROR_CONTINUE: 779 setOnErrorContinue((OnErrorContinueType2)newValue); 780 return; 781 case OljPackage.COPY_TABLE_TYPE__SET_CURSOR_NAME: 782 setSetCursorName((SetCursorNameType2)newValue); 783 return; 784 case OljPackage.COPY_TABLE_TYPE__SET_FETCH_SIZE: 785 setSetFetchSize((SetFetchSizeType2)newValue); 786 return; 787 case OljPackage.COPY_TABLE_TYPE__SOURCE_TABLE_NAME: 788 setSourceTableName((String )newValue); 789 return; 790 case OljPackage.COPY_TABLE_TYPE__TARGET_TABLE_NAME: 791 setTargetTableName((String )newValue); 792 return; 793 } 794 eDynamicSet(eFeature, newValue); 795 } 796 797 802 public void eUnset(EStructuralFeature eFeature) { 803 switch (eDerivedStructuralFeatureID(eFeature)) { 804 case OljPackage.COPY_TABLE_TYPE__JDBC_PARAMETERS: 805 setJdbcParameters((JdbcParametersType)null); 806 return; 807 case OljPackage.COPY_TABLE_TYPE__COMMIT_COUNT: 808 setCommitCount(COMMIT_COUNT_EDEFAULT); 809 return; 810 case OljPackage.COPY_TABLE_TYPE__LOG_MODE: 811 unsetLogMode(); 812 return; 813 case OljPackage.COPY_TABLE_TYPE__NAME: 814 setName(NAME_EDEFAULT); 815 return; 816 case OljPackage.COPY_TABLE_TYPE__OBJECT_ID_INCREMENT: 817 setObjectIDIncrement(OBJECT_ID_INCREMENT_EDEFAULT); 818 return; 819 case OljPackage.COPY_TABLE_TYPE__OID_LOGIC: 820 unsetOidLogic(); 821 return; 822 case OljPackage.COPY_TABLE_TYPE__ON_ERROR_CONTINUE: 823 unsetOnErrorContinue(); 824 return; 825 case OljPackage.COPY_TABLE_TYPE__SET_CURSOR_NAME: 826 unsetSetCursorName(); 827 return; 828 case OljPackage.COPY_TABLE_TYPE__SET_FETCH_SIZE: 829 unsetSetFetchSize(); 830 return; 831 case OljPackage.COPY_TABLE_TYPE__SOURCE_TABLE_NAME: 832 setSourceTableName(SOURCE_TABLE_NAME_EDEFAULT); 833 return; 834 case OljPackage.COPY_TABLE_TYPE__TARGET_TABLE_NAME: 835 setTargetTableName(TARGET_TABLE_NAME_EDEFAULT); 836 return; 837 } 838 eDynamicUnset(eFeature); 839 } 840 841 846 public boolean eIsSet(EStructuralFeature eFeature) { 847 switch (eDerivedStructuralFeatureID(eFeature)) { 848 case OljPackage.COPY_TABLE_TYPE__JDBC_PARAMETERS: 849 return jdbcParameters != null; 850 case OljPackage.COPY_TABLE_TYPE__COMMIT_COUNT: 851 return COMMIT_COUNT_EDEFAULT == null ? commitCount != null : !COMMIT_COUNT_EDEFAULT.equals(commitCount); 852 case OljPackage.COPY_TABLE_TYPE__LOG_MODE: 853 return isSetLogMode(); 854 case OljPackage.COPY_TABLE_TYPE__NAME: 855 return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); 856 case OljPackage.COPY_TABLE_TYPE__OBJECT_ID_INCREMENT: 857 return OBJECT_ID_INCREMENT_EDEFAULT == null ? objectIDIncrement != null : !OBJECT_ID_INCREMENT_EDEFAULT.equals(objectIDIncrement); 858 case OljPackage.COPY_TABLE_TYPE__OID_LOGIC: 859 return isSetOidLogic(); 860 case OljPackage.COPY_TABLE_TYPE__ON_ERROR_CONTINUE: 861 return isSetOnErrorContinue(); 862 case OljPackage.COPY_TABLE_TYPE__SET_CURSOR_NAME: 863 return isSetSetCursorName(); 864 case OljPackage.COPY_TABLE_TYPE__SET_FETCH_SIZE: 865 return isSetSetFetchSize(); 866 case OljPackage.COPY_TABLE_TYPE__SOURCE_TABLE_NAME: 867 return SOURCE_TABLE_NAME_EDEFAULT == null ? sourceTableName != null : !SOURCE_TABLE_NAME_EDEFAULT.equals(sourceTableName); 868 case OljPackage.COPY_TABLE_TYPE__TARGET_TABLE_NAME: 869 return TARGET_TABLE_NAME_EDEFAULT == null ? targetTableName != null : !TARGET_TABLE_NAME_EDEFAULT.equals(targetTableName); 870 } 871 return eDynamicIsSet(eFeature); 872 } 873 874 879 public String toString() { 880 if (eIsProxy()) return super.toString(); 881 882 StringBuffer result = new StringBuffer (super.toString()); 883 result.append(" (commitCount: "); 884 result.append(commitCount); 885 result.append(", logMode: "); 886 if (logModeESet) result.append(logMode); else result.append("<unset>"); 887 result.append(", name: "); 888 result.append(name); 889 result.append(", objectIDIncrement: "); 890 result.append(objectIDIncrement); 891 result.append(", oidLogic: "); 892 if (oidLogicESet) result.append(oidLogic); else result.append("<unset>"); 893 result.append(", onErrorContinue: "); 894 if (onErrorContinueESet) result.append(onErrorContinue); else result.append("<unset>"); 895 result.append(", setCursorName: "); 896 if (setCursorNameESet) result.append(setCursorName); else result.append("<unset>"); 897 result.append(", setFetchSize: "); 898 if (setFetchSizeESet) result.append(setFetchSize); else result.append("<unset>"); 899 result.append(", sourceTableName: "); 900 result.append(sourceTableName); 901 result.append(", targetTableName: "); 902 result.append(targetTableName); 903 result.append(')'); 904 return result.toString(); 905 } 906 907 } | Popular Tags |