OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 144 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
17 ilm 1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of the GNU General Public License Version 3
7
 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
8
 * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
9
 * language governing permissions and limitations under the License.
10
 *
11
 * When distributing the software, include this License Header Notice in each file.
12
 */
144 ilm 13
 
14
 package org.openconcerto.sql.model;
17 ilm 15
 
180 ilm 16
import org.openconcerto.utils.cc.CachedTransformer;
17
 
17 ilm 18
import java.io.InputStream;
19
import java.io.Reader;
20
import java.math.BigDecimal;
21
import java.net.URL;
22
import java.sql.Array;
23
import java.sql.Blob;
24
import java.sql.Clob;
25
import java.sql.Date;
26
import java.sql.NClob;
27
import java.sql.Ref;
28
import java.sql.ResultSet;
29
import java.sql.ResultSetMetaData;
30
import java.sql.RowId;
31
import java.sql.SQLException;
32
import java.sql.SQLWarning;
33
import java.sql.SQLXML;
34
import java.sql.Statement;
35
import java.sql.Time;
36
import java.sql.Timestamp;
37
import java.util.Calendar;
38
import java.util.HashMap;
39
import java.util.Map;
40
 
41
/**
144 ilm 42
 * A resultSet that wraps onto another one, caching name to index translation, and using a
43
 * ResultSetFullnameHelper.
17 ilm 44
 *
45
 * @author Sylvain
46
 */
47
public class SQLResultSet implements ResultSet {
48
 
144 ilm 49
    static public final <T> T getValue(final ResultSet rs, final Class<T> clz, final int columnIndex) throws SQLException {
50
        final Object res;
51
        if (clz == Object.class)
52
            res = rs.getObject(columnIndex);
53
        else if (Integer.class.isAssignableFrom(clz))
54
            res = rs.getInt(columnIndex);
55
        else if (Long.class.isAssignableFrom(clz))
56
            res = rs.getLong(columnIndex);
57
        else if (String.class.isAssignableFrom(clz))
58
            res = rs.getString(columnIndex);
59
        else if (Boolean.class.isAssignableFrom(clz))
60
            res = rs.getBoolean(columnIndex);
61
        else if (java.sql.Date.class.isAssignableFrom(clz))
62
            res = rs.getDate(columnIndex);
63
        else if (java.util.Date.class.isAssignableFrom(clz))
64
            res = rs.getTimestamp(columnIndex);
65
        else if (Short.class.isAssignableFrom(clz))
66
            res = rs.getShort(columnIndex);
67
        else if (Byte.class.isAssignableFrom(clz))
68
            res = rs.getByte(columnIndex);
69
        else if (Double.class.isAssignableFrom(clz))
70
            res = rs.getDouble(columnIndex);
71
        else if (Float.class.isAssignableFrom(clz))
72
            res = rs.getFloat(columnIndex);
73
        else if (Time.class.isAssignableFrom(clz))
74
            res = rs.getTime(columnIndex);
75
        else
76
            res = rs.getObject(columnIndex);
77
        return clz.cast(res);
78
    }
17 ilm 79
 
144 ilm 80
    static public final <T> T getValue(final ResultSet rs, final Class<T> clz, final String columnLabel) throws SQLException {
81
        final Object res;
82
        if (clz == Object.class)
83
            res = rs.getObject(columnLabel);
84
        else if (Integer.class.isAssignableFrom(clz))
85
            res = rs.getInt(columnLabel);
86
        else if (Long.class.isAssignableFrom(clz))
87
            res = rs.getLong(columnLabel);
88
        else if (String.class.isAssignableFrom(clz))
89
            res = rs.getString(columnLabel);
90
        else if (Boolean.class.isAssignableFrom(clz))
91
            res = rs.getBoolean(columnLabel);
92
        else if (java.sql.Date.class.isAssignableFrom(clz))
93
            res = rs.getDate(columnLabel);
94
        else if (java.util.Date.class.isAssignableFrom(clz))
95
            res = rs.getTimestamp(columnLabel);
96
        else if (Short.class.isAssignableFrom(clz))
97
            res = rs.getShort(columnLabel);
98
        else if (Byte.class.isAssignableFrom(clz))
99
            res = rs.getByte(columnLabel);
100
        else if (Double.class.isAssignableFrom(clz))
101
            res = rs.getDouble(columnLabel);
102
        else if (Float.class.isAssignableFrom(clz))
103
            res = rs.getFloat(columnLabel);
104
        else if (Time.class.isAssignableFrom(clz))
105
            res = rs.getTime(columnLabel);
106
        else
107
            res = rs.getObject(columnLabel);
108
        return clz.cast(res);
109
    }
17 ilm 110
 
144 ilm 111
    static public final int getRowProcessedCount(final ResultSet rs) {
112
        if (rs instanceof SQLResultSet) {
113
            return ((SQLResultSet) rs).getRowProcessedCount();
114
        } else {
115
            // ResultSet.getRow() always return 0 after the last row
116
            return 0;
117
        }
118
    }
17 ilm 119
 
144 ilm 120
    private final ResultSet delegate;
121
    private final ResultSetFullnameHelper helper;
180 ilm 122
    private final CachedTransformer<String, Integer, SQLException> indexes;
144 ilm 123
    private int rowProcessedCount;
17 ilm 124
 
144 ilm 125
    public SQLResultSet(ResultSet delegate) {
126
        this.delegate = delegate;
127
        this.helper = new ResultSetFullnameHelper(this);
180 ilm 128
        this.indexes = new CachedTransformer<>(new HashMap<>(), this::doFindColumn);
144 ilm 129
    }
17 ilm 130
 
144 ilm 131
    private ResultSet getDelegate() {
132
        return this.delegate;
133
    }
17 ilm 134
 
144 ilm 135
    public boolean absolute(int row) throws SQLException {
136
        return getDelegate().absolute(row);
137
    }
17 ilm 138
 
144 ilm 139
    public void afterLast() throws SQLException {
140
        getDelegate().afterLast();
141
    }
17 ilm 142
 
144 ilm 143
    public void beforeFirst() throws SQLException {
144
        getDelegate().beforeFirst();
145
    }
17 ilm 146
 
144 ilm 147
    public void cancelRowUpdates() throws SQLException {
148
        getDelegate().cancelRowUpdates();
149
    }
17 ilm 150
 
144 ilm 151
    public void clearWarnings() throws SQLException {
152
        getDelegate().clearWarnings();
153
    }
17 ilm 154
 
144 ilm 155
    public void close() throws SQLException {
156
        getDelegate().close();
157
    }
17 ilm 158
 
144 ilm 159
    public void deleteRow() throws SQLException {
160
        getDelegate().deleteRow();
161
    }
17 ilm 162
 
144 ilm 163
    public int findColumn(String columnName) throws SQLException {
180 ilm 164
        final int index = this.indexes.get(columnName).intValue();
165
        if (index < 1)
166
            throw new SQLException(columnName + " not found");
167
        else
168
            return index;
144 ilm 169
    }
17 ilm 170
 
144 ilm 171
    private int doFindColumn(String columnName) throws SQLException {
172
        try {
173
            return getDelegate().findColumn(columnName);
174
        } catch (SQLException e) {
175
            try {
176
                return this.helper.getIndex(columnName);
177
            } catch (Exception exn) {
178
                throw e;
179
            }
180
        }
181
    }
17 ilm 182
 
144 ilm 183
    public boolean first() throws SQLException {
184
        return getDelegate().first();
185
    }
17 ilm 186
 
144 ilm 187
    public Array getArray(int i) throws SQLException {
188
        return getDelegate().getArray(i);
189
    }
17 ilm 190
 
144 ilm 191
    public Array getArray(String colName) throws SQLException {
192
        return getDelegate().getArray(colName);
193
    }
17 ilm 194
 
144 ilm 195
    public InputStream getAsciiStream(int columnIndex) throws SQLException {
196
        return getDelegate().getAsciiStream(columnIndex);
197
    }
17 ilm 198
 
144 ilm 199
    public InputStream getAsciiStream(String columnName) throws SQLException {
200
        return getDelegate().getAsciiStream(this.findColumn(columnName));
201
    }
17 ilm 202
 
144 ilm 203
    public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {
204
        return getDelegate().getBigDecimal(columnIndex, scale);
205
    }
17 ilm 206
 
144 ilm 207
    public BigDecimal getBigDecimal(int columnIndex) throws SQLException {
208
        return getDelegate().getBigDecimal(columnIndex);
209
    }
17 ilm 210
 
144 ilm 211
    public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException {
212
        return getDelegate().getBigDecimal(columnName, scale);
213
    }
17 ilm 214
 
144 ilm 215
    public BigDecimal getBigDecimal(String columnName) throws SQLException {
216
        return getDelegate().getBigDecimal(this.findColumn(columnName));
217
    }
17 ilm 218
 
144 ilm 219
    public InputStream getBinaryStream(int columnIndex) throws SQLException {
220
        return getDelegate().getBinaryStream(columnIndex);
221
    }
17 ilm 222
 
144 ilm 223
    public InputStream getBinaryStream(String columnName) throws SQLException {
224
        return getDelegate().getBinaryStream(this.findColumn(columnName));
225
    }
17 ilm 226
 
144 ilm 227
    public Blob getBlob(int i) throws SQLException {
228
        return getDelegate().getBlob(i);
229
    }
17 ilm 230
 
144 ilm 231
    public Blob getBlob(String colName) throws SQLException {
232
        return getDelegate().getBlob(colName);
233
    }
17 ilm 234
 
144 ilm 235
    public boolean getBoolean(int columnIndex) throws SQLException {
236
        return getDelegate().getBoolean(columnIndex);
237
    }
17 ilm 238
 
144 ilm 239
    public boolean getBoolean(String columnName) throws SQLException {
240
        return getDelegate().getBoolean(this.findColumn(columnName));
241
    }
17 ilm 242
 
144 ilm 243
    public byte getByte(int columnIndex) throws SQLException {
244
        return getDelegate().getByte(columnIndex);
245
    }
17 ilm 246
 
144 ilm 247
    public byte getByte(String columnName) throws SQLException {
248
        return getDelegate().getByte(this.findColumn(columnName));
249
    }
17 ilm 250
 
144 ilm 251
    public byte[] getBytes(int columnIndex) throws SQLException {
252
        return getDelegate().getBytes(columnIndex);
253
    }
17 ilm 254
 
144 ilm 255
    public byte[] getBytes(String columnName) throws SQLException {
256
        return getDelegate().getBytes(this.findColumn(columnName));
257
    }
17 ilm 258
 
144 ilm 259
    public Reader getCharacterStream(int columnIndex) throws SQLException {
260
        return getDelegate().getCharacterStream(columnIndex);
261
    }
17 ilm 262
 
144 ilm 263
    public Reader getCharacterStream(String columnName) throws SQLException {
264
        return getDelegate().getCharacterStream(this.findColumn(columnName));
265
    }
17 ilm 266
 
144 ilm 267
    public Clob getClob(int i) throws SQLException {
268
        return getDelegate().getClob(i);
269
    }
17 ilm 270
 
144 ilm 271
    public Clob getClob(String colName) throws SQLException {
272
        return getDelegate().getClob(colName);
273
    }
17 ilm 274
 
144 ilm 275
    public int getConcurrency() throws SQLException {
276
        return getDelegate().getConcurrency();
277
    }
17 ilm 278
 
144 ilm 279
    public String getCursorName() throws SQLException {
280
        return getDelegate().getCursorName();
281
    }
17 ilm 282
 
144 ilm 283
    public Date getDate(int columnIndex, Calendar cal) throws SQLException {
284
        return getDelegate().getDate(columnIndex, cal);
285
    }
17 ilm 286
 
144 ilm 287
    public Date getDate(int columnIndex) throws SQLException {
288
        return getDelegate().getDate(columnIndex);
289
    }
17 ilm 290
 
144 ilm 291
    public Date getDate(String columnName, Calendar cal) throws SQLException {
292
        return getDelegate().getDate(columnName, cal);
293
    }
17 ilm 294
 
144 ilm 295
    public Date getDate(String columnName) throws SQLException {
296
        return getDelegate().getDate(this.findColumn(columnName));
297
    }
17 ilm 298
 
144 ilm 299
    public double getDouble(int columnIndex) throws SQLException {
300
        return getDelegate().getDouble(columnIndex);
301
    }
17 ilm 302
 
144 ilm 303
    public double getDouble(String columnName) throws SQLException {
304
        return getDelegate().getDouble(this.findColumn(columnName));
305
    }
17 ilm 306
 
144 ilm 307
    public int getFetchDirection() throws SQLException {
308
        return getDelegate().getFetchDirection();
309
    }
17 ilm 310
 
144 ilm 311
    public int getFetchSize() throws SQLException {
312
        return getDelegate().getFetchSize();
313
    }
17 ilm 314
 
144 ilm 315
    public float getFloat(int columnIndex) throws SQLException {
316
        return getDelegate().getFloat(columnIndex);
317
    }
17 ilm 318
 
144 ilm 319
    public float getFloat(String columnName) throws SQLException {
320
        return getDelegate().getFloat(this.findColumn(columnName));
321
    }
17 ilm 322
 
144 ilm 323
    public int getInt(int columnIndex) throws SQLException {
324
        return getDelegate().getInt(columnIndex);
325
    }
17 ilm 326
 
144 ilm 327
    public int getInt(String columnName) throws SQLException {
328
        return getDelegate().getInt(this.findColumn(columnName));
329
    }
17 ilm 330
 
144 ilm 331
    public long getLong(int columnIndex) throws SQLException {
332
        return getDelegate().getLong(columnIndex);
333
    }
17 ilm 334
 
144 ilm 335
    public long getLong(String columnName) throws SQLException {
336
        return getDelegate().getLong(this.findColumn(columnName));
337
    }
17 ilm 338
 
144 ilm 339
    public ResultSetMetaData getMetaData() throws SQLException {
340
        return new SQLResultSetMetadata(getDelegate().getMetaData());
341
    }
17 ilm 342
 
144 ilm 343
    public Object getObject(int arg0, Map arg1) throws SQLException {
344
        return getDelegate().getObject(arg0, arg1);
345
    }
17 ilm 346
 
144 ilm 347
    public Object getObject(int columnIndex) throws SQLException {
348
        return getDelegate().getObject(columnIndex);
349
    }
17 ilm 350
 
144 ilm 351
    public Object getObject(String arg0, Map arg1) throws SQLException {
352
        return getDelegate().getObject(arg0, arg1);
353
    }
17 ilm 354
 
144 ilm 355
    public Object getObject(String columnName) throws SQLException {
356
        return getDelegate().getObject(this.findColumn(columnName));
357
    }
17 ilm 358
 
144 ilm 359
    public Ref getRef(int i) throws SQLException {
360
        return getDelegate().getRef(i);
361
    }
17 ilm 362
 
144 ilm 363
    public Ref getRef(String colName) throws SQLException {
364
        return getDelegate().getRef(colName);
365
    }
17 ilm 366
 
144 ilm 367
    public int getRow() throws SQLException {
368
        return getDelegate().getRow();
369
    }
17 ilm 370
 
144 ilm 371
    public short getShort(int columnIndex) throws SQLException {
372
        return getDelegate().getShort(columnIndex);
373
    }
17 ilm 374
 
144 ilm 375
    public short getShort(String columnName) throws SQLException {
376
        return getDelegate().getShort(this.findColumn(columnName));
377
    }
17 ilm 378
 
144 ilm 379
    public Statement getStatement() throws SQLException {
380
        return getDelegate().getStatement();
381
    }
17 ilm 382
 
144 ilm 383
    public String getString(int columnIndex) throws SQLException {
384
        return getDelegate().getString(columnIndex);
385
    }
17 ilm 386
 
144 ilm 387
    public String getString(String columnName) throws SQLException {
388
        return getDelegate().getString(this.findColumn(columnName));
389
    }
17 ilm 390
 
144 ilm 391
    public Time getTime(int columnIndex, Calendar cal) throws SQLException {
392
        return getDelegate().getTime(columnIndex, cal);
393
    }
17 ilm 394
 
144 ilm 395
    public Time getTime(int columnIndex) throws SQLException {
396
        return getDelegate().getTime(columnIndex);
397
    }
17 ilm 398
 
144 ilm 399
    public Time getTime(String columnName, Calendar cal) throws SQLException {
400
        return getDelegate().getTime(columnName, cal);
401
    }
17 ilm 402
 
144 ilm 403
    public Time getTime(String columnName) throws SQLException {
404
        return getDelegate().getTime(this.findColumn(columnName));
405
    }
17 ilm 406
 
144 ilm 407
    public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException {
408
        return getDelegate().getTimestamp(columnIndex, cal);
409
    }
17 ilm 410
 
144 ilm 411
    public Timestamp getTimestamp(int columnIndex) throws SQLException {
412
        return getDelegate().getTimestamp(columnIndex);
413
    }
17 ilm 414
 
144 ilm 415
    public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException {
416
        return getDelegate().getTimestamp(columnName, cal);
417
    }
17 ilm 418
 
144 ilm 419
    public Timestamp getTimestamp(String columnName) throws SQLException {
420
        return getDelegate().getTimestamp(this.findColumn(columnName));
421
    }
17 ilm 422
 
144 ilm 423
    public int getType() throws SQLException {
424
        return getDelegate().getType();
425
    }
17 ilm 426
 
144 ilm 427
    public InputStream getUnicodeStream(int columnIndex) throws SQLException {
428
        return getDelegate().getUnicodeStream(columnIndex);
429
    }
17 ilm 430
 
144 ilm 431
    public InputStream getUnicodeStream(String columnName) throws SQLException {
432
        return getDelegate().getUnicodeStream(this.findColumn(columnName));
433
    }
17 ilm 434
 
144 ilm 435
    public URL getURL(int columnIndex) throws SQLException {
436
        return getDelegate().getURL(columnIndex);
437
    }
17 ilm 438
 
144 ilm 439
    public URL getURL(String columnName) throws SQLException {
440
        return getDelegate().getURL(this.findColumn(columnName));
441
    }
17 ilm 442
 
144 ilm 443
    // **
17 ilm 444
 
144 ilm 445
    public SQLWarning getWarnings() throws SQLException {
446
        return getDelegate().getWarnings();
447
    }
17 ilm 448
 
144 ilm 449
    public void insertRow() throws SQLException {
450
        getDelegate().insertRow();
451
    }
17 ilm 452
 
144 ilm 453
    public boolean isAfterLast() throws SQLException {
454
        return getDelegate().isAfterLast();
455
    }
17 ilm 456
 
144 ilm 457
    public boolean isBeforeFirst() throws SQLException {
458
        return getDelegate().isBeforeFirst();
459
    }
17 ilm 460
 
144 ilm 461
    public boolean isFirst() throws SQLException {
462
        return getDelegate().isFirst();
463
    }
17 ilm 464
 
144 ilm 465
    public boolean isLast() throws SQLException {
466
        return getDelegate().isLast();
467
    }
17 ilm 468
 
144 ilm 469
    public boolean last() throws SQLException {
470
        return getDelegate().last();
471
    }
17 ilm 472
 
144 ilm 473
    public void moveToCurrentRow() throws SQLException {
474
        getDelegate().moveToCurrentRow();
475
    }
17 ilm 476
 
144 ilm 477
    public void moveToInsertRow() throws SQLException {
478
        getDelegate().moveToInsertRow();
479
    }
17 ilm 480
 
144 ilm 481
    public boolean next() throws SQLException {
482
        rowProcessedCount++;
483
        return getDelegate().next();
484
    }
17 ilm 485
 
144 ilm 486
    public int getRowProcessedCount() {
487
        return rowProcessedCount;
488
    }
17 ilm 489
 
144 ilm 490
    public boolean previous() throws SQLException {
491
        return getDelegate().previous();
492
    }
17 ilm 493
 
144 ilm 494
    public void refreshRow() throws SQLException {
495
        getDelegate().refreshRow();
496
    }
17 ilm 497
 
144 ilm 498
    public boolean relative(int rows) throws SQLException {
499
        return getDelegate().relative(rows);
500
    }
17 ilm 501
 
144 ilm 502
    public boolean rowDeleted() throws SQLException {
503
        return getDelegate().rowDeleted();
504
    }
17 ilm 505
 
144 ilm 506
    public boolean rowInserted() throws SQLException {
507
        return getDelegate().rowInserted();
508
    }
17 ilm 509
 
144 ilm 510
    public boolean rowUpdated() throws SQLException {
511
        return getDelegate().rowUpdated();
512
    }
17 ilm 513
 
144 ilm 514
    public void setFetchDirection(int direction) throws SQLException {
515
        getDelegate().setFetchDirection(direction);
516
    }
17 ilm 517
 
144 ilm 518
    public void setFetchSize(int rows) throws SQLException {
519
        getDelegate().setFetchSize(rows);
520
    }
17 ilm 521
 
144 ilm 522
    // update*
17 ilm 523
 
144 ilm 524
    public void updateArray(int columnIndex, Array x) throws SQLException {
525
        getDelegate().updateArray(columnIndex, x);
526
    }
17 ilm 527
 
144 ilm 528
    public void updateArray(String columnName, Array x) throws SQLException {
529
        getDelegate().updateArray(columnName, x);
530
    }
17 ilm 531
 
144 ilm 532
    public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException {
533
        getDelegate().updateAsciiStream(columnIndex, x, length);
534
    }
17 ilm 535
 
144 ilm 536
    public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException {
537
        getDelegate().updateAsciiStream(columnName, x, length);
538
    }
17 ilm 539
 
144 ilm 540
    public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException {
541
        getDelegate().updateBigDecimal(columnIndex, x);
542
    }
17 ilm 543
 
144 ilm 544
    public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException {
545
        getDelegate().updateBigDecimal(columnName, x);
546
    }
17 ilm 547
 
144 ilm 548
    public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException {
549
        getDelegate().updateBinaryStream(columnIndex, x, length);
550
    }
17 ilm 551
 
144 ilm 552
    public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException {
553
        getDelegate().updateBinaryStream(columnName, x, length);
554
    }
17 ilm 555
 
144 ilm 556
    public void updateBlob(int columnIndex, Blob x) throws SQLException {
557
        getDelegate().updateBlob(columnIndex, x);
558
    }
17 ilm 559
 
144 ilm 560
    public void updateBlob(String columnName, Blob x) throws SQLException {
561
        getDelegate().updateBlob(columnName, x);
562
    }
17 ilm 563
 
144 ilm 564
    public void updateBoolean(int columnIndex, boolean x) throws SQLException {
565
        getDelegate().updateBoolean(columnIndex, x);
566
    }
17 ilm 567
 
144 ilm 568
    public void updateBoolean(String columnName, boolean x) throws SQLException {
569
        getDelegate().updateBoolean(columnName, x);
570
    }
17 ilm 571
 
144 ilm 572
    public void updateByte(int columnIndex, byte x) throws SQLException {
573
        getDelegate().updateByte(columnIndex, x);
574
    }
17 ilm 575
 
144 ilm 576
    public void updateByte(String columnName, byte x) throws SQLException {
577
        getDelegate().updateByte(columnName, x);
578
    }
17 ilm 579
 
144 ilm 580
    public void updateBytes(int columnIndex, byte[] x) throws SQLException {
581
        getDelegate().updateBytes(columnIndex, x);
582
    }
17 ilm 583
 
144 ilm 584
    public void updateBytes(String columnName, byte[] x) throws SQLException {
585
        getDelegate().updateBytes(columnName, x);
586
    }
17 ilm 587
 
144 ilm 588
    public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException {
589
        getDelegate().updateCharacterStream(columnIndex, x, length);
590
    }
17 ilm 591
 
144 ilm 592
    public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException {
593
        getDelegate().updateCharacterStream(columnName, reader, length);
594
    }
17 ilm 595
 
144 ilm 596
    public void updateClob(int columnIndex, Clob x) throws SQLException {
597
        getDelegate().updateClob(columnIndex, x);
598
    }
17 ilm 599
 
144 ilm 600
    public void updateClob(String columnName, Clob x) throws SQLException {
601
        getDelegate().updateClob(columnName, x);
602
    }
17 ilm 603
 
144 ilm 604
    public void updateDate(int columnIndex, Date x) throws SQLException {
605
        getDelegate().updateDate(columnIndex, x);
606
    }
17 ilm 607
 
144 ilm 608
    public void updateDate(String columnName, Date x) throws SQLException {
609
        getDelegate().updateDate(columnName, x);
610
    }
17 ilm 611
 
144 ilm 612
    public void updateDouble(int columnIndex, double x) throws SQLException {
613
        getDelegate().updateDouble(columnIndex, x);
614
    }
17 ilm 615
 
144 ilm 616
    public void updateDouble(String columnName, double x) throws SQLException {
617
        getDelegate().updateDouble(columnName, x);
618
    }
17 ilm 619
 
144 ilm 620
    public void updateFloat(int columnIndex, float x) throws SQLException {
621
        getDelegate().updateFloat(columnIndex, x);
622
    }
17 ilm 623
 
144 ilm 624
    public void updateFloat(String columnName, float x) throws SQLException {
625
        getDelegate().updateFloat(columnName, x);
626
    }
17 ilm 627
 
144 ilm 628
    public void updateInt(int columnIndex, int x) throws SQLException {
629
        getDelegate().updateInt(columnIndex, x);
630
    }
17 ilm 631
 
144 ilm 632
    public void updateInt(String columnName, int x) throws SQLException {
633
        getDelegate().updateInt(columnName, x);
634
    }
17 ilm 635
 
144 ilm 636
    public void updateLong(int columnIndex, long x) throws SQLException {
637
        getDelegate().updateLong(columnIndex, x);
638
    }
17 ilm 639
 
144 ilm 640
    public void updateLong(String columnName, long x) throws SQLException {
641
        getDelegate().updateLong(columnName, x);
642
    }
17 ilm 643
 
144 ilm 644
    public void updateNull(int columnIndex) throws SQLException {
645
        getDelegate().updateNull(columnIndex);
646
    }
17 ilm 647
 
144 ilm 648
    public void updateNull(String columnName) throws SQLException {
649
        getDelegate().updateNull(columnName);
650
    }
17 ilm 651
 
144 ilm 652
    public void updateObject(int columnIndex, Object x, int scale) throws SQLException {
653
        getDelegate().updateObject(columnIndex, x, scale);
654
    }
17 ilm 655
 
144 ilm 656
    public void updateObject(int columnIndex, Object x) throws SQLException {
657
        getDelegate().updateObject(columnIndex, x);
658
    }
17 ilm 659
 
144 ilm 660
    public void updateObject(String columnName, Object x, int scale) throws SQLException {
661
        getDelegate().updateObject(columnName, x, scale);
662
    }
17 ilm 663
 
144 ilm 664
    public void updateObject(String columnName, Object x) throws SQLException {
665
        getDelegate().updateObject(columnName, x);
666
    }
17 ilm 667
 
144 ilm 668
    public void updateRef(int columnIndex, Ref x) throws SQLException {
669
        getDelegate().updateRef(columnIndex, x);
670
    }
17 ilm 671
 
144 ilm 672
    public void updateRef(String columnName, Ref x) throws SQLException {
673
        getDelegate().updateRef(columnName, x);
674
    }
17 ilm 675
 
144 ilm 676
    public void updateRow() throws SQLException {
677
        getDelegate().updateRow();
678
    }
17 ilm 679
 
144 ilm 680
    public void updateShort(int columnIndex, short x) throws SQLException {
681
        getDelegate().updateShort(columnIndex, x);
682
    }
17 ilm 683
 
144 ilm 684
    public void updateShort(String columnName, short x) throws SQLException {
685
        getDelegate().updateShort(columnName, x);
686
    }
17 ilm 687
 
144 ilm 688
    public void updateString(int columnIndex, String x) throws SQLException {
689
        getDelegate().updateString(columnIndex, x);
690
    }
17 ilm 691
 
144 ilm 692
    public void updateString(String columnName, String x) throws SQLException {
693
        getDelegate().updateString(columnName, x);
694
    }
17 ilm 695
 
144 ilm 696
    public void updateTime(int columnIndex, Time x) throws SQLException {
697
        getDelegate().updateTime(columnIndex, x);
698
    }
17 ilm 699
 
144 ilm 700
    public void updateTime(String columnName, Time x) throws SQLException {
701
        getDelegate().updateTime(columnName, x);
702
    }
17 ilm 703
 
144 ilm 704
    public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException {
705
        getDelegate().updateTimestamp(columnIndex, x);
706
    }
17 ilm 707
 
144 ilm 708
    public void updateTimestamp(String columnName, Timestamp x) throws SQLException {
709
        getDelegate().updateTimestamp(columnName, x);
710
    }
17 ilm 711
 
144 ilm 712
    public boolean wasNull() throws SQLException {
713
        return getDelegate().wasNull();
714
    }
17 ilm 715
 
144 ilm 716
    public int getHoldability() throws SQLException {
717
        return getDelegate().getHoldability();
718
    }
17 ilm 719
 
144 ilm 720
    public Reader getNCharacterStream(int columnIndex) throws SQLException {
721
        return getDelegate().getNCharacterStream(columnIndex);
722
    }
17 ilm 723
 
144 ilm 724
    public Reader getNCharacterStream(String columnLabel) throws SQLException {
725
        return getDelegate().getNCharacterStream(columnLabel);
726
    }
17 ilm 727
 
144 ilm 728
    public NClob getNClob(int columnIndex) throws SQLException {
729
        return getDelegate().getNClob(columnIndex);
730
    }
17 ilm 731
 
144 ilm 732
    public NClob getNClob(String columnLabel) throws SQLException {
733
        return getDelegate().getNClob(columnLabel);
734
    }
17 ilm 735
 
144 ilm 736
    public String getNString(int columnIndex) throws SQLException {
737
        return getDelegate().getNString(columnIndex);
738
    }
17 ilm 739
 
144 ilm 740
    public String getNString(String columnLabel) throws SQLException {
741
        return getDelegate().getNString(columnLabel);
742
    }
17 ilm 743
 
144 ilm 744
    public RowId getRowId(int columnIndex) throws SQLException {
745
        return getDelegate().getRowId(columnIndex);
746
    }
17 ilm 747
 
144 ilm 748
    public RowId getRowId(String columnLabel) throws SQLException {
749
        return getDelegate().getRowId(columnLabel);
750
    }
17 ilm 751
 
144 ilm 752
    public SQLXML getSQLXML(int columnIndex) throws SQLException {
753
        return getDelegate().getSQLXML(columnIndex);
754
    }
17 ilm 755
 
144 ilm 756
    public SQLXML getSQLXML(String columnLabel) throws SQLException {
757
        return getDelegate().getSQLXML(columnLabel);
758
    }
17 ilm 759
 
144 ilm 760
    public boolean isClosed() throws SQLException {
761
        return getDelegate().isClosed();
762
    }
17 ilm 763
 
144 ilm 764
    public boolean isWrapperFor(Class<?> iface) throws SQLException {
765
        return getDelegate().isWrapperFor(iface);
766
    }
17 ilm 767
 
144 ilm 768
    public <T> T unwrap(Class<T> iface) throws SQLException {
769
        return getDelegate().unwrap(iface);
770
    }
17 ilm 771
 
144 ilm 772
    public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException {
773
        getDelegate().updateAsciiStream(columnIndex, x, length);
774
    }
17 ilm 775
 
144 ilm 776
    public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException {
777
        getDelegate().updateAsciiStream(columnIndex, x);
778
    }
17 ilm 779
 
144 ilm 780
    public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException {
781
        getDelegate().updateAsciiStream(columnLabel, x, length);
782
    }
17 ilm 783
 
144 ilm 784
    public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException {
785
        getDelegate().updateAsciiStream(columnLabel, x);
786
    }
17 ilm 787
 
144 ilm 788
    public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException {
789
        getDelegate().updateBinaryStream(columnIndex, x, length);
790
    }
17 ilm 791
 
144 ilm 792
    public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {
793
        getDelegate().updateBinaryStream(columnIndex, x);
794
    }
17 ilm 795
 
144 ilm 796
    public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException {
797
        getDelegate().updateBinaryStream(columnLabel, x, length);
798
    }
17 ilm 799
 
144 ilm 800
    public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException {
801
        getDelegate().updateBinaryStream(columnLabel, x);
802
    }
17 ilm 803
 
144 ilm 804
    public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException {
805
        getDelegate().updateBlob(columnIndex, inputStream, length);
806
    }
17 ilm 807
 
144 ilm 808
    public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {
809
        getDelegate().updateBlob(columnIndex, inputStream);
810
    }
17 ilm 811
 
144 ilm 812
    public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {
813
        getDelegate().updateBlob(columnLabel, inputStream, length);
814
    }
17 ilm 815
 
144 ilm 816
    public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {
817
        getDelegate().updateBlob(columnLabel, inputStream);
818
    }
17 ilm 819
 
144 ilm 820
    public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
821
        getDelegate().updateCharacterStream(columnIndex, x, length);
822
    }
17 ilm 823
 
144 ilm 824
    public void updateCharacterStream(int columnIndex, Reader x) throws SQLException {
825
        getDelegate().updateCharacterStream(columnIndex, x);
826
    }
17 ilm 827
 
144 ilm 828
    public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
829
        getDelegate().updateCharacterStream(columnLabel, reader, length);
830
    }
17 ilm 831
 
144 ilm 832
    public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException {
833
        getDelegate().updateCharacterStream(columnLabel, reader);
834
    }
17 ilm 835
 
144 ilm 836
    public void updateClob(int columnIndex, Reader reader, long length) throws SQLException {
837
        getDelegate().updateClob(columnIndex, reader, length);
838
    }
17 ilm 839
 
144 ilm 840
    public void updateClob(int columnIndex, Reader reader) throws SQLException {
841
        getDelegate().updateClob(columnIndex, reader);
842
    }
17 ilm 843
 
144 ilm 844
    public void updateClob(String columnLabel, Reader reader, long length) throws SQLException {
845
        getDelegate().updateClob(columnLabel, reader, length);
846
    }
17 ilm 847
 
144 ilm 848
    public void updateClob(String columnLabel, Reader reader) throws SQLException {
849
        getDelegate().updateClob(columnLabel, reader);
850
    }
17 ilm 851
 
144 ilm 852
    public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException {
853
        getDelegate().updateNCharacterStream(columnIndex, x, length);
854
    }
17 ilm 855
 
144 ilm 856
    public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException {
857
        getDelegate().updateNCharacterStream(columnIndex, x);
858
    }
17 ilm 859
 
144 ilm 860
    public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {
861
        getDelegate().updateNCharacterStream(columnLabel, reader, length);
862
    }
17 ilm 863
 
144 ilm 864
    public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException {
865
        getDelegate().updateNCharacterStream(columnLabel, reader);
866
    }
17 ilm 867
 
144 ilm 868
    public void updateNClob(int columnIndex, NClob clob) throws SQLException {
869
        getDelegate().updateNClob(columnIndex, clob);
870
    }
17 ilm 871
 
144 ilm 872
    public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException {
873
        getDelegate().updateNClob(columnIndex, reader, length);
874
    }
17 ilm 875
 
144 ilm 876
    public void updateNClob(int columnIndex, Reader reader) throws SQLException {
877
        getDelegate().updateNClob(columnIndex, reader);
878
    }
17 ilm 879
 
144 ilm 880
    public void updateNClob(String columnLabel, NClob clob) throws SQLException {
881
        getDelegate().updateNClob(columnLabel, clob);
882
    }
17 ilm 883
 
144 ilm 884
    public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException {
885
        getDelegate().updateNClob(columnLabel, reader, length);
886
    }
17 ilm 887
 
144 ilm 888
    public void updateNClob(String columnLabel, Reader reader) throws SQLException {
889
        getDelegate().updateNClob(columnLabel, reader);
890
    }
17 ilm 891
 
144 ilm 892
    public void updateNString(int columnIndex, String string) throws SQLException {
893
        getDelegate().updateNString(columnIndex, string);
894
    }
142 ilm 895
 
144 ilm 896
    public void updateNString(String columnLabel, String string) throws SQLException {
897
        getDelegate().updateNString(columnLabel, string);
898
    }
142 ilm 899
 
144 ilm 900
    public void updateRowId(int columnIndex, RowId x) throws SQLException {
901
        getDelegate().updateRowId(columnIndex, x);
902
    }
142 ilm 903
 
144 ilm 904
    public void updateRowId(String columnLabel, RowId x) throws SQLException {
905
        getDelegate().updateRowId(columnLabel, x);
906
    }
142 ilm 907
 
144 ilm 908
    public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {
909
        getDelegate().updateSQLXML(columnIndex, xmlObject);
910
    }
142 ilm 911
 
144 ilm 912
    public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {
913
        getDelegate().updateSQLXML(columnLabel, xmlObject);
914
    }
142 ilm 915
 
144 ilm 916
    // ------------------------- JDBC 4.1 -----------------------------------
142 ilm 917
 
144 ilm 918
    @Override
919
    public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
920
        return getDelegate().getObject(columnIndex, type);
921
    }
142 ilm 922
 
144 ilm 923
    @Override
924
    public <T> T getObject(String columnLabel, Class<T> type) throws SQLException {
925
        return getDelegate().getObject(columnLabel, type);
926
    }
17 ilm 927
}