KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ofbiz > minerva > pool > jdbc > ResultSetInPool


1 /*
2  * Licensed under the X license (see http://www.x.org/terms.htm)
3  */

4 package org.ofbiz.minerva.pool.jdbc;
5
6 import java.net.URL JavaDoc;
7 import java.sql.Array JavaDoc;
8 import java.sql.Blob JavaDoc;
9 import java.sql.Clob JavaDoc;
10 import java.sql.Date JavaDoc;
11 import java.sql.Ref JavaDoc;
12 import java.sql.ResultSet JavaDoc;
13 import java.sql.ResultSetMetaData JavaDoc;
14 import java.sql.SQLException JavaDoc;
15 import java.sql.SQLWarning JavaDoc;
16 import java.sql.Statement JavaDoc;
17 import java.sql.Time JavaDoc;
18 import java.sql.Timestamp JavaDoc;
19
20 /**
21  * Wraps a result set to track the last used time for the owning connection.
22  * That time is updated every time a navigation action is performed on the
23  * result set (next, previous, etc.).
24  *
25  * @author Aaron Mulder (ammulder@alumni.princeton.edu)
26  */

27 public class ResultSetInPool implements ResultSet JavaDoc {
28
29     private final static String JavaDoc CLOSED = "ResultSet has been closed!";
30     private ResultSet JavaDoc impl;
31     private StatementInPool st;
32
33     /**
34      * Creates a new wrapper from a source result set and statement wrapper.
35      */

36     ResultSetInPool(ResultSet JavaDoc source, StatementInPool owner) {
37         impl = source;
38         st = owner;
39     }
40
41     /**
42      * Updates the last used time for the owning connection to the current time.
43      */

44     public void setLastUsed() {
45         st.setLastUsed();
46     }
47
48     /**
49      * Indicates that an error occured on the owning statement.
50      */

51     public void setError(SQLException JavaDoc e) {
52         if (st != null)
53             st.setError(e);
54     }
55
56     /**
57      * Gets a reference to the "real" ResultSet. This should only be used if
58      * you need to cast that to a specific type to call a proprietary method -
59      * you will defeat all the pooling if you use the underlying ResultSet
60      * directly.
61      */

62     public ResultSet JavaDoc getUnderlyingResultSet() {
63         return impl;
64     }
65
66     // ---- Implementation of java.sql.ResultSet ----
67

68     public boolean absolute(int arg0) throws SQLException JavaDoc {
69         if (impl == null) throw new SQLException JavaDoc(CLOSED);
70         setLastUsed();
71         try {
72             return impl.absolute(arg0);
73         } catch (SQLException JavaDoc e) {
74             setError(e);
75             throw e;
76         }
77     }
78
79     public void afterLast() throws SQLException JavaDoc {
80         if (impl == null) throw new SQLException JavaDoc(CLOSED);
81         setLastUsed();
82         try {
83             impl.afterLast();
84         } catch (SQLException JavaDoc e) {
85             setError(e);
86             throw e;
87         }
88     }
89
90     public void beforeFirst() throws SQLException JavaDoc {
91         if (impl == null) throw new SQLException JavaDoc(CLOSED);
92         setLastUsed();
93         try {
94             impl.beforeFirst();
95         } catch (SQLException JavaDoc e) {
96             setError(e);
97             throw e;
98         }
99     }
100
101     public void cancelRowUpdates() throws SQLException JavaDoc {
102         if (impl == null) throw new SQLException JavaDoc(CLOSED);
103         try {
104             impl.cancelRowUpdates();
105         } catch (SQLException JavaDoc e) {
106             setError(e);
107             throw e;
108         }
109     }
110
111     public void clearWarnings() throws SQLException JavaDoc {
112         if (impl == null) throw new SQLException JavaDoc(CLOSED);
113         try {
114             impl.clearWarnings();
115         } catch (SQLException JavaDoc e) {
116             setError(e);
117             throw e;
118         }
119     }
120
121     public void close() throws SQLException JavaDoc {
122         if (impl != null) {
123             try {
124                 impl.close();
125             } catch (SQLException JavaDoc e) {
126             }
127             impl = null;
128         }
129         st = null;
130     }
131
132     public void deleteRow() throws SQLException JavaDoc {
133         if (impl == null) throw new SQLException JavaDoc(CLOSED);
134         setLastUsed();
135         try {
136             impl.deleteRow();
137         } catch (SQLException JavaDoc e) {
138             setError(e);
139             throw e;
140         }
141     }
142
143     public int findColumn(String JavaDoc arg0) throws SQLException JavaDoc {
144         if (impl == null) throw new SQLException JavaDoc(CLOSED);
145         try {
146             return impl.findColumn(arg0);
147         } catch (SQLException JavaDoc e) {
148             setError(e);
149             throw e;
150         }
151     }
152
153     public boolean first() throws SQLException JavaDoc {
154         if (impl == null) throw new SQLException JavaDoc(CLOSED);
155         setLastUsed();
156         try {
157             return impl.first();
158         } catch (SQLException JavaDoc e) {
159             setError(e);
160             throw e;
161         }
162     }
163
164     public Array JavaDoc getArray(int arg0) throws SQLException JavaDoc {
165         if (impl == null) throw new SQLException JavaDoc(CLOSED);
166         try {
167             return impl.getArray(arg0);
168         } catch (SQLException JavaDoc e) {
169             setError(e);
170             throw e;
171         }
172     }
173
174     public Array JavaDoc getArray(String JavaDoc arg0) throws SQLException JavaDoc {
175         if (impl == null) throw new SQLException JavaDoc(CLOSED);
176         try {
177             return impl.getArray(arg0);
178         } catch (SQLException JavaDoc e) {
179             setError(e);
180             throw e;
181         }
182     }
183
184     public java.io.InputStream JavaDoc getAsciiStream(int arg0) throws SQLException JavaDoc {
185         if (impl == null) throw new SQLException JavaDoc(CLOSED);
186         try {
187             return impl.getAsciiStream(arg0);
188         } catch (SQLException JavaDoc e) {
189             setError(e);
190             throw e;
191         }
192     }
193
194     public java.io.InputStream JavaDoc getAsciiStream(String JavaDoc arg0) throws SQLException JavaDoc {
195         if (impl == null) throw new SQLException JavaDoc(CLOSED);
196         try {
197             return impl.getAsciiStream(arg0);
198         } catch (SQLException JavaDoc e) {
199             setError(e);
200             throw e;
201         }
202     }
203
204     public java.math.BigDecimal JavaDoc getBigDecimal(int arg0) throws SQLException JavaDoc {
205         if (impl == null) throw new SQLException JavaDoc(CLOSED);
206         try {
207             return impl.getBigDecimal(arg0);
208         } catch (SQLException JavaDoc e) {
209             setError(e);
210             throw e;
211         }
212     }
213
214     public java.math.BigDecimal JavaDoc getBigDecimal(int arg0, int arg1) throws SQLException JavaDoc {
215         if (impl == null) throw new SQLException JavaDoc(CLOSED);
216         try {
217             return impl.getBigDecimal(arg0, arg1);
218         } catch (SQLException JavaDoc e) {
219             setError(e);
220             throw e;
221         }
222     }
223
224     public java.math.BigDecimal JavaDoc getBigDecimal(String JavaDoc arg0) throws SQLException JavaDoc {
225         if (impl == null) throw new SQLException JavaDoc(CLOSED);
226         try {
227             return impl.getBigDecimal(arg0);
228         } catch (SQLException JavaDoc e) {
229             setError(e);
230             throw e;
231         }
232     }
233
234     public java.math.BigDecimal JavaDoc getBigDecimal(String JavaDoc arg0, int arg1) throws SQLException JavaDoc {
235         if (impl == null) throw new SQLException JavaDoc(CLOSED);
236         try {
237             return impl.getBigDecimal(arg0, arg1);
238         } catch (SQLException JavaDoc e) {
239             setError(e);
240             throw e;
241         }
242     }
243
244     public java.io.InputStream JavaDoc getBinaryStream(int arg0) throws SQLException JavaDoc {
245         if (impl == null) throw new SQLException JavaDoc(CLOSED);
246         try {
247             return impl.getBinaryStream(arg0);
248         } catch (SQLException JavaDoc e) {
249             setError(e);
250             throw e;
251         }
252     }
253
254     public java.io.InputStream JavaDoc getBinaryStream(String JavaDoc arg0) throws SQLException JavaDoc {
255         if (impl == null) throw new SQLException JavaDoc(CLOSED);
256         try {
257             return impl.getBinaryStream(arg0);
258         } catch (SQLException JavaDoc e) {
259             setError(e);
260             throw e;
261         }
262     }
263
264     public Blob JavaDoc getBlob(int arg0) throws SQLException JavaDoc {
265         if (impl == null) throw new SQLException JavaDoc(CLOSED);
266         try {
267             return impl.getBlob(arg0);
268         } catch (SQLException JavaDoc e) {
269             setError(e);
270             throw e;
271         }
272     }
273
274     public Blob JavaDoc getBlob(String JavaDoc arg0) throws SQLException JavaDoc {
275         if (impl == null) throw new SQLException JavaDoc(CLOSED);
276         try {
277             return impl.getBlob(arg0);
278         } catch (SQLException JavaDoc e) {
279             setError(e);
280             throw e;
281         }
282     }
283
284     public boolean getBoolean(int arg0) throws SQLException JavaDoc {
285         if (impl == null) throw new SQLException JavaDoc(CLOSED);
286         try {
287             return impl.getBoolean(arg0);
288         } catch (SQLException JavaDoc e) {
289             setError(e);
290             throw e;
291         }
292     }
293
294     public boolean getBoolean(String JavaDoc arg0) throws SQLException JavaDoc {
295         if (impl == null) throw new SQLException JavaDoc(CLOSED);
296         try {
297             return impl.getBoolean(arg0);
298         } catch (SQLException JavaDoc e) {
299             setError(e);
300             throw e;
301         }
302     }
303
304     public byte getByte(int arg0) throws SQLException JavaDoc {
305         if (impl == null) throw new SQLException JavaDoc(CLOSED);
306         try {
307             return impl.getByte(arg0);
308         } catch (SQLException JavaDoc e) {
309             setError(e);
310             throw e;
311         }
312     }
313
314     public byte getByte(String JavaDoc arg0) throws SQLException JavaDoc {
315         if (impl == null) throw new SQLException JavaDoc(CLOSED);
316         try {
317             return impl.getByte(arg0);
318         } catch (SQLException JavaDoc e) {
319             setError(e);
320             throw e;
321         }
322     }
323
324     public byte[] getBytes(int arg0) throws SQLException JavaDoc {
325         if (impl == null) throw new SQLException JavaDoc(CLOSED);
326         try {
327             return impl.getBytes(arg0);
328         } catch (SQLException JavaDoc e) {
329             setError(e);
330             throw e;
331         }
332     }
333
334     public byte[] getBytes(String JavaDoc arg0) throws SQLException JavaDoc {
335         if (impl == null) throw new SQLException JavaDoc(CLOSED);
336         try {
337             return impl.getBytes(arg0);
338         } catch (SQLException JavaDoc e) {
339             setError(e);
340             throw e;
341         }
342     }
343
344     public java.io.Reader JavaDoc getCharacterStream(int arg0) throws SQLException JavaDoc {
345         if (impl == null) throw new SQLException JavaDoc(CLOSED);
346         try {
347             return impl.getCharacterStream(arg0);
348         } catch (SQLException JavaDoc e) {
349             setError(e);
350             throw e;
351         }
352     }
353
354     public java.io.Reader JavaDoc getCharacterStream(String JavaDoc arg0) throws SQLException JavaDoc {
355         if (impl == null) throw new SQLException JavaDoc(CLOSED);
356         try {
357             return impl.getCharacterStream(arg0);
358         } catch (SQLException JavaDoc e) {
359             setError(e);
360             throw e;
361         }
362     }
363
364     public Clob JavaDoc getClob(int arg0) throws SQLException JavaDoc {
365         if (impl == null) throw new SQLException JavaDoc(CLOSED);
366         try {
367             return impl.getClob(arg0);
368         } catch (SQLException JavaDoc e) {
369             setError(e);
370             throw e;
371         }
372     }
373
374     public Clob JavaDoc getClob(String JavaDoc arg0) throws SQLException JavaDoc {
375         if (impl == null) throw new SQLException JavaDoc(CLOSED);
376         try {
377             return impl.getClob(arg0);
378         } catch (SQLException JavaDoc e) {
379             setError(e);
380             throw e;
381         }
382     }
383
384     public int getConcurrency() throws SQLException JavaDoc {
385         if (impl == null) throw new SQLException JavaDoc(CLOSED);
386         try {
387             return impl.getConcurrency();
388         } catch (SQLException JavaDoc e) {
389             setError(e);
390             throw e;
391         }
392     }
393
394     public String JavaDoc getCursorName() throws SQLException JavaDoc {
395         if (impl == null) throw new SQLException JavaDoc(CLOSED);
396         try {
397             return impl.getCursorName();
398         } catch (SQLException JavaDoc e) {
399             setError(e);
400             throw e;
401         }
402     }
403
404     public Date JavaDoc getDate(int arg0) throws SQLException JavaDoc {
405         if (impl == null) throw new SQLException JavaDoc(CLOSED);
406         try {
407             return impl.getDate(arg0);
408         } catch (SQLException JavaDoc e) {
409             setError(e);
410             throw e;
411         }
412     }
413
414     public Date JavaDoc getDate(int arg0, java.util.Calendar JavaDoc arg1) throws SQLException JavaDoc {
415         if (impl == null) throw new SQLException JavaDoc(CLOSED);
416         try {
417             return impl.getDate(arg0, arg1);
418         } catch (SQLException JavaDoc e) {
419             setError(e);
420             throw e;
421         }
422     }
423
424     public Date JavaDoc getDate(String JavaDoc arg0) throws SQLException JavaDoc {
425         if (impl == null) throw new SQLException JavaDoc(CLOSED);
426         try {
427             return impl.getDate(arg0);
428         } catch (SQLException JavaDoc e) {
429             setError(e);
430             throw e;
431         }
432     }
433
434     public Date JavaDoc getDate(String JavaDoc arg0, java.util.Calendar JavaDoc arg1) throws SQLException JavaDoc {
435         if (impl == null) throw new SQLException JavaDoc(CLOSED);
436         try {
437             return impl.getDate(arg0, arg1);
438         } catch (SQLException JavaDoc e) {
439             setError(e);
440             throw e;
441         }
442     }
443
444     public double getDouble(int arg0) throws SQLException JavaDoc {
445         if (impl == null) throw new SQLException JavaDoc(CLOSED);
446         try {
447             return impl.getDouble(arg0);
448         } catch (SQLException JavaDoc e) {
449             setError(e);
450             throw e;
451         }
452     }
453
454     public double getDouble(String JavaDoc arg0) throws SQLException JavaDoc {
455         if (impl == null) throw new SQLException JavaDoc(CLOSED);
456         try {
457             return impl.getDouble(arg0);
458         } catch (SQLException JavaDoc e) {
459             setError(e);
460             throw e;
461         }
462     }
463
464     public int getFetchDirection() throws SQLException JavaDoc {
465         if (impl == null) throw new SQLException JavaDoc(CLOSED);
466         try {
467             return impl.getFetchDirection();
468         } catch (SQLException JavaDoc e) {
469             setError(e);
470             throw e;
471         }
472     }
473
474     public int getFetchSize() throws SQLException JavaDoc {
475         if (impl == null) throw new SQLException JavaDoc(CLOSED);
476         try {
477             return impl.getFetchSize();
478         } catch (SQLException JavaDoc e) {
479             setError(e);
480             throw e;
481         }
482     }
483
484     public float getFloat(int arg0) throws SQLException JavaDoc {
485         if (impl == null) throw new SQLException JavaDoc(CLOSED);
486         try {
487             return impl.getFloat(arg0);
488         } catch (SQLException JavaDoc e) {
489             setError(e);
490             throw e;
491         }
492     }
493
494     public float getFloat(String JavaDoc arg0) throws SQLException JavaDoc {
495         if (impl == null) throw new SQLException JavaDoc(CLOSED);
496         try {
497             return impl.getFloat(arg0);
498         } catch (SQLException JavaDoc e) {
499             setError(e);
500             throw e;
501         }
502     }
503
504     public int getInt(int arg0) throws SQLException JavaDoc {
505         if (impl == null) throw new SQLException JavaDoc(CLOSED);
506         try {
507             return impl.getInt(arg0);
508         } catch (SQLException JavaDoc e) {
509             setError(e);
510             throw e;
511         }
512     }
513
514     public int getInt(String JavaDoc arg0) throws SQLException JavaDoc {
515         if (impl == null) throw new SQLException JavaDoc(CLOSED);
516         try {
517             return impl.getInt(arg0);
518         } catch (SQLException JavaDoc e) {
519             setError(e);
520             throw e;
521         }
522     }
523
524     public long getLong(int arg0) throws SQLException JavaDoc {
525         if (impl == null) throw new SQLException JavaDoc(CLOSED);
526         try {
527             return impl.getLong(arg0);
528         } catch (SQLException JavaDoc e) {
529             setError(e);
530             throw e;
531         }
532     }
533
534     public long getLong(String JavaDoc arg0) throws SQLException JavaDoc {
535         if (impl == null) throw new SQLException JavaDoc(CLOSED);
536         try {
537             return impl.getLong(arg0);
538         } catch (SQLException JavaDoc e) {
539             setError(e);
540             throw e;
541         }
542     }
543
544     public ResultSetMetaData JavaDoc getMetaData() throws SQLException JavaDoc {
545         if (impl == null) throw new SQLException JavaDoc(CLOSED);
546         try {
547             return impl.getMetaData();
548         } catch (SQLException JavaDoc e) {
549             setError(e);
550             throw e;
551         }
552     }
553
554     public Object JavaDoc getObject(int arg0) throws SQLException JavaDoc {
555         if (impl == null) throw new SQLException JavaDoc(CLOSED);
556         try {
557             return impl.getObject(arg0);
558         } catch (SQLException JavaDoc e) {
559             setError(e);
560             throw e;
561         }
562     }
563
564     public Object JavaDoc getObject(int arg0, java.util.Map JavaDoc arg1) throws SQLException JavaDoc {
565         if (impl == null) throw new SQLException JavaDoc(CLOSED);
566         try {
567             return impl.getObject(arg0, arg1);
568         } catch (SQLException JavaDoc e) {
569             setError(e);
570             throw e;
571         }
572     }
573
574     public Object JavaDoc getObject(String JavaDoc arg0) throws SQLException JavaDoc {
575         if (impl == null) throw new SQLException JavaDoc(CLOSED);
576         try {
577             return impl.getObject(arg0);
578         } catch (SQLException JavaDoc e) {
579             setError(e);
580             throw e;
581         }
582     }
583
584     public Object JavaDoc getObject(String JavaDoc arg0, java.util.Map JavaDoc arg1) throws SQLException JavaDoc {
585         if (impl == null) throw new SQLException JavaDoc(CLOSED);
586         try {
587             return impl.getObject(arg0, arg1);
588         } catch (SQLException JavaDoc e) {
589             setError(e);
590             throw e;
591         }
592     }
593
594     public Ref JavaDoc getRef(int arg0) throws SQLException JavaDoc {
595         if (impl == null) throw new SQLException JavaDoc(CLOSED);
596         try {
597             return impl.getRef(arg0);
598         } catch (SQLException JavaDoc e) {
599             setError(e);
600             throw e;
601         }
602     }
603
604     public Ref JavaDoc getRef(String JavaDoc arg0) throws SQLException JavaDoc {
605         if (impl == null) throw new SQLException JavaDoc(CLOSED);
606         try {
607             return impl.getRef(arg0);
608         } catch (SQLException JavaDoc e) {
609             setError(e);
610             throw e;
611         }
612     }
613
614     public int getRow() throws SQLException JavaDoc {
615         if (impl == null) throw new SQLException JavaDoc(CLOSED);
616         try {
617             return impl.getRow();
618         } catch (SQLException JavaDoc e) {
619             setError(e);
620             throw e;
621         }
622     }
623
624     public short getShort(int arg0) throws SQLException JavaDoc {
625         if (impl == null) throw new SQLException JavaDoc(CLOSED);
626         try {
627             return impl.getShort(arg0);
628         } catch (SQLException JavaDoc e) {
629             setError(e);
630             throw e;
631         }
632     }
633
634     public short getShort(String JavaDoc arg0) throws SQLException JavaDoc {
635         if (impl == null) throw new SQLException JavaDoc(CLOSED);
636         try {
637             return impl.getShort(arg0);
638         } catch (SQLException JavaDoc e) {
639             setError(e);
640             throw e;
641         }
642     }
643
644     public Statement JavaDoc getStatement() throws SQLException JavaDoc {
645         if (impl == null) throw new SQLException JavaDoc(CLOSED);
646         try {
647             return impl.getStatement();
648         } catch (SQLException JavaDoc e) {
649             setError(e);
650             throw e;
651         }
652     }
653
654     public String JavaDoc getString(int arg0) throws SQLException JavaDoc {
655         if (impl == null) throw new SQLException JavaDoc(CLOSED);
656         try {
657             return impl.getString(arg0);
658         } catch (SQLException JavaDoc e) {
659             setError(e);
660             throw e;
661         }
662     }
663
664     public String JavaDoc getString(String JavaDoc arg0) throws SQLException JavaDoc {
665         if (impl == null) throw new SQLException JavaDoc(CLOSED);
666         try {
667             return impl.getString(arg0);
668         } catch (SQLException JavaDoc e) {
669             setError(e);
670             throw e;
671         }
672     }
673
674     public Time JavaDoc getTime(int arg0) throws SQLException JavaDoc {
675         if (impl == null) throw new SQLException JavaDoc(CLOSED);
676         try {
677             return impl.getTime(arg0);
678         } catch (SQLException JavaDoc e) {
679             setError(e);
680             throw e;
681         }
682     }
683
684     public Time JavaDoc getTime(int arg0, java.util.Calendar JavaDoc arg1) throws SQLException JavaDoc {
685         if (impl == null) throw new SQLException JavaDoc(CLOSED);
686         try {
687             return impl.getTime(arg0, arg1);
688         } catch (SQLException JavaDoc e) {
689             setError(e);
690             throw e;
691         }
692     }
693
694     public Time JavaDoc getTime(String JavaDoc arg0) throws SQLException JavaDoc {
695         if (impl == null) throw new SQLException JavaDoc(CLOSED);
696         try {
697             return impl.getTime(arg0);
698         } catch (SQLException JavaDoc e) {
699             setError(e);
700             throw e;
701         }
702     }
703
704     public Time JavaDoc getTime(String JavaDoc arg0, java.util.Calendar JavaDoc arg1) throws SQLException JavaDoc {
705         if (impl == null) throw new SQLException JavaDoc(CLOSED);
706         try {
707             return impl.getTime(arg0, arg1);
708         } catch (SQLException JavaDoc e) {
709             setError(e);
710             throw e;
711         }
712     }
713
714     public Timestamp JavaDoc getTimestamp(int arg0) throws SQLException JavaDoc {
715         if (impl == null) throw new SQLException JavaDoc(CLOSED);
716         try {
717             return impl.getTimestamp(arg0);
718         } catch (SQLException JavaDoc e) {
719             setError(e);
720             throw e;
721         }
722     }
723
724     public Timestamp JavaDoc getTimestamp(int arg0, java.util.Calendar JavaDoc arg1) throws SQLException JavaDoc {
725         if (impl == null) throw new SQLException JavaDoc(CLOSED);
726         try {
727             return impl.getTimestamp(arg0, arg1);
728         } catch (SQLException JavaDoc e) {
729             setError(e);
730             throw e;
731         }
732     }
733
734     public Timestamp JavaDoc getTimestamp(String JavaDoc arg0) throws SQLException JavaDoc {
735         if (impl == null) throw new SQLException JavaDoc(CLOSED);
736         try {
737             return impl.getTimestamp(arg0);
738         } catch (SQLException JavaDoc e) {
739             setError(e);
740             throw e;
741         }
742     }
743
744     public Timestamp JavaDoc getTimestamp(String JavaDoc arg0, java.util.Calendar JavaDoc arg1) throws SQLException JavaDoc {
745         if (impl == null) throw new SQLException JavaDoc(CLOSED);
746         try {
747             return impl.getTimestamp(arg0, arg1);
748         } catch (SQLException JavaDoc e) {
749             setError(e);
750             throw e;
751         }
752     }
753
754     public int getType() throws SQLException JavaDoc {
755         if (impl == null) throw new SQLException JavaDoc(CLOSED);
756         try {
757             return impl.getType();
758         } catch (SQLException JavaDoc e) {
759             setError(e);
760             throw e;
761         }
762     }
763
764     public java.io.InputStream JavaDoc getUnicodeStream(int arg0) throws SQLException JavaDoc {
765         if (impl == null) throw new SQLException JavaDoc(CLOSED);
766         try {
767             return impl.getUnicodeStream(arg0);
768         } catch (SQLException JavaDoc e) {
769             setError(e);
770             throw e;
771         }
772     }
773
774     public java.io.InputStream JavaDoc getUnicodeStream(String JavaDoc arg0) throws SQLException JavaDoc {
775         if (impl == null) throw new SQLException JavaDoc(CLOSED);
776         try {
777             return impl.getUnicodeStream(arg0);
778         } catch (SQLException JavaDoc e) {
779             setError(e);
780             throw e;
781         }
782     }
783
784     public SQLWarning JavaDoc getWarnings() throws SQLException JavaDoc {
785         if (impl == null) throw new SQLException JavaDoc(CLOSED);
786         try {
787             return impl.getWarnings();
788         } catch (SQLException JavaDoc e) {
789             setError(e);
790             throw e;
791         }
792     }
793
794     public void insertRow() throws SQLException JavaDoc {
795         if (impl == null) throw new SQLException JavaDoc(CLOSED);
796         setLastUsed();
797         try {
798             impl.insertRow();
799         } catch (SQLException JavaDoc e) {
800             setError(e);
801             throw e;
802         }
803     }
804
805     public boolean isAfterLast() throws SQLException JavaDoc {
806         if (impl == null) throw new SQLException JavaDoc(CLOSED);
807         try {
808             return impl.isAfterLast();
809         } catch (SQLException JavaDoc e) {
810             setError(e);
811             throw e;
812         }
813     }
814
815     public boolean isBeforeFirst() throws SQLException JavaDoc {
816         if (impl == null) throw new SQLException JavaDoc(CLOSED);
817         try {
818             return impl.isBeforeFirst();
819         } catch (SQLException JavaDoc e) {
820             setError(e);
821             throw e;
822         }
823     }
824
825     public boolean isFirst() throws SQLException JavaDoc {
826         if (impl == null) throw new SQLException JavaDoc(CLOSED);
827         try {
828             return impl.isFirst();
829         } catch (SQLException JavaDoc e) {
830             setError(e);
831             throw e;
832         }
833     }
834
835     public boolean isLast() throws SQLException JavaDoc {
836         if (impl == null) throw new SQLException JavaDoc(CLOSED);
837         try {
838             return impl.isLast();
839         } catch (SQLException JavaDoc e) {
840             setError(e);
841             throw e;
842         }
843     }
844
845     public boolean last() throws SQLException JavaDoc {
846         if (impl == null) throw new SQLException JavaDoc(CLOSED);
847         setLastUsed();
848         try {
849             return impl.last();
850         } catch (SQLException JavaDoc e) {
851             setError(e);
852             throw e;
853         }
854     }
855
856     public void moveToCurrentRow() throws SQLException JavaDoc {
857         if (impl == null) throw new SQLException JavaDoc(CLOSED);
858         setLastUsed();
859         try {
860             impl.moveToCurrentRow();
861         } catch (SQLException JavaDoc e) {
862             setError(e);
863             throw e;
864         }
865     }
866
867     public void moveToInsertRow() throws SQLException JavaDoc {
868         if (impl == null) throw new SQLException JavaDoc(CLOSED);
869         setLastUsed();
870         try {
871             impl.moveToInsertRow();
872         } catch (SQLException JavaDoc e) {
873             setError(e);
874             throw e;
875         }
876     }
877
878     public boolean next() throws SQLException JavaDoc {
879         if (impl == null) throw new SQLException JavaDoc(CLOSED);
880         setLastUsed();
881         try {
882             return impl.next();
883         } catch (SQLException JavaDoc e) {
884             setError(e);
885             throw e;
886         }
887     }
888
889     public boolean previous() throws SQLException JavaDoc {
890         if (impl == null) throw new SQLException JavaDoc(CLOSED);
891         setLastUsed();
892         try {
893             return impl.previous();
894         } catch (SQLException JavaDoc e) {
895             setError(e);
896             throw e;
897         }
898     }
899
900     public void refreshRow() throws SQLException JavaDoc {
901         if (impl == null) throw new SQLException JavaDoc(CLOSED);
902         setLastUsed();
903         try {
904             impl.refreshRow();
905         } catch (SQLException JavaDoc e) {
906             setError(e);
907             throw e;
908         }
909     }
910
911     public boolean relative(int arg0) throws SQLException JavaDoc {
912         if (impl == null) throw new SQLException JavaDoc(CLOSED);
913         setLastUsed();
914         try {
915             return impl.relative(arg0);
916         } catch (SQLException JavaDoc e) {
917             setError(e);
918             throw e;
919         }
920     }
921
922     public boolean rowDeleted() throws SQLException JavaDoc {
923         if (impl == null) throw new SQLException JavaDoc(CLOSED);
924         try {
925             return impl.rowDeleted();
926         } catch (SQLException JavaDoc e) {
927             setError(e);
928             throw e;
929         }
930     }
931
932     public boolean rowInserted() throws SQLException JavaDoc {
933         if (impl == null) throw new SQLException JavaDoc(CLOSED);
934         try {
935             return impl.rowInserted();
936         } catch (SQLException JavaDoc e) {
937             setError(e);
938             throw e;
939         }
940     }
941
942     public boolean rowUpdated() throws SQLException JavaDoc {
943         if (impl == null) throw new SQLException JavaDoc(CLOSED);
944         try {
945             return impl.rowUpdated();
946         } catch (SQLException JavaDoc e) {
947             setError(e);
948             throw e;
949         }
950     }
951
952     public void setFetchDirection(int arg0) throws SQLException JavaDoc {
953         if (impl == null) throw new SQLException JavaDoc(CLOSED);
954         try {
955             impl.setFetchDirection(arg0);
956         } catch (SQLException JavaDoc e) {
957             setError(e);
958             throw e;
959         }
960     }
961
962     public void setFetchSize(int arg0) throws SQLException JavaDoc {
963         if (impl == null) throw new SQLException JavaDoc(CLOSED);
964         try {
965             impl.setFetchSize(arg0);
966         } catch (SQLException JavaDoc e) {
967             setError(e);
968             throw e;
969         }
970     }
971
972     public void updateAsciiStream(int arg0, java.io.InputStream JavaDoc arg1, int arg2) throws SQLException JavaDoc {
973         if (impl == null) throw new SQLException JavaDoc(CLOSED);
974         try {
975             impl.updateAsciiStream(arg0, arg1, arg2);
976         } catch (SQLException JavaDoc e) {
977             setError(e);
978             throw e;
979         }
980     }
981
982     public void updateAsciiStream(String JavaDoc arg0, java.io.InputStream JavaDoc arg1, int arg2) throws SQLException JavaDoc {
983         if (impl == null) throw new SQLException JavaDoc(CLOSED);
984         try {
985             impl.updateAsciiStream(arg0, arg1, arg2);
986         } catch (SQLException JavaDoc e) {
987             setError(e);
988             throw e;
989         }
990     }
991
992     public void updateBigDecimal(int arg0, java.math.BigDecimal JavaDoc arg1) throws SQLException JavaDoc {
993         if (impl == null) throw new SQLException JavaDoc(CLOSED);
994         try {
995             impl.updateBigDecimal(arg0, arg1);
996         } catch (SQLException JavaDoc e) {
997             setError(e);
998             throw e;
999         }
1000    }
1001
1002    public void updateBigDecimal(String JavaDoc arg0, java.math.BigDecimal JavaDoc arg1) throws SQLException JavaDoc {
1003        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1004        try {
1005            impl.updateBigDecimal(arg0, arg1);
1006        } catch (SQLException JavaDoc e) {
1007            setError(e);
1008            throw e;
1009        }
1010    }
1011
1012    public void updateBinaryStream(int arg0, java.io.InputStream JavaDoc arg1, int arg2) throws SQLException JavaDoc {
1013        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1014        try {
1015            impl.updateBinaryStream(arg0, arg1, arg2);
1016        } catch (SQLException JavaDoc e) {
1017            setError(e);
1018            throw e;
1019        }
1020    }
1021
1022    public void updateBinaryStream(String JavaDoc arg0, java.io.InputStream JavaDoc arg1, int arg2) throws SQLException JavaDoc {
1023        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1024        try {
1025            impl.updateBinaryStream(arg0, arg1, arg2);
1026        } catch (SQLException JavaDoc e) {
1027            setError(e);
1028            throw e;
1029        }
1030    }
1031
1032    public void updateBoolean(int arg0, boolean arg1) throws SQLException JavaDoc {
1033        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1034        try {
1035            impl.updateBoolean(arg0, arg1);
1036        } catch (SQLException JavaDoc e) {
1037            setError(e);
1038            throw e;
1039        }
1040    }
1041
1042    public void updateBoolean(String JavaDoc arg0, boolean arg1) throws SQLException JavaDoc {
1043        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1044        try {
1045            impl.updateBoolean(arg0, arg1);
1046        } catch (SQLException JavaDoc e) {
1047            setError(e);
1048            throw e;
1049        }
1050    }
1051
1052    public void updateByte(int arg0, byte arg1) throws SQLException JavaDoc {
1053        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1054        try {
1055            impl.updateByte(arg0, arg1);
1056        } catch (SQLException JavaDoc e) {
1057            setError(e);
1058            throw e;
1059        }
1060    }
1061
1062    public void updateByte(String JavaDoc arg0, byte arg1) throws SQLException JavaDoc {
1063        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1064        try {
1065            impl.updateByte(arg0, arg1);
1066        } catch (SQLException JavaDoc e) {
1067            setError(e);
1068            throw e;
1069        }
1070    }
1071
1072    public void updateBytes(int arg0, byte[] arg1) throws SQLException JavaDoc {
1073        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1074        try {
1075            impl.updateBytes(arg0, arg1);
1076        } catch (SQLException JavaDoc e) {
1077            setError(e);
1078            throw e;
1079        }
1080    }
1081
1082    public void updateBytes(String JavaDoc arg0, byte[] arg1) throws SQLException JavaDoc {
1083        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1084        try {
1085            impl.updateBytes(arg0, arg1);
1086        } catch (SQLException JavaDoc e) {
1087            setError(e);
1088            throw e;
1089        }
1090    }
1091
1092    public void updateCharacterStream(int arg0, java.io.Reader JavaDoc arg1, int arg2) throws SQLException JavaDoc {
1093        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1094        try {
1095            impl.updateCharacterStream(arg0, arg1, arg2);
1096        } catch (SQLException JavaDoc e) {
1097            setError(e);
1098            throw e;
1099        }
1100    }
1101
1102    public void updateCharacterStream(String JavaDoc arg0, java.io.Reader JavaDoc arg1, int arg2) throws SQLException JavaDoc {
1103        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1104        try {
1105            impl.updateCharacterStream(arg0, arg1, arg2);
1106        } catch (SQLException JavaDoc e) {
1107            setError(e);
1108            throw e;
1109        }
1110    }
1111
1112    public void updateDate(int arg0, Date JavaDoc arg1) throws SQLException JavaDoc {
1113        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1114        try {
1115            impl.updateDate(arg0, arg1);
1116        } catch (SQLException JavaDoc e) {
1117            setError(e);
1118            throw e;
1119        }
1120    }
1121
1122    public void updateDate(String JavaDoc arg0, Date JavaDoc arg1) throws SQLException JavaDoc {
1123        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1124        try {
1125            impl.updateDate(arg0, arg1);
1126        } catch (SQLException JavaDoc e) {
1127            setError(e);
1128            throw e;
1129        }
1130    }
1131
1132    public void updateDouble(int arg0, double arg1) throws SQLException JavaDoc {
1133        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1134        try {
1135            impl.updateDouble(arg0, arg1);
1136        } catch (SQLException JavaDoc e) {
1137            setError(e);
1138            throw e;
1139        }
1140    }
1141
1142    public void updateDouble(String JavaDoc arg0, double arg1) throws SQLException JavaDoc {
1143        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1144        try {
1145            impl.updateDouble(arg0, arg1);
1146        } catch (SQLException JavaDoc e) {
1147            setError(e);
1148            throw e;
1149        }
1150    }
1151
1152    public void updateFloat(int arg0, float arg1) throws SQLException JavaDoc {
1153        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1154        try {
1155            impl.updateFloat(arg0, arg1);
1156        } catch (SQLException JavaDoc e) {
1157            setError(e);
1158            throw e;
1159        }
1160    }
1161
1162    public void updateFloat(String JavaDoc arg0, float arg1) throws SQLException JavaDoc {
1163        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1164        try {
1165            impl.updateFloat(arg0, arg1);
1166        } catch (SQLException JavaDoc e) {
1167            setError(e);
1168            throw e;
1169        }
1170    }
1171
1172    public void updateInt(int arg0, int arg1) throws SQLException JavaDoc {
1173        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1174        try {
1175            impl.updateInt(arg0, arg1);
1176        } catch (SQLException JavaDoc e) {
1177            setError(e);
1178            throw e;
1179        }
1180    }
1181
1182    public void updateInt(String JavaDoc arg0, int arg1) throws SQLException JavaDoc {
1183        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1184        try {
1185            impl.updateInt(arg0, arg1);
1186        } catch (SQLException JavaDoc e) {
1187            setError(e);
1188            throw e;
1189        }
1190    }
1191
1192    public void updateLong(int arg0, long arg1) throws SQLException JavaDoc {
1193        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1194        try {
1195            impl.updateLong(arg0, arg1);
1196        } catch (SQLException JavaDoc e) {
1197            setError(e);
1198            throw e;
1199        }
1200    }
1201
1202    public void updateLong(String JavaDoc arg0, long arg1) throws SQLException JavaDoc {
1203        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1204        try {
1205            impl.updateLong(arg0, arg1);
1206        } catch (SQLException JavaDoc e) {
1207            setError(e);
1208            throw e;
1209        }
1210    }
1211
1212    public void updateNull(int arg0) throws SQLException JavaDoc {
1213        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1214        try {
1215            impl.updateNull(arg0);
1216        } catch (SQLException JavaDoc e) {
1217            setError(e);
1218            throw e;
1219        }
1220    }
1221
1222    public void updateNull(String JavaDoc arg0) throws SQLException JavaDoc {
1223        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1224        try {
1225            impl.updateNull(arg0);
1226        } catch (SQLException JavaDoc e) {
1227            setError(e);
1228            throw e;
1229        }
1230    }
1231
1232    public void updateObject(int arg0, Object JavaDoc arg1) throws SQLException JavaDoc {
1233        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1234        try {
1235            impl.updateObject(arg0, arg1);
1236        } catch (SQLException JavaDoc e) {
1237            setError(e);
1238            throw e;
1239        }
1240    }
1241
1242    public void updateObject(int arg0, Object JavaDoc arg1, int arg2) throws SQLException JavaDoc {
1243        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1244        try {
1245            impl.updateObject(arg0, arg1, arg2);
1246        } catch (SQLException JavaDoc e) {
1247            setError(e);
1248            throw e;
1249        }
1250    }
1251
1252    public void updateObject(String JavaDoc arg0, Object JavaDoc arg1) throws SQLException JavaDoc {
1253        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1254        try {
1255            impl.updateObject(arg0, arg1);
1256        } catch (SQLException JavaDoc e) {
1257            setError(e);
1258            throw e;
1259        }
1260    }
1261
1262    public void updateObject(String JavaDoc arg0, Object JavaDoc arg1, int arg2) throws SQLException JavaDoc {
1263        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1264        try {
1265            impl.updateObject(arg0, arg1, arg2);
1266        } catch (SQLException JavaDoc e) {
1267            setError(e);
1268            throw e;
1269        }
1270    }
1271
1272    public void updateRow() throws SQLException JavaDoc {
1273        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1274        setLastUsed();
1275        try {
1276            impl.updateRow();
1277        } catch (SQLException JavaDoc e) {
1278            setError(e);
1279            throw e;
1280        }
1281    }
1282
1283    public void updateShort(int arg0, short arg1) throws SQLException JavaDoc {
1284        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1285        try {
1286            impl.updateShort(arg0, arg1);
1287        } catch (SQLException JavaDoc e) {
1288            setError(e);
1289            throw e;
1290        }
1291    }
1292
1293    public void updateShort(String JavaDoc arg0, short arg1) throws SQLException JavaDoc {
1294        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1295        try {
1296            impl.updateShort(arg0, arg1);
1297        } catch (SQLException JavaDoc e) {
1298            setError(e);
1299            throw e;
1300        }
1301    }
1302
1303    public void updateString(int arg0, String JavaDoc arg1) throws SQLException JavaDoc {
1304        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1305        try {
1306            impl.updateString(arg0, arg1);
1307        } catch (SQLException JavaDoc e) {
1308            setError(e);
1309            throw e;
1310        }
1311    }
1312
1313    public void updateString(String JavaDoc arg0, String JavaDoc arg1) throws SQLException JavaDoc {
1314        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1315        try {
1316            impl.updateString(arg0, arg1);
1317        } catch (SQLException JavaDoc e) {
1318            setError(e);
1319            throw e;
1320        }
1321    }
1322
1323    public void updateTime(int arg0, Time JavaDoc arg1) throws SQLException JavaDoc {
1324        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1325        try {
1326            impl.updateTime(arg0, arg1);
1327        } catch (SQLException JavaDoc e) {
1328            setError(e);
1329            throw e;
1330        }
1331    }
1332
1333    public void updateTime(String JavaDoc arg0, Time JavaDoc arg1) throws SQLException JavaDoc {
1334        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1335        try {
1336            impl.updateTime(arg0, arg1);
1337        } catch (SQLException JavaDoc e) {
1338            setError(e);
1339            throw e;
1340        }
1341    }
1342
1343    public void updateTimestamp(int arg0, Timestamp JavaDoc arg1) throws SQLException JavaDoc {
1344        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1345        try {
1346            impl.updateTimestamp(arg0, arg1);
1347        } catch (SQLException JavaDoc e) {
1348            setError(e);
1349            throw e;
1350        }
1351    }
1352
1353    public void updateTimestamp(String JavaDoc arg0, Timestamp JavaDoc arg1) throws SQLException JavaDoc {
1354        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1355        try {
1356            impl.updateTimestamp(arg0, arg1);
1357        } catch (SQLException JavaDoc e) {
1358            setError(e);
1359            throw e;
1360        }
1361    }
1362
1363    public boolean wasNull() throws SQLException JavaDoc {
1364        if (impl == null) throw new SQLException JavaDoc(CLOSED);
1365        try {
1366            return impl.wasNull();
1367        } catch (SQLException JavaDoc e) {
1368            setError(e);
1369            throw e;
1370        }
1371    }
1372
1373
1374    // ------- J2SE 1.4 methods comment; needed to compile -------
1375

1376    /* (non-Javadoc)
1377     * @see java.sql.ResultSet#getURL(int)
1378     */

1379    public URL JavaDoc getURL(int arg0) throws SQLException JavaDoc {
1380        // TODO Auto-generated method stub
1381
return null;
1382    }
1383
1384    /* (non-Javadoc)
1385     * @see java.sql.ResultSet#getURL(java.lang.String)
1386     */

1387    public URL JavaDoc getURL(String JavaDoc arg0) throws SQLException JavaDoc {
1388        // TODO Auto-generated method stub
1389
return null;
1390    }
1391
1392    /* (non-Javadoc)
1393     * @see java.sql.ResultSet#updateRef(int, java.sql.Ref)
1394     */

1395    public void updateRef(int arg0, Ref JavaDoc arg1) throws SQLException JavaDoc {
1396        // TODO Auto-generated method stub
1397

1398    }
1399
1400    /* (non-Javadoc)
1401     * @see java.sql.ResultSet#updateRef(java.lang.String, java.sql.Ref)
1402     */

1403    public void updateRef(String JavaDoc arg0, Ref JavaDoc arg1) throws SQLException JavaDoc {
1404        // TODO Auto-generated method stub
1405

1406    }
1407
1408    /* (non-Javadoc)
1409     * @see java.sql.ResultSet#updateBlob(int, java.sql.Blob)
1410     */

1411    public void updateBlob(int arg0, Blob JavaDoc arg1) throws SQLException JavaDoc {
1412        // TODO Auto-generated method stub
1413

1414    }
1415
1416    /* (non-Javadoc)
1417     * @see java.sql.ResultSet#updateBlob(java.lang.String, java.sql.Blob)
1418     */

1419    public void updateBlob(String JavaDoc arg0, Blob JavaDoc arg1) throws SQLException JavaDoc {
1420        // TODO Auto-generated method stub
1421

1422    }
1423
1424    /* (non-Javadoc)
1425     * @see java.sql.ResultSet#updateClob(int, java.sql.Clob)
1426     */

1427    public void updateClob(int arg0, Clob JavaDoc arg1) throws SQLException JavaDoc {
1428        // TODO Auto-generated method stub
1429

1430    }
1431
1432    /* (non-Javadoc)
1433     * @see java.sql.ResultSet#updateClob(java.lang.String, java.sql.Clob)
1434     */

1435    public void updateClob(String JavaDoc arg0, Clob JavaDoc arg1) throws SQLException JavaDoc {
1436        // TODO Auto-generated method stub
1437

1438    }
1439
1440    /* (non-Javadoc)
1441     * @see java.sql.ResultSet#updateArray(int, java.sql.Array)
1442     */

1443    public void updateArray(int arg0, Array JavaDoc arg1) throws SQLException JavaDoc {
1444        // TODO Auto-generated method stub
1445

1446    }
1447
1448    /* (non-Javadoc)
1449     * @see java.sql.ResultSet#updateArray(java.lang.String, java.sql.Array)
1450     */

1451    public void updateArray(String JavaDoc arg0, Array JavaDoc arg1) throws SQLException JavaDoc {
1452        // TODO Auto-generated method stub
1453

1454    }
1455
1456    // ---- End Implementation of ResultSet ----
1457
}
1458
Popular Tags