1
1
/*
2
- * Copyright 2002-2016 the original author or authors.
2
+ * Copyright 2002-2019 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
29
29
import java .util .Map ;
30
30
31
31
import org .springframework .jdbc .InvalidResultSetAccessException ;
32
+ import org .springframework .lang .Nullable ;
32
33
33
34
/**
34
35
* The default implementation of Spring's {@link SqlRowSet} interface, wrapping a
@@ -160,6 +161,7 @@ public int findColumn(String columnLabel) throws InvalidResultSetAccessException
160
161
* @see java.sql.ResultSet#getBigDecimal(int)
161
162
*/
162
163
@ Override
164
+ @ Nullable
163
165
public BigDecimal getBigDecimal (int columnIndex ) throws InvalidResultSetAccessException {
164
166
try {
165
167
return this .resultSet .getBigDecimal (columnIndex );
@@ -173,6 +175,7 @@ public BigDecimal getBigDecimal(int columnIndex) throws InvalidResultSetAccessEx
173
175
* @see java.sql.ResultSet#getBigDecimal(String)
174
176
*/
175
177
@ Override
178
+ @ Nullable
176
179
public BigDecimal getBigDecimal (String columnLabel ) throws InvalidResultSetAccessException {
177
180
return getBigDecimal (findColumn (columnLabel ));
178
181
}
@@ -223,6 +226,7 @@ public byte getByte(String columnLabel) throws InvalidResultSetAccessException {
223
226
* @see java.sql.ResultSet#getDate(int)
224
227
*/
225
228
@ Override
229
+ @ Nullable
226
230
public Date getDate (int columnIndex ) throws InvalidResultSetAccessException {
227
231
try {
228
232
return this .resultSet .getDate (columnIndex );
@@ -236,6 +240,7 @@ public Date getDate(int columnIndex) throws InvalidResultSetAccessException {
236
240
* @see java.sql.ResultSet#getDate(String)
237
241
*/
238
242
@ Override
243
+ @ Nullable
239
244
public Date getDate (String columnLabel ) throws InvalidResultSetAccessException {
240
245
return getDate (findColumn (columnLabel ));
241
246
}
@@ -244,6 +249,7 @@ public Date getDate(String columnLabel) throws InvalidResultSetAccessException {
244
249
* @see java.sql.ResultSet#getDate(int, Calendar)
245
250
*/
246
251
@ Override
252
+ @ Nullable
247
253
public Date getDate (int columnIndex , Calendar cal ) throws InvalidResultSetAccessException {
248
254
try {
249
255
return this .resultSet .getDate (columnIndex , cal );
@@ -257,6 +263,7 @@ public Date getDate(int columnIndex, Calendar cal) throws InvalidResultSetAccess
257
263
* @see java.sql.ResultSet#getDate(String, Calendar)
258
264
*/
259
265
@ Override
266
+ @ Nullable
260
267
public Date getDate (String columnLabel , Calendar cal ) throws InvalidResultSetAccessException {
261
268
return getDate (findColumn (columnLabel ), cal );
262
269
}
@@ -349,6 +356,7 @@ public long getLong(String columnLabel) throws InvalidResultSetAccessException {
349
356
* @see java.sql.ResultSet#getNString(int)
350
357
*/
351
358
@ Override
359
+ @ Nullable
352
360
public String getNString (int columnIndex ) throws InvalidResultSetAccessException {
353
361
try {
354
362
return this .resultSet .getNString (columnIndex );
@@ -362,6 +370,7 @@ public String getNString(int columnIndex) throws InvalidResultSetAccessException
362
370
* @see java.sql.ResultSet#getNString(String)
363
371
*/
364
372
@ Override
373
+ @ Nullable
365
374
public String getNString (String columnLabel ) throws InvalidResultSetAccessException {
366
375
return getNString (findColumn (columnLabel ));
367
376
}
@@ -370,6 +379,7 @@ public String getNString(String columnLabel) throws InvalidResultSetAccessExcept
370
379
* @see java.sql.ResultSet#getObject(int)
371
380
*/
372
381
@ Override
382
+ @ Nullable
373
383
public Object getObject (int columnIndex ) throws InvalidResultSetAccessException {
374
384
try {
375
385
return this .resultSet .getObject (columnIndex );
@@ -383,6 +393,7 @@ public Object getObject(int columnIndex) throws InvalidResultSetAccessException
383
393
* @see java.sql.ResultSet#getObject(String)
384
394
*/
385
395
@ Override
396
+ @ Nullable
386
397
public Object getObject (String columnLabel ) throws InvalidResultSetAccessException {
387
398
return getObject (findColumn (columnLabel ));
388
399
}
@@ -391,6 +402,7 @@ public Object getObject(String columnLabel) throws InvalidResultSetAccessExcepti
391
402
* @see java.sql.ResultSet#getObject(int, Map)
392
403
*/
393
404
@ Override
405
+ @ Nullable
394
406
public Object getObject (int columnIndex , Map <String , Class <?>> map ) throws InvalidResultSetAccessException {
395
407
try {
396
408
return this .resultSet .getObject (columnIndex , map );
@@ -404,6 +416,7 @@ public Object getObject(int columnIndex, Map<String, Class<?>> map) throws Inval
404
416
* @see java.sql.ResultSet#getObject(String, Map)
405
417
*/
406
418
@ Override
419
+ @ Nullable
407
420
public Object getObject (String columnLabel , Map <String , Class <?>> map ) throws InvalidResultSetAccessException {
408
421
return getObject (findColumn (columnLabel ), map );
409
422
}
@@ -412,6 +425,7 @@ public Object getObject(String columnLabel, Map<String, Class<?>> map) throws In
412
425
* @see java.sql.ResultSet#getObject(int, Class)
413
426
*/
414
427
@ Override
428
+ @ Nullable
415
429
public <T > T getObject (int columnIndex , Class <T > type ) throws InvalidResultSetAccessException {
416
430
try {
417
431
return this .resultSet .getObject (columnIndex , type );
@@ -425,6 +439,7 @@ public <T> T getObject(int columnIndex, Class<T> type) throws InvalidResultSetAc
425
439
* @see java.sql.ResultSet#getObject(String, Class)
426
440
*/
427
441
@ Override
442
+ @ Nullable
428
443
public <T > T getObject (String columnLabel , Class <T > type ) throws InvalidResultSetAccessException {
429
444
return getObject (findColumn (columnLabel ), type );
430
445
}
@@ -454,6 +469,7 @@ public short getShort(String columnLabel) throws InvalidResultSetAccessException
454
469
* @see java.sql.ResultSet#getString(int)
455
470
*/
456
471
@ Override
472
+ @ Nullable
457
473
public String getString (int columnIndex ) throws InvalidResultSetAccessException {
458
474
try {
459
475
return this .resultSet .getString (columnIndex );
@@ -467,6 +483,7 @@ public String getString(int columnIndex) throws InvalidResultSetAccessException
467
483
* @see java.sql.ResultSet#getString(String)
468
484
*/
469
485
@ Override
486
+ @ Nullable
470
487
public String getString (String columnLabel ) throws InvalidResultSetAccessException {
471
488
return getString (findColumn (columnLabel ));
472
489
}
@@ -475,6 +492,7 @@ public String getString(String columnLabel) throws InvalidResultSetAccessExcepti
475
492
* @see java.sql.ResultSet#getTime(int)
476
493
*/
477
494
@ Override
495
+ @ Nullable
478
496
public Time getTime (int columnIndex ) throws InvalidResultSetAccessException {
479
497
try {
480
498
return this .resultSet .getTime (columnIndex );
@@ -488,6 +506,7 @@ public Time getTime(int columnIndex) throws InvalidResultSetAccessException {
488
506
* @see java.sql.ResultSet#getTime(String)
489
507
*/
490
508
@ Override
509
+ @ Nullable
491
510
public Time getTime (String columnLabel ) throws InvalidResultSetAccessException {
492
511
return getTime (findColumn (columnLabel ));
493
512
}
@@ -496,6 +515,7 @@ public Time getTime(String columnLabel) throws InvalidResultSetAccessException {
496
515
* @see java.sql.ResultSet#getTime(int, Calendar)
497
516
*/
498
517
@ Override
518
+ @ Nullable
499
519
public Time getTime (int columnIndex , Calendar cal ) throws InvalidResultSetAccessException {
500
520
try {
501
521
return this .resultSet .getTime (columnIndex , cal );
@@ -509,6 +529,7 @@ public Time getTime(int columnIndex, Calendar cal) throws InvalidResultSetAccess
509
529
* @see java.sql.ResultSet#getTime(String, Calendar)
510
530
*/
511
531
@ Override
532
+ @ Nullable
512
533
public Time getTime (String columnLabel , Calendar cal ) throws InvalidResultSetAccessException {
513
534
return getTime (findColumn (columnLabel ), cal );
514
535
}
@@ -517,6 +538,7 @@ public Time getTime(String columnLabel, Calendar cal) throws InvalidResultSetAcc
517
538
* @see java.sql.ResultSet#getTimestamp(int)
518
539
*/
519
540
@ Override
541
+ @ Nullable
520
542
public Timestamp getTimestamp (int columnIndex ) throws InvalidResultSetAccessException {
521
543
try {
522
544
return this .resultSet .getTimestamp (columnIndex );
@@ -530,6 +552,7 @@ public Timestamp getTimestamp(int columnIndex) throws InvalidResultSetAccessExce
530
552
* @see java.sql.ResultSet#getTimestamp(String)
531
553
*/
532
554
@ Override
555
+ @ Nullable
533
556
public Timestamp getTimestamp (String columnLabel ) throws InvalidResultSetAccessException {
534
557
return getTimestamp (findColumn (columnLabel ));
535
558
}
@@ -538,6 +561,7 @@ public Timestamp getTimestamp(String columnLabel) throws InvalidResultSetAccessE
538
561
* @see java.sql.ResultSet#getTimestamp(int, Calendar)
539
562
*/
540
563
@ Override
564
+ @ Nullable
541
565
public Timestamp getTimestamp (int columnIndex , Calendar cal ) throws InvalidResultSetAccessException {
542
566
try {
543
567
return this .resultSet .getTimestamp (columnIndex , cal );
@@ -551,6 +575,7 @@ public Timestamp getTimestamp(int columnIndex, Calendar cal) throws InvalidResul
551
575
* @see java.sql.ResultSet#getTimestamp(String, Calendar)
552
576
*/
553
577
@ Override
578
+ @ Nullable
554
579
public Timestamp getTimestamp (String columnLabel , Calendar cal ) throws InvalidResultSetAccessException {
555
580
return getTimestamp (findColumn (columnLabel ), cal );
556
581
}
0 commit comments