001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.commons.dbutils;
018
019import java.io.InputStream;
020import java.io.Reader;
021import java.math.BigDecimal;
022import java.net.URL;
023import java.sql.Array;
024import java.sql.Blob;
025import java.sql.Clob;
026import java.sql.Date;
027import java.sql.NClob;
028import java.sql.Ref;
029import java.sql.ResultSet;
030import java.sql.ResultSetMetaData;
031import java.sql.RowId;
032import java.sql.SQLException;
033import java.sql.SQLWarning;
034import java.sql.SQLXML;
035import java.sql.Statement;
036import java.sql.Time;
037import java.sql.Timestamp;
038import java.util.Calendar;
039import java.util.Map;
040
041/**
042 * Extensions of this class convert ResultSets into other objects.
043 *
044 * According to the <i>DRY</i> principle (Don't Repeat Yourself), repeating {@code resultSet}
045 * variable inside the {@link ResultSetHandler#handle(ResultSet)} over and over for each iteration
046 * can get a little tedious, {@code AbstractResultSetHandler} implicitly gives users access to
047 * {@code ResultSet}'s methods.
048 *
049 * <b>NOTE</b> This class is <i>NOT</i> thread safe!
050 *
051 * @param <T> the target type the input ResultSet will be converted to.
052 * @since 1.6
053 */
054public abstract class BaseResultSetHandler<T> implements ResultSetHandler<T> {
055
056    /**
057     * The adapted ResultSet.
058     */
059    private ResultSet resultSet;
060
061    /**
062     * {@inheritDoc}
063     */
064    protected final boolean absolute(final int row) throws SQLException {
065        return resultSet.absolute(row);
066    }
067
068    /**
069     * {@inheritDoc}
070     */
071    protected final void afterLast() throws SQLException {
072        resultSet.afterLast();
073    }
074
075    /**
076     * {@inheritDoc}
077     */
078    protected final void beforeFirst() throws SQLException {
079        resultSet.beforeFirst();
080    }
081
082    /**
083     * {@inheritDoc}
084     */
085    protected final void cancelRowUpdates() throws SQLException {
086        resultSet.cancelRowUpdates();
087    }
088
089    /**
090     * {@inheritDoc}
091     */
092    protected final void clearWarnings() throws SQLException {
093        resultSet.clearWarnings();
094    }
095
096    /**
097     * {@inheritDoc}
098     */
099    protected final void close() throws SQLException {
100        resultSet.close();
101    }
102
103    /**
104     * {@inheritDoc}
105     */
106    protected final void deleteRow() throws SQLException {
107        resultSet.deleteRow();
108    }
109
110    /**
111     * {@inheritDoc}
112     */
113    protected final int findColumn(final String columnLabel) throws SQLException {
114        return resultSet.findColumn(columnLabel);
115    }
116
117    /**
118     * {@inheritDoc}
119     */
120    protected final boolean first() throws SQLException {
121        return resultSet.first();
122    }
123
124    protected final ResultSet getAdaptedResultSet() {
125        return resultSet;
126    }
127
128    /**
129     * {@inheritDoc}
130     */
131    protected final Array getArray(final int columnIndex) throws SQLException {
132        return resultSet.getArray(columnIndex);
133    }
134
135    /**
136     * {@inheritDoc}
137     */
138    protected final Array getArray(final String columnLabel) throws SQLException {
139        return resultSet.getArray(columnLabel);
140    }
141
142    /**
143     * {@inheritDoc}
144     */
145    protected final InputStream getAsciiStream(final int columnIndex) throws SQLException {
146        return resultSet.getAsciiStream(columnIndex);
147    }
148
149    /**
150     * {@inheritDoc}
151     */
152    protected final InputStream getAsciiStream(final String columnLabel) throws SQLException {
153        return resultSet.getAsciiStream(columnLabel);
154    }
155
156    /**
157     * {@inheritDoc}
158     */
159    protected final BigDecimal getBigDecimal(final int columnIndex) throws SQLException {
160        return resultSet.getBigDecimal(columnIndex);
161    }
162
163    /**
164     * {@inheritDoc}
165     */
166    @Deprecated
167    protected final BigDecimal getBigDecimal(final int columnIndex, final int scale) throws SQLException {
168        return resultSet.getBigDecimal(columnIndex, scale);
169    }
170
171    /**
172     * {@inheritDoc}
173     */
174    protected final BigDecimal getBigDecimal(final String columnLabel) throws SQLException {
175        return resultSet.getBigDecimal(columnLabel);
176    }
177
178    /**
179     * {@inheritDoc}
180     */
181    @Deprecated
182    protected final BigDecimal getBigDecimal(final String columnLabel, final int scale) throws SQLException {
183        return resultSet.getBigDecimal(columnLabel, scale);
184    }
185
186    /**
187     * {@inheritDoc}
188     */
189    protected final InputStream getBinaryStream(final int columnIndex) throws SQLException {
190        return resultSet.getBinaryStream(columnIndex);
191    }
192
193    /**
194     * {@inheritDoc}
195     */
196    protected final InputStream getBinaryStream(final String columnLabel) throws SQLException {
197        return resultSet.getBinaryStream(columnLabel);
198    }
199
200    /**
201     * {@inheritDoc}
202     */
203    protected final Blob getBlob(final int columnIndex) throws SQLException {
204        return resultSet.getBlob(columnIndex);
205    }
206
207    /**
208     * {@inheritDoc}
209     */
210    protected final Blob getBlob(final String columnLabel) throws SQLException {
211        return resultSet.getBlob(columnLabel);
212    }
213
214    /**
215     * {@inheritDoc}
216     */
217    protected final boolean getBoolean(final int columnIndex) throws SQLException {
218        return resultSet.getBoolean(columnIndex);
219    }
220
221    /**
222     * {@inheritDoc}
223     */
224    protected final boolean getBoolean(final String columnLabel) throws SQLException {
225        return resultSet.getBoolean(columnLabel);
226    }
227
228    /**
229     * {@inheritDoc}
230     */
231    protected final byte getByte(final int columnIndex) throws SQLException {
232        return resultSet.getByte(columnIndex);
233    }
234
235    /**
236     * {@inheritDoc}
237     */
238    protected final byte getByte(final String columnLabel) throws SQLException {
239        return resultSet.getByte(columnLabel);
240    }
241
242    /**
243     * {@inheritDoc}
244     */
245    protected final byte[] getBytes(final int columnIndex) throws SQLException {
246        return resultSet.getBytes(columnIndex);
247    }
248
249    /**
250     * {@inheritDoc}
251     */
252    protected final byte[] getBytes(final String columnLabel) throws SQLException {
253        return resultSet.getBytes(columnLabel);
254    }
255
256    /**
257     * {@inheritDoc}
258     */
259    protected final Reader getCharacterStream(final int columnIndex) throws SQLException {
260        return resultSet.getCharacterStream(columnIndex);
261    }
262
263    /**
264     * {@inheritDoc}
265     */
266    protected final Reader getCharacterStream(final String columnLabel) throws SQLException {
267        return resultSet.getCharacterStream(columnLabel);
268    }
269
270    /**
271     * {@inheritDoc}
272     */
273    protected final Clob getClob(final int columnIndex) throws SQLException {
274        return resultSet.getClob(columnIndex);
275    }
276
277    /**
278     * {@inheritDoc}
279     */
280    protected final Clob getClob(final String columnLabel) throws SQLException {
281        return resultSet.getClob(columnLabel);
282    }
283
284    /**
285     * {@inheritDoc}
286     */
287    protected final int getConcurrency() throws SQLException {
288        return resultSet.getConcurrency();
289    }
290
291    /**
292     * {@inheritDoc}
293     */
294    protected final String getCursorName() throws SQLException {
295        return resultSet.getCursorName();
296    }
297
298    /**
299     * {@inheritDoc}
300     */
301    protected final Date getDate(final int columnIndex) throws SQLException {
302        return resultSet.getDate(columnIndex);
303    }
304
305    /**
306     * {@inheritDoc}
307     */
308    protected final Date getDate(final int columnIndex, final Calendar cal) throws SQLException {
309        return resultSet.getDate(columnIndex, cal);
310    }
311
312    /**
313     * {@inheritDoc}
314     */
315    protected final Date getDate(final String columnLabel) throws SQLException {
316        return resultSet.getDate(columnLabel);
317    }
318
319    /**
320     * {@inheritDoc}
321     */
322    protected final Date getDate(final String columnLabel, final Calendar cal) throws SQLException {
323        return resultSet.getDate(columnLabel, cal);
324    }
325
326    /**
327     * {@inheritDoc}
328     */
329    protected final double getDouble(final int columnIndex) throws SQLException {
330        return resultSet.getDouble(columnIndex);
331    }
332
333    /**
334     * {@inheritDoc}
335     */
336    protected final double getDouble(final String columnLabel) throws SQLException {
337        return resultSet.getDouble(columnLabel);
338    }
339
340    /**
341     * {@inheritDoc}
342     */
343    protected final int getFetchDirection() throws SQLException {
344        return resultSet.getFetchDirection();
345    }
346
347    /**
348     * {@inheritDoc}
349     */
350    protected final int getFetchSize() throws SQLException {
351        return resultSet.getFetchSize();
352    }
353
354    /**
355     * {@inheritDoc}
356     */
357    protected final float getFloat(final int columnIndex) throws SQLException {
358        return resultSet.getFloat(columnIndex);
359    }
360
361    /**
362     * {@inheritDoc}
363     */
364    protected final float getFloat(final String columnLabel) throws SQLException {
365        return resultSet.getFloat(columnLabel);
366    }
367
368    /**
369     * {@inheritDoc}
370     */
371    protected final int getHoldability() throws SQLException {
372        return resultSet.getHoldability();
373    }
374
375    /**
376     * {@inheritDoc}
377     */
378    protected final int getInt(final int columnIndex) throws SQLException {
379        return resultSet.getInt(columnIndex);
380    }
381
382    /**
383     * {@inheritDoc}
384     */
385    protected final int getInt(final String columnLabel) throws SQLException {
386        return resultSet.getInt(columnLabel);
387    }
388
389    /**
390     * {@inheritDoc}
391     */
392    protected final long getLong(final int columnIndex) throws SQLException {
393        return resultSet.getLong(columnIndex);
394    }
395
396    /**
397     * {@inheritDoc}
398     */
399    protected final long getLong(final String columnLabel) throws SQLException {
400        return resultSet.getLong(columnLabel);
401    }
402
403    /**
404     * {@inheritDoc}
405     */
406    protected final ResultSetMetaData getMetaData() throws SQLException {
407        return resultSet.getMetaData();
408    }
409
410    /**
411     * {@inheritDoc}
412     */
413    protected final Reader getNCharacterStream(final int columnIndex) throws SQLException {
414        return resultSet.getNCharacterStream(columnIndex);
415    }
416
417    /**
418     * {@inheritDoc}
419     */
420    protected final Reader getNCharacterStream(final String columnLabel) throws SQLException {
421        return resultSet.getNCharacterStream(columnLabel);
422    }
423
424    /**
425     * {@inheritDoc}
426     */
427    protected final NClob getNClob(final int columnIndex) throws SQLException {
428        return resultSet.getNClob(columnIndex);
429    }
430
431    /**
432     * {@inheritDoc}
433     */
434    protected final NClob getNClob(final String columnLabel) throws SQLException {
435        return resultSet.getNClob(columnLabel);
436    }
437
438    /**
439     * {@inheritDoc}
440     */
441    protected final String getNString(final int columnIndex) throws SQLException {
442        return resultSet.getNString(columnIndex);
443    }
444
445    /**
446     * {@inheritDoc}
447     */
448    protected final String getNString(final String columnLabel) throws SQLException {
449        return resultSet.getNString(columnLabel);
450    }
451
452    /**
453     * {@inheritDoc}
454     */
455    protected final Object getObject(final int columnIndex) throws SQLException {
456        return resultSet.getObject(columnIndex);
457    }
458
459    /**
460     * {@inheritDoc}
461     */
462    protected final Object getObject(final int columnIndex, final Map<String, Class<?>> map) throws SQLException {
463        return resultSet.getObject(columnIndex, map);
464    }
465
466    /**
467     * {@inheritDoc}
468     */
469    protected final Object getObject(final String columnLabel) throws SQLException {
470        return resultSet.getObject(columnLabel);
471    }
472
473    /**
474     * {@inheritDoc}
475     */
476    protected final Object getObject(final String columnLabel, final Map<String, Class<?>> map) throws SQLException {
477        return resultSet.getObject(columnLabel, map);
478    }
479
480    /**
481     * {@inheritDoc}
482     */
483    protected final Ref getRef(final int columnIndex) throws SQLException {
484        return resultSet.getRef(columnIndex);
485    }
486
487    /**
488     * {@inheritDoc}
489     */
490    protected final Ref getRef(final String columnLabel) throws SQLException {
491        return resultSet.getRef(columnLabel);
492    }
493
494    /**
495     * {@inheritDoc}
496     */
497    protected final int getRow() throws SQLException {
498        return resultSet.getRow();
499    }
500
501    /**
502     * {@inheritDoc}
503     */
504    protected final RowId getRowId(final int columnIndex) throws SQLException {
505        return resultSet.getRowId(columnIndex);
506    }
507
508    /**
509     * {@inheritDoc}
510     */
511    protected final RowId getRowId(final String columnLabel) throws SQLException {
512        return resultSet.getRowId(columnLabel);
513    }
514
515    /**
516     * {@inheritDoc}
517     */
518    protected final short getShort(final int columnIndex) throws SQLException {
519        return resultSet.getShort(columnIndex);
520    }
521
522    /**
523     * {@inheritDoc}
524     */
525    protected final short getShort(final String columnLabel) throws SQLException {
526        return resultSet.getShort(columnLabel);
527    }
528
529    /**
530     * {@inheritDoc}
531     */
532    protected final SQLXML getSQLXML(final int columnIndex) throws SQLException {
533        return resultSet.getSQLXML(columnIndex);
534    }
535
536    /**
537     * {@inheritDoc}
538     */
539    protected final SQLXML getSQLXML(final String columnLabel) throws SQLException {
540        return resultSet.getSQLXML(columnLabel);
541    }
542
543    /**
544     * {@inheritDoc}
545     */
546    protected final Statement getStatement() throws SQLException {
547        return resultSet.getStatement();
548    }
549
550    /**
551     * {@inheritDoc}
552     */
553    protected final String getString(final int columnIndex) throws SQLException {
554        return resultSet.getString(columnIndex);
555    }
556
557    /**
558     * {@inheritDoc}
559     */
560    protected final String getString(final String columnLabel) throws SQLException {
561        return resultSet.getString(columnLabel);
562    }
563
564    /**
565     * {@inheritDoc}
566     */
567    protected final Time getTime(final int columnIndex) throws SQLException {
568        return resultSet.getTime(columnIndex);
569    }
570
571    /**
572     * {@inheritDoc}
573     */
574    protected final Time getTime(final int columnIndex, final Calendar cal) throws SQLException {
575        return resultSet.getTime(columnIndex, cal);
576    }
577
578    /**
579     * {@inheritDoc}
580     */
581    protected final Time getTime(final String columnLabel) throws SQLException {
582        return resultSet.getTime(columnLabel);
583    }
584
585    /**
586     * {@inheritDoc}
587     */
588    protected final Time getTime(final String columnLabel, final Calendar cal) throws SQLException {
589        return resultSet.getTime(columnLabel, cal);
590    }
591
592    /**
593     * {@inheritDoc}
594     */
595    protected final Timestamp getTimestamp(final int columnIndex) throws SQLException {
596        return resultSet.getTimestamp(columnIndex);
597    }
598
599    /**
600     * {@inheritDoc}
601     */
602    protected final Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException {
603        return resultSet.getTimestamp(columnIndex, cal);
604    }
605
606    /**
607     * {@inheritDoc}
608     */
609    protected final Timestamp getTimestamp(final String columnLabel) throws SQLException {
610        return resultSet.getTimestamp(columnLabel);
611    }
612
613    /**
614     * {@inheritDoc}
615     */
616    protected final Timestamp getTimestamp(final String columnLabel, final Calendar cal) throws SQLException {
617        return resultSet.getTimestamp(columnLabel, cal);
618    }
619
620    /**
621     * {@inheritDoc}
622     */
623    protected final int getType() throws SQLException {
624        return resultSet.getType();
625    }
626
627    /**
628     * {@inheritDoc}
629     */
630    @Deprecated
631    protected final InputStream getUnicodeStream(final int columnIndex) throws SQLException {
632        return resultSet.getUnicodeStream(columnIndex);
633    }
634
635    /**
636     * {@inheritDoc}
637     */
638    @Deprecated
639    protected final InputStream getUnicodeStream(final String columnLabel) throws SQLException {
640        return resultSet.getUnicodeStream(columnLabel);
641    }
642
643    /**
644     * {@inheritDoc}
645     */
646    protected final URL getURL(final int columnIndex) throws SQLException {
647        return resultSet.getURL(columnIndex);
648    }
649
650    /**
651     * {@inheritDoc}
652     */
653    protected final URL getURL(final String columnLabel) throws SQLException {
654        return resultSet.getURL(columnLabel);
655    }
656
657    /**
658     * {@inheritDoc}
659     */
660    protected final SQLWarning getWarnings() throws SQLException {
661        return resultSet.getWarnings();
662    }
663
664    /**
665     * Turn the {@code ResultSet} into an Object.
666     *
667     * @return An Object initialized with {@code ResultSet} data
668     * @throws SQLException if a database access error occurs
669     * @see ResultSetHandler#handle(ResultSet)
670     */
671    protected abstract T handle() throws SQLException;
672
673    /**
674     * {@inheritDoc}
675     */
676    @Override
677    public final T handle(final ResultSet rs) throws SQLException {
678        if (this.resultSet != null) {
679            throw new IllegalStateException("Re-entry not allowed!");
680        }
681
682        this.resultSet = rs;
683
684        try {
685            return handle();
686        } finally {
687            this.resultSet = null;
688        }
689    }
690
691    /**
692     * {@inheritDoc}
693     */
694    protected final void insertRow() throws SQLException {
695        resultSet.insertRow();
696    }
697
698    /**
699     * {@inheritDoc}
700     */
701    protected final boolean isAfterLast() throws SQLException {
702        return resultSet.isAfterLast();
703    }
704
705    /**
706     * {@inheritDoc}
707     */
708    protected final boolean isBeforeFirst() throws SQLException {
709        return resultSet.isBeforeFirst();
710    }
711
712    /**
713     * {@inheritDoc}
714     */
715    protected final boolean isClosed() throws SQLException {
716        return resultSet.isClosed();
717    }
718
719    /**
720     * {@inheritDoc}
721     */
722    protected final boolean isFirst() throws SQLException {
723        return resultSet.isFirst();
724    }
725
726    /**
727     * {@inheritDoc}
728     */
729    protected final boolean isLast() throws SQLException {
730        return resultSet.isLast();
731    }
732
733    /**
734     * {@inheritDoc}
735     */
736    protected final boolean isWrapperFor(final Class<?> iface) throws SQLException {
737        return resultSet.isWrapperFor(iface);
738    }
739
740    /**
741     * {@inheritDoc}
742     */
743    protected final boolean last() throws SQLException {
744        return resultSet.last();
745    }
746
747    /**
748     * {@inheritDoc}
749     */
750    protected final void moveToCurrentRow() throws SQLException {
751        resultSet.moveToCurrentRow();
752    }
753
754    /**
755     * {@inheritDoc}
756     */
757    protected final void moveToInsertRow() throws SQLException {
758        resultSet.moveToInsertRow();
759    }
760
761    /**
762     * {@inheritDoc}
763     */
764    protected final boolean next() throws SQLException {
765        return resultSet.next();
766    }
767
768    /**
769     * {@inheritDoc}
770     */
771    protected final boolean previous() throws SQLException {
772        return resultSet.previous();
773    }
774
775    /**
776     * {@inheritDoc}
777     */
778    protected final void refreshRow() throws SQLException {
779        resultSet.refreshRow();
780    }
781
782    /**
783     * {@inheritDoc}
784     */
785    protected final boolean relative(final int rows) throws SQLException {
786        return resultSet.relative(rows);
787    }
788
789    /**
790     * {@inheritDoc}
791     */
792    protected final boolean rowDeleted() throws SQLException {
793        return resultSet.rowDeleted();
794    }
795
796    /**
797     * {@inheritDoc}
798     */
799    protected final boolean rowInserted() throws SQLException {
800        return resultSet.rowInserted();
801    }
802
803    /**
804     * {@inheritDoc}
805     */
806    protected final boolean rowUpdated() throws SQLException {
807        return resultSet.rowUpdated();
808    }
809
810    /**
811     * {@inheritDoc}
812     */
813    protected final void setFetchDirection(final int direction) throws SQLException {
814        resultSet.setFetchDirection(direction);
815    }
816
817    /**
818     * {@inheritDoc}
819     */
820    protected final void setFetchSize(final int rows) throws SQLException {
821        resultSet.setFetchSize(rows);
822    }
823
824    /**
825     * {@inheritDoc}
826     */
827    protected final <E> E unwrap(final Class<E> iface) throws SQLException {
828        return resultSet.unwrap(iface);
829    }
830
831    /**
832     * {@inheritDoc}
833     */
834    protected final void updateArray(final int columnIndex, final Array x) throws SQLException {
835        resultSet.updateArray(columnIndex, x);
836    }
837
838    /**
839     * {@inheritDoc}
840     */
841    protected final void updateArray(final String columnLabel, final Array x) throws SQLException {
842        resultSet.updateArray(columnLabel, x);
843    }
844
845    /**
846     * {@inheritDoc}
847     */
848    protected final void updateAsciiStream(final int columnIndex, final InputStream x) throws SQLException {
849        resultSet.updateAsciiStream(columnIndex, x);
850    }
851
852    /**
853     * {@inheritDoc}
854     */
855    protected final void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
856        resultSet.updateAsciiStream(columnIndex, x, length);
857    }
858
859    /**
860     * {@inheritDoc}
861     */
862    protected final void updateAsciiStream(final int columnIndex, final InputStream x, final long length) throws SQLException {
863        resultSet.updateAsciiStream(columnIndex, x, length);
864    }
865
866    /**
867     * {@inheritDoc}
868     */
869    protected final void updateAsciiStream(final String columnLabel, final InputStream x) throws SQLException {
870        resultSet.updateAsciiStream(columnLabel, x);
871    }
872
873    /**
874     * {@inheritDoc}
875     */
876    protected final void updateAsciiStream(final String columnLabel, final InputStream x, final int length) throws SQLException {
877        resultSet.updateAsciiStream(columnLabel, x, length);
878    }
879
880    /**
881     * {@inheritDoc}
882     */
883    protected final void updateAsciiStream(final String columnLabel, final InputStream x, final long length) throws SQLException {
884        resultSet.updateAsciiStream(columnLabel, x, length);
885    }
886
887    /**
888     * {@inheritDoc}
889     */
890    protected final void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException {
891        resultSet.updateBigDecimal(columnIndex, x);
892    }
893
894    /**
895     * {@inheritDoc}
896     */
897    protected final void updateBigDecimal(final String columnLabel, final BigDecimal x) throws SQLException {
898        resultSet.updateBigDecimal(columnLabel, x);
899    }
900
901    /**
902     * {@inheritDoc}
903     */
904    protected final void updateBinaryStream(final int columnIndex, final InputStream x) throws SQLException {
905        resultSet.updateBinaryStream(columnIndex, x);
906    }
907
908    /**
909     * {@inheritDoc}
910     */
911    protected final void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
912        resultSet.updateBinaryStream(columnIndex, x, length);
913    }
914
915    /**
916     * {@inheritDoc}
917     */
918    protected final void updateBinaryStream(final int columnIndex, final InputStream x, final long length) throws SQLException {
919        resultSet.updateBinaryStream(columnIndex, x, length);
920    }
921
922    /**
923     * {@inheritDoc}
924     */
925    protected final void updateBinaryStream(final String columnLabel, final InputStream x) throws SQLException {
926        resultSet.updateBinaryStream(columnLabel, x);
927    }
928
929    /**
930     * {@inheritDoc}
931     */
932    protected final void updateBinaryStream(final String columnLabel, final InputStream x, final int length) throws SQLException {
933        resultSet.updateBinaryStream(columnLabel, x, length);
934    }
935
936    /**
937     * {@inheritDoc}
938     */
939    protected final void updateBinaryStream(final String columnLabel, final InputStream x, final long length) throws SQLException {
940        resultSet.updateBinaryStream(columnLabel, x, length);
941    }
942
943    /**
944     * {@inheritDoc}
945     */
946    protected final void updateBlob(final int columnIndex, final Blob x) throws SQLException {
947        resultSet.updateBlob(columnIndex, x);
948    }
949
950    /**
951     * {@inheritDoc}
952     */
953    protected final void updateBlob(final int columnIndex, final InputStream inputStream) throws SQLException {
954        resultSet.updateBlob(columnIndex, inputStream);
955    }
956
957    /**
958     * {@inheritDoc}
959     */
960    protected final void updateBlob(final int columnIndex, final InputStream inputStream, final long length) throws SQLException {
961        resultSet.updateBlob(columnIndex, inputStream, length);
962    }
963
964    /**
965     * {@inheritDoc}
966     */
967    protected final void updateBlob(final String columnLabel, final Blob x) throws SQLException {
968        resultSet.updateBlob(columnLabel, x);
969    }
970
971    /**
972     * {@inheritDoc}
973     */
974    protected final void updateBlob(final String columnLabel, final InputStream inputStream) throws SQLException {
975        resultSet.updateBlob(columnLabel, inputStream);
976    }
977
978    /**
979     * {@inheritDoc}
980     */
981    protected final void updateBlob(final String columnLabel, final InputStream inputStream, final long length) throws SQLException {
982        resultSet.updateBlob(columnLabel, inputStream, length);
983    }
984
985    /**
986     * {@inheritDoc}
987     */
988    protected final void updateBoolean(final int columnIndex, final boolean x) throws SQLException {
989        resultSet.updateBoolean(columnIndex, x);
990    }
991
992    /**
993     * {@inheritDoc}
994     */
995    protected final void updateBoolean(final String columnLabel, final boolean x) throws SQLException {
996        resultSet.updateBoolean(columnLabel, x);
997    }
998
999    /**
1000     * {@inheritDoc}
1001     */
1002    protected final void updateByte(final int columnIndex, final byte x) throws SQLException {
1003        resultSet.updateByte(columnIndex, x);
1004    }
1005
1006    /**
1007     * {@inheritDoc}
1008     */
1009    protected final void updateByte(final String columnLabel, final byte x) throws SQLException {
1010        resultSet.updateByte(columnLabel, x);
1011    }
1012
1013    /**
1014     * {@inheritDoc}
1015     */
1016    protected final void updateBytes(final int columnIndex, final byte[] x) throws SQLException {
1017        resultSet.updateBytes(columnIndex, x);
1018    }
1019
1020    /**
1021     * {@inheritDoc}
1022     */
1023    protected final void updateBytes(final String columnLabel, final byte[] x) throws SQLException {
1024        resultSet.updateBytes(columnLabel, x);
1025    }
1026
1027    /**
1028     * {@inheritDoc}
1029     */
1030    protected final void updateCharacterStream(final int columnIndex, final Reader x) throws SQLException {
1031        resultSet.updateCharacterStream(columnIndex, x);
1032    }
1033
1034    /**
1035     * {@inheritDoc}
1036     */
1037    protected final void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException {
1038        resultSet.updateCharacterStream(columnIndex, x, length);
1039    }
1040
1041    /**
1042     * {@inheritDoc}
1043     */
1044    protected final void updateCharacterStream(final int columnIndex, final Reader x, final long length) throws SQLException {
1045        resultSet.updateCharacterStream(columnIndex, x, length);
1046    }
1047
1048    /**
1049     * {@inheritDoc}
1050     */
1051    protected final void updateCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
1052        resultSet.updateCharacterStream(columnLabel, reader);
1053    }
1054
1055    /**
1056     * {@inheritDoc}
1057     */
1058    protected final void updateCharacterStream(final String columnLabel, final Reader reader, final int length) throws SQLException {
1059        resultSet.updateCharacterStream(columnLabel, reader, length);
1060    }
1061
1062    /**
1063     * {@inheritDoc}
1064     */
1065    protected final void updateCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException {
1066        resultSet.updateCharacterStream(columnLabel, reader, length);
1067    }
1068
1069    /**
1070     * {@inheritDoc}
1071     */
1072    protected final void updateClob(final int columnIndex, final Clob x) throws SQLException {
1073        resultSet.updateClob(columnIndex, x);
1074    }
1075
1076    /**
1077     * {@inheritDoc}
1078     */
1079    protected final void updateClob(final int columnIndex, final Reader reader) throws SQLException {
1080        resultSet.updateClob(columnIndex, reader);
1081    }
1082
1083    /**
1084     * {@inheritDoc}
1085     */
1086    protected final void updateClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
1087        resultSet.updateClob(columnIndex, reader, length);
1088    }
1089
1090    /**
1091     * {@inheritDoc}
1092     */
1093    protected final void updateClob(final String columnLabel, final Clob x) throws SQLException {
1094        resultSet.updateClob(columnLabel, x);
1095    }
1096
1097    /**
1098     * {@inheritDoc}
1099     */
1100    protected final void updateClob(final String columnLabel, final Reader reader) throws SQLException {
1101        resultSet.updateClob(columnLabel, reader);
1102    }
1103
1104    /**
1105     * {@inheritDoc}
1106     */
1107    protected final void updateClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
1108        resultSet.updateClob(columnLabel, reader, length);
1109    }
1110
1111    /**
1112     * {@inheritDoc}
1113     */
1114    protected final void updateDate(final int columnIndex, final Date x) throws SQLException {
1115        resultSet.updateDate(columnIndex, x);
1116    }
1117
1118    /**
1119     * {@inheritDoc}
1120     */
1121    protected final void updateDate(final String columnLabel, final Date x) throws SQLException {
1122        resultSet.updateDate(columnLabel, x);
1123    }
1124
1125    /**
1126     * {@inheritDoc}
1127     */
1128    protected final void updateDouble(final int columnIndex, final double x) throws SQLException {
1129        resultSet.updateDouble(columnIndex, x);
1130    }
1131
1132    /**
1133     * {@inheritDoc}
1134     */
1135    protected final void updateDouble(final String columnLabel, final double x) throws SQLException {
1136        resultSet.updateDouble(columnLabel, x);
1137    }
1138
1139    /**
1140     * {@inheritDoc}
1141     */
1142    protected final void updateFloat(final int columnIndex, final float x) throws SQLException {
1143        resultSet.updateFloat(columnIndex, x);
1144    }
1145
1146    /**
1147     * {@inheritDoc}
1148     */
1149    protected final void updateFloat(final String columnLabel, final float x) throws SQLException {
1150        resultSet.updateFloat(columnLabel, x);
1151    }
1152
1153    /**
1154     * {@inheritDoc}
1155     */
1156    protected final void updateInt(final int columnIndex, final int x) throws SQLException {
1157        resultSet.updateInt(columnIndex, x);
1158    }
1159
1160    /**
1161     * {@inheritDoc}
1162     */
1163    protected final void updateInt(final String columnLabel, final int x) throws SQLException {
1164        resultSet.updateInt(columnLabel, x);
1165    }
1166
1167    /**
1168     * {@inheritDoc}
1169     */
1170    protected final void updateLong(final int columnIndex, final long x) throws SQLException {
1171        resultSet.updateLong(columnIndex, x);
1172    }
1173
1174    /**
1175     * {@inheritDoc}
1176     */
1177    protected final void updateLong(final String columnLabel, final long x) throws SQLException {
1178        resultSet.updateLong(columnLabel, x);
1179    }
1180
1181    /**
1182     * {@inheritDoc}
1183     */
1184    protected final void updateNCharacterStream(final int columnIndex, final Reader x) throws SQLException {
1185        resultSet.updateNCharacterStream(columnIndex, x);
1186    }
1187
1188    /**
1189     * {@inheritDoc}
1190     */
1191    protected final void updateNCharacterStream(final int columnIndex, final Reader x, final long length) throws SQLException {
1192        resultSet.updateNCharacterStream(columnIndex, x, length);
1193    }
1194
1195    /**
1196     * {@inheritDoc}
1197     */
1198    protected final void updateNCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
1199        resultSet.updateNCharacterStream(columnLabel, reader);
1200    }
1201
1202    /**
1203     * {@inheritDoc}
1204     */
1205    protected final void updateNCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException {
1206        resultSet.updateNCharacterStream(columnLabel, reader, length);
1207    }
1208
1209    /**
1210     * {@inheritDoc}
1211     */
1212    protected final void updateNClob(final int columnIndex, final NClob nClob) throws SQLException {
1213        resultSet.updateNClob(columnIndex, nClob);
1214    }
1215
1216    /**
1217     * {@inheritDoc}
1218     */
1219    protected final void updateNClob(final int columnIndex, final Reader reader) throws SQLException {
1220        resultSet.updateNClob(columnIndex, reader);
1221    }
1222
1223    /**
1224     * {@inheritDoc}
1225     */
1226    protected final void updateNClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
1227        resultSet.updateNClob(columnIndex, reader, length);
1228    }
1229
1230    /**
1231     * {@inheritDoc}
1232     */
1233    protected final void updateNClob(final String columnLabel, final NClob nClob) throws SQLException {
1234        resultSet.updateNClob(columnLabel, nClob);
1235    }
1236
1237    /**
1238     * {@inheritDoc}
1239     */
1240    protected final void updateNClob(final String columnLabel, final Reader reader) throws SQLException {
1241        resultSet.updateNClob(columnLabel, reader);
1242    }
1243
1244    /**
1245     * {@inheritDoc}
1246     */
1247    protected final void updateNClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
1248        resultSet.updateNClob(columnLabel, reader, length);
1249    }
1250
1251    /**
1252     * {@inheritDoc}
1253     */
1254    protected final void updateNString(final int columnIndex, final String nString) throws SQLException {
1255        resultSet.updateNString(columnIndex, nString);
1256    }
1257
1258    /**
1259     * {@inheritDoc}
1260     */
1261    protected final void updateNString(final String columnLabel, final String nString) throws SQLException {
1262        resultSet.updateNString(columnLabel, nString);
1263    }
1264
1265    /**
1266     * {@inheritDoc}
1267     */
1268    protected final void updateNull(final int columnIndex) throws SQLException {
1269        resultSet.updateNull(columnIndex);
1270    }
1271
1272    /**
1273     * {@inheritDoc}
1274     */
1275    protected final void updateNull(final String columnLabel) throws SQLException {
1276        resultSet.updateNull(columnLabel);
1277    }
1278
1279    /**
1280     * {@inheritDoc}
1281     */
1282    protected final void updateObject(final int columnIndex, final Object x) throws SQLException {
1283        resultSet.updateObject(columnIndex, x);
1284    }
1285
1286    /**
1287     * {@inheritDoc}
1288     */
1289    protected final void updateObject(final int columnIndex, final Object x, final int scaleOrLength) throws SQLException {
1290        resultSet.updateObject(columnIndex, x, scaleOrLength);
1291    }
1292
1293    /**
1294     * {@inheritDoc}
1295     */
1296    protected final void updateObject(final String columnLabel, final Object x) throws SQLException {
1297        resultSet.updateObject(columnLabel, x);
1298    }
1299
1300    /**
1301     * {@inheritDoc}
1302     */
1303    protected final void updateObject(final String columnLabel, final Object x, final int scaleOrLength) throws SQLException {
1304        resultSet.updateObject(columnLabel, x, scaleOrLength);
1305    }
1306
1307    /**
1308     * {@inheritDoc}
1309     */
1310    protected final void updateRef(final int columnIndex, final Ref x) throws SQLException {
1311        resultSet.updateRef(columnIndex, x);
1312    }
1313
1314    /**
1315     * {@inheritDoc}
1316     */
1317    protected final void updateRef(final String columnLabel, final Ref x) throws SQLException {
1318        resultSet.updateRef(columnLabel, x);
1319    }
1320
1321    /**
1322     * {@inheritDoc}
1323     */
1324    protected final void updateRow() throws SQLException {
1325        resultSet.updateRow();
1326    }
1327
1328    /**
1329     * {@inheritDoc}
1330     */
1331    protected final void updateRowId(final int columnIndex, final RowId x) throws SQLException {
1332        resultSet.updateRowId(columnIndex, x);
1333    }
1334
1335    /**
1336     * {@inheritDoc}
1337     */
1338    protected final void updateRowId(final String columnLabel, final RowId x) throws SQLException {
1339        resultSet.updateRowId(columnLabel, x);
1340    }
1341
1342    /**
1343     * {@inheritDoc}
1344     */
1345    protected final void updateShort(final int columnIndex, final short x) throws SQLException {
1346        resultSet.updateShort(columnIndex, x);
1347    }
1348
1349    /**
1350     * {@inheritDoc}
1351     */
1352    protected final void updateShort(final String columnLabel, final short x) throws SQLException {
1353        resultSet.updateShort(columnLabel, x);
1354    }
1355
1356    /**
1357     * {@inheritDoc}
1358     */
1359    protected final void updateSQLXML(final int columnIndex, final SQLXML xmlObject) throws SQLException {
1360        resultSet.updateSQLXML(columnIndex, xmlObject);
1361    }
1362
1363    /**
1364     * {@inheritDoc}
1365     */
1366    protected final void updateSQLXML(final String columnLabel, final SQLXML xmlObject) throws SQLException {
1367        resultSet.updateSQLXML(columnLabel, xmlObject);
1368    }
1369
1370    /**
1371     * {@inheritDoc}
1372     */
1373    protected final void updateString(final int columnIndex, final String x) throws SQLException {
1374        resultSet.updateString(columnIndex, x);
1375    }
1376
1377    /**
1378     * {@inheritDoc}
1379     */
1380    protected final void updateString(final String columnLabel, final String x) throws SQLException {
1381        resultSet.updateString(columnLabel, x);
1382    }
1383
1384    /**
1385     * {@inheritDoc}
1386     */
1387    protected final void updateTime(final int columnIndex, final Time x) throws SQLException {
1388        resultSet.updateTime(columnIndex, x);
1389    }
1390
1391    /**
1392     * {@inheritDoc}
1393     */
1394    protected final void updateTime(final String columnLabel, final Time x) throws SQLException {
1395        resultSet.updateTime(columnLabel, x);
1396    }
1397
1398    /**
1399     * {@inheritDoc}
1400     */
1401    protected final void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException {
1402        resultSet.updateTimestamp(columnIndex, x);
1403    }
1404
1405    /**
1406     * {@inheritDoc}
1407     */
1408    protected final void updateTimestamp(final String columnLabel, final Timestamp x) throws SQLException {
1409        resultSet.updateTimestamp(columnLabel, x);
1410    }
1411
1412    /**
1413     * {@inheritDoc}
1414     */
1415    protected final boolean wasNull() throws SQLException {
1416        return resultSet.wasNull();
1417    }
1418
1419}