KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > rmijdbc > RJCallableStatement


1
2 /**
3  * RmiJdbc client/server JDBC Driver
4  * (C) GIE Dyade (Groupe BULL / INRIA Research Center) 1997
5  *
6  * @version 1.0
7  * @author Pierre-Yves Gibello (pierreyves.gibello@experlog.com)
8  */

9
10 package org.objectweb.rmijdbc;
11
12 import java.sql.*;
13 import java.math.BigDecimal JavaDoc;
14 import java.util.Calendar JavaDoc;
15 import java.rmi.RemoteException JavaDoc;
16
17 /**
18  * <P>CallableStatement is used to execute SQL stored procedures.
19  *
20  * <P>JDBC provides a stored procedure SQL escape that allows stored
21  * procedures to be called in a standard way for all RDBMS's. This
22  * escape syntax has one form that includes a result parameter and one
23  * that does not. If used, the result parameter must be registered as
24  * an OUT parameter. The other parameters may be used for input,
25  * output or both. Parameters are refered to sequentially, by
26  * number. The first parameter is 1.
27  *
28  * <P><CODE>
29  * {?= call <procedure-name>[<arg1>,<arg2>, ...]}<BR>
30  * {call <procedure-name>[<arg1>,<arg2>, ...]}
31  * </CODE>
32  *
33  * <P>IN parameter values are set using the set methods inherited from
34  * PreparedStatement. The type of all OUT parameters must be
35  * registered prior to executing the stored procedure; their values
36  * are retrieved after execution via the get methods provided here.
37  *
38  * <P>A Callable statement may return a ResultSet or multiple
39  * ResultSets. Multiple ResultSets are handled using operations
40  * inherited from Statement.
41  *
42  * <P>For maximum portability, a call's ResultSets and update counts
43  * should be processed prior to getting the values of output
44  * parameters.
45  *
46  * @see Connection#prepareCall
47  * @see ResultSet
48  */

49 public class RJCallableStatement extends RJPreparedStatement
50 implements java.sql.CallableStatement JavaDoc, java.io.Serializable JavaDoc {
51
52   RJCallableStatementInterface rmiCallableStmt_;
53
54   public RJCallableStatement(RJCallableStatementInterface c, Connection conn) {
55     super(c, conn);
56     rmiCallableStmt_ = c;
57   }
58
59   /**
60    * Before executing a stored procedure call, you must explicitly
61    * call registerOutParameter to register the java.sql.Type of each
62    * out parameter.
63    *
64    * <P><B>Note:</B> When reading the value of an out parameter, you
65    * must use the getXXX method whose Java type XXX corresponds to the
66    * parameter's registered SQL type.
67    *
68    * @param parameterIndex the first parameter is 1, the second is 2,...
69    * @param sqlType SQL type code defined by java.sql.Types;
70    * for parameters of type Numeric or Decimal use the version of
71    * registerOutParameter that accepts a scale value
72    * @see Type
73    */

74   public void registerOutParameter(int parameterIndex, int sqlType)
75   throws SQLException {
76     try {
77       rmiCallableStmt_.registerOutParameter(parameterIndex, sqlType);
78     } catch(RemoteException JavaDoc e) {
79       throw new java.sql.SQLException JavaDoc(e.getMessage());
80     }
81   }
82
83   /**
84    * Use this version of registerOutParameter for registering
85    * Numeric or Decimal out parameters.
86    *
87    * <P><B>Note:</B> When reading the value of an out parameter, you
88    * must use the getXXX method whose Java type XXX corresponds to the
89    * parameter's registered SQL type.
90    *
91    * @param parameterIndex the first parameter is 1, the second is 2, ...
92    * @param sqlType use either java.sql.Type.NUMERIC or java.sql.Type.DECIMAL
93    * @param scale a value greater than or equal to zero representing the
94    * desired number of digits to the right of the decimal point
95    * @see Type
96    */

97   public void registerOutParameter(int parameterIndex, int sqlType, int scale)
98   throws SQLException {
99     try {
100       rmiCallableStmt_.registerOutParameter(parameterIndex, sqlType, scale);
101     } catch(RemoteException JavaDoc e) {
102       throw new java.sql.SQLException JavaDoc(e.getMessage());
103     }
104   }
105
106   /**
107    * An OUT parameter may have the value of SQL NULL; wasNull reports
108    * whether the last value read has this special value.
109    *
110    * <P><B>Note:</B> You must first call getXXX on a parameter to
111    * read its value and then call wasNull() to see if the value was
112    * SQL NULL.
113    *
114    * @return true if the last parameter read was SQL NULL
115    */

116   public boolean wasNull() throws SQLException {
117     try {
118       return rmiCallableStmt_.wasNull();
119     } catch(RemoteException JavaDoc e) {
120       throw new java.sql.SQLException JavaDoc(e.getMessage());
121     }
122   }
123
124   /**
125    * Get the value of a CHAR, VARCHAR, or LONGVARCHAR parameter as a Java String.
126    *
127    * @param parameterIndex the first parameter is 1, the second is 2, ...
128    * @return the parameter value; if the value is SQL NULL, the result is null
129    */

130   public String JavaDoc getString(int parameterIndex) throws SQLException {
131     try {
132       return rmiCallableStmt_.getString(parameterIndex);
133     } catch(RemoteException JavaDoc e) {
134       throw new java.sql.SQLException JavaDoc(e.getMessage());
135     }
136   }
137
138   /**
139    * Get the value of a BIT parameter as a Java boolean.
140    *
141    * @param parameterIndex the first parameter is 1, the second is 2, ...
142    * @return the parameter value; if the value is SQL NULL, the result is false
143    */

144   public boolean getBoolean(int parameterIndex) throws SQLException {
145     try {
146       return rmiCallableStmt_.getBoolean(parameterIndex);
147     } catch(RemoteException JavaDoc e) {
148       throw new java.sql.SQLException JavaDoc(e.getMessage());
149     }
150   }
151
152   /**
153    * Get the value of a TINYINT parameter as a Java byte.
154    *
155    * @param parameterIndex the first parameter is 1, the second is 2, ...
156    * @return the parameter value; if the value is SQL NULL, the result is 0
157    */

158   public byte getByte(int parameterIndex) throws SQLException {
159     try {
160       return rmiCallableStmt_.getByte(parameterIndex);
161     } catch(RemoteException JavaDoc e) {
162       throw new java.sql.SQLException JavaDoc(e.getMessage());
163     }
164   }
165
166   /**
167    * Get the value of a SMALLINT parameter as a Java short.
168    *
169    * @param parameterIndex the first parameter is 1, the second is 2, ...
170    * @return the parameter value; if the value is SQL NULL, the result is 0
171    */

172   public short getShort(int parameterIndex) throws SQLException {
173     try {
174       return rmiCallableStmt_.getShort(parameterIndex);
175     } catch(RemoteException JavaDoc e) {
176       throw new java.sql.SQLException JavaDoc(e.getMessage());
177     }
178   }
179
180     /**
181      * Get the value of an INTEGER parameter as a Java int.
182      *
183      * @param parameterIndex the first parameter is 1, the second is 2, ...
184      * @return the parameter value; if the value is SQL NULL, the result is 0
185      */

186   public int getInt(int parameterIndex) throws SQLException {
187     try {
188       return rmiCallableStmt_.getInt(parameterIndex);
189     } catch(RemoteException JavaDoc e) {
190       throw new java.sql.SQLException JavaDoc(e.getMessage());
191     }
192   }
193
194     /**
195      * Get the value of a BIGINT parameter as a Java long.
196      *
197      * @param parameterIndex the first parameter is 1, the second is 2, ...
198      * @return the parameter value; if the value is SQL NULL, the result is 0
199      */

200   public long getLong(int parameterIndex) throws SQLException {
201     try {
202       return rmiCallableStmt_.getLong(parameterIndex);
203     } catch(RemoteException JavaDoc e) {
204       throw new java.sql.SQLException JavaDoc(e.getMessage());
205     }
206   }
207
208     /**
209      * Get the value of a FLOAT parameter as a Java float.
210      *
211      * @param parameterIndex the first parameter is 1, the second is 2, ...
212      * @return the parameter value; if the value is SQL NULL, the result is 0
213      */

214   public float getFloat(int parameterIndex) throws SQLException {
215     try {
216       return rmiCallableStmt_.getFloat(parameterIndex);
217     } catch(RemoteException JavaDoc e) {
218       throw new java.sql.SQLException JavaDoc(e.getMessage());
219     }
220   }
221
222     /**
223      * Get the value of a DOUBLE parameter as a Java double.
224      *
225      * @param parameterIndex the first parameter is 1, the second is 2, ...
226      * @return the parameter value; if the value is SQL NULL, the result is 0
227      */

228   public double getDouble(int parameterIndex) throws SQLException {
229     try {
230       return rmiCallableStmt_.getDouble(parameterIndex);
231     } catch(RemoteException JavaDoc e) {
232       throw new java.sql.SQLException JavaDoc(e.getMessage());
233     }
234   }
235
236     /**
237      * Get the value of a NUMERIC parameter as a java.math.BigDecimal object.
238      *
239      * @param parameterIndex the first parameter is 1, the second is 2, ...
240      * @param scale a value greater than or equal to zero representing the
241      * desired number of digits to the right of the decimal point
242      * @return the parameter value; if the value is SQL NULL, the result is null
243      */

244   public java.math.BigDecimal JavaDoc getBigDecimal(int parameterIndex, int scale)
245   throws SQLException {
246     try {
247       return rmiCallableStmt_.getBigDecimal(parameterIndex, scale);
248     } catch(RemoteException JavaDoc e) {
249       throw new java.sql.SQLException JavaDoc(e.getMessage());
250     }
251   }
252
253     /**
254      * Get the value of a SQL BINARY or VARBINARY parameter as a Java byte[]
255      *
256      * @param parameterIndex the first parameter is 1, the second is 2, ...
257      * @return the parameter value; if the value is SQL NULL, the result is null
258      */

259   public byte[] getBytes(int parameterIndex) throws SQLException {
260     try {
261       return rmiCallableStmt_.getBytes(parameterIndex);
262     } catch(RemoteException JavaDoc e) {
263       throw new java.sql.SQLException JavaDoc(e.getMessage());
264     }
265   }
266
267     /**
268      * Get the value of a SQL DATE parameter as a java.sql.Date object
269      *
270      * @param parameterIndex the first parameter is 1, the second is 2, ...
271      * @return the parameter value; if the value is SQL NULL, the result is null
272      */

273   public java.sql.Date JavaDoc getDate(int parameterIndex) throws SQLException {
274     try {
275       return rmiCallableStmt_.getDate(parameterIndex);
276     } catch(RemoteException JavaDoc e) {
277       throw new java.sql.SQLException JavaDoc(e.getMessage());
278     }
279   }
280
281     /**
282      * Get the value of a SQL TIME parameter as a java.sql.Time object.
283      *
284      * @param parameterIndex the first parameter is 1, the second is 2, ...
285      * @return the parameter value; if the value is SQL NULL, the result is null
286      */

287   public java.sql.Time JavaDoc getTime(int parameterIndex) throws SQLException {
288     try {
289       return rmiCallableStmt_.getTime(parameterIndex);
290     } catch(RemoteException JavaDoc e) {
291       throw new java.sql.SQLException JavaDoc(e.getMessage());
292     }
293   }
294
295     /**
296      * Get the value of a SQL TIMESTAMP parameter as a java.sql.Timestamp object.
297      *
298      * @param parameterIndex the first parameter is 1, the second is 2, ...
299      * @return the parameter value; if the value is SQL NULL, the result is null
300      */

301   public java.sql.Timestamp JavaDoc getTimestamp(int parameterIndex)
302   throws SQLException {
303     try {
304       return rmiCallableStmt_.getTimestamp(parameterIndex);
305     } catch(RemoteException JavaDoc e) {
306       throw new java.sql.SQLException JavaDoc(e.getMessage());
307     }
308   }
309
310     //----------------------------------------------------------------------
311
// Advanced features:
312

313
314     /**
315      * Get the value of a parameter as a Java object.
316      *
317      * <p>This method returns a Java object whose type coresponds to the SQL
318      * type that was registered for this parameter using registerOutParameter.
319      *
320      * <p>Note that this method may be used to read
321      * datatabase-specific, abstract data types. This is done by
322      * specifying a targetSqlType of java.sql.types.OTHER, which
323      * allows the driver to return a database-specific Java type.
324      *
325      * @param parameterIndex The first parameter is 1, the second is 2, ...
326      * @return A java.lang.Object holding the OUT parameter value.
327      * @see Types
328      */

329   public Object JavaDoc getObject(int parameterIndex) throws SQLException {
330     try {
331       return rmiCallableStmt_.getObject(parameterIndex);
332     } catch(RemoteException JavaDoc e) {
333       throw new java.sql.SQLException JavaDoc(e.getMessage());
334     }
335   }
336
337
338 // JDBC 2.0 methods
339
// Added by Mike Jennings (mjenning@islandnet.com)
340
// sometime in the summer of 1999
341

342 // Implementation added Aug 2000 by Peter Hearty (peter.hearty@lutris.com).
343

344   public void registerOutParameter(int paramIndex, int sqlType, String JavaDoc typeName)
345   throws SQLException {
346     try {
347       rmiCallableStmt_.registerOutParameter(paramIndex,
348                                  sqlType,
349                                  typeName);
350     } catch(RemoteException JavaDoc e) {
351       throw new java.sql.SQLException JavaDoc(e.getMessage());
352     }
353   }
354
355   public Timestamp getTimestamp(int parameterIndex, java.util.Calendar JavaDoc cal)
356   throws SQLException {
357     try {
358       return rmiCallableStmt_.getTimestamp(parameterIndex,cal);
359     } catch(RemoteException JavaDoc e) {
360       throw new java.sql.SQLException JavaDoc(e.getMessage());
361     }
362   }
363
364
365   public Time getTime(int parameterIndex, java.util.Calendar JavaDoc cal)
366   throws SQLException {
367     try {
368       return rmiCallableStmt_.getTime(parameterIndex,cal);
369     } catch(RemoteException JavaDoc e) {
370       throw new java.sql.SQLException JavaDoc(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 JavaDoc e) {
378       throw new java.sql.SQLException JavaDoc(e.getMessage());
379     }
380   }
381
382   public Object JavaDoc getObject(int i,java.util.Map JavaDoc map) throws SQLException {
383     try {
384       return rmiCallableStmt_.getObject(i,map);
385     } catch(RemoteException JavaDoc e) {
386       throw new java.sql.SQLException JavaDoc(e.getMessage());
387     }
388   }
389
390   public Date getDate(int parameterIndex,java.util.Calendar JavaDoc cal)
391   throws SQLException {
392     try {
393       return rmiCallableStmt_.getDate(parameterIndex,cal) ;
394     } catch(RemoteException JavaDoc e) {
395       throw new java.sql.SQLException JavaDoc(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 JavaDoc e) {
403       throw new java.sql.SQLException JavaDoc(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 JavaDoc e) {
411       throw new java.sql.SQLException JavaDoc(e.getMessage());
412     }
413   }
414
415   public java.math.BigDecimal JavaDoc getBigDecimal(int parameterIndex)
416   throws SQLException {
417     try {
418       return rmiCallableStmt_.getBigDecimal(parameterIndex);
419     } catch(RemoteException JavaDoc e) {
420       throw new java.sql.SQLException JavaDoc(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 JavaDoc e) {
428       throw new java.sql.SQLException JavaDoc(e.getMessage());
429     }
430   }
431
432  // end of java 1.2 stuff
433

434   //--------------------------JDBC 3.0-----------------------------
435

436     public void registerOutParameter(String JavaDoc parameterName, int sqlType)
437     throws SQLException {
438         try {
439             rmiCallableStmt_.registerOutParameter(parameterName, sqlType);
440         } catch(RemoteException JavaDoc e) {
441             throw new java.sql.SQLException JavaDoc(e.getMessage());
442         }
443     }
444
445
446     public void registerOutParameter(String JavaDoc parameterName, int sqlType, int scale)
447     throws SQLException {
448         try {
449             rmiCallableStmt_.registerOutParameter(parameterName, sqlType, scale);
450         } catch(RemoteException JavaDoc e) {
451             throw new java.sql.SQLException JavaDoc(e.getMessage());
452         }
453     }
454
455     public void registerOutParameter (String JavaDoc parameterName, int sqlType, String JavaDoc typeName)
456     throws SQLException {
457         try {
458             rmiCallableStmt_.registerOutParameter(parameterName, sqlType, typeName);
459         } catch(RemoteException JavaDoc e) {
460             throw new java.sql.SQLException JavaDoc(e.getMessage());
461         }
462     }
463         
464
465     public java.net.URL JavaDoc getURL(int parameterIndex) throws SQLException {
466         try {
467             return rmiCallableStmt_.getURL(parameterIndex);
468         } catch(RemoteException JavaDoc e) {
469             throw new java.sql.SQLException JavaDoc(e.getMessage());
470         }
471     }
472         
473
474     public void setURL(String JavaDoc parameterName, java.net.URL JavaDoc val) throws SQLException {
475         try {
476             rmiCallableStmt_.setURL(parameterName, val);
477         } catch(RemoteException JavaDoc e) {
478             throw new java.sql.SQLException JavaDoc(e.getMessage());
479         }
480     }
481         
482     
483     public void setNull(String JavaDoc parameterName, int sqlType)
484     throws SQLException {
485         try {
486             rmiCallableStmt_.setNull(parameterName, sqlType);
487         } catch(RemoteException JavaDoc e) {
488             throw new java.sql.SQLException JavaDoc(e.getMessage());
489         }
490     }
491         
492
493     public void setBoolean(String JavaDoc parameterName, boolean x)
494     throws SQLException {
495         try {
496             rmiCallableStmt_.setBoolean(parameterName, x);
497         } catch(RemoteException JavaDoc e) {
498             throw new java.sql.SQLException JavaDoc(e.getMessage());
499         }
500     }
501         
502
503     public void setByte(String JavaDoc parameterName, byte x)
504     throws SQLException {
505         try {
506             rmiCallableStmt_.setByte(parameterName, x);
507         } catch(RemoteException JavaDoc e) {
508             throw new java.sql.SQLException JavaDoc(e.getMessage());
509         }
510     }
511         
512
513     public void setShort(String JavaDoc parameterName, short x)
514     throws SQLException {
515         try {
516             rmiCallableStmt_.setShort(parameterName, x);
517         } catch(RemoteException JavaDoc e) {
518             throw new java.sql.SQLException JavaDoc(e.getMessage());
519         }
520     }
521         
522
523     public void setInt(String JavaDoc parameterName, int x)
524     throws SQLException {
525         try {
526             rmiCallableStmt_.setInt(parameterName, x);
527         } catch(RemoteException JavaDoc e) {
528             throw new java.sql.SQLException JavaDoc(e.getMessage());
529         }
530     }
531         
532
533     public void setLong(String JavaDoc parameterName, long x)
534     throws SQLException {
535         try {
536             rmiCallableStmt_.setLong(parameterName, x);
537         } catch(RemoteException JavaDoc e) {
538             throw new java.sql.SQLException JavaDoc(e.getMessage());
539         }
540     }
541         
542
543     public void setFloat(String JavaDoc parameterName, float x)
544     throws SQLException {
545         try {
546             rmiCallableStmt_.setFloat(parameterName, x);
547         } catch(RemoteException JavaDoc e) {
548             throw new java.sql.SQLException JavaDoc(e.getMessage());
549         }
550     }
551         
552
553     public void setDouble(String JavaDoc parameterName, double x)
554     throws SQLException {
555         try {
556             rmiCallableStmt_.setDouble(parameterName, x);
557         } catch(RemoteException JavaDoc e) {
558             throw new java.sql.SQLException JavaDoc(e.getMessage());
559         }
560     }
561         
562
563     public void setBigDecimal(String JavaDoc parameterName, BigDecimal JavaDoc x)
564     throws SQLException {
565         try {
566             rmiCallableStmt_.setBigDecimal(parameterName, x);
567         } catch(RemoteException JavaDoc e) {
568             throw new java.sql.SQLException JavaDoc(e.getMessage());
569         }
570     }
571         
572
573     public void setString(String JavaDoc parameterName, String JavaDoc x)
574     throws SQLException {
575         try {
576             rmiCallableStmt_.setString(parameterName, x);
577         } catch(RemoteException JavaDoc e) {
578             throw new java.sql.SQLException JavaDoc(e.getMessage());
579         }
580     }
581         
582
583     public void setBytes(String JavaDoc parameterName, byte x[])
584     throws SQLException {
585         try {
586             rmiCallableStmt_.setBytes(parameterName, x);
587         } catch(RemoteException JavaDoc e) {
588             throw new java.sql.SQLException JavaDoc(e.getMessage());
589         }
590     }
591         
592
593     public void setDate(String JavaDoc parameterName, java.sql.Date JavaDoc x)
594     throws SQLException {
595         try {
596             rmiCallableStmt_.setDate(parameterName, x);
597         } catch(RemoteException JavaDoc e) {
598             throw new java.sql.SQLException JavaDoc(e.getMessage());
599         }
600     }
601         
602
603     public void setTime(String JavaDoc parameterName, java.sql.Time JavaDoc x)
604     throws SQLException {
605         try {
606             rmiCallableStmt_.setTime(parameterName, x);
607         } catch(RemoteException JavaDoc e) {
608             throw new java.sql.SQLException JavaDoc(e.getMessage());
609         }
610     }
611         
612
613     public void setTimestamp(String JavaDoc parameterName, java.sql.Timestamp JavaDoc x)
614     throws SQLException {
615         try {
616             rmiCallableStmt_.setTimestamp(parameterName, x);
617         } catch(RemoteException JavaDoc e) {
618             throw new java.sql.SQLException JavaDoc(e.getMessage());
619         }
620     }
621         
622
623     public void setAsciiStream(String JavaDoc parameterName, java.io.InputStream JavaDoc x, int length)
624     throws SQLException {
625         try {
626             rmiCallableStmt_.setAsciiStream(parameterName, x, length);
627         } catch(RemoteException JavaDoc e) {
628             throw new java.sql.SQLException JavaDoc(e.getMessage());
629         }
630     }
631         
632
633     public void setBinaryStream(String JavaDoc parameterName, java.io.InputStream JavaDoc x, int length)
634     throws SQLException {
635         try {
636             rmiCallableStmt_.setBinaryStream(parameterName, x, length);
637         } catch(RemoteException JavaDoc e) {
638             throw new java.sql.SQLException JavaDoc(e.getMessage());
639         }
640     }
641         
642
643     public void setObject(String JavaDoc parameterName, Object JavaDoc x, int targetSqlType, int scale)
644     throws SQLException {
645         try {
646             rmiCallableStmt_.setObject(parameterName, x, targetSqlType, scale);
647         } catch(RemoteException JavaDoc e) {
648             throw new java.sql.SQLException JavaDoc(e.getMessage());
649         }
650     }
651         
652
653     public void setObject(String JavaDoc parameterName, Object JavaDoc x, int targetSqlType)
654     throws SQLException {
655          try {
656             rmiCallableStmt_.setObject(parameterName, x, targetSqlType);
657         } catch(RemoteException JavaDoc e) {
658             throw new java.sql.SQLException JavaDoc(e.getMessage());
659         }
660     }
661         
662
663     public void setObject(String JavaDoc parameterName, Object JavaDoc x)
664     throws SQLException {
665         try {
666             rmiCallableStmt_.setObject(parameterName, x);
667         } catch(RemoteException JavaDoc e) {
668             throw new java.sql.SQLException JavaDoc(e.getMessage());
669         }
670     }
671          
672
673     public void setCharacterStream(String JavaDoc parameterName, java.io.Reader JavaDoc reader, int length)
674     throws SQLException {
675         try {
676             rmiCallableStmt_.setCharacterStream(parameterName, reader, length);
677         } catch(RemoteException JavaDoc e) {
678             throw new java.sql.SQLException JavaDoc(e.getMessage());
679         }
680     }
681          
682
683     public void setDate(String JavaDoc parameterName, java.sql.Date JavaDoc x, Calendar JavaDoc cal)
684     throws SQLException {
685         try {
686             rmiCallableStmt_.setDate(parameterName, x, cal);
687         } catch(RemoteException JavaDoc e) {
688             throw new java.sql.SQLException JavaDoc(e.getMessage());
689         }
690     }
691         
692
693     public void setTime(String JavaDoc parameterName, java.sql.Time JavaDoc x, Calendar JavaDoc cal)
694     throws SQLException {
695         try {
696             rmiCallableStmt_.setTime(parameterName, x, cal);
697         } catch(RemoteException JavaDoc e) {
698             throw new java.sql.SQLException JavaDoc(e.getMessage());
699         }
700     }
701         
702
703     public void setTimestamp(String JavaDoc parameterName, java.sql.Timestamp JavaDoc x, Calendar JavaDoc cal)
704     throws SQLException {
705         try {
706             rmiCallableStmt_.setTimestamp(parameterName, x, cal);
707         } catch(RemoteException JavaDoc e) {
708             throw new java.sql.SQLException JavaDoc(e.getMessage());
709         }
710     }
711         
712
713     public void setNull (String JavaDoc parameterName, int sqlType, String JavaDoc typeName)
714     throws SQLException {
715         try {
716             rmiCallableStmt_.setNull(parameterName, sqlType, typeName);
717         } catch(RemoteException JavaDoc e) {
718             throw new java.sql.SQLException JavaDoc(e.getMessage());
719         }
720     }
721         
722
723     public String JavaDoc getString(String JavaDoc parameterName)
724     throws SQLException {
725         try {
726             return rmiCallableStmt_.getString(parameterName);
727         } catch(RemoteException JavaDoc e) {
728             throw new java.sql.SQLException JavaDoc(e.getMessage());
729         }
730     }
731         
732
733     public boolean getBoolean(String JavaDoc parameterName)
734     throws SQLException {
735         try {
736             return rmiCallableStmt_.getBoolean(parameterName);
737         } catch(RemoteException JavaDoc e) {
738             throw new java.sql.SQLException JavaDoc(e.getMessage());
739         }
740     }
741         
742
743     public byte getByte(String JavaDoc parameterName)
744     throws SQLException {
745         try {
746             return rmiCallableStmt_.getByte(parameterName);
747         } catch(RemoteException JavaDoc e) {
748             throw new java.sql.SQLException JavaDoc(e.getMessage());
749         }
750     }
751         
752
753     public short getShort(String JavaDoc parameterName)
754     throws SQLException {
755         try {
756             return rmiCallableStmt_.getShort(parameterName);
757         } catch(RemoteException JavaDoc e) {
758             throw new java.sql.SQLException JavaDoc(e.getMessage());
759         }
760     }
761         
762
763     public int getInt(String JavaDoc parameterName)
764     throws SQLException {
765         try {
766             return rmiCallableStmt_.getInt(parameterName);
767         } catch(RemoteException JavaDoc e) {
768             throw new java.sql.SQLException JavaDoc(e.getMessage());
769         }
770     }
771         
772
773     public long getLong(String JavaDoc parameterName)
774     throws SQLException {
775         try {
776             return rmiCallableStmt_.getLong(parameterName);
777         } catch(RemoteException JavaDoc e) {
778             throw new java.sql.SQLException JavaDoc(e.getMessage());
779         }
780     }
781         
782
783     public float getFloat(String JavaDoc parameterName)
784     throws SQLException {
785         try {
786             return rmiCallableStmt_.getFloat(parameterName);
787         } catch(RemoteException JavaDoc e) {
788             throw new java.sql.SQLException JavaDoc(e.getMessage());
789         }
790     }
791         
792
793     public double getDouble(String JavaDoc parameterName)
794     throws SQLException {
795         try {
796             return rmiCallableStmt_.getDouble(parameterName);
797         } catch(RemoteException JavaDoc e) {
798             throw new java.sql.SQLException JavaDoc(e.getMessage());
799         }
800     }
801         
802
803     public byte[] getBytes(String JavaDoc parameterName)
804     throws SQLException {
805         try {
806             return rmiCallableStmt_.getBytes(parameterName);
807         } catch(RemoteException JavaDoc e) {
808             throw new java.sql.SQLException JavaDoc(e.getMessage());
809         }
810     }
811         
812
813     public java.sql.Date JavaDoc getDate(String JavaDoc parameterName)
814     throws SQLException {
815         try {
816             return rmiCallableStmt_.getDate(parameterName);
817         } catch(RemoteException JavaDoc e) {
818             throw new java.sql.SQLException JavaDoc(e.getMessage());
819         }
820     }
821         
822
823     public java.sql.Time JavaDoc getTime(String JavaDoc parameterName)
824     throws SQLException {
825         try {
826             return rmiCallableStmt_.getTime(parameterName);
827         } catch(RemoteException JavaDoc e) {
828             throw new java.sql.SQLException JavaDoc(e.getMessage());
829         }
830     }
831         
832
833     public java.sql.Timestamp JavaDoc getTimestamp(String JavaDoc parameterName)
834     throws SQLException {
835         try {
836             return rmiCallableStmt_.getTimestamp(parameterName);
837         } catch(RemoteException JavaDoc e) {
838             throw new java.sql.SQLException JavaDoc(e.getMessage());
839         }
840     }
841         
842
843     public Object JavaDoc getObject(String JavaDoc parameterName)
844     throws SQLException {
845         try {
846             return rmiCallableStmt_.getObject(parameterName);
847         } catch(RemoteException JavaDoc e) {
848             throw new java.sql.SQLException JavaDoc(e.getMessage());
849         }
850     }
851         
852
853     public BigDecimal JavaDoc getBigDecimal(String JavaDoc parameterName)
854     throws SQLException {
855         try {
856             return rmiCallableStmt_.getBigDecimal(parameterName);
857         } catch(RemoteException JavaDoc e) {
858             throw new java.sql.SQLException JavaDoc(e.getMessage());
859         }
860     }
861         
862
863     public Object JavaDoc getObject (String JavaDoc parameterName, java.util.Map JavaDoc map)
864     throws SQLException {
865         try {
866             return rmiCallableStmt_.getObject(parameterName, map);
867         } catch(RemoteException JavaDoc e) {
868             throw new java.sql.SQLException JavaDoc(e.getMessage());
869         }
870     }
871         
872
873   public Ref getRef(String JavaDoc parameterName) throws SQLException {
874     try {
875       return new RJRef(rmiCallableStmt_.getRef(parameterName));
876     } catch(RemoteException JavaDoc e) {
877       throw new java.sql.SQLException JavaDoc(e.getMessage());
878     }
879   }
880     
881         
882
883     public Blob getBlob (String JavaDoc parameterName)
884     throws SQLException {
885         try {
886           return new RJBlob(rmiCallableStmt_.getBlob(parameterName));
887         } catch(RemoteException JavaDoc e) {
888           throw new java.sql.SQLException JavaDoc(e.getMessage());
889         }
890       }
891
892     public Clob getClob (String JavaDoc parameterName)
893     throws SQLException {
894         try {
895           return new RJClob(rmiCallableStmt_.getClob(parameterName));
896         } catch(RemoteException JavaDoc e) {
897           throw new java.sql.SQLException JavaDoc(e.getMessage());
898         }
899       }
900
901     
902     public Array getArray (String JavaDoc parameterName)
903     throws SQLException {
904         try {
905           return new RJArray(rmiCallableStmt_.getArray(parameterName));
906         } catch(RemoteException JavaDoc e) {
907           throw new java.sql.SQLException JavaDoc(e.getMessage());
908         }
909      }
910        
911     
912
913     public java.sql.Date JavaDoc getDate(String JavaDoc parameterName, Calendar JavaDoc cal)
914     throws SQLException {
915         try {
916             return rmiCallableStmt_.getDate(parameterName, cal);
917         } catch(RemoteException JavaDoc e) {
918             throw new java.sql.SQLException JavaDoc(e.getMessage());
919         }
920     }
921         
922
923     public java.sql.Time JavaDoc getTime(String JavaDoc parameterName, Calendar JavaDoc cal)
924     throws SQLException {
925         try {
926             return rmiCallableStmt_.getTime(parameterName, cal);
927         } catch(RemoteException JavaDoc e) {
928             throw new java.sql.SQLException JavaDoc(e.getMessage());
929         }
930     }
931         
932
933     public java.sql.Timestamp JavaDoc getTimestamp(String JavaDoc parameterName, Calendar JavaDoc cal)
934     throws SQLException {
935         try {
936             return rmiCallableStmt_.getTimestamp(parameterName, cal);
937         } catch(RemoteException JavaDoc e) {
938             throw new java.sql.SQLException JavaDoc(e.getMessage());
939         }
940     }
941         
942
943     public java.net.URL JavaDoc getURL(String JavaDoc parameterName) throws SQLException {
944         try {
945             return rmiCallableStmt_.getURL(parameterName);
946         } catch(RemoteException JavaDoc e) {
947             throw new java.sql.SQLException JavaDoc(e.getMessage());
948         }
949     }
950         
951 };
952
953
Popular Tags