1 55 package org.lateralnz.c3d; 56 57 import java.io.ByteArrayInputStream ; 58 import java.io.InputStream ; 59 import java.io.Reader ; 60 import java.io.Serializable ; 61 import java.io.StringReader ; 62 import java.math.BigDecimal ; 63 import java.net.MalformedURLException ; 64 import java.net.URL ; 65 import java.sql.Array ; 66 import java.sql.Blob ; 67 import java.sql.Clob ; 68 import java.sql.Date ; 69 import java.sql.Ref ; 70 import java.sql.ResultSet ; 71 import java.sql.ResultSetMetaData ; 72 import java.sql.SQLException ; 73 import java.sql.SQLWarning ; 74 import java.sql.Statement ; 75 import java.sql.Time ; 76 import java.sql.Timestamp ; 77 import java.text.ParseException ; 78 import java.util.ArrayList ; 79 import java.util.HashMap ; 80 81 import org.lateralnz.common.util.Constants; 82 import org.lateralnz.common.util.DateUtils; 83 import org.lateralnz.common.util.IOUtils; 84 import org.lateralnz.common.util.StringUtils; 85 86 import org.lateralnz.c3d.util.Column; 87 import org.lateralnz.c3d.util.DBUtils; 88 import org.lateralnz.c3d.util.PositionData; 89 90 94 public class DCResultSet implements ResultSet , Serializable , Constants { 95 private static final String CLASSNAME = DCResultSet.class.getName(); 96 private static final String DBDATEFORMAT = "dbdateformat"; 97 private static final String T = "t"; 98 99 private String cacheName; 100 private boolean closed = false; private DCResultSetMetaData metadata; private transient DatabaseEngine dbengine; private String cursorName = null; private ArrayList rows = new ArrayList (); private int size; private String [] colnames; private int concurrency; 108 private int type; 109 protected long lastAccessed = System.currentTimeMillis(); 110 111 private String dateformat = null; 112 113 private HashMap positions = new HashMap (); 114 115 private DCResultSet(DatabaseEngine dbengine) { 116 this.dbengine = dbengine; 117 dateformat = dbengine.getProperty(DBDATEFORMAT); 118 } 119 120 public DCResultSet(String [] columnNames, ArrayList rows, DatabaseEngine dbengine) { 121 this(dbengine); 122 this.metadata = new DCResultSetMetaData(columnNames); 123 this.rows = rows; 124 this.size = rows.size(); 125 } 126 127 public DCResultSet(String cacheName, String sql, ResultSet rs, DatabaseEngine dbengine, int concurrency, int type) throws SQLException { 128 this(dbengine); 129 this.cacheName = cacheName; 130 this.concurrency = concurrency; 131 this.type = type; 132 133 if (rs != null) { 134 this.cursorName = rs.getCursorName(); 135 ResultSetMetaData rsmd = rs.getMetaData(); 136 int count = rsmd.getColumnCount(); 137 int i, j; 138 139 int[] types = new int[count]; 140 colnames = new String [count]; 141 for (i = 0, j = 1; i < count; i++, j++) { 142 types[i] = rsmd.getColumnType(j); 143 colnames[i] = rsmd.getColumnName(j); 144 } 145 146 int[] keyColumns = null; 147 if (!StringUtils.isEmpty(cacheName)) { 148 keyColumns = dbengine.getPrimaryKeyColumns(cacheName, rsmd); 149 if (keyColumns == null) { 150 throw new SQLException ("unable to match columns in resultset with primary keys"); 151 } 152 } 153 154 Column[] cols; 155 while (rs.next()) { 156 cols = new Column[count]; 157 for (i = 0, j = 1; i < count; i++, j++) { 158 cols[i] = DBUtils.createColumn(rs, types, j); 159 } 160 if (keyColumns != null) { 161 String [] keyData = DBUtils.getKeyColumnData(keyColumns, rs); 162 dbengine.setKeyToResultSetLink(cacheName, keyData, sql); 163 } 164 165 rows.add(cols); 166 } 167 168 this.metadata = new DCResultSetMetaData(rsmd); 169 } 170 else { 171 metadata = new DCResultSetMetaData(); 172 } 173 174 size = rows.size(); 175 176 if (size > 0 && cacheName != null && sql != null) { 177 dbengine.setCachedResultSet(cacheName, sql, this); 178 } 179 } 180 181 private PositionData getPosition() throws SQLException { 182 return (PositionData)DBUtils.getObjectFromMap(Integer.toString(System.identityHashCode(Thread.currentThread())), positions, PositionData.class); 183 } 184 185 private void sanityCheck() throws SQLException { 186 } 191 192 private Column getColumn(int idx) throws SQLException { 193 sanityCheck(); 194 if (isBeforeFirst() || isAfterLast()) { 195 throw new SQLException ("resultset not correctly positioned"); 196 } 197 else { 198 PositionData pd = getPosition(); 199 IOUtils.close(pd.lastInputStream); 200 pd.lastInputStream = null; 201 IOUtils.close(pd.lastReader); 202 pd.lastReader = null; 203 pd.lastColumnWasNull = pd.currentcols[idx - 1].getNull(); 204 return pd.currentcols[idx - 1]; 205 } 206 } 207 208 private void setRow(PositionData pd) { 209 if (pd.rowpos >= 0 && pd.rowpos < size) { 210 pd.currentcols = (Column[])rows.get(pd.rowpos); 211 } 212 else { 213 pd.currentcols = null; 214 } 215 } 216 217 public boolean absolute(int param) throws SQLException { 218 sanityCheck(); 219 PositionData pd = getPosition(); 220 param--; 221 if (param < 0) { 222 pd.rowpos = -1; 223 setRow(pd); 224 return false; 225 } 226 else if (param >= size) { 227 pd.rowpos = size; 228 setRow(pd); 229 return false; 230 } 231 else { 232 pd.rowpos = param; 233 setRow(pd); 234 return true; 235 } 236 } 237 238 public void afterLast() throws SQLException { 239 sanityCheck(); 240 PositionData pd = getPosition(); 241 pd.rowpos = size; 242 setRow(pd); 243 } 244 245 public void beforeFirst() throws SQLException { 246 sanityCheck(); 247 PositionData pd = getPosition(); 248 pd.rowpos = -1; 249 setRow(pd); 250 } 251 252 255 public void cancelRowUpdates() throws SQLException { 256 throw new SQLException ("operation not supported"); 257 } 258 259 public void clearWarnings() throws SQLException { 260 } 261 262 public void close() throws SQLException { 263 PositionData pd = getPosition(); 264 pd.reset(); 265 positions.remove(Integer.toString(System.identityHashCode(Thread.currentThread()))); 266 } 267 268 271 public void deleteRow() throws SQLException { 272 throw new SQLException ("operation not supported"); 273 } 274 275 public int findColumn(String str) throws SQLException { 276 sanityCheck(); 277 if (StringUtils.isEmpty(str)) { 278 throw new SQLException ("empty column name"); 279 } 280 for (int i = 0; i < colnames.length; i++) { 281 if (colnames[i].equals(str)) { 282 return i + 1; 283 } 284 } 285 throw new SQLException ("unable to find column " + str); 286 } 287 288 public boolean first() throws SQLException { 289 sanityCheck(); 290 if (size < 1) { 291 return false; 292 } 293 PositionData pd = getPosition(); 294 pd.rowpos = 0; 295 setRow(pd); 296 return true; 297 } 298 299 302 public Array getArray(int param) throws SQLException { 303 throw new SQLException ("operation not supported"); 304 } 305 306 public Array getArray(String str) throws SQLException { 307 return getArray(findColumn(str)); 308 } 309 310 public InputStream getAsciiStream(int param) throws SQLException { 311 Column col = getColumn(param); 312 if (col.getNull()) { 313 return null; 314 } 315 else { 316 PositionData pd = getPosition(); 317 pd.lastInputStream = new ByteArrayInputStream (col.getValue()); 318 return pd.lastInputStream; 319 } 320 } 321 322 public InputStream getAsciiStream(String str) throws SQLException { 323 return getAsciiStream(findColumn(str)); 324 } 325 326 public BigDecimal getBigDecimal(int param) throws SQLException { 327 Column col = getColumn(param); 328 if (col.getNull()) { 329 return null; 330 } 331 else { 332 return new BigDecimal (new String (col.getValue())); 333 } 334 } 335 336 public BigDecimal getBigDecimal(String str) throws SQLException { 337 return getBigDecimal(findColumn(str)); 338 } 339 340 public BigDecimal getBigDecimal(int param, int param1) throws SQLException { 341 return getBigDecimal(param); 342 } 343 344 public BigDecimal getBigDecimal(String str, int param) throws SQLException { 345 return getBigDecimal(findColumn(str)); 346 } 347 348 public InputStream getBinaryStream(int param) throws SQLException { 349 Column col = getColumn(param); 350 if (col.getNull()) { 351 return null; 352 } 353 else { 354 PositionData pd = getPosition(); 355 pd.lastInputStream = new ByteArrayInputStream (col.getValue()); 356 return pd.lastInputStream; 357 } 358 } 359 360 public InputStream getBinaryStream(String str) throws SQLException { 361 return getBinaryStream(findColumn(str)); 362 } 363 364 367 public Blob getBlob(int param) throws SQLException { 368 throw new SQLException ("operation not supported"); 369 } 370 371 public Blob getBlob(String str) throws SQLException { 372 return getBlob(findColumn(str)); 373 } 374 375 public boolean getBoolean(int param) throws SQLException { 376 Column col = getColumn(param); 377 if (col.getNull()) { 378 return false; 379 } 380 else { 381 String s = new String (getColumn(param).getValue()); 382 if (s.equalsIgnoreCase(Y) || s.equalsIgnoreCase(T) || s.equalsIgnoreCase(TRUE)) { 383 return true; 384 } 385 else { 386 return false; 387 } 388 } 389 } 390 391 public boolean getBoolean(String str) throws SQLException { 392 return getBoolean(findColumn(str)); 393 } 394 395 public byte getByte(int param) throws SQLException { 396 Column col = getColumn(param); 397 if (col.getNull() || col.getValue() == null || col.getValue().length < 1) { 398 return 0; 399 } 400 else { 401 return col.getValue()[0]; 402 } 403 } 404 405 public byte getByte(String str) throws SQLException { 406 return getByte(findColumn(str)); 407 } 408 409 public byte[] getBytes(int param) throws SQLException { 410 return getColumn(param).getValue(); 411 } 412 413 public byte[] getBytes(String str) throws SQLException { 414 return getBytes(findColumn(str)); 415 } 416 417 public Reader getCharacterStream(int param) throws SQLException { 418 Column col = getColumn(param); 419 if (col.getNull()) { 420 return null; 421 } 422 else { 423 PositionData pd = getPosition(); 424 pd.lastReader = new StringReader (new String (col.getValue())); 425 return pd.lastReader; 426 } 427 } 428 429 public Reader getCharacterStream(String str) throws SQLException { 430 return getCharacterStream(findColumn(str)); 431 } 432 433 436 public Clob getClob(int param) throws SQLException { 437 throw new SQLException ("operation not supported"); 438 } 439 440 public Clob getClob(String str) throws SQLException { 441 return getClob(findColumn(str)); 442 } 443 444 public int getConcurrency() throws SQLException { 445 return concurrency; 446 } 447 448 public String getCursorName() throws SQLException { 449 return cursorName; 450 } 451 452 public Date getDate(int param) throws SQLException { 453 Column col = getColumn(param); 454 if (col.getNull()) { 455 return null; 456 } 457 else { 458 try { 459 String s = new String (col.getValue()); 460 java.util.Date d = DateUtils.parseDate(CLASSNAME, s, dateformat); 461 return new Date (d.getTime()); 462 } 463 catch (ParseException pe) { 464 throw new SQLException ("unexpected date format"); 465 } 466 } 467 } 468 469 public Date getDate(String str) throws SQLException { 470 return getDate(findColumn(str)); 471 } 472 473 476 public Date getDate(int param, java.util.Calendar calendar) throws SQLException { 477 throw new SQLException ("operation not supported"); 478 } 479 480 public Date getDate(String str, java.util.Calendar calendar) throws SQLException { 481 return getDate(findColumn(str), calendar); 482 } 483 484 public double getDouble(int param) throws SQLException { 485 Column col = getColumn(param); 486 if (col.getNull()) { 487 return 0.0d; 488 } 489 else { 490 return Double.parseDouble(new String (col.getValue())); 491 } 492 } 493 494 public double getDouble(String str) throws SQLException { 495 return getDouble(findColumn(str)); 496 } 497 498 public int getFetchDirection() throws SQLException { 499 return ResultSet.FETCH_UNKNOWN; 500 } 501 502 505 public int getFetchSize() throws SQLException { 506 throw new SQLException ("operation not supported"); 507 } 508 509 public float getFloat(int param) throws SQLException { 510 Column col = getColumn(param); 511 if (col.getNull()) { 512 return 0.0f; 513 } 514 else { 515 return Float.parseFloat(new String (col.getValue())); 516 } 517 } 518 519 public float getFloat(String str) throws SQLException { 520 return getFloat(findColumn(str)); 521 } 522 523 public int getInt(int param) throws SQLException { 524 Column col = getColumn(param); 525 if (col.getNull()) { 526 return 0; 527 } 528 else { 529 return Integer.parseInt(new String (col.getValue())); 530 } 531 } 532 533 public int getInt(String str) throws SQLException { 534 return getInt(findColumn(str)); 535 } 536 537 public long getLong(int param) throws SQLException { 538 Column col = getColumn(param); 539 if (col.getNull()) { 540 return 0l; 541 } 542 else { 543 return Long.parseLong(new String (col.getValue())); 544 } 545 } 546 547 public long getLong(String str) throws SQLException { 548 return getLong(findColumn(str)); 549 } 550 551 public ResultSetMetaData getMetaData() throws SQLException { 552 return metadata; 553 } 554 555 558 public Object getObject(int param) throws SQLException { 559 throw new SQLException ("operation not supported"); 560 } 561 562 public Object getObject(String str) throws SQLException { 563 return getObject(findColumn(str)); 564 } 565 566 569 public Object getObject(int param, java.util.Map map) throws SQLException { 570 throw new SQLException ("operation not supported"); 571 } 572 573 public Object getObject(String str, java.util.Map map) throws SQLException { 574 return getObject(findColumn(str), map); 575 } 576 577 580 public Ref getRef(int param) throws SQLException { 581 throw new SQLException ("operation not supported"); 582 } 583 584 public Ref getRef(String str) throws SQLException { 585 return getRef(findColumn(str)); 586 } 587 588 public int getRow() throws SQLException { 589 PositionData pd = getPosition(); 590 return pd.rowpos + 1; 591 } 592 593 public int getRowCount() { 594 return size; 595 } 596 597 public short getShort(int param) throws SQLException { 598 Column col = getColumn(param); 599 if (col.getNull()) { 600 return 0; 601 } 602 else { 603 return Short.parseShort(new String (col.getValue())); 604 } 605 } 606 607 public short getShort(String str) throws SQLException { 608 return getShort(findColumn(str)); 609 } 610 611 614 public Statement getStatement() throws SQLException { 615 return null; 616 } 617 618 public String getString(int param) throws SQLException { 619 Column col = getColumn(param); 620 if (col.getNull()) { 621 return null; 622 } 623 else { 624 return new String (col.getValue()); 625 } 626 } 627 628 public String getString(String str) throws SQLException { 629 return getString(findColumn(str)); 630 } 631 632 public Time getTime(int param) throws SQLException { 633 Column col = getColumn(param); 634 if (col.getNull()) { 635 return null; 636 } 637 else { 638 String s = new String (col.getValue()); 639 if (s.indexOf('.') >= 0) { 640 s = s.substring(0, s.indexOf('.')); 641 } 642 return Time.valueOf(s); 643 } 644 } 645 646 public Time getTime(String str) throws SQLException { 647 return getTime(findColumn(str)); 648 } 649 650 653 public Time getTime(int param, java.util.Calendar calendar) throws SQLException { 654 throw new SQLException ("operation not supported"); 655 } 656 657 public Time getTime(String str, java.util.Calendar calendar) throws SQLException { 658 return getTime(findColumn(str), calendar); 659 } 660 661 public Timestamp getTimestamp(int param) throws SQLException { 662 Column col = getColumn(param); 663 if (col.getNull()) { 664 return null; 665 } 666 else { 667 return Timestamp.valueOf(new String (col.getValue())); 668 } 669 } 670 671 public Timestamp getTimestamp(String str) throws SQLException { 672 return getTimestamp(findColumn(str)); 673 } 674 675 678 public Timestamp getTimestamp(int param, java.util.Calendar calendar) throws SQLException { 679 throw new SQLException ("operation not supported"); 680 } 681 682 public Timestamp getTimestamp(String str, java.util.Calendar calendar) throws SQLException { 683 return getTimestamp(findColumn(str), calendar); 684 } 685 686 public int getType() throws SQLException { 687 return type; 688 } 689 690 public URL getURL(int param) throws SQLException { 691 Column col = getColumn(param); 692 if (col.getNull()) { 693 return null; 694 } 695 else { 696 try { 697 return new URL (new String (col.getValue())); 698 } 699 catch (MalformedURLException mue) { 700 throw new SQLException ("not a url"); 701 } 702 } 703 } 704 705 public URL getURL(String str) throws SQLException { 706 return getURL(findColumn(str)); 707 } 708 709 712 public InputStream getUnicodeStream(String str) throws SQLException { 713 throw new SQLException ("operation not supported"); 714 } 715 716 719 public InputStream getUnicodeStream(int param) throws SQLException { 720 throw new SQLException ("operation not supported"); 721 } 722 723 public SQLWarning getWarnings() throws SQLException { 724 return null; 725 } 726 727 730 public void insertRow() throws SQLException { 731 throw new SQLException ("operation not supported"); 732 } 733 734 public boolean isAfterLast() throws SQLException { 735 sanityCheck(); 736 PositionData pd = getPosition(); 737 return pd.rowpos >= size; 738 } 739 740 public boolean isBeforeFirst() throws SQLException { 741 sanityCheck(); 742 PositionData pd = getPosition(); 743 return pd.rowpos < 0; 744 } 745 746 public boolean isFirst() throws SQLException { 747 sanityCheck(); 748 PositionData pd = getPosition(); 749 return pd.rowpos == 0; 750 } 751 752 public boolean isLast() throws SQLException { 753 sanityCheck(); 754 PositionData pd = getPosition(); 755 return pd.rowpos == size-1; 756 } 757 758 public boolean last() throws SQLException { 759 sanityCheck(); 760 if (size < 1) { 761 return false; 762 } 763 PositionData pd = getPosition(); 764 pd.rowpos = size-1; 765 setRow(pd); 766 return true; 767 } 768 769 772 public void moveToCurrentRow() throws SQLException { 773 throw new SQLException ("operation not supported"); 774 } 775 776 779 public void moveToInsertRow() throws SQLException { 780 throw new SQLException ("operation not supported"); 781 } 782 783 public boolean next() throws SQLException { 784 sanityCheck(); 785 if (isBeforeFirst()) { 786 return first(); 787 } 788 else { 789 PositionData pd = getPosition(); 790 pd.rowpos++; 791 if (pd.rowpos >= size) { 792 return false; 793 } 794 else { 795 setRow(pd); 796 return true; 797 } 798 } 799 } 800 801 public boolean previous() throws SQLException { 802 sanityCheck(); 803 PositionData pd = getPosition(); 804 pd.rowpos--; 805 if (pd.rowpos < 0) { 806 return false; 807 } 808 else { 809 setRow(pd); 810 return true; 811 } 812 } 813 814 817 public void refreshRow() throws SQLException { 818 throw new SQLException ("operation not supported"); 819 } 820 821 public boolean relative(int param) throws SQLException { 822 return false; 823 } 824 825 public boolean rowDeleted() throws SQLException { 826 return false; 827 } 828 829 public boolean rowInserted() throws SQLException { 830 return false; 831 } 832 833 public boolean rowUpdated() throws SQLException { 834 return false; 835 } 836 837 840 public void setFetchDirection(int param) throws SQLException { 841 throw new SQLException ("operation not supported"); 842 } 843 844 847 public void setFetchSize(int param) throws SQLException { 848 throw new SQLException ("operation not supported"); 849 } 850 851 854 public void updateArray(String str, Array array) throws SQLException { 855 throw new SQLException ("operation not supported"); 856 } 857 858 861 public void updateArray(int param, Array array) throws SQLException { 862 throw new SQLException ("operation not supported"); 863 } 864 865 868 public void updateAsciiStream(String str, InputStream inputStream, int param) throws SQLException { 869 throw new SQLException ("operation not supported"); 870 } 871 872 875 public void updateAsciiStream(int param, InputStream inputStream, int param2) throws SQLException { 876 throw new SQLException ("operation not supported"); 877 } 878 879 882 public void updateBigDecimal(String str, BigDecimal bigDecimal) throws SQLException { 883 throw new SQLException ("operation not supported"); 884 } 885 886 889 public void updateBigDecimal(int param, BigDecimal bigDecimal) throws SQLException { 890 throw new SQLException ("operation not supported"); 891 } 892 893 896 public void updateBinaryStream(int param, InputStream inputStream, int param2) throws SQLException { 897 throw new SQLException ("operation not supported"); 898 } 899 900 903 public void updateBinaryStream(String str, InputStream inputStream, int param) throws SQLException { 904 throw new SQLException ("operation not supported"); 905 } 906 907 910 public void updateBlob(int param, java.sql.Blob blob) throws SQLException { 911 throw new SQLException ("operation not supported"); 912 } 913 914 917 public void updateBlob(String str, java.sql.Blob blob) throws SQLException { 918 throw new SQLException ("operation not supported"); 919 } 920 921 924 public void updateBoolean(int param, boolean param1) throws SQLException { 925 throw new SQLException ("operation not supported"); 926 } 927 928 931 public void updateBoolean(String str, boolean param) throws SQLException { 932 throw new SQLException ("operation not supported"); 933 } 934 935 938 public void updateByte(int param, byte param1) throws SQLException { 939 throw new SQLException ("operation not supported"); 940 } 941 942 945 public void updateByte(String str, byte param) throws SQLException { 946 throw new SQLException ("operation not supported"); 947 } 948 949 952 public void updateBytes(int param, byte[] values) throws SQLException { 953 throw new SQLException ("operation not supported"); 954 } 955 956 959 public void updateBytes(String str, byte[] values) throws SQLException { 960 throw new SQLException ("operation not supported"); 961 } 962 963 966 public void updateCharacterStream(int param, java.io.Reader reader, int param2) throws SQLException { 967 throw new SQLException ("operation not supported"); 968 } 969 970 973 public void updateCharacterStream(String str, java.io.Reader reader, int param) throws SQLException { 974 throw new SQLException ("operation not supported"); 975 } 976 977 980 public void updateClob(String str, java.sql.Clob clob) throws SQLException { 981 throw new SQLException ("operation not supported"); 982 } 983 984 987 public void updateClob(int param, java.sql.Clob clob) throws SQLException { 988 throw new SQLException ("operation not supported"); 989 } 990 991 994 public void updateDate(int param, Date date) throws SQLException { 995 throw new SQLException ("operation not supported"); 996 } 997 998 1001 public void updateDate(String str, Date date) throws SQLException { 1002 throw new SQLException ("operation not supported"); 1003 } 1004 1005 1008 public void updateDouble(int param, double param1) throws SQLException { 1009 throw new SQLException ("operation not supported"); 1010 } 1011 1012 1015 public void updateDouble(String str, double param) throws SQLException { 1016 throw new SQLException ("operation not supported"); 1017 } 1018 1019 1022 public void updateFloat(String str, float param) throws SQLException { 1023 throw new SQLException ("operation not supported"); 1024 } 1025 1026 1029 public void updateFloat(int param, float param1) throws SQLException { 1030 throw new SQLException ("operation not supported"); 1031 } 1032 1033 1036 public void updateInt(String str, int param) throws SQLException { 1037 throw new SQLException ("operation not supported"); 1038 } 1039 1040 1043 public void updateInt(int param, int param1) throws SQLException { 1044 throw new SQLException ("operation not supported"); 1045 } 1046 1047 1050 public void updateLong(int param, long param1) throws SQLException { 1051 throw new SQLException ("operation not supported"); 1052 } 1053 1054 1057 public void updateLong(String str, long param) throws SQLException { 1058 throw new SQLException ("operation not supported"); 1059 } 1060 1061 1064 public void updateNull(String str) throws SQLException { 1065 throw new SQLException ("operation not supported"); 1066 } 1067 1068 1071 public void updateNull(int param) throws SQLException { 1072 throw new SQLException ("operation not supported"); 1073 } 1074 1075 1078 public void updateObject(String str, Object obj) throws SQLException { 1079 throw new SQLException ("operation not supported"); 1080 } 1081 1082 1085 public void updateObject(int param, Object obj) throws SQLException { 1086 throw new SQLException ("operation not supported"); 1087 } 1088 1089 1091 public void updateObject(int param, Object obj, int param2) throws SQLException { 1092 throw new SQLException ("operation not supported"); 1093 } 1094 1095 1098 public void updateObject(String str, Object obj, int param) throws SQLException { 1099 throw new SQLException ("operation not supported"); 1100 } 1101 1102 1105 public void updateRef(int param, java.sql.Ref ref) throws SQLException { 1106 throw new SQLException ("operation not supported"); 1107 } 1108 1109 1112 public void updateRef(String str, java.sql.Ref ref) throws SQLException { 1113 throw new SQLException ("operation not supported"); 1114 } 1115 1116 public void updateRow() throws SQLException { 1119 throw new SQLException ("operation not supported"); 1120 } 1121 1122 1125 public void updateShort(int param, short param1) throws SQLException { 1126 throw new SQLException ("operation not supported"); 1127 } 1128 1129 1132 public void updateShort(String str, short param) throws SQLException { 1133 throw new SQLException ("operation not supported"); 1134 } 1135 1136 1139 public void updateString(int param, String str) throws SQLException { 1140 throw new SQLException ("operation not supported"); 1141 } 1142 1143 1146 public void updateString(String str, String str1) throws SQLException { 1147 throw new SQLException ("operation not supported"); 1148 } 1149 1150 1153 public void updateTime(String str, Time time) throws SQLException { 1154 throw new SQLException ("operation not supported"); 1155 } 1156 1157 1160 public void updateTime(int param, Time time) throws SQLException { 1161 throw new SQLException ("operation not supported"); 1162 } 1163 1164 1167 public void updateTimestamp(String str, Timestamp timestamp) throws SQLException { 1168 throw new SQLException ("operation not supported"); 1169 } 1170 1171 1174 public void updateTimestamp(int param, Timestamp timestamp) throws SQLException { 1175 throw new SQLException ("operation not supported"); 1176 } 1177 1178 public boolean wasNull() throws SQLException { 1179 sanityCheck(); 1180 PositionData pd = getPosition(); 1181 return pd.lastColumnWasNull; 1182 } 1183} | Popular Tags |