1 2 9 10 package org.objectweb.rmijdbc; 11 12 import java.sql.*; 13 import java.math.BigDecimal ; 14 import java.util.Calendar ; 15 import java.rmi.RemoteException ; 16 17 49 public class RJCallableStatement extends RJPreparedStatement 50 implements java.sql.CallableStatement , java.io.Serializable { 51 52 RJCallableStatementInterface rmiCallableStmt_; 53 54 public RJCallableStatement(RJCallableStatementInterface c, Connection conn) { 55 super(c, conn); 56 rmiCallableStmt_ = c; 57 } 58 59 74 public void registerOutParameter(int parameterIndex, int sqlType) 75 throws SQLException { 76 try { 77 rmiCallableStmt_.registerOutParameter(parameterIndex, sqlType); 78 } catch(RemoteException e) { 79 throw new java.sql.SQLException (e.getMessage()); 80 } 81 } 82 83 97 public void registerOutParameter(int parameterIndex, int sqlType, int scale) 98 throws SQLException { 99 try { 100 rmiCallableStmt_.registerOutParameter(parameterIndex, sqlType, scale); 101 } catch(RemoteException e) { 102 throw new java.sql.SQLException (e.getMessage()); 103 } 104 } 105 106 116 public boolean wasNull() throws SQLException { 117 try { 118 return rmiCallableStmt_.wasNull(); 119 } catch(RemoteException e) { 120 throw new java.sql.SQLException (e.getMessage()); 121 } 122 } 123 124 130 public String getString(int parameterIndex) throws SQLException { 131 try { 132 return rmiCallableStmt_.getString(parameterIndex); 133 } catch(RemoteException e) { 134 throw new java.sql.SQLException (e.getMessage()); 135 } 136 } 137 138 144 public boolean getBoolean(int parameterIndex) throws SQLException { 145 try { 146 return rmiCallableStmt_.getBoolean(parameterIndex); 147 } catch(RemoteException e) { 148 throw new java.sql.SQLException (e.getMessage()); 149 } 150 } 151 152 158 public byte getByte(int parameterIndex) throws SQLException { 159 try { 160 return rmiCallableStmt_.getByte(parameterIndex); 161 } catch(RemoteException e) { 162 throw new java.sql.SQLException (e.getMessage()); 163 } 164 } 165 166 172 public short getShort(int parameterIndex) throws SQLException { 173 try { 174 return rmiCallableStmt_.getShort(parameterIndex); 175 } catch(RemoteException e) { 176 throw new java.sql.SQLException (e.getMessage()); 177 } 178 } 179 180 186 public int getInt(int parameterIndex) throws SQLException { 187 try { 188 return rmiCallableStmt_.getInt(parameterIndex); 189 } catch(RemoteException e) { 190 throw new java.sql.SQLException (e.getMessage()); 191 } 192 } 193 194 200 public long getLong(int parameterIndex) throws SQLException { 201 try { 202 return rmiCallableStmt_.getLong(parameterIndex); 203 } catch(RemoteException e) { 204 throw new java.sql.SQLException (e.getMessage()); 205 } 206 } 207 208 214 public float getFloat(int parameterIndex) throws SQLException { 215 try { 216 return rmiCallableStmt_.getFloat(parameterIndex); 217 } catch(RemoteException e) { 218 throw new java.sql.SQLException (e.getMessage()); 219 } 220 } 221 222 228 public double getDouble(int parameterIndex) throws SQLException { 229 try { 230 return rmiCallableStmt_.getDouble(parameterIndex); 231 } catch(RemoteException e) { 232 throw new java.sql.SQLException (e.getMessage()); 233 } 234 } 235 236 244 public java.math.BigDecimal getBigDecimal(int parameterIndex, int scale) 245 throws SQLException { 246 try { 247 return rmiCallableStmt_.getBigDecimal(parameterIndex, scale); 248 } catch(RemoteException e) { 249 throw new java.sql.SQLException (e.getMessage()); 250 } 251 } 252 253 259 public byte[] getBytes(int parameterIndex) throws SQLException { 260 try { 261 return rmiCallableStmt_.getBytes(parameterIndex); 262 } catch(RemoteException e) { 263 throw new java.sql.SQLException (e.getMessage()); 264 } 265 } 266 267 273 public java.sql.Date getDate(int parameterIndex) throws SQLException { 274 try { 275 return rmiCallableStmt_.getDate(parameterIndex); 276 } catch(RemoteException e) { 277 throw new java.sql.SQLException (e.getMessage()); 278 } 279 } 280 281 287 public java.sql.Time getTime(int parameterIndex) throws SQLException { 288 try { 289 return rmiCallableStmt_.getTime(parameterIndex); 290 } catch(RemoteException e) { 291 throw new java.sql.SQLException (e.getMessage()); 292 } 293 } 294 295 301 public java.sql.Timestamp getTimestamp(int parameterIndex) 302 throws SQLException { 303 try { 304 return rmiCallableStmt_.getTimestamp(parameterIndex); 305 } catch(RemoteException e) { 306 throw new java.sql.SQLException (e.getMessage()); 307 } 308 } 309 310 313 314 329 public Object getObject(int parameterIndex) throws SQLException { 330 try { 331 return rmiCallableStmt_.getObject(parameterIndex); 332 } catch(RemoteException e) { 333 throw new java.sql.SQLException (e.getMessage()); 334 } 335 } 336 337 338 342 344 public void registerOutParameter(int paramIndex, int sqlType, String typeName) 345 throws SQLException { 346 try { 347 rmiCallableStmt_.registerOutParameter(paramIndex, 348 sqlType, 349 typeName); 350 } catch(RemoteException e) { 351 throw new java.sql.SQLException (e.getMessage()); 352 } 353 } 354 355 public Timestamp getTimestamp(int parameterIndex, java.util.Calendar cal) 356 throws SQLException { 357 try { 358 return rmiCallableStmt_.getTimestamp(parameterIndex,cal); 359 } catch(RemoteException e) { 360 throw new java.sql.SQLException (e.getMessage()); 361 } 362 } 363 364 365 public Time getTime(int parameterIndex, java.util.Calendar cal) 366 throws SQLException { 367 try { 368 return rmiCallableStmt_.getTime(parameterIndex,cal); 369 } catch(RemoteException e) { 370 throw new java.sql.SQLException (e.getMessage()); 371 } 372 } 373 374 public Ref getRef(int i) throws SQLException { 375 try { 376 return new RJRef(rmiCallableStmt_.getRef(i)); 377 } catch(RemoteException e) { 378 throw new java.sql.SQLException (e.getMessage()); 379 } 380 } 381 382 public Object getObject(int i,java.util.Map map) throws SQLException { 383 try { 384 return rmiCallableStmt_.getObject(i,map); 385 } catch(RemoteException e) { 386 throw new java.sql.SQLException (e.getMessage()); 387 } 388 } 389 390 public Date getDate(int parameterIndex,java.util.Calendar cal) 391 throws SQLException { 392 try { 393 return rmiCallableStmt_.getDate(parameterIndex,cal) ; 394 } catch(RemoteException e) { 395 throw new java.sql.SQLException (e.getMessage()); 396 } 397 } 398 399 public Clob getClob(int i) throws SQLException { 400 try { 401 return new RJClob(rmiCallableStmt_.getClob(i)); 402 } catch(RemoteException e) { 403 throw new java.sql.SQLException (e.getMessage()); 404 } 405 } 406 407 public Blob getBlob(int i) throws SQLException { 408 try { 409 return new RJBlob(rmiCallableStmt_.getBlob(i)); 410 } catch(RemoteException e) { 411 throw new java.sql.SQLException (e.getMessage()); 412 } 413 } 414 415 public java.math.BigDecimal getBigDecimal(int parameterIndex) 416 throws SQLException { 417 try { 418 return rmiCallableStmt_.getBigDecimal(parameterIndex); 419 } catch(RemoteException e) { 420 throw new java.sql.SQLException (e.getMessage()); 421 } 422 } 423 424 public Array getArray(int i) throws SQLException { 425 try { 426 return new RJArray(rmiCallableStmt_.getArray(i)); 427 } catch(RemoteException e) { 428 throw new java.sql.SQLException (e.getMessage()); 429 } 430 } 431 432 434 436 public void registerOutParameter(String parameterName, int sqlType) 437 throws SQLException { 438 try { 439 rmiCallableStmt_.registerOutParameter(parameterName, sqlType); 440 } catch(RemoteException e) { 441 throw new java.sql.SQLException (e.getMessage()); 442 } 443 } 444 445 446 public void registerOutParameter(String parameterName, int sqlType, int scale) 447 throws SQLException { 448 try { 449 rmiCallableStmt_.registerOutParameter(parameterName, sqlType, scale); 450 } catch(RemoteException e) { 451 throw new java.sql.SQLException (e.getMessage()); 452 } 453 } 454 455 public void registerOutParameter (String parameterName, int sqlType, String typeName) 456 throws SQLException { 457 try { 458 rmiCallableStmt_.registerOutParameter(parameterName, sqlType, typeName); 459 } catch(RemoteException e) { 460 throw new java.sql.SQLException (e.getMessage()); 461 } 462 } 463 464 465 public java.net.URL getURL(int parameterIndex) throws SQLException { 466 try { 467 return rmiCallableStmt_.getURL(parameterIndex); 468 } catch(RemoteException e) { 469 throw new java.sql.SQLException (e.getMessage()); 470 } 471 } 472 473 474 public void setURL(String parameterName, java.net.URL val) throws SQLException { 475 try { 476 rmiCallableStmt_.setURL(parameterName, val); 477 } catch(RemoteException e) { 478 throw new java.sql.SQLException (e.getMessage()); 479 } 480 } 481 482 483 public void setNull(String parameterName, int sqlType) 484 throws SQLException { 485 try { 486 rmiCallableStmt_.setNull(parameterName, sqlType); 487 } catch(RemoteException e) { 488 throw new java.sql.SQLException (e.getMessage()); 489 } 490 } 491 492 493 public void setBoolean(String parameterName, boolean x) 494 throws SQLException { 495 try { 496 rmiCallableStmt_.setBoolean(parameterName, x); 497 } catch(RemoteException e) { 498 throw new java.sql.SQLException (e.getMessage()); 499 } 500 } 501 502 503 public void setByte(String parameterName, byte x) 504 throws SQLException { 505 try { 506 rmiCallableStmt_.setByte(parameterName, x); 507 } catch(RemoteException e) { 508 throw new java.sql.SQLException (e.getMessage()); 509 } 510 } 511 512 513 public void setShort(String parameterName, short x) 514 throws SQLException { 515 try { 516 rmiCallableStmt_.setShort(parameterName, x); 517 } catch(RemoteException e) { 518 throw new java.sql.SQLException (e.getMessage()); 519 } 520 } 521 522 523 public void setInt(String parameterName, int x) 524 throws SQLException { 525 try { 526 rmiCallableStmt_.setInt(parameterName, x); 527 } catch(RemoteException e) { 528 throw new java.sql.SQLException (e.getMessage()); 529 } 530 } 531 532 533 public void setLong(String parameterName, long x) 534 throws SQLException { 535 try { 536 rmiCallableStmt_.setLong(parameterName, x); 537 } catch(RemoteException e) { 538 throw new java.sql.SQLException (e.getMessage()); 539 } 540 } 541 542 543 public void setFloat(String parameterName, float x) 544 throws SQLException { 545 try { 546 rmiCallableStmt_.setFloat(parameterName, x); 547 } catch(RemoteException e) { 548 throw new java.sql.SQLException (e.getMessage()); 549 } 550 } 551 552 553 public void setDouble(String parameterName, double x) 554 throws SQLException { 555 try { 556 rmiCallableStmt_.setDouble(parameterName, x); 557 } catch(RemoteException e) { 558 throw new java.sql.SQLException (e.getMessage()); 559 } 560 } 561 562 563 public void setBigDecimal(String parameterName, BigDecimal x) 564 throws SQLException { 565 try { 566 rmiCallableStmt_.setBigDecimal(parameterName, x); 567 } catch(RemoteException e) { 568 throw new java.sql.SQLException (e.getMessage()); 569 } 570 } 571 572 573 public void setString(String parameterName, String x) 574 throws SQLException { 575 try { 576 rmiCallableStmt_.setString(parameterName, x); 577 } catch(RemoteException e) { 578 throw new java.sql.SQLException (e.getMessage()); 579 } 580 } 581 582 583 public void setBytes(String parameterName, byte x[]) 584 throws SQLException { 585 try { 586 rmiCallableStmt_.setBytes(parameterName, x); 587 } catch(RemoteException e) { 588 throw new java.sql.SQLException (e.getMessage()); 589 } 590 } 591 592 593 public void setDate(String parameterName, java.sql.Date x) 594 throws SQLException { 595 try { 596 rmiCallableStmt_.setDate(parameterName, x); 597 } catch(RemoteException e) { 598 throw new java.sql.SQLException (e.getMessage()); 599 } 600 } 601 602 603 public void setTime(String parameterName, java.sql.Time x) 604 throws SQLException { 605 try { 606 rmiCallableStmt_.setTime(parameterName, x); 607 } catch(RemoteException e) { 608 throw new java.sql.SQLException (e.getMessage()); 609 } 610 } 611 612 613 public void setTimestamp(String parameterName, java.sql.Timestamp x) 614 throws SQLException { 615 try { 616 rmiCallableStmt_.setTimestamp(parameterName, x); 617 } catch(RemoteException e) { 618 throw new java.sql.SQLException (e.getMessage()); 619 } 620 } 621 622 623 public void setAsciiStream(String parameterName, java.io.InputStream x, int length) 624 throws SQLException { 625 try { 626 rmiCallableStmt_.setAsciiStream(parameterName, x, length); 627 } catch(RemoteException e) { 628 throw new java.sql.SQLException (e.getMessage()); 629 } 630 } 631 632 633 public void setBinaryStream(String parameterName, java.io.InputStream x, int length) 634 throws SQLException { 635 try { 636 rmiCallableStmt_.setBinaryStream(parameterName, x, length); 637 } catch(RemoteException e) { 638 throw new java.sql.SQLException (e.getMessage()); 639 } 640 } 641 642 643 public void setObject(String parameterName, Object x, int targetSqlType, int scale) 644 throws SQLException { 645 try { 646 rmiCallableStmt_.setObject(parameterName, x, targetSqlType, scale); 647 } catch(RemoteException e) { 648 throw new java.sql.SQLException (e.getMessage()); 649 } 650 } 651 652 653 public void setObject(String parameterName, Object x, int targetSqlType) 654 throws SQLException { 655 try { 656 rmiCallableStmt_.setObject(parameterName, x, targetSqlType); 657 } catch(RemoteException e) { 658 throw new java.sql.SQLException (e.getMessage()); 659 } 660 } 661 662 663 public void setObject(String parameterName, Object x) 664 throws SQLException { 665 try { 666 rmiCallableStmt_.setObject(parameterName, x); 667 } catch(RemoteException e) { 668 throw new java.sql.SQLException (e.getMessage()); 669 } 670 } 671 672 673 public void setCharacterStream(String parameterName, java.io.Reader reader, int length) 674 throws SQLException { 675 try { 676 rmiCallableStmt_.setCharacterStream(parameterName, reader, length); 677 } catch(RemoteException e) { 678 throw new java.sql.SQLException (e.getMessage()); 679 } 680 } 681 682 683 public void setDate(String parameterName, java.sql.Date x, Calendar cal) 684 throws SQLException { 685 try { 686 rmiCallableStmt_.setDate(parameterName, x, cal); 687 } catch(RemoteException e) { 688 throw new java.sql.SQLException (e.getMessage()); 689 } 690 } 691 692 693 public void setTime(String parameterName, java.sql.Time x, Calendar cal) 694 throws SQLException { 695 try { 696 rmiCallableStmt_.setTime(parameterName, x, cal); 697 } catch(RemoteException e) { 698 throw new java.sql.SQLException (e.getMessage()); 699 } 700 } 701 702 703 public void setTimestamp(String parameterName, java.sql.Timestamp x, Calendar cal) 704 throws SQLException { 705 try { 706 rmiCallableStmt_.setTimestamp(parameterName, x, cal); 707 } catch(RemoteException e) { 708 throw new java.sql.SQLException (e.getMessage()); 709 } 710 } 711 712 713 public void setNull (String parameterName, int sqlType, String typeName) 714 throws SQLException { 715 try { 716 rmiCallableStmt_.setNull(parameterName, sqlType, typeName); 717 } catch(RemoteException e) { 718 throw new java.sql.SQLException (e.getMessage()); 719 } 720 } 721 722 723 public String getString(String parameterName) 724 throws SQLException { 725 try { 726 return rmiCallableStmt_.getString(parameterName); 727 } catch(RemoteException e) { 728 throw new java.sql.SQLException (e.getMessage()); 729 } 730 } 731 732 733 public boolean getBoolean(String parameterName) 734 throws SQLException { 735 try { 736 return rmiCallableStmt_.getBoolean(parameterName); 737 } catch(RemoteException e) { 738 throw new java.sql.SQLException (e.getMessage()); 739 } 740 } 741 742 743 public byte getByte(String parameterName) 744 throws SQLException { 745 try { 746 return rmiCallableStmt_.getByte(parameterName); 747 } catch(RemoteException e) { 748 throw new java.sql.SQLException (e.getMessage()); 749 } 750 } 751 752 753 public short getShort(String parameterName) 754 throws SQLException { 755 try { 756 return rmiCallableStmt_.getShort(parameterName); 757 } catch(RemoteException e) { 758 throw new java.sql.SQLException (e.getMessage()); 759 } 760 } 761 762 763 public int getInt(String parameterName) 764 throws SQLException { 765 try { 766 return rmiCallableStmt_.getInt(parameterName); 767 } catch(RemoteException e) { 768 throw new java.sql.SQLException (e.getMessage()); 769 } 770 } 771 772 773 public long getLong(String parameterName) 774 throws SQLException { 775 try { 776 return rmiCallableStmt_.getLong(parameterName); 777 } catch(RemoteException e) { 778 throw new java.sql.SQLException (e.getMessage()); 779 } 780 } 781 782 783 public float getFloat(String parameterName) 784 throws SQLException { 785 try { 786 return rmiCallableStmt_.getFloat(parameterName); 787 } catch(RemoteException e) { 788 throw new java.sql.SQLException (e.getMessage()); 789 } 790 } 791 792 793 public double getDouble(String parameterName) 794 throws SQLException { 795 try { 796 return rmiCallableStmt_.getDouble(parameterName); 797 } catch(RemoteException e) { 798 throw new java.sql.SQLException (e.getMessage()); 799 } 800 } 801 802 803 public byte[] getBytes(String parameterName) 804 throws SQLException { 805 try { 806 return rmiCallableStmt_.getBytes(parameterName); 807 } catch(RemoteException e) { 808 throw new java.sql.SQLException (e.getMessage()); 809 } 810 } 811 812 813 public java.sql.Date getDate(String parameterName) 814 throws SQLException { 815 try { 816 return rmiCallableStmt_.getDate(parameterName); 817 } catch(RemoteException e) { 818 throw new java.sql.SQLException (e.getMessage()); 819 } 820 } 821 822 823 public java.sql.Time getTime(String parameterName) 824 throws SQLException { 825 try { 826 return rmiCallableStmt_.getTime(parameterName); 827 } catch(RemoteException e) { 828 throw new java.sql.SQLException (e.getMessage()); 829 } 830 } 831 832 833 public java.sql.Timestamp getTimestamp(String parameterName) 834 throws SQLException { 835 try { 836 return rmiCallableStmt_.getTimestamp(parameterName); 837 } catch(RemoteException e) { 838 throw new java.sql.SQLException (e.getMessage()); 839 } 840 } 841 842 843 public Object getObject(String parameterName) 844 throws SQLException { 845 try { 846 return rmiCallableStmt_.getObject(parameterName); 847 } catch(RemoteException e) { 848 throw new java.sql.SQLException (e.getMessage()); 849 } 850 } 851 852 853 public BigDecimal getBigDecimal(String parameterName) 854 throws SQLException { 855 try { 856 return rmiCallableStmt_.getBigDecimal(parameterName); 857 } catch(RemoteException e) { 858 throw new java.sql.SQLException (e.getMessage()); 859 } 860 } 861 862 863 public Object getObject (String parameterName, java.util.Map map) 864 throws SQLException { 865 try { 866 return rmiCallableStmt_.getObject(parameterName, map); 867 } catch(RemoteException e) { 868 throw new java.sql.SQLException (e.getMessage()); 869 } 870 } 871 872 873 public Ref getRef(String parameterName) throws SQLException { 874 try { 875 return new RJRef(rmiCallableStmt_.getRef(parameterName)); 876 } catch(RemoteException e) { 877 throw new java.sql.SQLException (e.getMessage()); 878 } 879 } 880 881 882 883 public Blob getBlob (String parameterName) 884 throws SQLException { 885 try { 886 return new RJBlob(rmiCallableStmt_.getBlob(parameterName)); 887 } catch(RemoteException e) { 888 throw new java.sql.SQLException (e.getMessage()); 889 } 890 } 891 892 public Clob getClob (String parameterName) 893 throws SQLException { 894 try { 895 return new RJClob(rmiCallableStmt_.getClob(parameterName)); 896 } catch(RemoteException e) { 897 throw new java.sql.SQLException (e.getMessage()); 898 } 899 } 900 901 902 public Array getArray (String parameterName) 903 throws SQLException { 904 try { 905 return new RJArray(rmiCallableStmt_.getArray(parameterName)); 906 } catch(RemoteException e) { 907 throw new java.sql.SQLException (e.getMessage()); 908 } 909 } 910 911 912 913 public java.sql.Date getDate(String parameterName, Calendar cal) 914 throws SQLException { 915 try { 916 return rmiCallableStmt_.getDate(parameterName, cal); 917 } catch(RemoteException e) { 918 throw new java.sql.SQLException (e.getMessage()); 919 } 920 } 921 922 923 public java.sql.Time getTime(String parameterName, Calendar cal) 924 throws SQLException { 925 try { 926 return rmiCallableStmt_.getTime(parameterName, cal); 927 } catch(RemoteException e) { 928 throw new java.sql.SQLException (e.getMessage()); 929 } 930 } 931 932 933 public java.sql.Timestamp getTimestamp(String parameterName, Calendar cal) 934 throws SQLException { 935 try { 936 return rmiCallableStmt_.getTimestamp(parameterName, cal); 937 } catch(RemoteException e) { 938 throw new java.sql.SQLException (e.getMessage()); 939 } 940 } 941 942 943 public java.net.URL getURL(String parameterName) throws SQLException { 944 try { 945 return rmiCallableStmt_.getURL(parameterName); 946 } catch(RemoteException e) { 947 throw new java.sql.SQLException (e.getMessage()); 948 } 949 } 950 951 }; 952 953 | Popular Tags |