KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > driver > CallableStatement


1 /**
2  * C-JDBC: Clustered JDBC.
3  * Copyright (C) 2002-2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Contact: c-jdbc@objectweb.org
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by the
9  * Free Software Foundation; either version 2.1 of the License, or any later
10  * version.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20  *
21  * Initial developer(s): Emmanuel Cecchet.
22  * Contributor(s): ______________________________________.
23  */

24
25 package org.objectweb.cjdbc.driver;
26
27 import java.io.InputStream JavaDoc;
28 import java.io.Reader JavaDoc;
29 import java.math.BigDecimal JavaDoc;
30 import java.net.URL JavaDoc;
31 import java.sql.Array JavaDoc;
32 import java.sql.Blob JavaDoc;
33 import java.sql.Clob JavaDoc;
34 import java.sql.Date JavaDoc;
35 import java.sql.Ref JavaDoc;
36 import java.sql.SQLException JavaDoc;
37 import java.sql.Time JavaDoc;
38 import java.sql.Timestamp JavaDoc;
39 import java.util.Calendar JavaDoc;
40 import java.util.Map JavaDoc;
41
42 import org.objectweb.cjdbc.common.exceptions.NotImplementedException;
43
44 /**
45  * This class is used to execute SQL stored procedures. The JDBC API provides a
46  * stored procedure SQL escape syntax that allows stored procedures to be called
47  * in a standard way for all RDBMSs. The only syntax accepted by this
48  * implementation is as follows:
49  *
50  * <pre>
51  * {call &lt;procedure-name&gt;[&lt;arg1&gt;,&lt;arg2&gt;, ...]}
52  * </pre>
53  *
54  * The other standard form
55  *
56  * <pre>
57  * {?= call &lt;procedure-name&gt;[&lt;arg1&gt;,&lt;arg2&gt;, ...]}
58  * </pre>
59  *
60  * is *NOT* supported. Parameters are referred to sequentially, by number, with
61  * the first parameter being 1. IN parameter values are set using the
62  * <code>set</code> methods inherited from {@link PreparedStatement}.
63  * <p>
64  * OUT parameters are *NOT* supported.
65  * <p>
66  * A <code>CallableStatement</code> can return one {@link DriverResultSet}
67  * object or multiple <code>ResultSet</code> objects. Multiple
68  * <code>ResultSet</code> objects are handled using operations inherited from
69  * {@link Statement}.
70  *
71  * @see org.objectweb.cjdbc.driver.Connection#prepareCall(String)
72  * @see DriverResultSet
73  * @author <a HREF="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet </a>
74  * @version 1.0
75  */

76 public class CallableStatement extends PreparedStatement
77     implements
78       java.sql.CallableStatement JavaDoc
79 {
80   /**
81    * <code>CallableStatements</code> syntax is {call procedure_name[(?, ?,
82    * ...)]}. Note that {? = call ...} is not supported by this implementation.
83    *
84    * @param connection the instanatiating connection
85    * @param sql the SQL statement with ? for IN markers
86    * @exception SQLException if something bad occurs
87    */

88   public CallableStatement(Connection connection, String JavaDoc sql)
89       throws SQLException JavaDoc
90   {
91     super(connection, sql);
92     if (!this.sql.toLowerCase().startsWith("{call")
93         && !this.sql.toLowerCase().startsWith("}call"))
94       throw new SQLException JavaDoc(
95           "Syntax error: callable statements expected syntax is {call procedure_name[(?, ?, ...)]}");
96   }
97
98   /**
99    * Registers the OUT parameter in ordinal position <code>parameterIndex</code>
100    * to the JDBC type <code>sqlType</code>. All OUT parameters must be
101    * registered before a stored procedure is executed.
102    * <p>
103    * The JDBC type specified by <code>sqlType</code> for an OUT parameter
104    * determines the Java type that must be used in the <code>get</code> method
105    * to read the value of that parameter.
106    * <p>
107    * If the JDBC type expected to be returned to this output parameter is
108    * specific to this particular database, <code>sqlType</code> should be
109    * <code>java.sql.Types.OTHER</code>. The method {@link #getObject(int)}
110    * retrieves the value.
111    *
112    * @param parameterIndex the first parameter is 1, the second is 2, and so on
113    * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>.
114    * If the parameter is of JDBC type <code>NUMERIC</code> or
115    * <code>DECIMAL</code>, the version of
116    * <code>registerOutParameter</code> that accepts a scale value
117    * should be used.
118    * @exception SQLException if a database access error occurs
119    * @see java.sql.Types
120    */

121   public void registerOutParameter(int parameterIndex, int sqlType)
122       throws SQLException JavaDoc
123   {
124     throw new NotImplementedException(
125         "registerOutParameter(int parameterIndex, int sqlType)");
126   }
127
128   /**
129    * Registers the parameter in ordinal position <code>parameterIndex</code>
130    * to be of JDBC type <code>sqlType</code>. This method must be called
131    * before a stored procedure is executed.
132    * <p>
133    * The JDBC type specified by <code>sqlType</code> for an OUT parameter
134    * determines the Java type that must be used in the <code>get</code> method
135    * to read the value of that parameter.
136    * <p>
137    * This version of <code>registerOutParameter</code> should be used when the
138    * parameter is of JDBC type <code>NUMERIC</code> or <code>DECIMAL</code>.
139    *
140    * @param parameterIndex the first parameter is 1, the second is 2, and so on
141    * @param sqlType the SQL type code defined by <code>java.sql.Types</code>.
142    * @param scale the desired number of digits to the right of the decimal
143    * point. It must be greater than or equal to zero.
144    * @exception SQLException if a database access error occurs
145    * @see java.sql.Types
146    */

147   public void registerOutParameter(int parameterIndex, int sqlType, int scale)
148       throws SQLException JavaDoc
149   {
150     throw new NotImplementedException(
151         "registerOutParameter(int parameterIndex, int sqlType, int scale)");
152   }
153
154   /**
155    * Retrieves whether the last OUT parameter read had the value of SQL
156    * <code>NULL</code>. Note that this method should be called only after
157    * calling a getter method; otherwise, there is no value to use in determining
158    * whether it is <code>null</code> or not.
159    *
160    * @return <code>true</code> if the last parameter read was SQL
161    * <code>NULL</code>;<code>false</code> otherwise
162    * @exception SQLException if a database access error occurs
163    */

164   public boolean wasNull() throws SQLException JavaDoc
165   {
166     throw new NotImplementedException("wasNull");
167   }
168
169   /**
170    * Retrieves the value of the designated JDBC <code>CHAR</code>,
171    * <code>VARCHAR</code>, or <code>LONGVARCHAR</code> parameter as a
172    * <code>String</code> in the Java programming language.
173    * <p>
174    * For the fixed-length type JDBC <code>CHAR</code>, the
175    * <code>String</code> object returned has exactly the same value the JDBC
176    * <code>CHAR</code> value had in the database, including any padding added
177    * by the database.
178    *
179    * @param parameterIndex the first parameter is 1, the second is 2, and so on
180    * @return the parameter value. If the value is SQL <code>NULL</code>, the
181    * result is <code>null</code>.
182    * @exception SQLException if a database access error occurs
183    * @see #setString
184    */

185   public String JavaDoc getString(int parameterIndex) throws SQLException JavaDoc
186   {
187     throw new NotImplementedException("getString");
188   }
189
190   /**
191    * Retrieves the value of the designated JDBC <code>BIT</code> parameter as
192    * a <code>boolean</code> in the Java programming language.
193    *
194    * @param parameterIndex the first parameter is 1, the second is 2, and so on
195    * @return the parameter value. If the value is SQL <code>NULL</code>, the
196    * result is <code>false</code>.
197    * @exception SQLException if a database access error occurs
198    * @see #setBoolean
199    */

200   public boolean getBoolean(int parameterIndex) throws SQLException JavaDoc
201   {
202     throw new NotImplementedException("getBoolean");
203   }
204
205   /**
206    * Retrieves the value of the designated JDBC <code>TINYINT</code> parameter
207    * as a <code>byte</code> in the Java programming language.
208    *
209    * @param parameterIndex the first parameter is 1, the second is 2, and so on
210    * @return the parameter value. If the value is SQL <code>NULL</code>, the
211    * result is <code>0</code>.
212    * @exception SQLException if a database access error occurs
213    * @see #setByte
214    */

215   public byte getByte(int parameterIndex) throws SQLException JavaDoc
216   {
217     throw new NotImplementedException("getByte");
218   }
219
220   /**
221    * Retrieves the value of the designated JDBC <code>SMALLINT</code>
222    * parameter as a <code>short</code> in the Java programming language.
223    *
224    * @param parameterIndex the first parameter is 1, the second is 2, and so on
225    * @return the parameter value. If the value is SQL <code>NULL</code>, the
226    * result is <code>0</code>.
227    * @exception SQLException if a database access error occurs
228    * @see #setShort
229    */

230   public short getShort(int parameterIndex) throws SQLException JavaDoc
231   {
232     throw new NotImplementedException("getShort");
233   }
234
235   /**
236    * Retrieves the value of the designated JDBC <code>INTEGER</code> parameter
237    * as an <code>int</code> in the Java programming language.
238    *
239    * @param parameterIndex the first parameter is 1, the second is 2, and so on
240    * @return the parameter value. If the value is SQL <code>NULL</code>, the
241    * result is <code>0</code>.
242    * @exception SQLException if a database access error occurs
243    * @see #setInt
244    */

245   public int getInt(int parameterIndex) throws SQLException JavaDoc
246   {
247     throw new NotImplementedException("getInt");
248   }
249
250   /**
251    * Retrieves the value of the designated JDBC <code>BIGINT</code> parameter
252    * as a <code>long</code> in the Java programming language.
253    *
254    * @param parameterIndex the first parameter is 1, the second is 2, and so on
255    * @return the parameter value. If the value is SQL <code>NULL</code>, the
256    * result is <code>0</code>.
257    * @exception SQLException if a database access error occurs
258    * @see #setLong
259    */

260   public long getLong(int parameterIndex) throws SQLException JavaDoc
261   {
262     throw new NotImplementedException("getLong");
263   }
264
265   /**
266    * Retrieves the value of the designated JDBC <code>FLOAT</code> parameter
267    * as a <code>float</code> in the Java programming language.
268    *
269    * @param parameterIndex the first parameter is 1, the second is 2, and so on
270    * @return the parameter value. If the value is SQL <code>NULL</code>, the
271    * result is <code>0</code>.
272    * @exception SQLException if a database access error occurs
273    * @see #setFloat
274    */

275   public float getFloat(int parameterIndex) throws SQLException JavaDoc
276   {
277     throw new NotImplementedException("getFloat");
278   }
279
280   /**
281    * Retrieves the value of the designated JDBC <code>DOUBLE</code> parameter
282    * as a <code>double</code> in the Java programming language.
283    *
284    * @param parameterIndex the first parameter is 1, the second is 2, and so on
285    * @return the parameter value. If the value is SQL <code>NULL</code>, the
286    * result is <code>0</code>.
287    * @exception SQLException if a database access error occurs
288    * @see #setDouble
289    */

290   public double getDouble(int parameterIndex) throws SQLException JavaDoc
291   {
292     throw new NotImplementedException("getDouble");
293   }
294
295   /**
296    * Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter
297    * as a <code>java.math.BigDecimal</code> object with <i>scale </i> digits
298    * to the right of the decimal point.
299    *
300    * @param parameterIndex the first parameter is 1, the second is 2, and so on
301    * @param scale the number of digits to the right of the decimal point
302    * @return the parameter value. If the value is SQL <code>NULL</code>, the
303    * result is <code>null</code>.
304    * @exception SQLException if a database access error occurs
305    * @deprecated use <code>getBigDecimal(int parameterIndex)</code> or
306    * <code>getBigDecimal(String parameterName)</code>
307    * @see #setBigDecimal
308    */

309   public BigDecimal JavaDoc getBigDecimal(int parameterIndex, int scale)
310       throws SQLException JavaDoc
311   {
312     throw new NotImplementedException("getBigDecimal");
313   }
314
315   /**
316    * Retrieves the value of the designated JDBC <code>BINARY</code> or
317    * <code>VARBINARY</code> parameter as an array of <code>byte</code>
318    * values in the Java programming language.
319    *
320    * @param parameterIndex the first parameter is 1, the second is 2, and so on
321    * @return the parameter value. If the value is SQL <code>NULL</code>, the
322    * result is <code>null</code>.
323    * @exception SQLException if a database access error occurs
324    * @see #setBytes
325    */

326   public byte[] getBytes(int parameterIndex) throws SQLException JavaDoc
327   {
328     throw new NotImplementedException("getBytes");
329   }
330
331   /**
332    * Retrieves the value of the designated JDBC <code>DATE</code> parameter as
333    * a <code>java.sql.Date</code> object.
334    *
335    * @param parameterIndex the first parameter is 1, the second is 2, and so on
336    * @return the parameter value. If the value is SQL <code>NULL</code>, the
337    * result is <code>null</code>.
338    * @exception SQLException if a database access error occurs
339    * @see #setDate(String, Date)
340    */

341   public Date JavaDoc getDate(int parameterIndex) throws SQLException JavaDoc
342   {
343     throw new NotImplementedException("getDate");
344   }
345
346   /**
347    * Retrieves the value of the designated JDBC <code>TIME</code> parameter as
348    * a <code>java.sql.Time</code> object.
349    *
350    * @param parameterIndex the first parameter is 1, the second is 2, and so on
351    * @return the parameter value. If the value is SQL <code>NULL</code>, the
352    * result is <code>null</code>.
353    * @exception SQLException if a database access error occurs
354    * @see #setTime(String, Time)
355    */

356   public Time JavaDoc getTime(int parameterIndex) throws SQLException JavaDoc
357   {
358     throw new NotImplementedException("getTime");
359   }
360
361   /**
362    * Retrieves the value of the designated JDBC <code>TIMESTAMP</code>
363    * parameter as a <code>java.sql.Timestamp</code> object.
364    *
365    * @param parameterIndex the first parameter is 1, the second is 2, and so on
366    * @return the parameter value. If the value is SQL <code>NULL</code>, the
367    * result is <code>null</code>.
368    * @exception SQLException if a database access error occurs
369    * @see #setTimestamp(String, Timestamp)
370    */

371   public Timestamp JavaDoc getTimestamp(int parameterIndex) throws SQLException JavaDoc
372   {
373     throw new NotImplementedException("getTimestamp");
374   }
375
376   // ----------------------------------------------------------------------
377
// Advanced features:
378

379   /**
380    * Retrieves the value of the designated parameter as an <code>Object</code>
381    * in the Java programming language. If the value is an SQL <code>NULL</code>,
382    * the driver returns a Java <code>null</code>.
383    * <p>
384    * This method returns a Java object whose type corresponds to the JDBC type
385    * that was registered for this parameter using the method
386    * <code>registerOutParameter</code>. By registering the target JDBC type
387    * as <code>java.sql.Types.OTHER</code>, this method can be used to read
388    * database-specific abstract data types.
389    *
390    * @param parameterIndex the first parameter is 1, the second is 2, and so on
391    * @return A <code>java.lang.Object</code> holding the OUT parameter value
392    * @exception SQLException if a database access error occurs
393    * @see java.sql.Types
394    * @see #setObject(String, Object)
395    */

396   public Object JavaDoc getObject(int parameterIndex) throws SQLException JavaDoc
397   {
398     throw new NotImplementedException("getObject");
399   }
400
401   // --------------------------JDBC 2.0-----------------------------
402

403   /**
404    * Retrieves the value of the designated JDBC <code>NUMERIC</code> parameter
405    * as a <code>java.math.BigDecimal</code> object with as many digits to the
406    * right of the decimal point as the value contains.
407    *
408    * @param parameterIndex the first parameter is 1, the second is 2, and so on
409    * @return the parameter value in full precision. If the value is SQL
410    * <code>NULL</code>, the result is <code>null</code>.
411    * @exception SQLException if a database access error occurs
412    * @see #setBigDecimal
413    * @since 1.2
414    */

415   public BigDecimal JavaDoc getBigDecimal(int parameterIndex) throws SQLException JavaDoc
416   {
417     throw new NotImplementedException("");
418   }
419
420   /**
421    * Returns an object representing the value of OUT parameter <code>i</code>
422    * and uses <code>map</code> for the custom mapping of the parameter value.
423    * <p>
424    * This method returns a Java object whose type corresponds to the JDBC type
425    * that was registered for this parameter using the method
426    * <code>registerOutParameter</code>. By registering the target JDBC type
427    * as <code>java.sql.Types.OTHER</code>, this method can be used to read
428    * database-specific abstract data types.
429    *
430    * @param i the first parameter is 1, the second is 2, and so on
431    * @param map the mapping from SQL type names to Java classes
432    * @return a <code>java.lang.Object</code> holding the OUT parameter value
433    * @exception SQLException if a database access error occurs
434    * @see #setObject(String, Object)
435    * @since 1.2
436    */

437   public Object JavaDoc getObject(int i, Map JavaDoc map) throws SQLException JavaDoc
438   {
439     throw new NotImplementedException("getObject");
440   }
441
442   /**
443    * Retrieves the value of the designated JDBC
444    * <code>REF(&lt;structured-type&gt;)</code> parameter as a <code>Ref</code>
445    * object in the Java programming language.
446    *
447    * @param i the first parameter is 1, the second is 2, and so on
448    * @return the parameter value as a <code>Ref</code> object in the Java
449    * programming language. If the value was SQL <code>NULL</code>,
450    * the value <code>null</code> is returned.
451    * @exception SQLException if a database access error occurs
452    * @since 1.2
453    */

454   public Ref JavaDoc getRef(int i) throws SQLException JavaDoc
455   {
456     throw new NotImplementedException("getRef");
457   }
458
459   /**
460    * Retrieves the value of the designated JDBC <code>BLOB</code> parameter as
461    * a {@link Blob}object in the Java programming language.
462    *
463    * @param i the first parameter is 1, the second is 2, and so on
464    * @return the parameter value as a <code>Blob</code> object in the Java
465    * programming language. If the value was SQL <code>NULL</code>,
466    * the value <code>null</code> is returned.
467    * @exception SQLException if a database access error occurs
468    * @since 1.2
469    */

470   public Blob getBlob(int i) throws SQLException JavaDoc
471   {
472     throw new NotImplementedException("getBlob");
473   }
474
475   /**
476    * Retrieves the value of the designated JDBC <code>CLOB</code> parameter as
477    * a <code>Clob</code> object in the Java programming language.
478    *
479    * @param i the first parameter is 1, the second is 2, and so on
480    * @return the parameter value as a <code>Clob</code> object in the Java
481    * programming language. If the value was SQL <code>NULL</code>,
482    * the value <code>null</code> is returned.
483    * @exception SQLException if a database access error occurs
484    * @since 1.2
485    */

486   public Clob getClob(int i) throws SQLException JavaDoc
487   {
488     throw new NotImplementedException("getClob");
489   }
490
491   /**
492    * Retrieves the value of the designated JDBC <code>ARRAY</code> parameter
493    * as an {@link Array}object in the Java programming language.
494    *
495    * @param i the first parameter is 1, the second is 2, and so on
496    * @return the parameter value as an <code>Array</code> object in the Java
497    * programming language. If the value was SQL <code>NULL</code>,
498    * the value <code>null</code> is returned.
499    * @exception SQLException if a database access error occurs
500    * @since 1.2
501    */

502   public Array JavaDoc getArray(int i) throws SQLException JavaDoc
503   {
504     throw new NotImplementedException("getArray");
505   }
506
507   /**
508    * Retrieves the value of the designated JDBC <code>DATE</code> parameter as
509    * a <code>java.sql.Date</code> object, using the given
510    * <code>Calendar</code> object to construct the date. With a
511    * <code>Calendar</code> object, the driver can calculate the date taking
512    * into account a custom timezone and locale. If no <code>Calendar</code>
513    * object is specified, the driver uses the default timezone and locale.
514    *
515    * @param parameterIndex the first parameter is 1, the second is 2, and so on
516    * @param cal the <code>Calendar</code> object the driver will use to
517    * construct the date
518    * @return the parameter value. If the value is SQL <code>NULL</code>, the
519    * result is <code>null</code>.
520    * @exception SQLException if a database access error occurs
521    * @see #setDate(String, Date)
522    * @since 1.2
523    */

524   public Date JavaDoc getDate(int parameterIndex, Calendar JavaDoc cal) throws SQLException JavaDoc
525   {
526     throw new NotImplementedException("getDate");
527   }
528
529   /**
530    * Retrieves the value of the designated JDBC <code>TIME</code> parameter as
531    * a <code>java.sql.Time</code> object, using the given
532    * <code>Calendar</code> object to construct the time. With a
533    * <code>Calendar</code> object, the driver can calculate the time taking
534    * into account a custom timezone and locale. If no <code>Calendar</code>
535    * object is specified, the driver uses the default timezone and locale.
536    *
537    * @param parameterIndex the first parameter is 1, the second is 2, and so on
538    * @param cal the <code>Calendar</code> object the driver will use to
539    * construct the time
540    * @return the parameter value; if the value is SQL <code>NULL</code>, the
541    * result is <code>null</code>.
542    * @exception SQLException if a database access error occurs
543    * @see #setTime(String, Time)
544    * @since 1.2
545    */

546   public Time JavaDoc getTime(int parameterIndex, Calendar JavaDoc cal) throws SQLException JavaDoc
547   {
548     throw new NotImplementedException("getTime");
549   }
550
551   /**
552    * Retrieves the value of the designated JDBC <code>TIMESTAMP</code>
553    * parameter as a <code>java.sql.Timestamp</code> object, using the given
554    * <code>Calendar</code> object to construct the <code>Timestamp</code>
555    * object. With a <code>Calendar</code> object, the driver can calculate the
556    * timestamp taking into account a custom timezone and locale. If no
557    * <code>Calendar</code> object is specified, the driver uses the default
558    * timezone and locale.
559    *
560    * @param parameterIndex the first parameter is 1, the second is 2, and so on
561    * @param cal the <code>Calendar</code> object the driver will use to
562    * construct the timestamp
563    * @return the parameter value. If the value is SQL <code>NULL</code>, the
564    * result is <code>null</code>.
565    * @exception SQLException if a database access error occurs
566    * @see #setTimestamp(String, Timestamp)
567    * @since 1.2
568    */

569   public Timestamp JavaDoc getTimestamp(int parameterIndex, Calendar JavaDoc cal)
570       throws SQLException JavaDoc
571   {
572     throw new NotImplementedException("getTimestamp");
573   }
574
575   /**
576    * Registers the designated output parameter. This version of the method
577    * <code>registerOutParameter</code> should be used for a user-defined or
578    * <code>REF</code> output parameter. Examples of user-defined types
579    * include: <code>STRUCT</code>,<code>DISTINCT</code>,
580    * <code>JAVA_OBJECT</code>, and named array types.
581    * <p>
582    * Before executing a stored procedure call, you must explicitly call
583    * <code>registerOutParameter</code> to register the type from
584    * <code>java.sql.Types</code> for each OUT parameter. For a user-defined
585    * parameter, the fully-qualified SQL type name of the parameter should also
586    * be given, while a <code>REF</code> parameter requires that the
587    * fully-qualified type name of the referenced type be given. A JDBC driver
588    * that does not need the type code and type name information may ignore it.
589    * To be portable, however, applications should always provide these values
590    * for user-defined and <code>REF</code> parameters.
591    * <p>
592    * Although it is intended for user-defined and <code>REF</code> parameters,
593    * this method may be used to register a parameter of any JDBC type. If the
594    * parameter does not have a user-defined or <code>REF</code> type, the
595    * <i>typeName </i> parameter is ignored.
596    * <p>
597    * <b>Note: </b> When reading the value of an out parameter, you must use the
598    * getter method whose Java type corresponds to the parameter's registered SQL
599    * type.
600    *
601    * @param paramIndex the first parameter is 1, the second is 2,...
602    * @param sqlType a value from {@link java.sql.Types}
603    * @param typeName the fully-qualified name of an SQL structured type
604    * @exception SQLException if a database access error occurs
605    * @see java.sql.Types
606    * @since 1.2
607    */

608   public void registerOutParameter(int paramIndex, int sqlType, String JavaDoc typeName)
609       throws SQLException JavaDoc
610   {
611     throw new NotImplementedException("registerOutParameter");
612   }
613
614   // --------------------------JDBC 3.0-----------------------------
615

616   /**
617    * Registers the OUT parameter named <code>parameterName</code> to the JDBC
618    * type <code>sqlType</code>. All OUT parameters must be registered before
619    * a stored procedure is executed.
620    * <p>
621    * The JDBC type specified by <code>sqlType</code> for an OUT parameter
622    * determines the Java type that must be used in the <code>get</code> method
623    * to read the value of that parameter.
624    * <p>
625    * If the JDBC type expected to be returned to this output parameter is
626    * specific to this particular database, <code>sqlType</code> should be
627    * <code>java.sql.Types.OTHER</code>. The method {@link #getObject(String)}
628    * retrieves the value.
629    *
630    * @param parameterName the name of the parameter
631    * @param sqlType the JDBC type code defined by <code>java.sql.Types</code>.
632    * If the parameter is of JDBC type <code>NUMERIC</code> or
633    * <code>DECIMAL</code>, the version of
634    * <code>registerOutParameter</code> that accepts a scale value
635    * should be used.
636    * @exception SQLException if a database access error occurs
637    * @since 1.4
638    * @see java.sql.Types
639    */

640   public void registerOutParameter(String JavaDoc parameterName, int sqlType)
641       throws SQLException JavaDoc
642   {
643     throw new NotImplementedException("registerOutParameter");
644   }
645
646   /**
647    * Registers the parameter named <code>parameterName</code> to be of JDBC
648    * type <code>sqlType</code>. This method must be called before a stored
649    * procedure is executed.
650    * <p>
651    * The JDBC type specified by <code>sqlType</code> for an OUT parameter
652    * determines the Java type that must be used in the <code>get</code> method
653    * to read the value of that parameter.
654    * <p>
655    * This version of <code>registerOutParameter</code> should be used when the
656    * parameter is of JDBC type <code>NUMERIC</code> or <code>DECIMAL</code>.
657    *
658    * @param parameterName the name of the parameter
659    * @param sqlType SQL type code defined by <code>java.sql.Types</code>.
660    * @param scale the desired number of digits to the right of the decimal
661    * point. It must be greater than or equal to zero.
662    * @exception SQLException if a database access error occurs
663    * @since 1.4
664    * @see java.sql.Types
665    */

666   public void registerOutParameter(String JavaDoc parameterName, int sqlType, int scale)
667       throws SQLException JavaDoc
668   {
669     throw new NotImplementedException("registerOutParameter");
670   }
671
672   /**
673    * Registers the designated output parameter. This version of the method
674    * <code>registerOutParameter</code> should be used for a user-named or REF
675    * output parameter. Examples of user-named types include: STRUCT, DISTINCT,
676    * JAVA_OBJECT, and named array types.
677    * <p>
678    * Before executing a stored procedure call, you must explicitly call
679    * <code>registerOutParameter</code> to register the type from
680    * <code>java.sql.Types</code> for each OUT parameter. For a user-named
681    * parameter the fully-qualified SQL type name of the parameter should also be
682    * given, while a REF parameter requires that the fully-qualified type name of
683    * the referenced type be given. A JDBC driver that does not need the type
684    * code and type name information may ignore it. To be portable, however,
685    * applications should always provide these values for user-named and REF
686    * parameters.
687    * <p>
688    * Although it is intended for user-named and REF parameters, this method may
689    * be used to register a parameter of any JDBC type. If the parameter does not
690    * have a user-named or REF type, the typeName parameter is ignored.
691    * <p>
692    * <b>Note: </b> When reading the value of an out parameter, you must use the
693    * <code>getXXX</code> method whose Java type XXX corresponds to the
694    * parameter's registered SQL type.
695    *
696    * @param parameterName the name of the parameter
697    * @param sqlType a value from {@link java.sql.Types}
698    * @param typeName the fully-qualified name of an SQL structured type
699    * @exception SQLException if a database access error occurs
700    * @see java.sql.Types
701    * @since 1.4
702    */

703   public void registerOutParameter(String JavaDoc parameterName, int sqlType,
704       String JavaDoc typeName) throws SQLException JavaDoc
705   {
706     throw new NotImplementedException("registerOutParameter");
707   }
708
709   /**
710    * Retrieves the value of the designated JDBC <code>DATALINK</code>
711    * parameter as a <code>java.net.URL</code> object.
712    *
713    * @param parameterIndex the first parameter is 1, the second is 2,...
714    * @return a <code>java.net.URL</code> object that represents the JDBC
715    * <code>DATALINK</code> value used as the designated parameter
716    * @exception SQLException if a database access error occurs, or if the URL
717    * being returned is not a valid URL on the Java platform
718    * @see #setURL
719    * @since 1.4
720    */

721   public URL JavaDoc getURL(int parameterIndex) throws SQLException JavaDoc
722   {
723     throw new NotImplementedException("getURL");
724   }
725
726   /**
727    * Sets the designated parameter to the given <code>java.net.URL</code>
728    * object. The driver converts this to an SQL <code>DATALINK</code> value
729    * when it sends it to the database.
730    *
731    * @param parameterName the name of the parameter
732    * @param val the parameter value
733    * @exception SQLException if a database access error occurs, or if a URL is
734    * malformed
735    * @see #getURL(String)
736    * @since 1.4
737    */

738   public void setURL(String JavaDoc parameterName, URL JavaDoc val) throws SQLException JavaDoc
739   {
740     throw new NotImplementedException("setURL");
741   }
742
743   /**
744    * Sets the designated parameter to SQL <code>NULL</code>.
745    * <p>
746    * <b>Note: </b> you must specify the parameter's SQL type.
747    *
748    * @param parameterName the name of the parameter
749    * @param sqlType the SQL type code defined in <code>java.sql.Types</code>
750    * @exception SQLException if a database access error occurs
751    * @since 1.4
752    */

753   public void setNull(String JavaDoc parameterName, int sqlType) throws SQLException JavaDoc
754   {
755     throw new NotImplementedException("setNull");
756   }
757
758   /**
759    * Sets the designated parameter to the given Java <code>boolean</code>
760    * value. The driver converts this to an SQL <code>BIT</code> value when it
761    * sends it to the database.
762    *
763    * @param parameterName the name of the parameter
764    * @param x the parameter value
765    * @exception SQLException if a database access error occurs
766    * @see #getBoolean(String)
767    * @since 1.4
768    */

769   public void setBoolean(String JavaDoc parameterName, boolean x) throws SQLException JavaDoc
770   {
771     throw new NotImplementedException("setBoolean");
772   }
773
774   /**
775    * Sets the designated parameter to the given Java <code>byte</code> value.
776    * The driver converts this to an SQL <code>TINYINT</code> value when it
777    * sends it to the database.
778    *
779    * @param parameterName the name of the parameter
780    * @param x the parameter value
781    * @exception SQLException if a database access error occurs
782    * @see #getByte(String)
783    * @since 1.4
784    */

785   public void setByte(String JavaDoc parameterName, byte x) throws SQLException JavaDoc
786   {
787     throw new NotImplementedException("setByte");
788   }
789
790   /**
791    * Sets the designated parameter to the given Java <code>short</code> value.
792    * The driver converts this to an SQL <code>SMALLINT</code> value when it
793    * sends it to the database.
794    *
795    * @param parameterName the name of the parameter
796    * @param x the parameter value
797    * @exception SQLException if a database access error occurs
798    * @see #getShort(String)
799    * @since 1.4
800    */

801   public void setShort(String JavaDoc parameterName, short x) throws SQLException JavaDoc
802   {
803     throw new NotImplementedException("setShort");
804   }
805
806   /**
807    * Sets the designated parameter to the given Java <code>int</code> value.
808    * The driver converts this to an SQL <code>INTEGER</code> value when it
809    * sends it to the database.
810    *
811    * @param parameterName the name of the parameter
812    * @param x the parameter value
813    * @exception SQLException if a database access error occurs
814    * @see #getInt(String)
815    * @since 1.4
816    */

817   public void setInt(String JavaDoc parameterName, int x) throws SQLException JavaDoc
818   {
819     throw new NotImplementedException("setInt");
820   }
821
822   /**
823    * Sets the designated parameter to the given Java <code>long</code> value.
824    * The driver converts this to an SQL <code>BIGINT</code> value when it
825    * sends it to the database.
826    *
827    * @param parameterName the name of the parameter
828    * @param x the parameter value
829    * @exception SQLException if a database access error occurs
830    * @see #getLong(String)
831    * @since 1.4
832    */

833   public void setLong(String JavaDoc parameterName, long x) throws SQLException JavaDoc
834   {
835     throw new NotImplementedException("setLong");
836   }
837
838   /**
839    * Sets the designated parameter to the given Java <code>float</code> value.
840    * The driver converts this to an SQL <code>FLOAT</code> value when it sends
841    * it to the database.
842    *
843    * @param parameterName the name of the parameter
844    * @param x the parameter value
845    * @exception SQLException if a database access error occurs
846    * @see #getFloat(String)
847    * @since 1.4
848    */

849   public void setFloat(String JavaDoc parameterName, float x) throws SQLException JavaDoc
850   {
851     throw new NotImplementedException("setFloat");
852   }
853
854   /**
855    * Sets the designated parameter to the given Java <code>double</code>
856    * value. The driver converts this to an SQL <code>DOUBLE</code> value when
857    * it sends it to the database.
858    *
859    * @param parameterName the name of the parameter
860    * @param x the parameter value
861    * @exception SQLException if a database access error occurs
862    * @see #getDouble(String)
863    * @since 1.4
864    */

865   public void setDouble(String JavaDoc parameterName, double x) throws SQLException JavaDoc
866   {
867     throw new NotImplementedException("setDouble");
868   }
869
870   /**
871    * Sets the designated parameter to the given
872    * <code>java.math.BigDecimal</code> value. The driver converts this to an
873    * SQL <code>NUMERIC</code> value when it sends it to the database.
874    *
875    * @param parameterName the name of the parameter
876    * @param x the parameter value
877    * @exception SQLException if a database access error occurs
878    * @see #getBigDecimal(String)
879    * @since 1.4
880    */

881   public void setBigDecimal(String JavaDoc parameterName, BigDecimal JavaDoc x)
882       throws SQLException JavaDoc
883   {
884     throw new NotImplementedException("setBigDecimal");
885   }
886
887   /**
888    * Sets the designated parameter to the given Java <code>String</code>
889    * value. The driver converts this to an SQL <code>VARCHAR</code> or
890    * <code>LONGVARCHAR</code> value (depending on the argument's size relative
891    * to the driver's limits on <code>VARCHAR</code> values) when it sends it
892    * to the database.
893    *
894    * @param parameterName the name of the parameter
895    * @param x the parameter value
896    * @exception SQLException if a database access error occurs
897    * @see #getString(String)
898    * @since 1.4
899    */

900   public void setString(String JavaDoc parameterName, String JavaDoc x) throws SQLException JavaDoc
901   {
902     throw new NotImplementedException("setString");
903   }
904
905   /**
906    * Sets the designated parameter to the given Java array of bytes. The driver
907    * converts this to an SQL <code>VARBINARY</code> or
908    * <code>LONGVARBINARY</code> (depending on the argument's size relative to
909    * the driver's limits on <code>VARBINARY</code> values) when it sends it to
910    * the database.
911    *
912    * @param parameterName the name of the parameter
913    * @param x the parameter value
914    * @exception SQLException if a database access error occurs
915    * @see #getBytes(String)
916    * @since 1.4
917    */

918   public void setBytes(String JavaDoc parameterName, byte[] x) throws SQLException JavaDoc
919   {
920     throw new NotImplementedException("setBytes");
921   }
922
923   /**
924    * Sets the designated parameter to the given <code>java.sql.Date</code>
925    * value. The driver converts this to an SQL <code>DATE</code> value when it
926    * sends it to the database.
927    *
928    * @param parameterName the name of the parameter
929    * @param x the parameter value
930    * @exception SQLException if a database access error occurs
931    * @see #getDate(String)
932    * @since 1.4
933    */

934   public void setDate(String JavaDoc parameterName, Date JavaDoc x) throws SQLException JavaDoc
935   {
936     throw new NotImplementedException("setDate");
937   }
938
939   /**
940    * Sets the designated parameter to the given <code>java.sql.Time</code>
941    * value. The driver converts this to an SQL <code>TIME</code> value when it
942    * sends it to the database.
943    *
944    * @param parameterName the name of the parameter
945    * @param x the parameter value
946    * @exception SQLException if a database access error occurs
947    * @see #getTime(String)
948    * @since 1.4
949    */

950   public void setTime(String JavaDoc parameterName, Time JavaDoc x) throws SQLException JavaDoc
951   {
952