1 17 package org.eclipse.emf.ecore.sdo.impl; 18 19 import commonj.sdo.DataGraph; 20 import commonj.sdo.DataObject; 21 import commonj.sdo.Property; 22 import commonj.sdo.Sequence; 23 import commonj.sdo.Type; 24 25 import java.io.ObjectStreamException ; 26 27 import java.math.BigDecimal ; 28 import java.math.BigInteger ; 29 30 import java.util.Collection ; 31 import java.util.Date ; 32 import java.util.List ; 33 34 import org.eclipse.emf.common.notify.NotificationChain; 35 36 import org.eclipse.emf.ecore.EClass; 37 import org.eclipse.emf.ecore.EStructuralFeature; 38 import org.eclipse.emf.ecore.InternalEObject; 39 40 import org.eclipse.emf.ecore.sdo.EDataObjectAnyType; 41 import org.eclipse.emf.ecore.sdo.InternalEDataObject; 42 import org.eclipse.emf.ecore.sdo.SDOPackage; 43 44 import org.eclipse.emf.ecore.sdo.util.SDOUtil; 45 46 import org.eclipse.emf.ecore.util.InternalEList; 47 48 import org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl; 49 50 59 public class EDataObjectAnyTypeImpl extends AnyTypeImpl implements EDataObjectAnyType, InternalEDataObject 60 { 61 66 protected EDataObjectAnyTypeImpl() 67 { 68 super(); 69 } 70 71 76 protected EClass eStaticClass() 77 { 78 return SDOPackage.eINSTANCE.getEDataObjectAnyType(); 79 } 80 81 86 public Object get(String path) 87 { 88 return SDOUtil.get(this, path); 89 } 90 91 96 public void set(String path, Object value) 97 { 98 SDOUtil.set(this, path, value); 99 } 100 101 106 public boolean isSet(String path) 107 { 108 return SDOUtil.isSet(this, path); 109 } 110 111 116 public void unset(String path) 117 { 118 SDOUtil.unset(this, path); 119 } 120 121 126 public Object get(int propertyIndex) 127 { 128 return SDOUtil.get(this, propertyIndex); 129 } 130 131 136 public void set(int propertyIndex, Object value) 137 { 138 SDOUtil.set(this, propertyIndex, value); 139 } 140 141 146 public boolean isSet(int propertyIndex) 147 { 148 return SDOUtil.isSet(this, propertyIndex); 149 } 150 151 156 public void unset(int propertyIndex) 157 { 158 SDOUtil.unset(this, propertyIndex); 159 } 160 161 166 public Object get(Property property) 167 { 168 return SDOUtil.get(this, property); 169 } 170 171 176 public void set(Property property, Object value) 177 { 178 SDOUtil.set(this, property, value); 179 } 180 181 186 public boolean isSet(Property property) 187 { 188 return SDOUtil.isSet(this, property); 189 } 190 191 196 public void unset(Property property) 197 { 198 SDOUtil.unset(this, property); 199 } 200 201 206 public DataObject getContainer() 207 { 208 return SDOUtil.getContainer(this); 209 } 210 211 216 public Property getContainmentProperty() 217 { 218 return SDOUtil.getContainmentProperty(this); 219 } 220 221 226 public DataGraph getDataGraph() 227 { 228 return SDOUtil.getDataGraph(this); 229 } 230 231 236 public Type getType() 237 { 238 return SDOUtil.getType(this); 239 } 240 241 246 public BigDecimal getBigDecimal(String path) 247 { 248 return SDOUtil.getBigDecimal(this, path); 249 } 250 251 256 public BigInteger getBigInteger(String path) 257 { 258 return SDOUtil.getBigInteger(this, path); 259 } 260 261 266 public boolean getBoolean(String path) 267 { 268 return SDOUtil.getBoolean(this, path); 269 } 270 271 276 public byte getByte(String path) 277 { 278 return SDOUtil.getByte(this, path); 279 } 280 281 286 public byte[] getBytes(String path) 287 { 288 return SDOUtil.getBytes(this, path); 289 } 290 291 296 public char getChar(String path) 297 { 298 return SDOUtil.getChar(this, path); 299 } 300 301 306 public DataObject getDataObject(String path) 307 { 308 return SDOUtil.getDataObject(this, path); 309 } 310 311 316 public Date getDate(String path) 317 { 318 return SDOUtil.getDate(this, path); 319 } 320 321 326 public double getDouble(String path) 327 { 328 return SDOUtil.getDouble(this, path); 329 } 330 331 336 public float getFloat(String path) 337 { 338 return SDOUtil.getFloat(this, path); 339 } 340 341 346 public int getInt(String path) 347 { 348 return SDOUtil.getInt(this, path); 349 } 350 351 356 public List getList(String path) 357 { 358 return SDOUtil.getList(this, path); 359 } 360 361 366 public long getLong(String path) 367 { 368 return SDOUtil.getLong(this, path); 369 } 370 371 376 public Sequence getSequence(String path) 377 { 378 return SDOUtil.getSequence(this, path); 379 } 380 381 386 public short getShort(String path) 387 { 388 return SDOUtil.getShort(this, path); 389 } 390 391 396 public String getString(String path) 397 { 398 return SDOUtil.getString(this, path); 399 } 400 401 406 public void setBigDecimal(String path, BigDecimal value) 407 { 408 SDOUtil.setBigDecimal(this, path, value); 409 } 410 411 416 public void setBigInteger(String path, BigInteger value) 417 { 418 SDOUtil.setBigInteger(this, path, value); 419 } 420 421 426 public void setBoolean(String path, boolean value) 427 { 428 SDOUtil.setBoolean(this, path, value); 429 } 430 431 436 public void setByte(String path, byte value) 437 { 438 SDOUtil.setByte(this, path, value); 439 } 440 441 446 public void setBytes(String path, byte[] value) 447 { 448 SDOUtil.setBytes(this, path, value); 449 } 450 451 456 public void setChar(String path, char value) 457 { 458 SDOUtil.setChar(this, path, value); 459 } 460 461 466 public void setDataObject(String path, DataObject value) 467 { 468 SDOUtil.setDataObject(this, path, value); 469 } 470 471 476 public void setDate(String path, Date value) 477 { 478 SDOUtil.setDate(this, path, value); 479 } 480 481 486 public void setDouble(String path, double value) 487 { 488 SDOUtil.setDouble(this, path, value); 489 } 490 491 496 public void setFloat(String path, float value) 497 { 498 SDOUtil.setFloat(this, path, value); 499 } 500 501 506 public void setInt(String path, int value) 507 { 508 SDOUtil.setInt(this, path, value); 509 } 510 511 516 public void setList(String path, List value) 517 { 518 SDOUtil.setList(this, path, value); 519 } 520 521 526 public void setLong(String path, long value) 527 { 528 SDOUtil.setLong(this, path, value); 529 } 530 531 536 public void setShort(String path, short value) 537 { 538 SDOUtil.setShort(this, path, value); 539 } 540 541 546 public void setString(String path, String value) 547 { 548 SDOUtil.setString(this, path, value); 549 } 550 551 556 public BigDecimal getBigDecimal(int propertyIndex) 557 { 558 return SDOUtil.getBigDecimal(this, propertyIndex); 559 } 560 561 566 public BigInteger getBigInteger(int propertyIndex) 567 { 568 return SDOUtil.getBigInteger(this, propertyIndex); 569 } 570 571 576 public boolean getBoolean(int propertyIndex) 577 { 578 return SDOUtil.getBoolean(this, propertyIndex); 579 } 580 581 586 public byte getByte(int propertyIndex) 587 { 588 return SDOUtil.getByte(this, propertyIndex); 589 } 590 591 596 public byte[] getBytes(int propertyIndex) 597 { 598 return SDOUtil.getBytes(this, propertyIndex); 599 } 600 601 606 public char getChar(int propertyIndex) 607 { 608 return SDOUtil.getChar(this, propertyIndex); 609 } 610 611 616 public DataObject getDataObject(int propertyIndex) 617 { 618 return SDOUtil.getDataObject(this, propertyIndex); 619 } 620 621 626 public Date getDate(int propertyIndex) 627 { 628 return SDOUtil.getDate(this, propertyIndex); 629 } 630 631 636 public double getDouble(int propertyIndex) 637 { 638 return SDOUtil.getDouble(this, propertyIndex); 639 } 640 641 646 public float getFloat(int propertyIndex) 647 { 648 return SDOUtil.getFloat(this, propertyIndex); 649 } 650 651 656 public int getInt(int propertyIndex) 657 { 658 return SDOUtil.getInt(this, propertyIndex); 659 } 660 661 666 public List getList(int propertyIndex) 667 { 668 return SDOUtil.getList(this, propertyIndex); 669 } 670 671 676 public long getLong(int propertyIndex) 677 { 678 return SDOUtil.getLong(this, propertyIndex); 679 } 680 681 686 public Sequence getSequence(int propertyIndex) 687 { 688 return SDOUtil.getSequence(this, propertyIndex); 689 } 690 691 696 public short getShort(int propertyIndex) 697 { 698 return SDOUtil.getShort(this, propertyIndex); 699 } 700 701 706 public String getString(int propertyIndex) 707 { 708 return SDOUtil.getString(this, propertyIndex); 709 } 710 711 716 public void setBigDecimal(int propertyIndex, BigDecimal value) 717 { 718 SDOUtil.setBigDecimal(this, propertyIndex, value); 719 } 720 721 726 public void setBigInteger(int propertyIndex, BigInteger value) 727 { 728 SDOUtil.setBigInteger(this, propertyIndex, value); 729 } 730 731 736 public void setBoolean(int propertyIndex, boolean value) 737 { 738 SDOUtil.setBoolean(this, propertyIndex, value); 739 } 740 741 746 public void setByte(int propertyIndex, byte value) 747 { 748 SDOUtil.setByte(this, propertyIndex, value); 749 } 750 751 756 public void setBytes(int propertyIndex, byte[] value) 757 { 758 SDOUtil.setBytes(this, propertyIndex, value); 759 } 760 761 766 public void setChar(int propertyIndex, char value) 767 { 768 SDOUtil.setChar(this, propertyIndex, value); 769 } 770 771 776 public void setDataObject(int propertyIndex, DataObject value) 777 { 778 SDOUtil.setDataObject(this, propertyIndex, value); 779 } 780 781 786 public void setDate(int propertyIndex, Date value) 787 { 788 SDOUtil.setDate(this, propertyIndex, value); 789 } 790 791 796 public void setDouble(int propertyIndex, double value) 797 { 798 SDOUtil.setDouble(this, propertyIndex, value); 799 } 800 801 806 public void setFloat(int propertyIndex, float value) 807 { 808 SDOUtil.setFloat(this, propertyIndex, value); 809 } 810 811 816 public void setInt(int propertyIndex, int value) 817 { 818 SDOUtil.setInt(this, propertyIndex, value); 819 } 820 821 826 public void setList(int propertyIndex, List value) 827 { 828 SDOUtil.setList(this, propertyIndex, value); 829 } 830 831 836 public void setLong(int propertyIndex, long value) 837 { 838 SDOUtil.setLong(this, propertyIndex, value); 839 } 840 841 846 public void setShort(int propertyIndex, short value) 847 { 848 SDOUtil.setShort(this, propertyIndex, value); 849 } 850 851 856 public void setString(int propertyIndex, String value) 857 { 858 SDOUtil.setString(this, propertyIndex, value); 859 } 860 861 866 public BigDecimal getBigDecimal(Property property) 867 { 868 return SDOUtil.getBigDecimal(this, property); 869 } 870 871 876 public BigInteger getBigInteger(Property property) 877 { 878 return SDOUtil.getBigInteger(this, property); 879 } 880 881 886 public boolean getBoolean(Property property) 887 { 888 return SDOUtil.getBoolean(this, property); 889 } 890 891 896 public byte getByte(Property property) 897 { 898 return SDOUtil.getByte(this, property); 899 } 900 901 906 public byte[] getBytes(Property property) 907 { 908 return SDOUtil.getBytes(this, property); 909 } 910 911 916 public char getChar(Property property) 917 { 918 return SDOUtil.getChar(this, property); 919 } 920 921 926 public DataObject getDataObject(Property property) 927 { 928 return SDOUtil.getDataObject(this, property); 929 } 930 931 936 public Date getDate(Property property) 937 { 938 return SDOUtil.getDate(this, property); 939 } 940 941 946 public double getDouble(Property property) 947 { 948 return SDOUtil.getDouble(this, property); 949 } 950 951 956 public float getFloat(Property property) 957 { 958 return SDOUtil.getFloat(this, property); 959 } 960 961 966 public int getInt(Property property) 967 { 968 return SDOUtil.getInt(this, property); 969 } 970 971 976 public List getList(Property property) 977 { 978 return SDOUtil.getList(this, property); 979 } 980 981 986 public long getLong(Property property) 987 { 988 return SDOUtil.getLong(this, property); 989 } 990 991 996 public Sequence getSequence(Property property) 997 { 998 return SDOUtil.getSequence(this, property); 999 } 1000 1001 1006 public short getShort(Property property) 1007 { 1008 return SDOUtil.getShort(this, property); 1009 } 1010 1011 1016 public String getString(Property property) 1017 { 1018 return SDOUtil.getString(this, property); 1019 } 1020 1021 1026 public void setBigDecimal(Property property, BigDecimal value) 1027 { 1028 SDOUtil.setBigDecimal(this, property, value); 1029 } 1030 1031 1036 public void setBigInteger(Property property, BigInteger value) 1037 { 1038 SDOUtil.setBigInteger(this, property, value); 1039 } 1040 1041 1046 public void setBoolean(Property property, boolean value) 1047 { 1048 SDOUtil.setBoolean(this, property, value); 1049 } 1050 1051 1056 public void setByte(Property property, byte value) 1057 { 1058 SDOUtil.setByte(this, property, value); 1059 } 1060 1061 1066 public void setBytes(Property property, byte[] value) 1067 { 1068 SDOUtil.setBytes(this, property, value); 1069 } 1070 1071 1076 public void setChar(Property property, char value) 1077 { 1078 SDOUtil.setChar(this, property, value); 1079 } 1080 1081 1086 public void setDataObject(Property property, DataObject value) 1087 { 1088 SDOUtil.setDataObject(this, property, value); 1089 } 1090 1091 1096 public void setDate(Property property, Date value) 1097 { 1098 SDOUtil.setDate(this, property, value); 1099 } 1100 1101 1106 public void setDouble(Property property, double value) 1107 { 1108 SDOUtil.setDouble(this, property, value); 1109 } 1110 1111 1116 public void setFloat(Property property, float value) 1117 { 1118 SDOUtil.setFloat(this, property, value); 1119 } 1120 1121 1126 public void setInt(Property property, int value) 1127 { 1128 SDOUtil.setInt(this, property, value); 1129 } 1130 1131 1136 public void setList(Property property, List value) 1137 { 1138 SDOUtil.setList(this, property, value); 1139 } 1140 1141 1146 public void setLong(Property property, long value) 1147 { 1148 SDOUtil.setLong(this, property, value); 1149 } 1150 1151 1156 public void setShort(Property property, short value) 1157 { 1158 SDOUtil.setShort(this, property, value); 1159 } 1160 1161 1166 public void setString(Property property, String value) 1167 { 1168 SDOUtil.setString(this, property, value); 1169 } 1170 1171 1176 public DataObject createDataObject(String propertyName) 1177 { 1178 return SDOUtil.createDataObject(this, propertyName); 1179 } 1180 1181 1186 public DataObject createDataObject(int propertyIndex) 1187 { 1188 return SDOUtil.createDataObject(this, propertyIndex); 1189 } 1190 1191 1196 public DataObject createDataObject(Property property) 1197 { 1198 return SDOUtil.createDataObject(this, property); 1199 } 1200 1201 1206 public DataObject createDataObject(String propertyName, String namespaceURI, String typeName) 1207 { 1208 return SDOUtil.createDataObject(this, propertyName, namespaceURI, typeName); 1209 } 1210 1211 1216 public DataObject createDataObject(int propertyIndex, String namespaceURI, String typeName) 1217 { 1218 return SDOUtil.createDataObject(this, propertyIndex, namespaceURI, typeName); 1219 } 1220 1221 1226 public DataObject createDataObject(Property property, Type type) 1227 { 1228 return SDOUtil.createDataObject(this, property, type); 1229 } 1230 1231 1236 public void delete() 1237 { 1238 SDOUtil.delete(this); 1239 } 1240 1241 1246 public List getInstanceProperties() 1247 { 1248 return SDOUtil.getInstanceProperties(this); 1249 } 1250 1251 1256 public Object writeReplace() throws ObjectStreamException 1257 { 1258 return SDOUtil.writeReplace(this); 1259 } 1260 1261 1266 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) 1267 { 1268 if (featureID >= 0) 1269 { 1270 switch (eDerivedStructuralFeatureID(featureID, baseClass)) 1271 { 1272 case SDOPackage.EDATA_OBJECT_ANY_TYPE__MIXED: 1273 return ((InternalEList)getMixed()).basicRemove(otherEnd, msgs); 1274 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY: 1275 return ((InternalEList)getAny()).basicRemove(otherEnd, msgs); 1276 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY_ATTRIBUTE: 1277 return ((InternalEList)getAnyAttribute()).basicRemove(otherEnd, msgs); 1278 default: 1279 return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); 1280 } 1281 } 1282 return eBasicSetContainer(null, featureID, msgs); 1283 } 1284 1285 1290 public Object eGet(EStructuralFeature eFeature, boolean resolve) 1291 { 1292 switch (eDerivedStructuralFeatureID(eFeature)) 1293 { 1294 case SDOPackage.EDATA_OBJECT_ANY_TYPE__MIXED: 1295 return getMixed(); 1296 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY: 1297 return getAny(); 1298 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY_ATTRIBUTE: 1299 return getAnyAttribute(); 1300 } 1301 return eDynamicGet(eFeature, resolve); 1302 } 1303 1304 1309 public void eSet(EStructuralFeature eFeature, Object newValue) 1310 { 1311 switch (eDerivedStructuralFeatureID(eFeature)) 1312 { 1313 case SDOPackage.EDATA_OBJECT_ANY_TYPE__MIXED: 1314 getMixed().clear(); 1315 getMixed().addAll((Collection )newValue); 1316 return; 1317 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY: 1318 getAny().clear(); 1319 getAny().addAll((Collection )newValue); 1320 return; 1321 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY_ATTRIBUTE: 1322 getAnyAttribute().clear(); 1323 getAnyAttribute().addAll((Collection )newValue); 1324 return; 1325 } 1326 eDynamicSet(eFeature, newValue); 1327 } 1328 1329 1334 public void eUnset(EStructuralFeature eFeature) 1335 { 1336 switch (eDerivedStructuralFeatureID(eFeature)) 1337 { 1338 case SDOPackage.EDATA_OBJECT_ANY_TYPE__MIXED: 1339 getMixed().clear(); 1340 return; 1341 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY: 1342 getAny().clear(); 1343 return; 1344 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY_ATTRIBUTE: 1345 getAnyAttribute().clear(); 1346 return; 1347 } 1348 eDynamicUnset(eFeature); 1349 } 1350 1351 1356 public boolean eIsSet(EStructuralFeature eFeature) 1357 { 1358 switch (eDerivedStructuralFeatureID(eFeature)) 1359 { 1360 case SDOPackage.EDATA_OBJECT_ANY_TYPE__MIXED: 1361 return mixed != null && !mixed.isEmpty(); 1362 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY: 1363 return !getAny().isEmpty(); 1364 case SDOPackage.EDATA_OBJECT_ANY_TYPE__ANY_ATTRIBUTE: 1365 return anyAttribute != null && !anyAttribute.isEmpty(); 1366 } 1367 return eDynamicIsSet(eFeature); 1368 } 1369 1370} | Popular Tags |