Project

General

Profile

Download (35.8 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9

    
10
package eu.etaxonomy.cdm.io.common;
11

    
12
import java.io.InputStream;
13
import java.io.Reader;
14
import java.math.BigDecimal;
15
import java.net.URL;
16
import java.sql.Array;
17
import java.sql.Blob;
18
import java.sql.Clob;
19
import java.sql.Date;
20
import java.sql.NClob;
21
import java.sql.Ref;
22
import java.sql.ResultSet;
23
import java.sql.ResultSetMetaData;
24
import java.sql.RowId;
25
import java.sql.SQLException;
26
import java.sql.SQLWarning;
27
import java.sql.SQLXML;
28
import java.sql.Statement;
29
import java.sql.Time;
30
import java.sql.Timestamp;
31
import java.util.Calendar;
32
import java.util.HashMap;
33
import java.util.Map;
34

    
35
import org.apache.log4j.Logger;
36

    
37
/**
38
 * Some ResultSets do not allow asking twice for the same column value. This proxy solves this
39
 * problem by storing all values to a value map. When moving to another record the value map is
40
 * emptied.
41
 *
42
 * @author a.mueller
43
 * @since 24.08.2010
44
 */
45
public class ResultSetProxy implements ResultSet {
46
	@SuppressWarnings("unused")
47
    private static final Logger logger = Logger.getLogger(ResultSetProxy.class);
48

    
49
// ************************** FACTORY METHODS *********************************/
50

    
51
	public static ResultSetProxy NewInstance(ResultSet resultSet){
52
		return new ResultSetProxy(resultSet);
53
	}
54

    
55
// **************************** VARIABLES ************************************************/
56

    
57
	private ResultSet resultSet;
58

    
59
	private Map<String, Object> proxyMap;
60

    
61
	private Object NULL = new Object();
62

    
63
// ********************** CONSTRUCTORS ****************************************************/
64

    
65
	public ResultSetProxy(ResultSet resultSet) {
66
		this.resultSet = resultSet;
67
		newProxyMap();
68
	}
69

    
70
// ************************* METHODS ********************************************/
71

    
72
	private void newProxyMap() {
73
		proxyMap = new HashMap<>();
74
	}
75

    
76
// ******************************* DELEGATES ****************************/
77

    
78
	@Override
79
	public boolean absolute(int row) throws SQLException {
80
		newProxyMap();
81
		return resultSet.absolute(row);
82
	}
83

    
84
	@Override
85
	public void afterLast() throws SQLException {
86
		newProxyMap();
87
		resultSet.afterLast();
88
	}
89

    
90
	@Override
91
	public void beforeFirst() throws SQLException {
92
		newProxyMap();
93
		resultSet.beforeFirst();
94
	}
95

    
96
	@Override
97
	public void cancelRowUpdates() throws SQLException {
98
		resultSet.cancelRowUpdates();
99
	}
100

    
101
	@Override
102
	public void clearWarnings() throws SQLException {
103
		resultSet.clearWarnings();
104
	}
105

    
106
	@Override
107
	public void close() throws SQLException {
108
		newProxyMap();
109
		resultSet.close();
110
	}
111

    
112
	@Override
113
	public void deleteRow() throws SQLException {
114
		newProxyMap();
115
		resultSet.deleteRow();
116
	}
117

    
118
	@Override
119
	public int findColumn(String columnLabel) throws SQLException {
120
		return resultSet.findColumn(columnLabel);
121
	}
122

    
123
	@Override
124
	public boolean first() throws SQLException {
125
		newProxyMap();
126
		return resultSet.first();
127
	}
128

    
129
	@Override
130
	public Array getArray(int columnIndex) throws SQLException {
131
		return resultSet.getArray(columnIndex);
132
	}
133

    
134
	@Override
135
	public Array getArray(String columnLabel) throws SQLException {
136
		return resultSet.getArray(columnLabel);
137
	}
138

    
139
	@Override
140
	public InputStream getAsciiStream(int columnIndex) throws SQLException {
141
		return resultSet.getAsciiStream(columnIndex);
142
	}
143

    
144
	@Override
145
	public InputStream getAsciiStream(String columnLabel) throws SQLException {
146
		return resultSet.getAsciiStream(columnLabel);
147
	}
148

    
149
	@Override
150
	@Deprecated
151
	public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
152
		return resultSet.getBigDecimal(columnIndex, scale);
153
	}
154

    
155
	@Override
156
	public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
157
		return resultSet.getBigDecimal(columnIndex);
158
	}
159

    
160
	@Override
161
	public BigDecimal getBigDecimal(String columnLabel, int scale)
162
			throws SQLException {
163
		return resultSet.getBigDecimal(columnLabel, scale);
164
	}
165

    
166
	@Override
167
	public BigDecimal getBigDecimal(String columnLabel) throws SQLException {
168
		return resultSet.getBigDecimal(columnLabel);
169
	}
170

    
171
	@Override
172
	public InputStream getBinaryStream(int columnIndex) throws SQLException {
173
		return resultSet.getBinaryStream(columnIndex);
174
	}
175

    
176
	@Override
177
	public InputStream getBinaryStream(String columnLabel) throws SQLException {
178
		return resultSet.getBinaryStream(columnLabel);
179
	}
180

    
181
	@Override
182
	public Blob getBlob(int columnIndex) throws SQLException {
183
		return resultSet.getBlob(columnIndex);
184
	}
185

    
186
	@Override
187
	public Blob getBlob(String columnLabel) throws SQLException {
188
		return resultSet.getBlob(columnLabel);
189
	}
190

    
191
	@Override
192
	public boolean getBoolean(int columnIndex) throws SQLException {
193
		return resultSet.getBoolean(columnIndex);
194
	}
195

    
196
	@Override
197
	public boolean getBoolean(String columnLabel) throws SQLException {
198
		if (proxyMap.get(columnLabel) != null){
199
			return (Boolean)proxyMap.get(columnLabel);
200
		}else{
201
			Boolean result = resultSet.getBoolean(columnLabel);
202
			proxyMap.put(columnLabel, result);
203
			return result;
204
		}
205
	}
206

    
207
	@Override
208
	public byte getByte(int columnIndex) throws SQLException {
209
		return resultSet.getByte(columnIndex);
210
	}
211

    
212
	@Override
213
	public byte getByte(String columnLabel) throws SQLException {
214
		return resultSet.getByte(columnLabel);
215
	}
216

    
217
	@Override
218
	public byte[] getBytes(int columnIndex) throws SQLException {
219
		return resultSet.getBytes(columnIndex);
220
	}
221

    
222
	@Override
223
	public byte[] getBytes(String columnLabel) throws SQLException {
224
		return resultSet.getBytes(columnLabel);
225
	}
226

    
227
	@Override
228
	public Reader getCharacterStream(int columnIndex) throws SQLException {
229
		return resultSet.getCharacterStream(columnIndex);
230
	}
231

    
232
	@Override
233
	public Reader getCharacterStream(String columnLabel) throws SQLException {
234
		return resultSet.getCharacterStream(columnLabel);
235
	}
236

    
237
	@Override
238
	public Clob getClob(int columnIndex) throws SQLException {
239
		return resultSet.getClob(columnIndex);
240
	}
241

    
242
	@Override
243
	public Clob getClob(String columnLabel) throws SQLException {
244
		return resultSet.getClob(columnLabel);
245
	}
246

    
247
	@Override
248
	public int getConcurrency() throws SQLException {
249
		return resultSet.getConcurrency();
250
	}
251

    
252
	@Override
253
	public String getCursorName() throws SQLException {
254
		return resultSet.getCursorName();
255
	}
256

    
257
	@Override
258
	public Date getDate(int columnIndex, Calendar cal) throws SQLException {
259
		return resultSet.getDate(columnIndex, cal);
260
	}
261

    
262
	@Override
263
	public Date getDate(int columnIndex) throws SQLException {
264
		return resultSet.getDate(columnIndex);
265
	}
266

    
267
	@Override
268
	public Date getDate(String columnLabel, Calendar cal) throws SQLException {
269
		return resultSet.getDate(columnLabel, cal);
270
	}
271

    
272
	@Override
273
	public Date getDate(String columnLabel) throws SQLException {
274
		return resultSet.getDate(columnLabel);
275
	}
276

    
277
	@Override
278
	public double getDouble(int columnIndex) throws SQLException {
279
		return resultSet.getDouble(columnIndex);
280
	}
281

    
282
	@Override
283
	public double getDouble(String columnLabel) throws SQLException {
284
		return resultSet.getDouble(columnLabel);
285
	}
286

    
287
	@Override
288
	public int getFetchDirection() throws SQLException {
289
		return resultSet.getFetchDirection();
290
	}
291

    
292
	@Override
293
	public int getFetchSize() throws SQLException {
294
		return resultSet.getFetchSize();
295
	}
296

    
297
	@Override
298
	public float getFloat(int columnIndex) throws SQLException {
299
		return resultSet.getFloat(columnIndex);
300
	}
301

    
302
	@Override
303
	public float getFloat(String columnLabel) throws SQLException {
304
		return resultSet.getFloat(columnLabel);
305
	}
306

    
307
	@Override
308
	public int getHoldability() throws SQLException {
309
		return resultSet.getHoldability();
310
	}
311

    
312
	@Override
313
	public int getInt(int columnIndex) throws SQLException {
314
		return resultSet.getInt(columnIndex);
315
	}
316

    
317
	@Override
318
	public int getInt(String columnLabel) throws SQLException {
319
		if (proxyMap.get(columnLabel) != null){
320
			return (Integer)proxyMap.get(columnLabel);
321
		}else{
322
			int result = resultSet.getInt(columnLabel);
323
			proxyMap.put(columnLabel, result);
324
			return result;
325
		}
326

    
327
	}
328

    
329
	@Override
330
	public long getLong(int columnIndex) throws SQLException {
331
		return resultSet.getLong(columnIndex);
332
	}
333

    
334
	@Override
335
	public long getLong(String columnLabel) throws SQLException {
336
		if (proxyMap.get(columnLabel) != null){
337
			return (Long)proxyMap.get(columnLabel);
338
		}else{
339
			long result = resultSet.getLong(columnLabel);
340
			proxyMap.put(columnLabel, result);
341
			return result;
342
		}
343
	}
344

    
345
	@Override
346
	public ResultSetMetaData getMetaData() throws SQLException {
347
		return resultSet.getMetaData();
348
	}
349

    
350
	@Override
351
	public Reader getNCharacterStream(int columnIndex) throws SQLException {
352
		return resultSet.getNCharacterStream(columnIndex);
353
	}
354

    
355
	@Override
356
	public Reader getNCharacterStream(String columnLabel) throws SQLException {
357
		return resultSet.getNCharacterStream(columnLabel);
358
	}
359

    
360
	@Override
361
	public NClob getNClob(int columnIndex) throws SQLException {
362
		return resultSet.getNClob(columnIndex);
363
	}
364

    
365
	@Override
366
	public NClob getNClob(String columnLabel) throws SQLException {
367
		if (proxyMap.get(columnLabel) != null){
368
			return (NClob)proxyMap.get(columnLabel);
369
		}else{
370
			NClob result = resultSet.getNClob(columnLabel);
371
			proxyMap.put(columnLabel, result);
372
			return result;
373
		}
374
	}
375

    
376
	@Override
377
	public String getNString(int columnIndex) throws SQLException {
378
		return resultSet.getNString(columnIndex);
379
	}
380

    
381
	@Override
382
	public String getNString(String columnLabel) throws SQLException {
383
		if (proxyMap.get(columnLabel) != null){
384
			return (String)proxyMap.get(columnLabel);
385
		}else{
386
			String result = resultSet.getNString(columnLabel);
387
			proxyMap.put(columnLabel, result);
388
			return result;
389
		}
390
	}
391

    
392
	@Override
393
	public Object getObject(int columnIndex, Map<String, Class<?>> map) throws SQLException {
394
		return resultSet.getObject(columnIndex, map);
395
	}
396

    
397
	@Override
398
	public Object getObject(int columnIndex) throws SQLException {
399
		return resultSet.getObject(columnIndex);
400
	}
401

    
402
	@Override
403
	public Object getObject(String columnLabel, Map<String, Class<?>> map) throws SQLException {
404
		return resultSet.getObject(columnLabel, map);
405
	}
406

    
407

    
408
	/* (non-Javadoc)
409
	 * @see java.sql.ResultSet#getObject(java.lang.String)
410
	 */
411
	@Override
412
	public Object getObject(String columnLabel) throws SQLException {
413
		Object mapValue = proxyMap.get(columnLabel);
414
		if (mapValue != null){
415
			if (mapValue == NULL){
416
				return null;
417
			}else{
418
				return mapValue;
419
			}
420
		}else{
421
			Object result = resultSet.getObject(columnLabel);
422
			if (result == null){
423
				mapValue = NULL;
424
			}else{
425
				mapValue = result;
426
			}
427
			proxyMap.put(columnLabel, mapValue);
428
			return result;
429
		}
430
	}
431

    
432

    
433
	/* (non-Javadoc)
434
	 * @see java.sql.ResultSet#getRef(int)
435
	 */
436
	@Override
437
	public Ref getRef(int columnIndex) throws SQLException {
438
		return resultSet.getRef(columnIndex);
439
	}
440

    
441

    
442
	/* (non-Javadoc)
443
	 * @see java.sql.ResultSet#getRef(java.lang.String)
444
	 */
445
	@Override
446
	public Ref getRef(String columnLabel) throws SQLException {
447
		return resultSet.getRef(columnLabel);
448
	}
449

    
450

    
451
	/* (non-Javadoc)
452
	 * @see java.sql.ResultSet#getRow()
453
	 */
454
	@Override
455
	public int getRow() throws SQLException {
456
		return resultSet.getRow();
457
	}
458

    
459

    
460
	/* (non-Javadoc)
461
	 * @see java.sql.ResultSet#getRowId(int)
462
	 */
463
	@Override
464
	public RowId getRowId(int columnIndex) throws SQLException {
465
		return resultSet.getRowId(columnIndex);
466
	}
467

    
468

    
469
	/* (non-Javadoc)
470
	 * @see java.sql.ResultSet#getRowId(java.lang.String)
471
	 */
472
	@Override
473
	public RowId getRowId(String columnLabel) throws SQLException {
474
		return resultSet.getRowId(columnLabel);
475
	}
476

    
477

    
478
	/* (non-Javadoc)
479
	 * @see java.sql.ResultSet#getShort(int)
480
	 */
481
	@Override
482
	public short getShort(int columnIndex) throws SQLException {
483
		return resultSet.getShort(columnIndex);
484
	}
485

    
486

    
487
	/* (non-Javadoc)
488
	 * @see java.sql.ResultSet#getShort(java.lang.String)
489
	 */
490
	@Override
491
	public short getShort(String columnLabel) throws SQLException {
492
		return resultSet.getShort(columnLabel);
493
	}
494

    
495

    
496
	/* (non-Javadoc)
497
	 * @see java.sql.ResultSet#getSQLXML(int)
498
	 */
499
	@Override
500
	public SQLXML getSQLXML(int columnIndex) throws SQLException {
501
		return resultSet.getSQLXML(columnIndex);
502
	}
503

    
504

    
505
	/* (non-Javadoc)
506
	 * @see java.sql.ResultSet#getSQLXML(java.lang.String)
507
	 */
508
	@Override
509
	public SQLXML getSQLXML(String columnLabel) throws SQLException {
510
		return resultSet.getSQLXML(columnLabel);
511
	}
512

    
513

    
514
	/* (non-Javadoc)
515
	 * @see java.sql.ResultSet#getStatement()
516
	 */
517
	@Override
518
	public Statement getStatement() throws SQLException {
519
		return resultSet.getStatement();
520
	}
521

    
522

    
523
	/* (non-Javadoc)
524
	 * @see java.sql.ResultSet#getString(int)
525
	 */
526
	@Override
527
	public String getString(int columnIndex) throws SQLException {
528
		return resultSet.getString(columnIndex);
529
	}
530

    
531

    
532
	/* (non-Javadoc)
533
	 * @see java.sql.ResultSet#getString(java.lang.String)
534
	 */
535
	@Override
536
	public String getString(String columnLabel) throws SQLException {
537
		Object mapValue = proxyMap.get(columnLabel);
538
		if (mapValue != null){
539
			if (mapValue == NULL){
540
				return null;
541
			}else{
542
				return (String)mapValue;
543
			}
544
		}else{
545
			String result = resultSet.getString(columnLabel);
546
			if (result == null){
547
				mapValue = NULL;
548
			}else{
549
				mapValue = result;
550
			}
551
			proxyMap.put(columnLabel, mapValue);
552
			return result;
553
		}
554
	}
555

    
556

    
557
	/* (non-Javadoc)
558
	 * @see java.sql.ResultSet#getTime(int, java.util.Calendar)
559
	 */
560
	@Override
561
	public Time getTime(int columnIndex, Calendar cal) throws SQLException {
562
		return resultSet.getTime(columnIndex, cal);
563
	}
564

    
565

    
566
	/* (non-Javadoc)
567
	 * @see java.sql.ResultSet#getTime(int)
568
	 */
569
	@Override
570
	public Time getTime(int columnIndex) throws SQLException {
571
		return resultSet.getTime(columnIndex);
572
	}
573

    
574

    
575
	/* (non-Javadoc)
576
	 * @see java.sql.ResultSet#getTime(java.lang.String, java.util.Calendar)
577
	 */
578
	@Override
579
	public Time getTime(String columnLabel, Calendar cal) throws SQLException {
580
		return resultSet.getTime(columnLabel, cal);
581
	}
582

    
583

    
584
	/* (non-Javadoc)
585
	 * @see java.sql.ResultSet#getTime(java.lang.String)
586
	 */
587
	@Override
588
	public Time getTime(String columnLabel) throws SQLException {
589
		return resultSet.getTime(columnLabel);
590
	}
591

    
592

    
593
	/* (non-Javadoc)
594
	 * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar)
595
	 */
596
	@Override
597
	public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
598
		return resultSet.getTimestamp(columnIndex, cal);
599
	}
600

    
601

    
602
	/* (non-Javadoc)
603
	 * @see java.sql.ResultSet#getTimestamp(int)
604
	 */
605
	@Override
606
	public Timestamp getTimestamp(int columnIndex) throws SQLException {
607
		return resultSet.getTimestamp(columnIndex);
608
	}
609

    
610

    
611
	/* (non-Javadoc)
612
	 * @see java.sql.ResultSet#getTimestamp(java.lang.String, java.util.Calendar)
613
	 */
614
	@Override
615
	public Timestamp getTimestamp(String columnLabel, Calendar cal)
616
			throws SQLException {
617
		return resultSet.getTimestamp(columnLabel, cal);
618
	}
619

    
620

    
621
	/* (non-Javadoc)
622
	 * @see java.sql.ResultSet#getTimestamp(java.lang.String)
623
	 */
624
	@Override
625
	public Timestamp getTimestamp(String columnLabel) throws SQLException {
626
		return resultSet.getTimestamp(columnLabel);
627
	}
628

    
629

    
630
	/* (non-Javadoc)
631
	 * @see java.sql.ResultSet#getType()
632
	 */
633
	@Override
634
	public int getType() throws SQLException {
635
		return resultSet.getType();
636
	}
637

    
638

    
639
	/* (non-Javadoc)
640
	 * @see java.sql.ResultSet#getUnicodeStream(int)
641
	 */
642
	@Override
643
	@Deprecated
644
	public InputStream getUnicodeStream(int columnIndex) throws SQLException {
645
		return resultSet.getUnicodeStream(columnIndex);
646
	}
647

    
648

    
649
	/* (non-Javadoc)
650
	 * @see java.sql.ResultSet#getUnicodeStream(java.lang.String)
651
	 */
652
	@Override
653
	@Deprecated
654
	public InputStream getUnicodeStream(String columnLabel) throws SQLException {
655
		return resultSet.getUnicodeStream(columnLabel);
656
	}
657

    
658

    
659
	/* (non-Javadoc)
660
	 * @see java.sql.ResultSet#getURL(int)
661
	 */
662
	@Override
663
	public URL getURL(int columnIndex) throws SQLException {
664
		return resultSet.getURL(columnIndex);
665
	}
666

    
667

    
668
	/* (non-Javadoc)
669
	 * @see java.sql.ResultSet#getURL(java.lang.String)
670
	 */
671
	@Override
672
	public URL getURL(String columnLabel) throws SQLException {
673
		return resultSet.getURL(columnLabel);
674
	}
675

    
676

    
677
	/* (non-Javadoc)
678
	 * @see java.sql.ResultSet#getWarnings()
679
	 */
680
	@Override
681
	public SQLWarning getWarnings() throws SQLException {
682
		return resultSet.getWarnings();
683
	}
684

    
685

    
686
	/* (non-Javadoc)
687
	 * @see java.sql.ResultSet#insertRow()
688
	 */
689
	@Override
690
	public void insertRow() throws SQLException {
691
		resultSet.insertRow();
692
	}
693

    
694

    
695
	/* (non-Javadoc)
696
	 * @see java.sql.ResultSet#isAfterLast()
697
	 */
698
	@Override
699
	public boolean isAfterLast() throws SQLException {
700
		return resultSet.isAfterLast();
701
	}
702

    
703

    
704
	/* (non-Javadoc)
705
	 * @see java.sql.ResultSet#isBeforeFirst()
706
	 */
707
	@Override
708
	public boolean isBeforeFirst() throws SQLException {
709
		return resultSet.isBeforeFirst();
710
	}
711

    
712

    
713
	/* (non-Javadoc)
714
	 * @see java.sql.ResultSet#isClosed()
715
	 */
716
	@Override
717
	public boolean isClosed() throws SQLException {
718
		return resultSet.isClosed();
719
	}
720

    
721

    
722
	/* (non-Javadoc)
723
	 * @see java.sql.ResultSet#isFirst()
724
	 */
725
	@Override
726
	public boolean isFirst() throws SQLException {
727
		return resultSet.isFirst();
728
	}
729

    
730

    
731
	/* (non-Javadoc)
732
	 * @see java.sql.ResultSet#isLast()
733
	 */
734
	@Override
735
	public boolean isLast() throws SQLException {
736
		return resultSet.isLast();
737
	}
738

    
739

    
740
	/* (non-Javadoc)
741
	 * @see java.sql.Wrapper#isWrapperFor(java.lang.Class)
742
	 */
743
	@Override
744
	public boolean isWrapperFor(Class<?> iface) throws SQLException {
745
		return resultSet.isWrapperFor(iface);
746
	}
747

    
748

    
749
	/* (non-Javadoc)
750
	 * @see java.sql.ResultSet#last()
751
	 */
752
	@Override
753
	public boolean last() throws SQLException {
754
		newProxyMap();
755
		return resultSet.last();
756
	}
757

    
758

    
759
	/* (non-Javadoc)
760
	 * @see java.sql.ResultSet#moveToCurrentRow()
761
	 */
762
	@Override
763
	public void moveToCurrentRow() throws SQLException {
764
		newProxyMap();
765
		resultSet.moveToCurrentRow();
766
	}
767

    
768

    
769
	/* (non-Javadoc)
770
	 * @see java.sql.ResultSet#moveToInsertRow()
771
	 */
772
	@Override
773
	public void moveToInsertRow() throws SQLException {
774
		newProxyMap();
775
		resultSet.moveToInsertRow();
776
	}
777

    
778
	@Override
779
	public boolean next() throws SQLException {
780
		newProxyMap();
781
		return resultSet.next();
782
	}
783

    
784
	@Override
785
	public boolean previous() throws SQLException {
786
		newProxyMap();
787
		return resultSet.previous();
788
	}
789

    
790
	@Override
791
	public void refreshRow() throws SQLException {
792
		newProxyMap();
793
		resultSet.refreshRow();
794
	}
795

    
796
	@Override
797
	public boolean relative(int rows) throws SQLException {
798
		newProxyMap();
799
		return resultSet.relative(rows);
800
	}
801

    
802
	@Override
803
	public boolean rowDeleted() throws SQLException {
804
		return resultSet.rowDeleted();
805
	}
806

    
807
	@Override
808
	public boolean rowInserted() throws SQLException {
809
		return resultSet.rowInserted();
810
	}
811

    
812
	@Override
813
	public boolean rowUpdated() throws SQLException {
814
		return resultSet.rowUpdated();
815
	}
816

    
817
	@Override
818
	public void setFetchDirection(int direction) throws SQLException {
819
		resultSet.setFetchDirection(direction);
820
	}
821

    
822
	@Override
823
	public void setFetchSize(int rows) throws SQLException {
824
		resultSet.setFetchSize(rows);
825
	}
826

    
827
	@Override
828
	public <T> T unwrap(Class<T> iface) throws SQLException {
829
		return resultSet.unwrap(iface);
830
	}
831

    
832
	@Override
833
	public void updateArray(int columnIndex, Array x) throws SQLException {
834
		resultSet.updateArray(columnIndex, x);
835
	}
836

    
837
	@Override
838
	public void updateArray(String columnLabel, Array x) throws SQLException {
839
		resultSet.updateArray(columnLabel, x);
840
	}
841

    
842
	@Override
843
	public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException {
844
		resultSet.updateAsciiStream(columnIndex, x, length);
845
	}
846

    
847
	@Override
848
	public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException {
849
		resultSet.updateAsciiStream(columnIndex, x, length);
850
	}
851

    
852
	@Override
853
	public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException {
854
		resultSet.updateAsciiStream(columnIndex, x);
855
	}
856

    
857
	@Override
858
	public void updateAsciiStream(String columnLabel, InputStream x, int length) throws SQLException {
859
		resultSet.updateAsciiStream(columnLabel, x, length);
860
	}
861

    
862
	@Override
863
	public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException {
864
		resultSet.updateAsciiStream(columnLabel, x, length);
865
	}
866

    
867
	@Override
868
	public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException {
869
		resultSet.updateAsciiStream(columnLabel, x);
870
	}
871

    
872
	@Override
873
	public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
874
		resultSet.updateBigDecimal(columnIndex, x);
875
	}
876

    
877
	@Override
878
	public void updateBigDecimal(String columnLabel, BigDecimal x) throws SQLException {
879
		resultSet.updateBigDecimal(columnLabel, x);
880
	}
881

    
882
	@Override
883
	public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException {
884
		resultSet.updateBinaryStream(columnIndex, x, length);
885
	}
886

    
887
	@Override
888
	public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException {
889
		resultSet.updateBinaryStream(columnIndex, x, length);
890
	}
891

    
892
	@Override
893
	public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {
894
		resultSet.updateBinaryStream(columnIndex, x);
895
	}
896

    
897
	@Override
898
	public void updateBinaryStream(String columnLabel, InputStream x, int length) throws SQLException {
899
		resultSet.updateBinaryStream(columnLabel, x, length);
900
	}
901

    
902
	@Override
903
	public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException {
904
		resultSet.updateBinaryStream(columnLabel, x, length);
905
	}
906

    
907
	@Override
908
	public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException {
909
		resultSet.updateBinaryStream(columnLabel, x);
910
	}
911

    
912
	@Override
913
	public void updateBlob(int columnIndex, Blob x) throws SQLException {
914
		resultSet.updateBlob(columnIndex, x);
915
	}
916

    
917
	@Override
918
	public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException {
919
		resultSet.updateBlob(columnIndex, inputStream, length);
920
	}
921

    
922
	@Override
923
	public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
924
		resultSet.updateBlob(columnIndex, inputStream);
925
	}
926

    
927
	@Override
928
	public void updateBlob(String columnLabel, Blob x) throws SQLException {
929
		resultSet.updateBlob(columnLabel, x);
930
	}
931

    
932
	@Override
933
	public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
934
		resultSet.updateBlob(columnLabel, inputStream, length);
935
	}
936

    
937
	@Override
938
	public void updateBlob(String columnLabel, InputStream inputStream)	throws SQLException {
939
		resultSet.updateBlob(columnLabel, inputStream);
940
	}
941

    
942
	@Override
943
	public void updateBoolean(int columnIndex, boolean x) throws SQLException {
944
		resultSet.updateBoolean(columnIndex, x);
945
	}
946

    
947
	@Override
948
	public void updateBoolean(String columnLabel, boolean x) throws SQLException {
949
		resultSet.updateBoolean(columnLabel, x);
950
	}
951

    
952
	@Override
953
	public void updateByte(int columnIndex, byte x) throws SQLException {
954
		resultSet.updateByte(columnIndex, x);
955
	}
956

    
957
	@Override
958
	public void updateByte(String columnLabel, byte x) throws SQLException {
959
		resultSet.updateByte(columnLabel, x);
960
	}
961

    
962
	@Override
963
	public void updateBytes(int columnIndex, byte[] x) throws SQLException {
964
		resultSet.updateBytes(columnIndex, x);
965
	}
966

    
967
	@Override
968
	public void updateBytes(String columnLabel, byte[] x) throws SQLException {
969
		resultSet.updateBytes(columnLabel, x);
970
	}
971

    
972
	@Override
973
	public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {
974
		resultSet.updateCharacterStream(columnIndex, x, length);
975
	}
976

    
977
	@Override
978
	public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
979
		resultSet.updateCharacterStream(columnIndex, x, length);
980
	}
981

    
982
	@Override
983
	public void updateCharacterStream(int columnIndex, Reader x) throws SQLException {
984
		resultSet.updateCharacterStream(columnIndex, x);
985
	}
986

    
987
	@Override
988
	public void updateCharacterStream(String columnLabel, Reader reader,
989
			int length) throws SQLException {
990
		resultSet.updateCharacterStream(columnLabel, reader, length);
991
	}
992

    
993
	@Override
994
	public void updateCharacterStream(String columnLabel, Reader reader,
995
			long length) throws SQLException {
996
		resultSet.updateCharacterStream(columnLabel, reader, length);
997
	}
998

    
999

    
1000
	/* (non-Javadoc)
1001
	 * @see java.sql.ResultSet#updateCharacterStream(java.lang.String, java.io.Reader)
1002
	 */
1003
	@Override
1004
	public void updateCharacterStream(String columnLabel, Reader reader)
1005
			throws SQLException {
1006
		resultSet.updateCharacterStream(columnLabel, reader);
1007
	}
1008

    
1009

    
1010
	/* (non-Javadoc)
1011
	 * @see java.sql.ResultSet#updateClob(int, java.sql.Clob)
1012
	 */
1013
	@Override
1014
	public void updateClob(int columnIndex, Clob x) throws SQLException {
1015
		resultSet.updateClob(columnIndex, x);
1016
	}
1017

    
1018

    
1019
	/* (non-Javadoc)
1020
	 * @see java.sql.ResultSet#updateClob(int, java.io.Reader, long)
1021
	 */
1022
	@Override
1023
	public void updateClob(int columnIndex, Reader reader, long length)
1024
			throws SQLException {
1025
		resultSet.updateClob(columnIndex, reader, length);
1026
	}
1027

    
1028

    
1029
	/* (non-Javadoc)
1030
	 * @see java.sql.ResultSet#updateClob(int, java.io.Reader)
1031
	 */
1032
	@Override
1033
	public void updateClob(int columnIndex, Reader reader) throws SQLException {
1034
		resultSet.updateClob(columnIndex, reader);
1035
	}
1036

    
1037

    
1038
	/* (non-Javadoc)
1039
	 * @see java.sql.ResultSet#updateClob(java.lang.String, java.sql.Clob)
1040
	 */
1041
	@Override
1042
	public void updateClob(String columnLabel, Clob x) throws SQLException {
1043
		resultSet.updateClob(columnLabel, x);
1044
	}
1045

    
1046

    
1047
	/* (non-Javadoc)
1048
	 * @see java.sql.ResultSet#updateClob(java.lang.String, java.io.Reader, long)
1049
	 */
1050
	@Override
1051
	public void updateClob(String columnLabel, Reader reader, long length)
1052
			throws SQLException {
1053
		resultSet.updateClob(columnLabel, reader, length);
1054
	}
1055

    
1056

    
1057
	/* (non-Javadoc)
1058
	 * @see java.sql.ResultSet#updateClob(java.lang.String, java.io.Reader)
1059
	 */
1060
	@Override
1061
	public void updateClob(String columnLabel, Reader reader)
1062
			throws SQLException {
1063
		resultSet.updateClob(columnLabel, reader);
1064
	}
1065

    
1066

    
1067
	/* (non-Javadoc)
1068
	 * @see java.sql.ResultSet#updateDate(int, java.sql.Date)
1069
	 */
1070
	@Override
1071
	public void updateDate(int columnIndex, Date x) throws SQLException {
1072
		resultSet.updateDate(columnIndex, x);
1073
	}
1074

    
1075

    
1076
	/* (non-Javadoc)
1077
	 * @see java.sql.ResultSet#updateDate(java.lang.String, java.sql.Date)
1078
	 */
1079
	@Override
1080
	public void updateDate(String columnLabel, Date x) throws SQLException {
1081
		resultSet.updateDate(columnLabel, x);
1082
	}
1083

    
1084

    
1085
	/* (non-Javadoc)
1086
	 * @see java.sql.ResultSet#updateDouble(int, double)
1087
	 */
1088
	@Override
1089
	public void updateDouble(int columnIndex, double x) throws SQLException {
1090
		resultSet.updateDouble(columnIndex, x);
1091
	}
1092

    
1093

    
1094
	/* (non-Javadoc)
1095
	 * @see java.sql.ResultSet#updateDouble(java.lang.String, double)
1096
	 */
1097
	@Override
1098
	public void updateDouble(String columnLabel, double x) throws SQLException {
1099
		resultSet.updateDouble(columnLabel, x);
1100
	}
1101

    
1102

    
1103
	/* (non-Javadoc)
1104
	 * @see java.sql.ResultSet#updateFloat(int, float)
1105
	 */
1106
	@Override
1107
	public void updateFloat(int columnIndex, float x) throws SQLException {
1108
		resultSet.updateFloat(columnIndex, x);
1109
	}
1110

    
1111

    
1112
	/* (non-Javadoc)
1113
	 * @see java.sql.ResultSet#updateFloat(java.lang.String, float)
1114
	 */
1115
	@Override
1116
	public void updateFloat(String columnLabel, float x) throws SQLException {
1117
		resultSet.updateFloat(columnLabel, x);
1118
	}
1119

    
1120

    
1121
	/* (non-Javadoc)
1122
	 * @see java.sql.ResultSet#updateInt(int, int)
1123
	 */
1124
	@Override
1125
	public void updateInt(int columnIndex, int x) throws SQLException {
1126
		resultSet.updateInt(columnIndex, x);
1127
	}
1128

    
1129

    
1130
	/* (non-Javadoc)
1131
	 * @see java.sql.ResultSet#updateInt(java.lang.String, int)
1132
	 */
1133
	@Override
1134
	public void updateInt(String columnLabel, int x) throws SQLException {
1135
		resultSet.updateInt(columnLabel, x);
1136
	}
1137

    
1138

    
1139
	/* (non-Javadoc)
1140
	 * @see java.sql.ResultSet#updateLong(int, long)
1141
	 */
1142
	@Override
1143
	public void updateLong(int columnIndex, long x) throws SQLException {
1144
		resultSet.updateLong(columnIndex, x);
1145
	}
1146

    
1147

    
1148
	/* (non-Javadoc)
1149
	 * @see java.sql.ResultSet#updateLong(java.lang.String, long)
1150
	 */
1151
	@Override
1152
	public void updateLong(String columnLabel, long x) throws SQLException {
1153
		resultSet.updateLong(columnLabel, x);
1154
	}
1155

    
1156

    
1157
	/* (non-Javadoc)
1158
	 * @see java.sql.ResultSet#updateNCharacterStream(int, java.io.Reader, long)
1159
	 */
1160
	@Override
1161
	public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
1162
		resultSet.updateNCharacterStream(columnIndex, x, length);
1163
	}
1164

    
1165

    
1166
	/* (non-Javadoc)
1167
	 * @see java.sql.ResultSet#updateNCharacterStream(int, java.io.Reader)
1168
	 */
1169
	@Override
1170
	public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException {
1171
		resultSet.updateNCharacterStream(columnIndex, x);
1172
	}
1173

    
1174

    
1175
	/* (non-Javadoc)
1176
	 * @see java.sql.ResultSet#updateNCharacterStream(java.lang.String, java.io.Reader, long)
1177
	 */
1178
	@Override
1179
	public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
1180
		resultSet.updateNCharacterStream(columnLabel, reader, length);
1181
	}
1182

    
1183

    
1184
	/* (non-Javadoc)
1185
	 * @see java.sql.ResultSet#updateNCharacterStream(java.lang.String, java.io.Reader)
1186
	 */
1187
	@Override
1188
	public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException {
1189
		resultSet.updateNCharacterStream(columnLabel, reader);
1190
	}
1191

    
1192

    
1193
	/* (non-Javadoc)
1194
	 * @see java.sql.ResultSet#updateNClob(int, java.sql.NClob)
1195
	 */
1196
	@Override
1197
	public void updateNClob(int columnIndex, NClob clob) throws SQLException {
1198
		resultSet.updateNClob(columnIndex, clob);
1199
	}
1200

    
1201

    
1202
	/* (non-Javadoc)
1203
	 * @see java.sql.ResultSet#updateNClob(int, java.io.Reader, long)
1204
	 */
1205
	@Override
1206
	public void updateNClob(int columnIndex, Reader reader, long length)
1207
			throws SQLException {
1208
		resultSet.updateNClob(columnIndex, reader, length);
1209
	}
1210

    
1211

    
1212
	/* (non-Javadoc)
1213
	 * @see java.sql.ResultSet#updateNClob(int, java.io.Reader)
1214
	 */
1215
	@Override
1216
	public void updateNClob(int columnIndex, Reader reader) throws SQLException {
1217
		resultSet.updateNClob(columnIndex, reader);
1218
	}
1219

    
1220

    
1221
	/* (non-Javadoc)
1222
	 * @see java.sql.ResultSet#updateNClob(java.lang.String, java.sql.NClob)
1223
	 */
1224
	@Override
1225
	public void updateNClob(String columnLabel, NClob clob) throws SQLException {
1226
		resultSet.updateNClob(columnLabel, clob);
1227
	}
1228

    
1229

    
1230
	/* (non-Javadoc)
1231
	 * @see java.sql.ResultSet#updateNClob(java.lang.String, java.io.Reader, long)
1232
	 */
1233
	@Override
1234
	public void updateNClob(String columnLabel, Reader reader, long length)
1235
			throws SQLException {
1236
		resultSet.updateNClob(columnLabel, reader, length);
1237
	}
1238

    
1239

    
1240
	/* (non-Javadoc)
1241
	 * @see java.sql.ResultSet#updateNClob(java.lang.String, java.io.Reader)
1242
	 */
1243
	@Override
1244
	public void updateNClob(String columnLabel, Reader reader)
1245
			throws SQLException {
1246
		resultSet.updateNClob(columnLabel, reader);
1247
	}
1248

    
1249

    
1250
	/* (non-Javadoc)
1251
	 * @see java.sql.ResultSet#updateNString(int, java.lang.String)
1252
	 */
1253
	@Override
1254
	public void updateNString(int columnIndex, String string)
1255
			throws SQLException {
1256
		resultSet.updateNString(columnIndex, string);
1257
	}
1258

    
1259

    
1260
	/* (non-Javadoc)
1261
	 * @see java.sql.ResultSet#updateNString(java.lang.String, java.lang.String)
1262
	 */
1263
	@Override
1264
	public void updateNString(String columnLabel, String string)
1265
			throws SQLException {
1266
		resultSet.updateNString(columnLabel, string);
1267
	}
1268

    
1269

    
1270
	/* (non-Javadoc)
1271
	 * @see java.sql.ResultSet#updateNull(int)
1272
	 */
1273
	@Override
1274
	public void updateNull(int columnIndex) throws SQLException {
1275
		resultSet.updateNull(columnIndex);
1276
	}
1277

    
1278

    
1279
	/* (non-Javadoc)
1280
	 * @see java.sql.ResultSet#updateNull(java.lang.String)
1281
	 */
1282
	@Override
1283
	public void updateNull(String columnLabel) throws SQLException {
1284
		resultSet.updateNull(columnLabel);
1285
	}
1286

    
1287

    
1288
	/* (non-Javadoc)
1289
	 * @see java.sql.ResultSet#updateObject(int, java.lang.Object, int)
1290
	 */
1291
	@Override
1292
	public void updateObject(int columnIndex, Object x, int scaleOrLength)
1293
			throws SQLException {
1294
		resultSet.updateObject(columnIndex, x, scaleOrLength);
1295
	}
1296

    
1297

    
1298
	/* (non-Javadoc)
1299
	 * @see java.sql.ResultSet#updateObject(int, java.lang.Object)
1300
	 */
1301
	@Override
1302
	public void updateObject(int columnIndex, Object x) throws SQLException {
1303
		resultSet.updateObject(columnIndex, x);
1304
	}
1305

    
1306

    
1307
	/* (non-Javadoc)
1308
	 * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object, int)
1309
	 */
1310
	@Override
1311
	public void updateObject(String columnLabel, Object x, int scaleOrLength)
1312
			throws SQLException {
1313
		resultSet.updateObject(columnLabel, x, scaleOrLength);
1314
	}
1315

    
1316

    
1317
	/* (non-Javadoc)
1318
	 * @see java.sql.ResultSet#updateObject(java.lang.String, java.lang.Object)
1319
	 */
1320
	@Override
1321
	public void updateObject(String columnLabel, Object x) throws SQLException {
1322
		resultSet.updateObject(columnLabel, x);
1323
	}
1324

    
1325

    
1326
	/* (non-Javadoc)
1327
	 * @see java.sql.ResultSet#updateRef(int, java.sql.Ref)
1328
	 */
1329
	@Override
1330
	public void updateRef(int columnIndex, Ref x) throws SQLException {
1331
		resultSet.updateRef(columnIndex, x);
1332
	}
1333

    
1334

    
1335
	/* (non-Javadoc)
1336
	 * @see java.sql.ResultSet#updateRef(java.lang.String, java.sql.Ref)
1337
	 */
1338
	@Override
1339
	public void updateRef(String columnLabel, Ref x) throws SQLException {
1340
		resultSet.updateRef(columnLabel, x);
1341
	}
1342

    
1343

    
1344
	/* (non-Javadoc)
1345
	 * @see java.sql.ResultSet#updateRow()
1346
	 */
1347
	@Override
1348
	public void updateRow() throws SQLException {
1349
		resultSet.updateRow();
1350
	}
1351

    
1352

    
1353
	/* (non-Javadoc)
1354
	 * @see java.sql.ResultSet#updateRowId(int, java.sql.RowId)
1355
	 */
1356
	@Override
1357
	public void updateRowId(int columnIndex, RowId x) throws SQLException {
1358
		resultSet.updateRowId(columnIndex, x);
1359
	}
1360

    
1361

    
1362
	/* (non-Javadoc)
1363
	 * @see java.sql.ResultSet#updateRowId(java.lang.String, java.sql.RowId)
1364
	 */
1365
	@Override
1366
	public void updateRowId(String columnLabel, RowId x) throws SQLException {
1367
		resultSet.updateRowId(columnLabel, x);
1368
	}
1369

    
1370

    
1371
	@Override public void updateShort(int columnIndex, short x) throws SQLException {
1372
		resultSet.updateShort(columnIndex, x);
1373
	}
1374

    
1375

    
1376
	/* (non-Javadoc)
1377
	 * @see java.sql.ResultSet#updateShort(java.lang.String, short)
1378
	 */
1379
	@Override
1380
	public void updateShort(String columnLabel, short x) throws SQLException {
1381
		resultSet.updateShort(columnLabel, x);
1382
	}
1383

    
1384

    
1385
	/* (non-Javadoc)
1386
	 * @see java.sql.ResultSet#updateSQLXML(int, java.sql.SQLXML)
1387
	 */
1388
	@Override
1389
	public void updateSQLXML(int columnIndex, SQLXML xmlObject)
1390
			throws SQLException {
1391
		resultSet.updateSQLXML(columnIndex, xmlObject);
1392
	}
1393

    
1394
	@Override
1395
	public void updateSQLXML(String columnLabel, SQLXML xmlObject)
1396
			throws SQLException {
1397
		resultSet.updateSQLXML(columnLabel, xmlObject);
1398
	}
1399

    
1400
	@Override
1401
	public void updateString(int columnIndex, String x) throws SQLException {
1402
		resultSet.updateString(columnIndex, x);
1403
	}
1404

    
1405
	@Override
1406
	public void updateString(String columnLabel, String x) throws SQLException {
1407
		resultSet.updateString(columnLabel, x);
1408
	}
1409

    
1410
	@Override
1411
	public void updateTime(int columnIndex, Time x) throws SQLException {
1412
		resultSet.updateTime(columnIndex, x);
1413
	}
1414

    
1415
	@Override
1416
	public void updateTime(String columnLabel, Time x) throws SQLException {
1417
		resultSet.updateTime(columnLabel, x);
1418
	}
1419

    
1420
	@Override
1421
	public void updateTimestamp(int columnIndex, Timestamp x)
1422
			throws SQLException {
1423
		resultSet.updateTimestamp(columnIndex, x);
1424
	}
1425

    
1426
	@Override
1427
	public void updateTimestamp(String columnLabel, Timestamp x)
1428
			throws SQLException {
1429
		resultSet.updateTimestamp(columnLabel, x);
1430
	}
1431

    
1432
	@Override
1433
	public boolean wasNull() throws SQLException {
1434
		return resultSet.wasNull();
1435
	}
1436

    
1437
	// added for compatibility with Java 7
1438
	@Override
1439
    public <T> T getObject(int arg0, Class<T> arg1) throws SQLException {
1440
		// TODO Auto-generated method stub
1441
		return null;
1442
	}
1443

    
1444
	// added for compatibility with Java 7
1445
	@Override
1446
    public <T> T getObject(String arg0, Class<T> arg1) throws SQLException {
1447
		// TODO Auto-generated method stub
1448
		return null;
1449
	}
1450
}
(52-52/65)