53
53
public interface StructReader {
54
54
/**
55
55
* @return the type of the underlying data. This will always be a {@code STRUCT} type, with fields
56
- * corresponding to the data's columns. For the result of a read or query, this will always match
57
- * the columns passed to the {@code read()} call or named in the query text, in order.
56
+ * corresponding to the data's columns. For the result of a read or query, this will always
57
+ * match the columns passed to the {@code read()} call or named in the query text, in order.
58
58
*/
59
59
Type getType ();
60
60
61
61
/**
62
62
* @return the number of columns in the underlying data. This includes any columns with {@code
63
- * NULL} values.
63
+ * NULL} values.
64
64
*/
65
65
int getColumnCount ();
66
66
@@ -157,7 +157,6 @@ public interface StructReader {
157
157
String getString (String columnName );
158
158
159
159
/**
160
- *
161
160
* @param columnIndex index of the column
162
161
* @return the value of a non-{@code NULL} column with type {@link Type#json()}.
163
162
*/
@@ -174,7 +173,6 @@ default String getJson(String columnName) {
174
173
}
175
174
176
175
/**
177
- *
178
176
* @param columnIndex index of the column
179
177
* @return the value of a non-{@code NULL} column with type {@link Type#pgJsonb()}.
180
178
*/
@@ -245,7 +243,6 @@ default Value getValue(String columnName) {
245
243
/**
246
244
* @param columnIndex index of the column
247
245
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
248
- *
249
246
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
250
247
* may contain {@code NULL} values, use {@link #getBooleanList(int)} instead.
251
248
*/
@@ -254,7 +251,6 @@ default Value getValue(String columnName) {
254
251
/**
255
252
* @param columnName name of the column
256
253
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
257
- *
258
254
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
259
255
* may contain {@code NULL} values, use {@link #getBooleanList(String)} instead.
260
256
*/
@@ -263,23 +259,22 @@ default Value getValue(String columnName) {
263
259
/**
264
260
* @param columnIndex index of the column
265
261
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
266
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
267
- * each element in the list multiple times.
262
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
263
+ * access each element in the list multiple times.
268
264
*/
269
265
List <Boolean > getBooleanList (int columnIndex );
270
266
271
267
/**
272
268
* @param columnName name of the column
273
269
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
274
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
275
- * each element in the list multiple times.
270
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
271
+ * access each element in the list multiple times.
276
272
*/
277
273
List <Boolean > getBooleanList (String columnName );
278
274
279
275
/**
280
276
* @param columnIndex index of the column
281
277
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
282
- *
283
278
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
284
279
* may contain {@code NULL} values, use {@link #getLongList(int)} instead.
285
280
*/
@@ -288,7 +283,6 @@ default Value getValue(String columnName) {
288
283
/**
289
284
* @param columnName name of the column
290
285
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
291
- *
292
286
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
293
287
* may contain {@code NULL} values, use {@link #getLongList(String)} instead.
294
288
*/
@@ -297,23 +291,22 @@ default Value getValue(String columnName) {
297
291
/**
298
292
* @param columnIndex index of the column
299
293
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
300
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
301
- * each element in the list multiple times.
294
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
295
+ * access each element in the list multiple times.
302
296
*/
303
297
List <Long > getLongList (int columnIndex );
304
298
305
299
/**
306
300
* @param columnName
307
301
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
308
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
309
- * each element in the list multiple times.
302
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
303
+ * access each element in the list multiple times.
310
304
*/
311
305
List <Long > getLongList (String columnName );
312
306
313
307
/**
314
308
* @param columnIndex index of the column
315
309
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
316
- *
317
310
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
318
311
* may contain {@code NULL} values, use {@link #getDoubleList(int)} instead.
319
312
*/
@@ -322,7 +315,6 @@ default Value getValue(String columnName) {
322
315
/**
323
316
* @param columnName name of the column
324
317
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
325
- *
326
318
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
327
319
* may contain {@code NULL} values, use {@link #getDoubleList(String)} instead.
328
320
*/
@@ -331,56 +323,56 @@ default Value getValue(String columnName) {
331
323
/**
332
324
* @param columnIndex index of the column
333
325
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
334
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
335
- * each element in the list multiple times.
326
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
327
+ * access each element in the list multiple times.
336
328
*/
337
329
List <Double > getDoubleList (int columnIndex );
338
330
339
331
/**
340
332
* @param columnName name of the column
341
333
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
342
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
343
- * each element in the list multiple times.
334
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
335
+ * access each element in the list multiple times.
344
336
*/
345
337
List <Double > getDoubleList (String columnName );
346
338
347
339
/**
348
340
* @param columnIndex index of the column
349
341
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
350
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
351
- * each element in the list multiple times.
342
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
343
+ * access each element in the list multiple times.
352
344
*/
353
345
List <BigDecimal > getBigDecimalList (int columnIndex );
354
346
355
347
/**
356
348
* @param columnName name of the column
357
349
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
358
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
359
- * each element in the list multiple times.
350
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
351
+ * access each element in the list multiple times.
360
352
*/
361
353
List <BigDecimal > getBigDecimalList (String columnName );
362
354
363
355
/**
364
356
* @param columnIndex index of the column
365
357
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
366
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
367
- * each element in the list multiple times.
358
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
359
+ * access each element in the list multiple times.
368
360
*/
369
361
List <String > getStringList (int columnIndex );
370
362
371
363
/**
372
364
* @param columnName name of the column
373
365
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
374
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
375
- * each element in the list multiple times.
366
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
367
+ * access each element in the list multiple times.
376
368
*/
377
369
List <String > getStringList (String columnName );
378
370
379
371
/**
380
372
* @param columnIndex index of the column
381
373
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
382
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
383
- * each element in the list multiple times.
374
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
375
+ * access each element in the list multiple times.
384
376
*/
385
377
default List <String > getJsonList (int columnIndex ) {
386
378
throw new UnsupportedOperationException ("method should be overwritten" );
@@ -389,8 +381,8 @@ default List<String> getJsonList(int columnIndex) {
389
381
/**
390
382
* @param columnName name of the column
391
383
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
392
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
393
- * each element in the list multiple times.
384
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
385
+ * access each element in the list multiple times.
394
386
*/
395
387
default List <String > getJsonList (String columnName ) {
396
388
throw new UnsupportedOperationException ("method should be overwritten" );
@@ -399,8 +391,8 @@ default List<String> getJsonList(String columnName) {
399
391
/**
400
392
* @param columnIndex index of the column
401
393
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
402
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
403
- * each element in the list multiple times.
394
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
395
+ * access each element in the list multiple times.
404
396
*/
405
397
default List <String > getPgJsonbList (int columnIndex ) {
406
398
throw new UnsupportedOperationException ("method should be overwritten" );
@@ -409,8 +401,8 @@ default List<String> getPgJsonbList(int columnIndex) {
409
401
/**
410
402
* @param columnName name of the column
411
403
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
412
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
413
- * each element in the list multiple times.
404
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
405
+ * access each element in the list multiple times.
414
406
*/
415
407
default List <String > getPgJsonbList (String columnName ) {
416
408
throw new UnsupportedOperationException ("method should be overwritten" );
@@ -419,64 +411,64 @@ default List<String> getPgJsonbList(String columnName) {
419
411
/**
420
412
* @param columnIndex index of the column
421
413
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
422
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
423
- * each element in the list multiple times.
414
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
415
+ * access each element in the list multiple times.
424
416
*/
425
417
List <ByteArray > getBytesList (int columnIndex );
426
418
427
419
/**
428
420
* @param columnName name of the column
429
421
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
430
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
431
- * each element in the list multiple times.
422
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
423
+ * access each element in the list multiple times.
432
424
*/
433
425
List <ByteArray > getBytesList (String columnName );
434
426
435
427
/**
436
428
* @param columnIndex index of the column
437
429
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
438
- * The list returned by this method is lazily constructed. Create a copy of it if you intend to
439
- * access each element in the list multiple times.
430
+ * The list returned by this method is lazily constructed. Create a copy of it if you intend
431
+ * to access each element in the list multiple times.
440
432
*/
441
433
List <Timestamp > getTimestampList (int columnIndex );
442
434
443
435
/**
444
436
* @param columnName name of the column
445
437
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
446
- * The list returned by this method is lazily constructed. Create a copy of it if you intend to
447
- * access each element in the list multiple times.
438
+ * The list returned by this method is lazily constructed. Create a copy of it if you intend
439
+ * to access each element in the list multiple times.
448
440
*/
449
441
List <Timestamp > getTimestampList (String columnName );
450
442
451
443
/**
452
444
* @param columnIndex index of the column
453
445
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
454
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
455
- * each element in the list multiple times.
446
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
447
+ * access each element in the list multiple times.
456
448
*/
457
449
List <Date > getDateList (int columnIndex );
458
450
459
451
/**
460
452
* @param columnName name of the column
461
453
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
462
- * list returned by this method is lazily constructed. Create a copy of it if you intend to access
463
- * each element in the list multiple times.
454
+ * list returned by this method is lazily constructed. Create a copy of it if you intend to
455
+ * access each element in the list multiple times.
464
456
*/
465
457
List <Date > getDateList (String columnName );
466
458
467
459
/**
468
460
* @param columnIndex index of the column
469
461
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
470
- * The list returned by this method is lazily constructed. Create a copy of it if you intend to
471
- * access each element in the list multiple times.
462
+ * The list returned by this method is lazily constructed. Create a copy of it if you intend
463
+ * to access each element in the list multiple times.
472
464
*/
473
465
List <Struct > getStructList (int columnIndex );
474
466
475
467
/**
476
468
* @param columnName name of the column
477
469
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
478
- * The list returned by this method is lazily constructed. Create a copy of it if you intend to
479
- * access each element in the list multiple times.
470
+ * The list returned by this method is lazily constructed. Create a copy of it if you intend
471
+ * to access each element in the list multiple times.
480
472
*/
481
473
List <Struct > getStructList (String columnName );
482
474
}
0 commit comments