| 1 2 9 10 package org.objectweb.rmijdbc; 11 12 import java.math.BigDecimal ; 13 import java.sql.*; 14 import java.rmi.RemoteException ; 15 16 21 61 62 public class RJResultSet implements java.sql.ResultSet , java.io.Serializable  63 { 64 65 RJResultSetInterface rmiResultSet_; 66 Statement statement_ = null; 67 68 public RJResultSet(RJResultSetInterface r, Statement st) { 69 rmiResultSet_ = r; 70 statement_ = st; 71 } 72 73 85 public boolean next() throws java.sql.SQLException { 86 try { 87 return rmiResultSet_.next(); 88 } catch(RemoteException e) { 89 throw new java.sql.SQLException (e.getMessage()); 90 } 91 } 92 93 94 106 public void close() throws java.sql.SQLException { 107 try { 108 rmiResultSet_.close(); 109 } catch(RemoteException e) { 110 throw new java.sql.SQLException (e.getMessage()); 111 } 112 } 113 114 123 public boolean wasNull() throws java.sql.SQLException { 124 try { 125 return rmiResultSet_.wasNull(); 126 } catch(RemoteException e) { 127 throw new java.sql.SQLException (e.getMessage()); 128 } 129 } 130 131 135 141 public String getString(int columnIndex) throws java.sql.SQLException { 142 try { 143 return rmiResultSet_.getString(columnIndex); 144 } catch(RemoteException e) { 145 throw new java.sql.SQLException (e.getMessage()); 146 } 147 } 148 149 155 public boolean getBoolean(int columnIndex) throws java.sql.SQLException { 156 try { 157 return rmiResultSet_.getBoolean(columnIndex); 158 } catch(RemoteException e) { 159 throw new java.sql.SQLException (e.getMessage()); 160 } 161 } 162 163 169 public byte getByte(int columnIndex) throws java.sql.SQLException { 170 try { 171 return rmiResultSet_.getByte(columnIndex); 172 } catch(RemoteException e) { 173 throw new java.sql.SQLException (e.getMessage()); 174 } 175 } 176 177 183 public short getShort(int columnIndex) throws java.sql.SQLException { 184 try { 185 return rmiResultSet_.getShort(columnIndex); 186 } catch(RemoteException e) { 187 throw new java.sql.SQLException (e.getMessage()); 188 } 189 } 190 191 197 public int getInt(int columnIndex) throws java.sql.SQLException { 198 try { 199 return rmiResultSet_.getInt(columnIndex); 200 } catch(RemoteException e) { 201 throw new java.sql.SQLException (e.getMessage()); 202 } 203 } 204 205 211 public long getLong(int columnIndex) throws java.sql.SQLException { 212 try { 213 return rmiResultSet_.getLong(columnIndex); 214 } catch(RemoteException e) { 215 throw new java.sql.SQLException (e.getMessage()); 216 } 217 } 218 219 225 public float getFloat(int columnIndex) throws java.sql.SQLException { 226 try { 227 return rmiResultSet_.getFloat(columnIndex); 228 } catch(RemoteException e) { 229 throw new java.sql.SQLException (e.getMessage()); 230 } 231 } 232 233 239 public double getDouble(int columnIndex) throws java.sql.SQLException { 240 try { 241 return rmiResultSet_.getDouble(columnIndex); 242 } catch(RemoteException e) { 243 throw new java.sql.SQLException (e.getMessage()); 244 } 245 } 246 247 254 public BigDecimal getBigDecimal(int columnIndex, int scale) 255 throws java.sql.SQLException { 256 try { 257 return rmiResultSet_.getBigDecimal(columnIndex, scale); 258 } catch(RemoteException e) { 259 throw new java.sql.SQLException (e.getMessage()); 260 } 261 } 262 263 270 public byte[] getBytes(int columnIndex) throws java.sql.SQLException { 271 try { 272 return rmiResultSet_.getBytes(columnIndex); 273 } catch(RemoteException e) { 274 throw new java.sql.SQLException (e.getMessage()); 275 } 276 } 277 278 284 public java.sql.Date getDate(int columnIndex) throws java.sql.SQLException { 285 try { 286 return rmiResultSet_.getDate(columnIndex); 287 } catch(RemoteException e) { 288 throw new java.sql.SQLException (e.getMessage()); 289 } 290 } 291 292 298 public java.sql.Time getTime(int columnIndex) throws java.sql.SQLException { 299 try { 300 return rmiResultSet_.getTime(columnIndex); 301 } catch(RemoteException e) { 302 throw new java.sql.SQLException (e.getMessage()); 303 } 304 } 305 306 312 public java.sql.Timestamp getTimestamp(int columnIndex) 313 throws java.sql.SQLException { 314 try { 315 return rmiResultSet_.getTimestamp(columnIndex); 316 } catch(RemoteException e) { 317 throw new java.sql.SQLException (e.getMessage()); 318 } 319 } 320 321 338 public java.io.InputStream getAsciiStream(int columnIndex) 340 throws java.sql.SQLException { 341 try { 342 byte[] val = rmiResultSet_.getAsciiStream(columnIndex); 343 if(val == null) return null; 344 return new java.io.ByteArrayInputStream (val); 345 } catch(RemoteException e) { 346 throw new java.sql.SQLException (e.getMessage()); 347 } 348 } 349 350 367 public java.io.InputStream getUnicodeStream(int columnIndex) 369 throws java.sql.SQLException { 370 try { 371 byte[] val = rmiResultSet_.getUnicodeStream(columnIndex); 372 if(val == null) return null; 373 return new java.io.ByteArrayInputStream (val); 374 } catch(RemoteException e) { 375 throw new java.sql.SQLException (e.getMessage()); 376 } 377 } 378 379 395 public java.io.InputStream getBinaryStream(int columnIndex) 397 throws java.sql.SQLException { 398 try { 399 byte[] val = rmiResultSet_.getBinaryStream(columnIndex); 400 if(val == null) return null; 401 return new java.io.ByteArrayInputStream (val); 402 } catch(RemoteException e) { 403 throw new java.sql.SQLException (e.getMessage()); 404 } 405 } 406 407 408 412 418 public String getString(String columnName) throws java.sql.SQLException { 419 try { 420 return rmiResultSet_.getString(columnName); 421 } catch(RemoteException e) { 422 throw new java.sql.SQLException (e.getMessage()); 423 } 424 } 425 426 432 public boolean getBoolean(String columnName) throws java.sql.SQLException { 433 try { 434 return rmiResultSet_.getBoolean(columnName); 435 } catch(RemoteException e) { 436 throw new java.sql.SQLException (e.getMessage()); 437 } 438 } 439 440 446 public byte getByte(String columnName) throws java.sql.SQLException { 447 try { 448 return rmiResultSet_.getByte(columnName); 449 } catch(RemoteException e) { 450 throw new java.sql.SQLException (e.getMessage()); 451 } 452 } 453 454 460 public short getShort(String columnName) throws java.sql.SQLException { 461 try { 462 return rmiResultSet_.getShort(columnName); 463 } catch(RemoteException e) { 464 throw new java.sql.SQLException (e.getMessage()); 465 } 466 } 467 468 474 public int getInt(String columnName) throws java.sql.SQLException { 475 try { 476 return rmiResultSet_.getInt(columnName); 477 } catch(RemoteException e) { 478 throw new java.sql.SQLException (e.getMessage()); 479 } 480 } 481 482 488 public long getLong(String columnName) throws java.sql.SQLException { 489 try { 490 return rmiResultSet_.getLong(columnName); 491 } catch(RemoteException e) { 492 throw new java.sql.SQLException (e.getMessage()); 493 } 494 } 495 496 502 public float getFloat(String columnName) throws java.sql.SQLException { 503 try { 504 return rmiResultSet_.getFloat(columnName); 505 } catch(RemoteException e) { 506 throw new java.sql.SQLException (e.getMessage()); 507 } 508 } 509 510 516 public double getDouble(String columnName) throws java.sql.SQLException { 517 try { 518 return rmiResultSet_.getDouble(columnName); 519 } catch(RemoteException e) { 520 throw new java.sql.SQLException (e.getMessage()); 521 } 522 } 523 524 531 public BigDecimal getBigDecimal(String columnName, int scale) 532 throws java.sql.SQLException { 533 try { 534 return rmiResultSet_.getBigDecimal(columnName, scale); 535 } catch(RemoteException e) { 536 throw new java.sql.SQLException (e.getMessage()); 537 } 538 } 539 540 547 public byte[] getBytes(String columnName) throws java.sql.SQLException { 548 try { 549 return rmiResultSet_.getBytes(columnName); 550 } catch(RemoteException e) { 551 throw new java.sql.SQLException (e.getMessage()); 552 } 553 } 554 555 561 public java.sql.Date getDate(String columnName) throws java.sql.SQLException { 562 try { 563 return rmiResultSet_.getDate(columnName); 564 } catch(RemoteException e) { 565 throw new java.sql.SQLException (e.getMessage()); 566 } 567 } 568 569 575 public java.sql.Time getTime(String columnName) throws java.sql.SQLException { 576 try { 577 return rmiResultSet_.getTime(columnName); 578 } catch(RemoteException e) { 579 throw new java.sql.SQLException (e.getMessage()); 580 } 581 } 582 583 589 public java.sql.Timestamp getTimestamp(String columnName) 590 throws java.sql.SQLException { 591 try { 592 return rmiResultSet_.getTimestamp(columnName); 593 } catch(RemoteException e) { 594 throw new java.sql.SQLException (e.getMessage()); 595 } 596 } 597 598 613 public java.io.InputStream getAsciiStream(String columnName) 615 throws java.sql.SQLException { 616 try { 617 byte[] val = rmiResultSet_.getAsciiStream(columnName); 618 if(val == null) return null; 619 return new java.io.ByteArrayInputStream (val); 620 } catch(RemoteException e) { 621 throw new java.sql.SQLException (e.getMessage()); 622 } 623 } 624 625 640 public java.io.InputStream getUnicodeStream(String columnName) 642 throws java.sql.SQLException { 643 try { 644 byte[] val = rmiResultSet_.getUnicodeStream(columnName); 645 if(val == null) return null; 646 return new java.io.ByteArrayInputStream (val); 647 } catch(RemoteException e) { 648 throw new java.sql.SQLException (e.getMessage()); 649 } 650 } 651 652 666 public java.io.InputStream getBinaryStream(String columnName) 668 throws java.sql.SQLException { 669 try { 670 byte[] val = rmiResultSet_.getBinaryStream(columnName); 671 if(val == null) return null; 672 return new java.io.ByteArrayInputStream (val); 673 } catch(RemoteException e) { 674 throw new java.sql.SQLException (e.getMessage()); 675 } 676 } 677 678 679 683 698 public SQLWarning getWarnings() throws java.sql.SQLException { 699 try { 700 return rmiResultSet_.getWarnings(); 701 } catch(RemoteException e) { 702 throw new java.sql.SQLException (e.getMessage()); 703 } 704 } 705 706 710 public void clearWarnings() throws java.sql.SQLException { 711 try { 712 rmiResultSet_.clearWarnings(); 713 } catch(RemoteException e) { 714 throw new java.sql.SQLException (e.getMessage()); 715 } 716 } 717 718 735 public String getCursorName() throws java.sql.SQLException { 736 try { 737 return rmiResultSet_.getCursorName(); 738 } catch(RemoteException e) { 739 throw new java.sql.SQLException (e.getMessage()); 740 } 741 } 742 743 749 public java.sql.ResultSetMetaData getMetaData() 750 throws java.sql.SQLException { 751 try { 752 return new RJResultSetMetaData(rmiResultSet_.getMetaData()); 753 } catch(RemoteException e) { 754 throw new java.sql.SQLException (e.getMessage()); 755 } 756 } 757 758 772 public Object getObject(int columnIndex) throws java.sql.SQLException { 773 try { 774 return rmiResultSet_.getObject(columnIndex); 775 } catch(RemoteException e) { 776 throw new java.sql.SQLException (e.getMessage()); 777 } 778 } 779 780 794 public Object getObject(String columnName) throws java.sql.SQLException { 795 try { 796 return rmiResultSet_.getObject(columnName); 797 } catch(RemoteException e) { 798 throw new java.sql.SQLException (e.getMessage()); 799 } 800 } 801 802 804 810 public int findColumn(String columnName) throws java.sql.SQLException { 811 try { 812 return rmiResultSet_.findColumn(columnName); 813 } catch(RemoteException e) { 814 throw new java.sql.SQLException (e.getMessage()); 815 } 816 } 817 818 823 public void updateTimestamp(String columnName, 825 Timestamp x) throws SQLException 826 { 827 try { 828 rmiResultSet_.updateTimestamp(columnName,x); 829 } catch(RemoteException e) { 830 throw new java.sql.SQLException (e.getMessage()); 831 } 832 } 833 834 public void updateTimestamp(int columnIndex,Timestamp x) throws SQLException 835 { 836 try { 837 rmiResultSet_.updateTimestamp(columnIndex,x); 838 } catch(RemoteException e) { 839 throw new java.sql.SQLException (e.getMessage()); 840 } 841 } 842 843 public void updateTime(String columnName,Time x) throws SQLException 844 { 845 try { 846 rmiResultSet_.updateTime(columnName,x); 847 } catch(RemoteException e) { 848 throw new java.sql.SQLException (e.getMessage()); 849 } 850 } 851 852 853 public void updateTime(int columnIndex, 854 Time x) throws SQLException 855 { 856 try { 857 rmiResultSet_.updateTime(columnIndex,x); 858 } catch(RemoteException e) { 859 throw new java.sql.SQLException (e.getMessage()); 860 } 861 } 862 863 public void updateString(String columnName, 864 String x) throws SQLException 865 { 866 try { 867 rmiResultSet_.updateString(columnName,x); 868 } catch(RemoteException e) { 869 throw new java.sql.SQLException (e.getMessage()); 870 } 871 } 872 873 public void updateString(int columnIndex, 874 String x) throws SQLException 875 { 876 try { 877 rmiResultSet_.updateString(columnIndex,x); 878 } catch(RemoteException e) { 879 throw new java.sql.SQLException (e.getMessage()); 880 } 881 } 882 883 public void updateShort(int columnIndex, 884 short x) throws SQLException 885 { 886 try { 887 rmiResultSet_.updateShort(columnIndex,x); 888 } catch(RemoteException e) { 889 throw new java.sql.SQLException (e.getMessage()); 890 } 891 } 892 893 public void updateShort(String  |