KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > internetcds > jdbc > tds > PreparedStatement_2_0


1 //
2
// Copyright 1999 Craig Spannring
3
//
4
// All rights reserved.
5
//
6
// Redistribution and use in source and binary forms, with or without
7
// modification, are permitted provided that the following conditions are met:
8
// 1. Redistributions of source code must retain the above copyright
9
// notice, this list of conditions and the following disclaimer.
10
// 2. Redistributions in binary form must reproduce the above copyright
11
// notice, this list of conditions and the following disclaimer in the
12
// documentation and/or other materials provided with the distribution.
13
// 3. All advertising materials mentioning features or use of this software
14
// must display the following acknowledgement:
15
// This product includes software developed by Craig Spannring
16
// 4. The name of Craig Spannring may not be used to endorse or promote
17
// products derived from this software without specific prior
18
// written permission.
19
//
20
// THIS SOFTWARE IS PROVIDED BY CRAIG SPANNRING ``AS IS'' AND
21
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
// ARE DISCLAIMED. IN NO EVENT SHALL CRAIG SPANNRING BE LIABLE
24
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30
// SUCH DAMAGE.
31
//
32

33 package com.internetcds.jdbc.tds;
34
35 import java.net.URL JavaDoc;
36 import java.sql.*;
37 import java.math.BigDecimal JavaDoc;
38 import java.io.InputStream JavaDoc;
39 import java.io.Reader JavaDoc;
40 import java.util.Calendar JavaDoc;
41 import java.util.Map JavaDoc;
42
43
44 public class PreparedStatement_2_0
45    extends com.internetcds.jdbc.tds.PreparedStatement_base
46    implements java.sql.PreparedStatement JavaDoc
47 {
48    public static final String JavaDoc cvsVersion = "$Id: PreparedStatement_2_0.java,v 1.1 2006/06/23 10:39:30 sinisa Exp $";
49
50
51    public PreparedStatement_2_0(
52       java.sql.Connection JavaDoc conn_,
53       Tds tds_,
54       String JavaDoc sql)
55       throws java.sql.SQLException JavaDoc
56       {
57          super(conn_, tds_, sql);
58       }
59
60     //--------------------------JDBC 2.0-----------------------------
61

62     /**
63      * JDBC 2.0
64      *
65      * Adds a set of parameters to the batch.
66      *
67      * @exception SQLException if a database access error occurs
68      * @see Statement#addBatch
69      */

70    public void addBatch() throws java.sql.SQLException JavaDoc
71       {
72          NotImplemented();
73       }
74    
75    /**
76     * JDBC 2.0
77     *
78     * Sets the designated parameter to the given <code>Reader</code>
79     * object, which is the given number of characters long.
80     * When a very large UNICODE value is input to a LONGVARCHAR
81     * parameter, it may be more practical to send it via a
82     * java.io.Reader. JDBC will read the data from the stream
83     * as needed, until it reaches end-of-file. The JDBC driver will
84     * do any necessary conversion from UNICODE to the database char format.
85     *
86     * <P><B>Note:</B> This stream object can either be a standard
87     * Java stream object or your own subclass that implements the
88     * standard interface.
89     *
90     * @param parameterIndex the first parameter is 1, the second is 2, ...
91     * @param x the java reader which contains the UNICODE data
92     * @param length the number of characters in the stream
93     * @exception SQLException if a database access error occurs
94     */

95    public void setCharacterStream(int parameterIndex,
96                                   java.io.Reader JavaDoc reader,
97                                   int length) throws java.sql.SQLException JavaDoc
98       {
99          NotImplemented();
100       }
101    
102
103     /**
104      * JDBC 2.0
105      *
106      * Sets a REF(&lt;structured-type&gt;) parameter.
107      *
108      * @param i the first parameter is 1, the second is 2, ...
109      * @param x an object representing data of an SQL REF Type
110      * @exception SQLException if a database access error occurs
111      */

112    public void setRef (int i, java.sql.Ref JavaDoc x) throws java.sql.SQLException JavaDoc
113       {
114          NotImplemented();
115       }
116
117
118     /**
119      * JDBC 2.0
120      *
121      * Sets a BLOB parameter.
122      *
123      * @param i the first parameter is 1, the second is 2, ...
124      * @param x an object representing a BLOB
125      * @exception SQLException if a database access error occurs
126      */

127    public void setBlob (int i, java.sql.Blob JavaDoc x) throws java.sql.SQLException JavaDoc
128       {
129          NotImplemented();
130       }
131
132
133     /**
134      * JDBC 2.0
135      *
136      * Sets a CLOB parameter.
137      *
138      * @param i the first parameter is 1, the second is 2, ...
139      * @param x an object representing a CLOB
140      * @exception SQLException if a database access error occurs
141      */

142    public void setClob (int i, java.sql.Clob JavaDoc x) throws java.sql.SQLException JavaDoc
143       {
144          NotImplemented();
145       }
146
147
148     /**
149      * JDBC 2.0
150      *
151      * Sets an Array parameter.
152      *
153      * @param i the first parameter is 1, the second is 2, ...
154      * @param x an object representing an SQL array
155      * @exception SQLException if a database access error occurs
156      */

157    public void setArray (int i, java.sql.Array JavaDoc x) throws java.sql.SQLException JavaDoc
158       {
159          NotImplemented();
160       }
161
162
163     /**
164      * JDBC 2.0
165      *
166      * Gets the number, types and properties of a ResultSet's columns.
167      *
168      * @return the description of a ResultSet's columns
169      * @exception SQLException if a database access error occurs
170      */

171    public java.sql.ResultSetMetaData JavaDoc getMetaData() throws java.sql.SQLException JavaDoc
172       {
173          NotImplemented();
174          return null;
175       }
176
177
178     /**
179      * JDBC 2.0
180      *
181      * Sets the designated parameter to a java.sql.Date value,
182      * using the given <code>Calendar</code> object. The driver uses
183      * the <code>Calendar</code> object to construct an SQL DATE,
184      * which the driver then sends to the database. With a
185      * a <code>Calendar</code> object, the driver can calculate the date
186      * taking into account a custom timezone and locale. If no
187      * <code>Calendar</code> object is specified, the driver uses the default
188      * timezone and locale.
189      *
190      * @param parameterIndex the first parameter is 1, the second is 2, ...
191      * @param x the parameter value
192      * @param cal the <code>Calendar</code> object the driver will use
193      * to construct the date
194      * @exception SQLException if a database access error occurs
195      */

196    public void setDate(int parameterIndex, java.sql.Date JavaDoc x, java.util.Calendar JavaDoc cal)
197       throws java.sql.SQLException JavaDoc
198    {
199       NotImplemented();
200    }
201    
202    
203    /**
204     * JDBC 2.0
205     *
206     * Sets the designated parameter to a java.sql.Time value,
207     * using the given <code>Calendar</code> object. The driver uses
208     * the <code>Calendar</code> object to construct an SQL TIME,
209     * which the driver then sends to the database. With a
210     * a <code>Calendar</code> object, the driver can calculate the time
211     * taking into account a custom timezone and locale. If no
212     * <code>Calendar</code> object is specified, the driver uses the default
213     * timezone and locale.
214     *
215     * @param parameterIndex the first parameter is 1, the second is 2, ...
216     * @param x the parameter value
217     * @param cal the <code>Calendar</code> object the driver will use
218     * to construct the time
219     * @exception SQLException if a database access error occurs
220     */

221    public void setTime(int parameterIndex, java.sql.Time JavaDoc x, java.util.Calendar JavaDoc cal)
222       throws java.sql.SQLException JavaDoc
223    {
224       NotImplemented();
225    }
226    
227    
228    /**
229     * JDBC 2.0
230     *
231     * Sets the designated parameter to a java.sql.Timestamp value,
232     * using the given <code>Calendar</code> object. The driver uses
233     * the <code>Calendar</code> object to construct an SQL TIMESTAMP,
234     * which the driver then sends to the database. With a
235     * a <code>Calendar</code> object, the driver can calculate the timestamp
236     * taking into account a custom timezone and locale. If no
237     * <code>Calendar</code> object is specified, the driver uses the default
238     * timezone and locale.
239     *
240     * @param parameterIndex the first parameter is 1, the second is 2, ...
241     * @param x the parameter value
242     * @param cal the <code>Calendar</code> object the driver will use
243     * to construct the timestamp
244     * @exception SQLException if a database access error occurs
245     */

246    public void setTimestamp(int parameterIndex,
247                             java.sql.Timestamp JavaDoc x,
248                             java.util.Calendar JavaDoc cal)
249       throws java.sql.SQLException JavaDoc
250    {
251       NotImplemented();
252    }
253    
254
255    /**
256     * JDBC 2.0
257     *
258     * Sets the designated parameter to SQL NULL. This version of setNull should
259     * be used for user-named types and REF type parameters. Examples
260     * of user-named types include: STRUCT, DISTINCT, JAVA_OBJECT, and
261     * named array types.
262     *
263     * <P><B>Note:</B> To be portable, applications must give the
264     * SQL type code and the fully-qualified SQL type name when specifying
265     * a NULL user-defined or REF parameter. In the case of a user-named type
266     * the name is the type name of the parameter itself. For a REF
267     * parameter the name is the type name of the referenced type. If
268     * a JDBC driver does not need the type code or type name information,
269     * it may ignore it.
270     *
271     * Although it is intended for user-named and Ref parameters,
272     * this method may be used to set a null parameter of any JDBC type.
273     * If the parameter does not have a user-named or REF type, the given
274     * typeName is ignored.
275     *
276     *
277     * @param parameterIndex the first parameter is 1, the second is 2, ...
278     * @param sqlType a value from java.sql.Types
279     * @param typeName the fully-qualified name of an SQL user-named type,
280     * ignored if the parameter is not a user-named type or REF
281     * @exception SQLException if a database access error occurs
282     */

283    public void setNull (int paramIndex, int sqlType, String JavaDoc typeName)
284       throws java.sql.SQLException JavaDoc
285    {
286       NotImplemented();
287    }
288   //---------------------------------------------------------------------
289
// JDBC 3.0
290
//---------------------------------------------------------------------
291

292     public void setURL(int current, URL JavaDoc url) throws SQLException {
293         throw new UnsupportedOperationException JavaDoc("Statement.getMoreResults(int) unsupported");
294     }
295     
296     public void setURL(String JavaDoc current, URL JavaDoc url) throws SQLException {
297         throw new UnsupportedOperationException JavaDoc("Statement.getMoreResults(int) unsupported");
298     }
299
300     public boolean getMoreResults(int current) throws SQLException {
301         throw new UnsupportedOperationException JavaDoc("Statement.getMoreResults(int) unsupported");
302     }
303
304     public ResultSet getGeneratedKeys() throws SQLException {
305         throw new UnsupportedOperationException JavaDoc("Statement.getGeneratedKeys() unsupported");
306     }
307
308     public int executeUpdate(String JavaDoc sql, int autoGeneratedKeys) throws SQLException {
309         throw new UnsupportedOperationException JavaDoc("Statement.executeUpdate(String,int) unsupported");
310     }
311
312     public int executeUpdate(String JavaDoc sql, int[] columnIndexes) throws SQLException {
313         throw new UnsupportedOperationException JavaDoc("Statement.executeUpdate(String,int[]) unsupported");
314     }
315
316     public int executeUpdate(String JavaDoc sql, String JavaDoc[] columnNames) throws SQLException {
317         throw new UnsupportedOperationException JavaDoc("Statement.executeUpdate(String,String[]) unsupported");
318     }
319
320     public boolean execute(String JavaDoc sql, int autoGeneratedKeys) throws SQLException {
321         throw new UnsupportedOperationException JavaDoc("Statement.execute(String,int) unsupported");
322     }
323
324     public boolean execute(String JavaDoc sql, int[] columnIndexes) throws SQLException {
325         throw new UnsupportedOperationException JavaDoc("Statement.execute(String,int[]) unsupported");
326     }
327
328     public boolean execute(String JavaDoc sql, String JavaDoc[] columnNames) throws SQLException {
329         throw new UnsupportedOperationException JavaDoc("Statement.execute(String,String[]) unsupported");
330     }
331
332     public int getResultSetHoldability() throws SQLException {
333         throw new UnsupportedOperationException JavaDoc("Statement.getResultSetHoldability() unsupported");
334     }
335
336     public java.sql.ParameterMetaData JavaDoc getParameterMetaData() throws SQLException {
337         throw new UnsupportedOperationException JavaDoc("Statement.getParameterMetaData() unsupported");
338     }
339
340     public void registerOutParameter(String JavaDoc str,int x) throws SQLException {
341         throw new UnsupportedOperationException JavaDoc("Statement.getParameterMetaData() unsupported");
342     }
343
344     public void registerOutParameter(String JavaDoc str,int x, int y) throws SQLException {
345         throw new UnsupportedOperationException JavaDoc("Statement.getParameterMetaData() unsupported");
346     }
347
348     public void registerOutParameter(String JavaDoc str1,String JavaDoc str2) throws SQLException {
349         throw new UnsupportedOperationException JavaDoc("Statement.getParameterMetaData() unsupported");
350     }
351     public void registerOutParameter(String JavaDoc str1,int x,String JavaDoc str2) throws SQLException {
352         throw new UnsupportedOperationException JavaDoc("Statement.getParameterMetaData() unsupported");
353     }
354
355     public URL JavaDoc getURL(int url) throws SQLException {
356         throw new UnsupportedOperationException JavaDoc("Statement.getMoreResults(int) unsupported");
357     }
358     
359     public void setNull(String JavaDoc column, int url) throws SQLException {
360         throw new UnsupportedOperationException JavaDoc("Statement.getMoreResults(int) setNull");
361     }
362     
363     public void setBoolean(String JavaDoc str,boolean b) throws SQLException {
364         throw new UnsupportedOperationException JavaDoc("Statement.setBoolean(int) setNull");
365     }
366
367     public void setByte(String JavaDoc str,byte b) throws SQLException {
368         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
369     }
370
371
372     public void setShort(String JavaDoc str,short b) throws SQLException {
373         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
374     }
375     
376     
377     public void setInt(String JavaDoc str,int b) throws SQLException {
378         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
379     }
380     
381     
382     public void setLong(String JavaDoc str,long b) throws SQLException {
383         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
384     }
385     
386     
387     public void setFloat(String JavaDoc str,float b) throws SQLException {
388         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
389     }
390
391
392     public void setDouble(String JavaDoc str,double b) throws SQLException {
393         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
394     }
395     
396     
397     public void setBigDecimal(String JavaDoc str,BigDecimal JavaDoc b) throws SQLException {
398         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
399     }
400
401
402     public void setString(String JavaDoc str,String JavaDoc b) throws SQLException {
403         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
404     }
405
406     public void setBytes(String JavaDoc str,byte[] b) throws SQLException {
407         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
408     }
409
410     public void setDate(String JavaDoc str,Date b) throws SQLException {
411         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
412     }
413
414     public void setTime(String JavaDoc str,Time b) throws SQLException {
415         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
416     }
417
418     public void setTimestamp(String JavaDoc str,Timestamp b) throws SQLException {
419         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
420     }
421     
422    public void setAsciiStream(String JavaDoc str,InputStream JavaDoc b, int x) throws SQLException {
423         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
424     }
425
426   public void setBinaryStream(String JavaDoc str,InputStream JavaDoc b, int x) throws SQLException {
427         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
428     }
429     
430   public void setObject(String JavaDoc str,Object JavaDoc b, int x, int y) throws SQLException {
431         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
432     }
433
434   public void setObject(String JavaDoc str,Object JavaDoc b, int x) throws SQLException {
435         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
436     }
437
438   public void setObject(String JavaDoc str,Object JavaDoc b) throws SQLException {
439         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
440     }
441     
442   public void setCharacterStream(String JavaDoc str,Reader JavaDoc b, int x) throws SQLException {
443         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
444     }
445
446   public void setDate(String JavaDoc str,Date b, Calendar JavaDoc cal) throws SQLException {
447         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
448     }
449
450   public void setTime(String JavaDoc str,Time b, Calendar JavaDoc cal) throws SQLException {
451         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
452     }
453     
454   public void setTimestamp(String JavaDoc str,Timestamp b, Calendar JavaDoc cal) throws SQLException {
455         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
456     }
457
458   public void setNull(String JavaDoc str,int b, String JavaDoc str2) throws SQLException {
459         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
460     }
461
462   public String JavaDoc getString(String JavaDoc str) throws SQLException {
463         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
464     }
465     
466   public boolean getBoolean(String JavaDoc str) throws SQLException {
467         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
468     }
469     
470   public byte getByte(String JavaDoc str) throws SQLException {
471         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
472     }
473     
474   public short getShort(String JavaDoc str) throws SQLException {
475         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
476     }
477
478   public int getInt(String JavaDoc str) throws SQLException {
479         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
480     }
481     
482   public long getLong(String JavaDoc str) throws SQLException {
483         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
484     }
485     
486   public float getFloat(String JavaDoc str) throws SQLException {
487         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
488     }
489   
490   public double getDouble(String JavaDoc str) throws SQLException {
491         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
492     }
493
494   public byte[] getBytes(String JavaDoc str) throws SQLException {
495         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
496     }
497     
498   public Date getDate(String JavaDoc str) throws SQLException {
499         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
500     }
501     
502   public Time getTime(String JavaDoc str) throws SQLException {
503         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
504     }
505     
506   public Timestamp getTimestamp(String JavaDoc str) throws SQLException {
507         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
508     }
509     
510     public Object JavaDoc getObject(String JavaDoc str) throws SQLException {
511         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
512     }
513     
514     public BigDecimal JavaDoc getBigDecimal(String JavaDoc str) throws SQLException {
515         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
516     }
517     
518     public Object JavaDoc getObject(String JavaDoc str, Map JavaDoc m) throws SQLException {
519         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
520     }
521
522     public Ref getRef(String JavaDoc str) throws SQLException {
523         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
524     }
525   
526   
527     public Blob getBlob(String JavaDoc str) throws SQLException {
528         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
529     }
530
531    public Clob getClob(String JavaDoc str) throws SQLException {
532         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
533     }
534     
535    public Array getArray(String JavaDoc str) throws SQLException {
536         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
537     }
538  
539  
540    public Date getDate(String JavaDoc str, Calendar JavaDoc c) throws SQLException {
541         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
542     }
543
544   public Time getTime(String JavaDoc str, Calendar JavaDoc m) throws SQLException {
545         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
546     }
547
548     public Timestamp getTimestamp(String JavaDoc str, Calendar JavaDoc m) throws SQLException {
549         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
550     }
551     
552    public URL JavaDoc getURL(String JavaDoc str) throws SQLException {
553         throw new UnsupportedOperationException JavaDoc("Statement.setByte(int) setNull");
554     }
555    
556    
557 }
558
Popular Tags