KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > dbcp > DelegatingResultSet


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.commons.dbcp;
18
19 import java.sql.ResultSet JavaDoc;
20 import java.math.BigDecimal JavaDoc;
21 import java.sql.Date JavaDoc;
22 import java.sql.Time JavaDoc;
23 import java.sql.Timestamp JavaDoc;
24 import java.io.InputStream JavaDoc;
25 import java.sql.SQLWarning JavaDoc;
26 import java.sql.ResultSetMetaData JavaDoc;
27 import java.sql.SQLException JavaDoc;
28 import java.io.Reader JavaDoc;
29 import java.sql.Statement JavaDoc;
30 import java.util.Map JavaDoc;
31 import java.sql.Ref JavaDoc;
32 import java.sql.Blob JavaDoc;
33 import java.sql.Clob JavaDoc;
34 import java.sql.Array JavaDoc;
35 import java.util.Calendar JavaDoc;
36
37 /**
38  * A base delegating implementation of {@link ResultSet}.
39  * <p>
40  * All of the methods from the {@link ResultSet} interface
41  * simply call the corresponding method on the "delegate"
42  * provided in my constructor.
43  * <p>
44  * Extends AbandonedTrace to implement result set tracking and
45  * logging of code which created the ResultSet. Tracking the
46  * ResultSet ensures that the Statment which created it can
47  * close any open ResultSet's on Statement close.
48  *
49  * @author Glenn L. Nielsen
50  * @author James House
51  * @author Dirk Verbeeck
52  * @version $Revision: 1.13 $ $Date: 2004/03/06 13:35:31 $
53  */

54 public class DelegatingResultSet extends AbandonedTrace implements ResultSet JavaDoc {
55
56     /** My delegate. **/
57     private ResultSet JavaDoc _res;
58
59     /** The Statement that created me, if any. **/
60     private Statement JavaDoc _stmt;
61
62     /**
63      * Create a wrapper for the ResultSet which traces this
64      * ResultSet to the Statement which created it and the
65      * code which created it.
66      *
67      * @param Statement stmt which create this ResultSet
68      * @param ResultSet to wrap
69      */

70     public DelegatingResultSet(Statement JavaDoc stmt, ResultSet JavaDoc res) {
71         super((AbandonedTrace)stmt);
72         this._stmt = stmt;
73         this._res = res;
74     }
75     
76     public static ResultSet JavaDoc wrapResultSet(Statement JavaDoc stmt, ResultSet JavaDoc rset) {
77         if(null == rset) {
78             return null;
79         } else {
80             return new DelegatingResultSet(stmt,rset);
81         }
82     }
83
84     public ResultSet JavaDoc getDelegate() {
85         return _res;
86     }
87
88     public boolean equals(Object JavaDoc obj) {
89         ResultSet JavaDoc delegate = getInnermostDelegate();
90         if (delegate == null) {
91             return false;
92         }
93         if (obj instanceof DelegatingResultSet) {
94             DelegatingResultSet s = (DelegatingResultSet) obj;
95             return delegate.equals(s.getInnermostDelegate());
96         }
97         else {
98             return delegate.equals(obj);
99         }
100     }
101
102     public int hashCode() {
103         Object JavaDoc obj = getInnermostDelegate();
104         if (obj == null) {
105             return 0;
106         }
107         return obj.hashCode();
108     }
109
110     /**
111      * If my underlying {@link ResultSet} is not a
112      * <tt>DelegatingResultSet</tt>, returns it,
113      * otherwise recursively invokes this method on
114      * my delegate.
115      * <p>
116      * Hence this method will return the first
117      * delegate that is not a <tt>DelegatingResultSet</tt>,
118      * or <tt>null</tt> when no non-<tt>DelegatingResultSet</tt>
119      * delegate can be found by transversing this chain.
120      * <p>
121      * This method is useful when you may have nested
122      * <tt>DelegatingResultSet</tt>s, and you want to make
123      * sure to obtain a "genuine" {@link ResultSet}.
124      */

125     public ResultSet JavaDoc getInnermostDelegate() {
126         ResultSet JavaDoc r = _res;
127         while(r != null && r instanceof DelegatingResultSet) {
128             r = ((DelegatingResultSet)r).getDelegate();
129             if(this == r) {
130                 return null;
131             }
132         }
133         return r;
134     }
135     
136     public Statement JavaDoc getStatement() throws SQLException JavaDoc {
137         return _stmt;
138     }
139
140     /**
141      * Wrapper for close of ResultSet which removes this
142      * result set from being traced then calls close on
143      * the original ResultSet.
144      */

145     public void close() throws SQLException JavaDoc {
146         try {
147             if(_stmt != null) {
148                 ((AbandonedTrace)_stmt).removeTrace(this);
149                 _stmt = null;
150             }
151             _res.close();
152         }
153         catch (SQLException JavaDoc e) {
154             handleException(e);
155         }
156     }
157
158     protected void handleException(SQLException JavaDoc e) throws SQLException JavaDoc {
159         if ((_stmt != null) && (_stmt instanceof DelegatingStatement)) {
160             ((DelegatingStatement)_stmt).handleException(e);
161         }
162         else {
163             throw e;
164         }
165     }
166
167     public boolean next() throws SQLException JavaDoc
168     { try { return _res.next(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
169
170     public boolean wasNull() throws SQLException JavaDoc
171     { try { return _res.wasNull(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
172
173     public String JavaDoc getString(int columnIndex) throws SQLException JavaDoc
174     { try { return _res.getString(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
175
176     public boolean getBoolean(int columnIndex) throws SQLException JavaDoc
177     { try { return _res.getBoolean(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
178
179     public byte getByte(int columnIndex) throws SQLException JavaDoc
180     { try { return _res.getByte(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
181
182     public short getShort(int columnIndex) throws SQLException JavaDoc
183     { try { return _res.getShort(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
184
185     public int getInt(int columnIndex) throws SQLException JavaDoc
186     { try { return _res.getInt(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
187
188     public long getLong(int columnIndex) throws SQLException JavaDoc
189     { try { return _res.getLong(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
190
191     public float getFloat(int columnIndex) throws SQLException JavaDoc
192     { try { return _res.getFloat(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
193
194     public double getDouble(int columnIndex) throws SQLException JavaDoc
195     { try { return _res.getDouble(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
196
197     /** @deprecated */
198     public BigDecimal JavaDoc getBigDecimal(int columnIndex, int scale) throws SQLException JavaDoc
199     { try { return _res.getBigDecimal(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
200
201     public byte[] getBytes(int columnIndex) throws SQLException JavaDoc
202     { try { return _res.getBytes(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
203
204     public Date JavaDoc getDate(int columnIndex) throws SQLException JavaDoc
205     { try { return _res.getDate(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
206
207     public Time JavaDoc getTime(int columnIndex) throws SQLException JavaDoc
208     { try { return _res.getTime(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
209
210     public Timestamp JavaDoc getTimestamp(int columnIndex) throws SQLException JavaDoc
211     { try { return _res.getTimestamp(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
212
213     public InputStream JavaDoc getAsciiStream(int columnIndex) throws SQLException JavaDoc
214     { try { return _res.getAsciiStream(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
215
216     /** @deprecated */
217     public InputStream JavaDoc getUnicodeStream(int columnIndex) throws SQLException JavaDoc
218     { try { return _res.getUnicodeStream(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
219
220     public InputStream JavaDoc getBinaryStream(int columnIndex) throws SQLException JavaDoc
221     { try { return _res.getBinaryStream(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
222
223     public String JavaDoc getString(String JavaDoc columnName) throws SQLException JavaDoc
224     { try { return _res.getString(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
225
226     public boolean getBoolean(String JavaDoc columnName) throws SQLException JavaDoc
227     { try { return _res.getBoolean(columnName); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
228
229     public byte getByte(String JavaDoc columnName) throws SQLException JavaDoc
230     { try { return _res.getByte(columnName); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
231
232     public short getShort(String JavaDoc columnName) throws SQLException JavaDoc
233     { try { return _res.getShort(columnName); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
234
235     public int getInt(String JavaDoc columnName) throws SQLException JavaDoc
236     { try { return _res.getInt(columnName); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
237
238     public long getLong(String JavaDoc columnName) throws SQLException JavaDoc
239     { try { return _res.getLong(columnName); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
240
241     public float getFloat(String JavaDoc columnName) throws SQLException JavaDoc
242     { try { return _res.getFloat(columnName); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
243
244     public double getDouble(String JavaDoc columnName) throws SQLException JavaDoc
245     { try { return _res.getDouble(columnName); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
246
247     /** @deprecated */
248     public BigDecimal JavaDoc getBigDecimal(String JavaDoc columnName, int scale) throws SQLException JavaDoc
249     { try { return _res.getBigDecimal(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
250
251     public byte[] getBytes(String JavaDoc columnName) throws SQLException JavaDoc
252     { try { return _res.getBytes(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
253
254     public Date JavaDoc getDate(String JavaDoc columnName) throws SQLException JavaDoc
255     { try { return _res.getDate(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
256
257     public Time JavaDoc getTime(String JavaDoc columnName) throws SQLException JavaDoc
258     { try { return _res.getTime(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
259
260     public Timestamp JavaDoc getTimestamp(String JavaDoc columnName) throws SQLException JavaDoc
261     { try { return _res.getTimestamp(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
262
263     public InputStream JavaDoc getAsciiStream(String JavaDoc columnName) throws SQLException JavaDoc
264     { try { return _res.getAsciiStream(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
265
266     /** @deprecated */
267     public InputStream JavaDoc getUnicodeStream(String JavaDoc columnName) throws SQLException JavaDoc
268     { try { return _res.getUnicodeStream(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
269
270     public InputStream JavaDoc getBinaryStream(String JavaDoc columnName) throws SQLException JavaDoc
271     { try { return _res.getBinaryStream(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
272
273     public SQLWarning JavaDoc getWarnings() throws SQLException JavaDoc
274     { try { return _res.getWarnings(); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
275
276     public void clearWarnings() throws SQLException JavaDoc
277     { try { _res.clearWarnings(); } catch (SQLException JavaDoc e) { handleException(e); } }
278
279     public String JavaDoc getCursorName() throws SQLException JavaDoc
280     { try { return _res.getCursorName(); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
281
282     public ResultSetMetaData JavaDoc getMetaData() throws SQLException JavaDoc
283     { try { return _res.getMetaData(); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
284
285     public Object JavaDoc getObject(int columnIndex) throws SQLException JavaDoc
286     { try { return _res.getObject(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
287
288     public Object JavaDoc getObject(String JavaDoc columnName) throws SQLException JavaDoc
289     { try { return _res.getObject(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
290
291     public int findColumn(String JavaDoc columnName) throws SQLException JavaDoc
292     { try { return _res.findColumn(columnName); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
293
294     public Reader JavaDoc getCharacterStream(int columnIndex) throws SQLException JavaDoc
295     { try { return _res.getCharacterStream(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
296
297     public Reader JavaDoc getCharacterStream(String JavaDoc columnName) throws SQLException JavaDoc
298     { try { return _res.getCharacterStream(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
299
300     public BigDecimal JavaDoc getBigDecimal(int columnIndex) throws SQLException JavaDoc
301     { try { return _res.getBigDecimal(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
302
303     public BigDecimal JavaDoc getBigDecimal(String JavaDoc columnName) throws SQLException JavaDoc
304     { try { return _res.getBigDecimal(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
305
306     public boolean isBeforeFirst() throws SQLException JavaDoc
307     { try { return _res.isBeforeFirst(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
308
309     public boolean isAfterLast() throws SQLException JavaDoc
310     { try { return _res.isAfterLast(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
311
312     public boolean isFirst() throws SQLException JavaDoc
313     { try { return _res.isFirst(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
314
315     public boolean isLast() throws SQLException JavaDoc
316     { try { return _res.isLast(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
317
318     public void beforeFirst() throws SQLException JavaDoc
319     { try { _res.beforeFirst(); } catch (SQLException JavaDoc e) { handleException(e); } }
320
321     public void afterLast() throws SQLException JavaDoc
322     { try { _res.afterLast(); } catch (SQLException JavaDoc e) { handleException(e); } }
323
324     public boolean first() throws SQLException JavaDoc
325     { try { return _res.first(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
326
327     public boolean last() throws SQLException JavaDoc
328     { try { return _res.last(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
329
330     public int getRow() throws SQLException JavaDoc
331     { try { return _res.getRow(); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
332
333     public boolean absolute(int row) throws SQLException JavaDoc
334     { try { return _res.absolute(row); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
335
336     public boolean relative(int rows) throws SQLException JavaDoc
337     { try { return _res.relative(rows); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
338
339     public boolean previous() throws SQLException JavaDoc
340     { try { return _res.previous(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
341
342     public void setFetchDirection(int direction) throws SQLException JavaDoc
343     { try { _res.setFetchDirection(direction); } catch (SQLException JavaDoc e) { handleException(e); } }
344
345     public int getFetchDirection() throws SQLException JavaDoc
346     { try { return _res.getFetchDirection(); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
347
348     public void setFetchSize(int rows) throws SQLException JavaDoc
349     { try { _res.setFetchSize(rows); } catch (SQLException JavaDoc e) { handleException(e); } }
350
351     public int getFetchSize() throws SQLException JavaDoc
352     { try { return _res.getFetchSize(); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
353
354     public int getType() throws SQLException JavaDoc
355     { try { return _res.getType(); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
356
357     public int getConcurrency() throws SQLException JavaDoc
358     { try { return _res.getConcurrency(); } catch (SQLException JavaDoc e) { handleException(e); return 0; } }
359
360     public boolean rowUpdated() throws SQLException JavaDoc
361     { try { return _res.rowUpdated(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
362
363     public boolean rowInserted() throws SQLException JavaDoc
364     { try { return _res.rowInserted(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
365
366     public boolean rowDeleted() throws SQLException JavaDoc
367     { try { return _res.rowDeleted(); } catch (SQLException JavaDoc e) { handleException(e); return false; } }
368
369     public void updateNull(int columnIndex) throws SQLException JavaDoc
370     { try { _res.updateNull(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); } }
371
372     public void updateBoolean(int columnIndex, boolean x) throws SQLException JavaDoc
373     { try { _res.updateBoolean(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
374
375     public void updateByte(int columnIndex, byte x) throws SQLException JavaDoc
376     { try { _res.updateByte(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
377
378     public void updateShort(int columnIndex, short x) throws SQLException JavaDoc
379     { try { _res.updateShort(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
380
381     public void updateInt(int columnIndex, int x) throws SQLException JavaDoc
382     { try { _res.updateInt(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
383
384     public void updateLong(int columnIndex, long x) throws SQLException JavaDoc
385     { try { _res.updateLong(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
386
387     public void updateFloat(int columnIndex, float x) throws SQLException JavaDoc
388     { try { _res.updateFloat(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
389
390     public void updateDouble(int columnIndex, double x) throws SQLException JavaDoc
391     { try { _res.updateDouble(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
392
393     public void updateBigDecimal(int columnIndex, BigDecimal JavaDoc x) throws SQLException JavaDoc
394     { try { _res.updateBigDecimal(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
395
396     public void updateString(int columnIndex, String JavaDoc x) throws SQLException JavaDoc
397     { try { _res.updateString(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
398
399     public void updateBytes(int columnIndex, byte[] x) throws SQLException JavaDoc
400     { try { _res.updateBytes(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
401
402     public void updateDate(int columnIndex, Date JavaDoc x) throws SQLException JavaDoc
403     { try { _res.updateDate(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
404
405     public void updateTime(int columnIndex, Time JavaDoc x) throws SQLException JavaDoc
406     { try { _res.updateTime(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
407
408     public void updateTimestamp(int columnIndex, Timestamp JavaDoc x) throws SQLException JavaDoc
409     { try { _res.updateTimestamp(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
410
411     public void updateAsciiStream(int columnIndex, InputStream JavaDoc x, int length) throws SQLException JavaDoc
412     { try { _res.updateAsciiStream(columnIndex, x, length); } catch (SQLException JavaDoc e) { handleException(e); } }
413
414     public void updateBinaryStream(int columnIndex, InputStream JavaDoc x, int length) throws SQLException JavaDoc
415     { try { _res.updateBinaryStream(columnIndex, x, length); } catch (SQLException JavaDoc e) { handleException(e); } }
416
417     public void updateCharacterStream(int columnIndex, Reader JavaDoc x, int length) throws SQLException JavaDoc
418     { try { _res.updateCharacterStream(columnIndex, x, length); } catch (SQLException JavaDoc e) { handleException(e); } }
419
420     public void updateObject(int columnIndex, Object JavaDoc x, int scale) throws SQLException JavaDoc
421     { try { _res.updateObject(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
422
423     public void updateObject(int columnIndex, Object JavaDoc x) throws SQLException JavaDoc
424     { try { _res.updateObject(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
425
426     public void updateNull(String JavaDoc columnName) throws SQLException JavaDoc
427     { try { _res.updateNull(columnName); } catch (SQLException JavaDoc e) { handleException(e); } }
428
429     public void updateBoolean(String JavaDoc columnName, boolean x) throws SQLException JavaDoc
430     { try { _res.updateBoolean(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
431
432     public void updateByte(String JavaDoc columnName, byte x) throws SQLException JavaDoc
433     { try { _res.updateByte(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
434
435     public void updateShort(String JavaDoc columnName, short x) throws SQLException JavaDoc
436     { try { _res.updateShort(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
437
438     public void updateInt(String JavaDoc columnName, int x) throws SQLException JavaDoc
439     { try { _res.updateInt(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
440
441     public void updateLong(String JavaDoc columnName, long x) throws SQLException JavaDoc
442     { try { _res.updateLong(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
443
444     public void updateFloat(String JavaDoc columnName, float x) throws SQLException JavaDoc
445     { try { _res.updateFloat(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
446
447     public void updateDouble(String JavaDoc columnName, double x) throws SQLException JavaDoc
448     { try { _res.updateDouble(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
449
450     public void updateBigDecimal(String JavaDoc columnName, BigDecimal JavaDoc x) throws SQLException JavaDoc
451     { try { _res.updateBigDecimal(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
452
453     public void updateString(String JavaDoc columnName, String JavaDoc x) throws SQLException JavaDoc
454     { try { _res.updateString(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
455
456     public void updateBytes(String JavaDoc columnName, byte[] x) throws SQLException JavaDoc
457     { try { _res.updateBytes(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
458
459     public void updateDate(String JavaDoc columnName, Date JavaDoc x) throws SQLException JavaDoc
460     { try { _res.updateDate(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
461
462     public void updateTime(String JavaDoc columnName, Time JavaDoc x) throws SQLException JavaDoc
463     { try { _res.updateTime(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
464
465     public void updateTimestamp(String JavaDoc columnName, Timestamp JavaDoc x) throws SQLException JavaDoc
466     { try { _res.updateTimestamp(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
467
468     public void updateAsciiStream(String JavaDoc columnName, InputStream JavaDoc x, int length) throws SQLException JavaDoc
469     { try { _res.updateAsciiStream(columnName, x, length); } catch (SQLException JavaDoc e) { handleException(e); } }
470
471     public void updateBinaryStream(String JavaDoc columnName, InputStream JavaDoc x, int length) throws SQLException JavaDoc
472     { try { _res.updateBinaryStream(columnName, x, length); } catch (SQLException JavaDoc e) { handleException(e); } }
473
474     public void updateCharacterStream(String JavaDoc columnName, Reader JavaDoc reader, int length) throws SQLException JavaDoc
475     { try { _res.updateCharacterStream(columnName, reader, length); } catch (SQLException JavaDoc e) { handleException(e); } }
476
477     public void updateObject(String JavaDoc columnName, Object JavaDoc x, int scale) throws SQLException JavaDoc
478     { try { _res.updateObject(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
479
480     public void updateObject(String JavaDoc columnName, Object JavaDoc x) throws SQLException JavaDoc
481     { try { _res.updateObject(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
482
483     public void insertRow() throws SQLException JavaDoc
484     { try { _res.insertRow(); } catch (SQLException JavaDoc e) { handleException(e); } }
485
486     public void updateRow() throws SQLException JavaDoc
487     { try { _res.updateRow(); } catch (SQLException JavaDoc e) { handleException(e); } }
488
489     public void deleteRow() throws SQLException JavaDoc
490     { try { _res.deleteRow(); } catch (SQLException JavaDoc e) { handleException(e); } }
491
492     public void refreshRow() throws SQLException JavaDoc
493     { try { _res.refreshRow(); } catch (SQLException JavaDoc e) { handleException(e); } }
494
495     public void cancelRowUpdates() throws SQLException JavaDoc
496     { try { _res.cancelRowUpdates(); } catch (SQLException JavaDoc e) { handleException(e); } }
497
498     public void moveToInsertRow() throws SQLException JavaDoc
499     { try { _res.moveToInsertRow(); } catch (SQLException JavaDoc e) { handleException(e); } }
500
501     public void moveToCurrentRow() throws SQLException JavaDoc
502     { try { _res.moveToCurrentRow(); } catch (SQLException JavaDoc e) { handleException(e); } }
503
504     public Object JavaDoc getObject(int i, Map JavaDoc map) throws SQLException JavaDoc
505     { try { return _res.getObject(i, map); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
506
507     public Ref JavaDoc getRef(int i) throws SQLException JavaDoc
508     { try { return _res.getRef(i); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
509
510     public Blob JavaDoc getBlob(int i) throws SQLException JavaDoc
511     { try { return _res.getBlob(i); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
512
513     public Clob JavaDoc getClob(int i) throws SQLException JavaDoc
514     { try { return _res.getClob(i); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
515
516     public Array JavaDoc getArray(int i) throws SQLException JavaDoc
517     { try { return _res.getArray(i); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
518
519     public Object JavaDoc getObject(String JavaDoc colName, Map JavaDoc map) throws SQLException JavaDoc
520     { try { return _res.getObject(colName, map); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
521
522     public Ref JavaDoc getRef(String JavaDoc colName) throws SQLException JavaDoc
523     { try { return _res.getRef(colName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
524
525     public Blob JavaDoc getBlob(String JavaDoc colName) throws SQLException JavaDoc
526     { try { return _res.getBlob(colName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
527
528     public Clob JavaDoc getClob(String JavaDoc colName) throws SQLException JavaDoc
529     { try { return _res.getClob(colName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
530
531     public Array JavaDoc getArray(String JavaDoc colName) throws SQLException JavaDoc
532     { try { return _res.getArray(colName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
533
534     public Date JavaDoc getDate(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc
535     { try { return _res.getDate(columnIndex, cal); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
536
537     public Date JavaDoc getDate(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc
538     { try { return _res.getDate(columnName, cal); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
539
540     public Time JavaDoc getTime(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc
541     { try { return _res.getTime(columnIndex, cal); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
542
543     public Time JavaDoc getTime(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc
544     { try { return _res.getTime(columnName, cal); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
545
546     public Timestamp JavaDoc getTimestamp(int columnIndex, Calendar JavaDoc cal) throws SQLException JavaDoc
547     { try { return _res.getTimestamp(columnIndex, cal); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
548
549     public Timestamp JavaDoc getTimestamp(String JavaDoc columnName, Calendar JavaDoc cal) throws SQLException JavaDoc
550     { try { return _res.getTimestamp(columnName, cal); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
551
552
553     // ------------------- JDBC 3.0 -----------------------------------------
554
// Will be commented by the build process on a JDBC 2.0 system
555

556 /* JDBC_3_ANT_KEY_BEGIN */
557
558     public java.net.URL JavaDoc getURL(int columnIndex) throws SQLException JavaDoc
559     { try { return _res.getURL(columnIndex); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
560
561     public java.net.URL JavaDoc getURL(String JavaDoc columnName) throws SQLException JavaDoc
562     { try { return _res.getURL(columnName); } catch (SQLException JavaDoc e) { handleException(e); return null; } }
563
564     public void updateRef(int columnIndex, java.sql.Ref JavaDoc x) throws SQLException JavaDoc
565     { try { _res.updateRef(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
566
567     public void updateRef(String JavaDoc columnName, java.sql.Ref JavaDoc x) throws SQLException JavaDoc
568     { try { _res.updateRef(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
569
570     public void updateBlob(int columnIndex, java.sql.Blob JavaDoc x) throws SQLException JavaDoc
571     { try { _res.updateBlob(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
572
573     public void updateBlob(String JavaDoc columnName, java.sql.Blob JavaDoc x) throws SQLException JavaDoc
574     { try { _res.updateBlob(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
575
576     public void updateClob(int columnIndex, java.sql.Clob JavaDoc x) throws SQLException JavaDoc
577     { try { _res.updateClob(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
578
579     public void updateClob(String JavaDoc columnName, java.sql.Clob JavaDoc x) throws SQLException JavaDoc
580     { try { _res.updateClob(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
581
582     public void updateArray(int columnIndex, java.sql.Array JavaDoc x) throws SQLException JavaDoc
583     { try { _res.updateArray(columnIndex, x); } catch (SQLException JavaDoc e) { handleException(e); } }
584
585     public void updateArray(String JavaDoc columnName, java.sql.Array JavaDoc x) throws SQLException JavaDoc
586     { try { _res.updateArray(columnName, x); } catch (SQLException JavaDoc e) { handleException(e); } }
587
588 /* JDBC_3_ANT_KEY_END */
589 }
590
Popular Tags