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.EDataType; 38 import org.eclipse.emf.ecore.EStructuralFeature; 39 import org.eclipse.emf.ecore.InternalEObject; 40 41 import org.eclipse.emf.ecore.sdo.EDataObjectSimpleAnyType; 42 import org.eclipse.emf.ecore.sdo.InternalEDataObject; 43 import org.eclipse.emf.ecore.sdo.SDOPackage; 44 45 import org.eclipse.emf.ecore.sdo.util.SDOUtil; 46 47 import org.eclipse.emf.ecore.util.InternalEList; 48 49 import org.eclipse.emf.ecore.xml.type.impl.SimpleAnyTypeImpl; 50 51 60 public class EDataObjectSimpleAnyTypeImpl extends SimpleAnyTypeImpl implements EDataObjectSimpleAnyType, InternalEDataObject 61 { 62 67 protected EDataObjectSimpleAnyTypeImpl() 68 { 69 super(); 70 } 71 72 77 protected EClass eStaticClass() 78 { 79 return SDOPackage.eINSTANCE.getEDataObjectSimpleAnyType(); 80 } 81 82 87 public Object get(String path) 88 { 89 return SDOUtil.get(this, path); 90 } 91 92 97 public void set(String path, Object value) 98 { 99 SDOUtil.set(this, path, value); 100 } 101 102 107 public boolean isSet(String path) 108 { 109 return SDOUtil.isSet(this, path); 110 } 111 112 117 public void unset(String path) 118 { 119 SDOUtil.unset(this, path); 120 } 121 122 127 public Object get(int propertyIndex) 128 { 129 return SDOUtil.get(this, propertyIndex); 130 } 131 132 137 public void set(int propertyIndex, Object value) 138 { 139 SDOUtil.set(this, propertyIndex, value); 140 } 141 142 147 public boolean isSet(int propertyIndex) 148 { 149 return SDOUtil.isSet(this, propertyIndex); 150 } 151 152 157 public void unset(int propertyIndex) 158 { 159 SDOUtil.unset(this, propertyIndex); 160 } 161 162 167 public Object get(Property property) 168 { 169 return SDOUtil.get(this, property); 170 } 171 172 177 public void set(Property property, Object value) 178 { 179 SDOUtil.set(this, property, value); 180 } 181 182 187 public boolean isSet(Property property) 188 { 189 return SDOUtil.isSet(this, property); 190 } 191 192 197 public void unset(Property property) 198 { 199 SDOUtil.unset(this, property); 200 } 201 202 207 public DataObject getContainer() 208 { 209 return SDOUtil.getContainer(this); 210 } 211 212 217 public Property getContainmentProperty() 218 { 219 return SDOUtil.getContainmentProperty(this); 220 } 221 222 227 public DataGraph getDataGraph() 228 { 229 return SDOUtil.getDataGraph(this); 230 } 231 232 237 public Type getType() 238 { 239 return SDOUtil.getType(this); 240 } 241 242 247 public BigDecimal getBigDecimal(String path) 248 { 249 return SDOUtil.getBigDecimal(this, path); 250 } 251 252 257 public BigInteger getBigInteger(String path) 258 { 259 return SDOUtil.getBigInteger(this, path); 260 } 261 262 267 public boolean getBoolean(String path) 268 { 269 return SDOUtil.getBoolean(this, path); 270 } 271 272 277 public byte getByte(String path) 278 { 279 return SDOUtil.getByte(this, path); 280 } 281 282 287 public byte[] getBytes(String path) 288 { 289 return SDOUtil.getBytes(this, path); 290 } 291 292 297 public char getChar(String path) 298 { 299 return SDOUtil.getChar(this, path); 300 } 301 302 307 public DataObject getDataObject(String path) 308 { 309 return SDOUtil.getDataObject(this, path); 310 } 311 312 317 public Date getDate(String path) 318 { 319 return SDOUtil.getDate(this, path); 320 } 321 322 327 public double getDouble(String path) 328 { 329 return SDOUtil.getDouble(this, path); 330 } 331 332 337 public float getFloat(String path) 338 { 339 return SDOUtil.getFloat(this, path); 340 } 341 342 347 public int getInt(String path) 348 { 349 return SDOUtil.getInt(this, path); 350 } 351 352 357 public List getList(String path) 358 { 359 return SDOUtil.getList(this, path); 360 } 361 362 367 public long getLong(String path) 368 { 369 return SDOUtil.getLong(this, path); 370 } 371 372 377 public Sequence getSequence(String path) 378 { 379 return SDOUtil.getSequence(this, path); 380 } 381 382 387 public short getShort(String path) 388 { 389 return SDOUtil.getShort(this, path); 390 } 391 392 397 public String getString(String path) 398 { 399 return SDOUtil.getString(this, path); 400 } 401 402 407 public void setBigDecimal(String path, BigDecimal value) 408 { 409 SDOUtil.setBigDecimal(this, path, value); 410 } 411 412 417 public void setBigInteger(String path, BigInteger value) 418 { 419 SDOUtil.setBigInteger(this, path, value); 420 } 421 422 427 public void setBoolean(String path, boolean value) 428 { 429 SDOUtil.setBoolean(this, path, value); 430 } 431 432 437 public void setByte(String path, byte value) 438 { 439 SDOUtil.setByte(this, path, value); 440 } 441 442 447 public void setBytes(String path, byte[] value) 448 { 449 SDOUtil.setBytes(this, path, value); 450 } 451 452 457 public void setChar(String path, char value) 458 { 459 SDOUtil.setChar(this, path, value); 460 } 461 462 467 public void setDataObject(String path, DataObject value) 468 { 469 SDOUtil.setDataObject(this, path, value); 470 } 471 472 477 public void setDate(String path, Date value) 478 { 479 SDOUtil.setDate(this, path, value); 480 } 481 482 487 public void setDouble(String path, double value) 488 { 489 SDOUtil.setDouble(this, path, value); 490 } 491 492 497 public void setFloat(String path, float value) 498 { 499 SDOUtil.setFloat(this, path, value); 500 } 501 502 507 public void setInt(String path, int value) 508 { 509 SDOUtil.setInt(this, path, value); 510 } 511 512 517 public void setList(String path, List value) 518 { 519 SDOUtil.setList(this, path, value); 520 } 521 522 527 public void setLong(String path, long value) 528 { 529 SDOUtil.setLong(this, path, value); 530 } 531 532 537 public void setShort(String path, short value) 538 { 539 SDOUtil.setShort(this, path, value); 540 } 541 542 547 public void setString(String path, String value) 548 { 549 SDOUtil.setString(this, path, value); 550 } 551 552 557 public BigDecimal getBigDecimal(int propertyIndex) 558 { 559 return SDOUtil.getBigDecimal(this, propertyIndex); 560 } 561 562 567 public BigInteger getBigInteger(int propertyIndex) 568 { 569 return SDOUtil.getBigInteger(this, propertyIndex); 570 } 571 572 577 public boolean getBoolean(int propertyIndex) 578 { 579 return SDOUtil.getBoolean(this, propertyIndex); 580 } 581 582 587 public byte getByte(int propertyIndex) 588 { 589 return SDOUtil.getByte(this, propertyIndex); 590 } 591 592 597 public byte[] getBytes(int propertyIndex) 598 { 599 return SDOUtil.getBytes(this, propertyIndex); 600 } 601 602 607 public char getChar(int propertyIndex) 608 { 609 return SDOUtil.getChar(this, propertyIndex); 610 } 611 612 617 public DataObject getDataObject(int propertyIndex) 618 { 619 return SDOUtil.getDataObject(this, propertyIndex); 620 } 621 622 627 public Date getDate(int propertyIndex) 628 { 629 return SDOUtil.getDate(this, propertyIndex); 630 } 631 632 637 public double getDouble(int propertyIndex) 638 { 639 return SDOUtil.getDouble(this, propertyIndex); 640 } 641 642 647 public float getFloat(int propertyIndex) 648 { 649 return SDOUtil.getFloat(this, propertyIndex); 650 } 651 652 657 public int getInt(int propertyIndex) 658 { 659 return SDOUtil.getInt(this, propertyIndex); 660 } 661 662 667 public List getList(int propertyIndex) 668 { 669 return SDOUtil.getList(this, propertyIndex); 670 } 671 672 677 public long getLong(int propertyIndex) 678 { 679 return SDOUtil.getLong(this, propertyIndex); 680 } 681 682 687 public Sequence getSequence(int propertyIndex) 688 { 689 return SDOUtil.getSequence(this, propertyIndex); 690 } 691 692 697 public short getShort(int propertyIndex) 698 { 699 return SDOUtil.getShort(this, propertyIndex); 700 } 701 702 707 public String getString(int propertyIndex) 708 { 709 return SDOUtil.getString(this, propertyIndex); 710 } 711 712 717 public void setBigDecimal(int propertyIndex, BigDecimal value) 718 { 719 SDOUtil.setBigDecimal(this, propertyIndex, value); 720 } 721 722 727 public void setBigInteger(int propertyIndex, BigInteger value) 728 { 729 SDOUtil.setBigInteger(this, propertyIndex, value); 730 } 731 732 737 public void setBoolean(int propertyIndex, boolean value) 738 { 739 SDOUtil.setBoolean(this, propertyIndex, value); 740 } 741 742 747 public void setByte(int propertyIndex, byte value) 748 { 749 SDOUtil.setByte(this, propertyIndex, value); 750 } 751 752 757 public void setBytes(int propertyIndex, byte[] value) 758 { 759 SDOUtil.setBytes(this, propertyIndex, value); 760 } 761 762 767 public void setChar(int propertyIndex, char value) 768 { 769 SDOUtil.setChar(this, propertyIndex, value); 770 } 771 772 777 public void setDataObject(int propertyIndex, DataObject value) 778 { 779 SDOUtil.setDataObject(this, propertyIndex, value); 780 } 781 782 787 public void setDate(int propertyIndex, Date value) 788 { 789 SDOUtil.setDate(this, propertyIndex, value); 790 } 791 792 797 public void setDouble(int propertyIndex, double value) 798 { 799 SDOUtil.setDouble(this, propertyIndex, value); 800 } 801 802 807 public void setFloat(int propertyIndex, float value) 808 { 809 SDOUtil.setFloat(this, propertyIndex, value); 810 } 811 812 817 public void setInt(int propertyIndex, int value) 818 { 819 SDOUtil.setInt(this, propertyIndex, value); 820 } 821 822 827 public void setList(int propertyIndex, List value) 828 { 829 SDOUtil.setList(this, propertyIndex, value); 830 } 831 832 837 public void setLong(int propertyIndex, long value) 838 { 839 SDOUtil.setLong(this, propertyIndex, value); 840 } 841 842 847 public void setShort(int propertyIndex, short value) 848 { 849 SDOUtil.setShort(this, propertyIndex, value); 850 } 851 852 857 public void setString(int propertyIndex, String value) 858 { 859 SDOUtil.setString(this, propertyIndex, value); 860 } 861 862 867 public BigDecimal getBigDecimal(Property property) 868 { 869 return SDOUtil.getBigDecimal(this, property); 870 } 871 872 877 public BigInteger getBigInteger(Property property) 878 { 879 return SDOUtil.getBigInteger(this, property); 880 } 881 882 887 public boolean getBoolean(Property property) 888 { 889 return SDOUtil.getBoolean(this, property); 890 } 891 892 897 public byte getByte(Property property) 898 { 899 return SDOUtil.getByte(this, property); 900 } 901 902 907 public byte[] getBytes(Property property) 908 { 909 return SDOUtil.getBytes(this, property); 910 } 911 912 917 public char getChar(Property property) 918 { 919 return SDOUtil.getChar(this, property); 920 } 921 922 927 public DataObject getDataObject(Property property) 928 { 929 return SDOUtil.getDataObject(this, property); 930 } 931 932 937 public Date getDate(Property property) 938 { 939 return SDOUtil.getDate(this, property); 940 } 941 942 947 public double getDouble(Property property) 948 { 949 return SDOUtil.getDouble(this, property); 950 } 951 952 957 public float getFloat(Property property) 958 { 959 return SDOUtil.getFloat(this, property); 960 } 961 962 967 public int getInt(Property property) 968 { 969 return SDOUtil.getInt(this, property); 970 } 971 972 977 public List getList(Property property) 978 { 979 return SDOUtil.getList(this, property); 980 } 981 982 987 public long getLong(Property property) 988 { 989 return SDOUtil.getLong(this, property); 990 } 991 992 997 public Sequence getSequence(Property property) 998 { 999 return SDOUtil.getSequence(this, property); 1000 } 1001 1002 1007 public short getShort(Property property) 1008 { 1009 return SDOUtil.getShort(this, property); 1010 } 1011 1012 1017 public String getString(Property property) 1018 { 1019 return SDOUtil.getString(this, property); 1020 } 1021 1022 1027 public void setBigDecimal(Property property, BigDecimal value) 1028 { 1029 SDOUtil.setBigDecimal(this, property, value); 1030 } 1031 1032 1037 public void setBigInteger(Property property, BigInteger value) 1038 { 1039 SDOUtil.setBigInteger(this, property, value); 1040 } 1041 1042 1047 public void setBoolean(Property property, boolean value) 1048 { 1049 SDOUtil.setBoolean(this, property, value); 1050 } 1051 1052 1057 public void setByte(Property property, byte value) 1058 { 1059 SDOUtil.setByte(this, property, value); 1060 } 1061 1062 1067 public void setBytes(Property property, byte[] value) 1068 { 1069 SDOUtil.setBytes(this, property, value); 1070 } 1071 1072 1077 public void setChar(Property property, char value) 1078 { 1079 SDOUtil.setChar(this, property, value); 1080 } 1081 1082 1087 public void setDataObject(Property property, DataObject value) 1088 { 1089 SDOUtil.setDataObject(this, property, value); 1090 } 1091 1092 1097 public void setDate(Property property, Date value) 1098 { 1099 SDOUtil.setDate(this, property, value); 1100 } 1101 1102 1107 public void setDouble(Property property, double value) 1108 { 1109 SDOUtil.setDouble(this, property, value); 1110 } 1111 1112 1117 public void setFloat(Property property, float value) 1118 { 1119 SDOUtil.setFloat(this, property, value); 1120 } 1121 1122 1127 public void setInt(Property property, int value) 1128 { 1129 SDOUtil.setInt(this, property, value); 1130 } 1131 1132 1137 public void setList(Property property, List value) 1138 { 1139 SDOUtil.setList(this, property, value); 1140 } 1141 1142 1147 public void setLong(Property property, long value) 1148 { 1149 SDOUtil.setLong(this, property, value); 1150 } 1151 1152 1157 public void setShort(Property property, short value) 1158 { 1159 SDOUtil.setShort(this, property, value); 1160 } 1161 1162 1167 public void setString(Property property, String value) 1168 { 1169 SDOUtil.setString(this, property, value); 1170 } 1171 1172 1177 public DataObject createDataObject(String propertyName) 1178 { 1179 return SDOUtil.createDataObject(this, propertyName); 1180 } 1181 1182 1187 public DataObject createDataObject(int propertyIndex) 1188 { 1189 return SDOUtil.createDataObject(this, propertyIndex); 1190 } 1191 1192 1197 public DataObject createDataObject(Property property) 1198 { 1199 return SDOUtil.createDataObject(this, property); 1200 } 1201 1202 1207 public DataObject createDataObject(String propertyName, String namespaceURI, String typeName) 1208 { 1209 return SDOUtil.createDataObject(this, propertyName, namespaceURI, typeName); 1210 } 1211 1212 1217 public DataObject createDataObject(int propertyIndex, String namespaceURI, String typeName) 1218 { 1219 return SDOUtil.createDataObject(this, propertyIndex, namespaceURI, typeName); 1220 } 1221 1222 1227 public DataObject createDataObject(Property property, Type type) 1228 { 1229 return SDOUtil.createDataObject(this, property, type); 1230 } 1231 1232 1237 public void delete() 1238 { 1239 SDOUtil.delete(this); 1240 } 1241 1242 1247 public List getInstanceProperties() 1248 { 1249 return SDOUtil.getInstanceProperties(this); 1250 } 1251 1252 1257 public Object writeReplace() throws ObjectStreamException 1258 { 1259 return SDOUtil.writeReplace(this); 1260 } 1261 1262 1267 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs) 1268 { 1269 if (featureID >= 0) 1270 { 1271 switch (eDerivedStructuralFeatureID(featureID, baseClass)) 1272 { 1273 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__MIXED: 1274 return ((InternalEList)getMixed()).basicRemove(otherEnd, msgs); 1275 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY: 1276 return ((InternalEList)getAny()).basicRemove(otherEnd, msgs); 1277 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY_ATTRIBUTE: 1278 return ((InternalEList)getAnyAttribute()).basicRemove(otherEnd, msgs); 1279 default: 1280 return eDynamicInverseRemove(otherEnd, featureID, baseClass, msgs); 1281 } 1282 } 1283 return eBasicSetContainer(null, featureID, msgs); 1284 } 1285 1286 1291 public Object eGet(EStructuralFeature eFeature, boolean resolve) 1292 { 1293 switch (eDerivedStructuralFeatureID(eFeature)) 1294 { 1295 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__MIXED: 1296 return getMixed(); 1297 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY: 1298 return getAny(); 1299 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY_ATTRIBUTE: 1300 return getAnyAttribute(); 1301 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__RAW_VALUE: 1302 return getRawValue(); 1303 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__VALUE: 1304 return getValue(); 1305 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__INSTANCE_TYPE: 1306 return getInstanceType(); 1307 } 1308 return eDynamicGet(eFeature, resolve); 1309 } 1310 1311 1316 public void eSet(EStructuralFeature eFeature, Object newValue) 1317 { 1318 switch (eDerivedStructuralFeatureID(eFeature)) 1319 { 1320 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__MIXED: 1321 getMixed().clear(); 1322 getMixed().addAll((Collection )newValue); 1323 return; 1324 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY: 1325 getAny().clear(); 1326 getAny().addAll((Collection )newValue); 1327 return; 1328 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY_ATTRIBUTE: 1329 getAnyAttribute().clear(); 1330 getAnyAttribute().addAll((Collection )newValue); 1331 return; 1332 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__RAW_VALUE: 1333 setRawValue((String )newValue); 1334 return; 1335 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__VALUE: 1336 setValue((Object )newValue); 1337 return; 1338 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__INSTANCE_TYPE: 1339 setInstanceType((EDataType)newValue); 1340 return; 1341 } 1342 eDynamicSet(eFeature, newValue); 1343 } 1344 1345 1350 public void eUnset(EStructuralFeature eFeature) 1351 { 1352 switch (eDerivedStructuralFeatureID(eFeature)) 1353 { 1354 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__MIXED: 1355 getMixed().clear(); 1356 return; 1357 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY: 1358 getAny().clear(); 1359 return; 1360 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY_ATTRIBUTE: 1361 getAnyAttribute().clear(); 1362 return; 1363 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__RAW_VALUE: 1364 setRawValue(RAW_VALUE_EDEFAULT); 1365 return; 1366 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__VALUE: 1367 setValue(VALUE_EDEFAULT); 1368 return; 1369 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__INSTANCE_TYPE: 1370 setInstanceType((EDataType)null); 1371 return; 1372 } 1373 eDynamicUnset(eFeature); 1374 } 1375 1376 1381 public boolean eIsSet(EStructuralFeature eFeature) 1382 { 1383 switch (eDerivedStructuralFeatureID(eFeature)) 1384 { 1385 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__MIXED: 1386 return mixed != null && !mixed.isEmpty(); 1387 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY: 1388 return !getAny().isEmpty(); 1389 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__ANY_ATTRIBUTE: 1390 return anyAttribute != null && !anyAttribute.isEmpty(); 1391 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__RAW_VALUE: 1392 return RAW_VALUE_EDEFAULT == null ? getRawValue() != null : !RAW_VALUE_EDEFAULT.equals(getRawValue()); 1393 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__VALUE: 1394 return VALUE_EDEFAULT == null ? getValue() != null : !VALUE_EDEFAULT.equals(getValue()); 1395 case SDOPackage.EDATA_OBJECT_SIMPLE_ANY_TYPE__INSTANCE_TYPE: 1396 return instanceType != null; 1397 } 1398 return eDynamicIsSet(eFeature); 1399 } 1400 1401} | Popular Tags |