52
52
*/
53
53
public interface StructReader {
54
54
/**
55
- * Returns the type of the underlying data. This will always be a {@code STRUCT} type, with fields
55
+ * @return the type of the underlying data. This will always be a {@code STRUCT} type, with fields
56
56
* corresponding to the data's columns. For the result of a read or query, this will always match
57
57
* 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
- * Returns the number of columns in the underlying data. This includes any columns with {@code
62
+ * @return the number of columns in the underlying data. This includes any columns with {@code
63
63
* NULL} values.
64
64
*/
65
65
int getColumnCount ();
66
66
67
67
/**
68
- * Returns the index of the column named {@code columnName}.
69
- *
68
+ * @param columnName
69
+ * @return the index of the column named {@code columnName}.
70
70
* @throws IllegalArgumentException if there is not exactly one element of {@code
71
71
* type().structFields()} with {@link Type.StructField#getName()} equal to {@code columnName}
72
72
*/
@@ -157,131 +157,151 @@ default Value getValue(int columnIndex) {
157
157
throw new UnsupportedOperationException ("method should be overwritten" );
158
158
}
159
159
160
- /** Returns the value of a nullable column as a {@link Value}. */
160
+ /**
161
+ * @param columnName
162
+ * @return the value of a nullable column as a {@link Value}.
163
+ */
161
164
default Value getValue (String columnName ) {
162
165
throw new UnsupportedOperationException ("method should be overwritten" );
163
166
}
164
167
165
168
/**
166
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
169
+ * @param columnIndex
170
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
167
171
*
168
172
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
169
173
* may contain {@code NULL} values, use {@link #getBooleanList(int)} instead.
170
174
*/
171
175
boolean [] getBooleanArray (int columnIndex );
172
176
173
177
/**
174
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
178
+ * @param columnName
179
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
175
180
*
176
181
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
177
182
* may contain {@code NULL} values, use {@link #getBooleanList(String)} instead.
178
183
*/
179
184
boolean [] getBooleanArray (String columnName );
180
185
181
186
/**
182
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
187
+ * @param columnIndex
188
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
183
189
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
184
190
* each element in the list multiple times.
185
191
*/
186
192
List <Boolean > getBooleanList (int columnIndex );
187
193
188
194
/**
189
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
195
+ * @param columnName
196
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
190
197
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
191
198
* each element in the list multiple times.
192
199
*/
193
200
List <Boolean > getBooleanList (String columnName );
194
201
195
202
/**
196
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
203
+ * @param columnIndex
204
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
197
205
*
198
206
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
199
207
* may contain {@code NULL} values, use {@link #getLongList(int)} instead.
200
208
*/
201
209
long [] getLongArray (int columnIndex );
202
210
203
211
/**
204
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
212
+ * @param columnName
213
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
205
214
*
206
215
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
207
216
* may contain {@code NULL} values, use {@link #getLongList(String)} instead.
208
217
*/
209
218
long [] getLongArray (String columnName );
210
219
211
220
/**
212
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
221
+ * @param columnIndex
222
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
213
223
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
214
224
* each element in the list multiple times.
215
225
*/
216
226
List <Long > getLongList (int columnIndex );
217
227
218
228
/**
219
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
229
+ * @param columnName
230
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
220
231
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
221
232
* each element in the list multiple times.
222
233
*/
223
234
List <Long > getLongList (String columnName );
224
235
225
236
/**
226
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
237
+ * @param columnIndex
238
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
227
239
*
228
240
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
229
241
* may contain {@code NULL} values, use {@link #getDoubleList(int)} instead.
230
242
*/
231
243
double [] getDoubleArray (int columnIndex );
232
244
233
245
/**
234
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
246
+ * @param columnName
247
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
235
248
*
236
249
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
237
250
* may contain {@code NULL} values, use {@link #getDoubleList(String)} instead.
238
251
*/
239
252
double [] getDoubleArray (String columnName );
240
253
241
254
/**
242
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
255
+ * @param columnIndex
256
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
243
257
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
244
258
* each element in the list multiple times.
245
259
*/
246
260
List <Double > getDoubleList (int columnIndex );
247
261
248
262
/**
249
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
263
+ * @param columnName
264
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
250
265
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
251
266
* each element in the list multiple times.
252
267
*/
253
268
List <Double > getDoubleList (String columnName );
254
269
255
270
/**
256
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
271
+ * @param columnIndex
272
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
257
273
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
258
274
* each element in the list multiple times.
259
275
*/
260
276
List <BigDecimal > getBigDecimalList (int columnIndex );
261
277
262
278
/**
263
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
279
+ * @param columnName
280
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
264
281
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
265
282
* each element in the list multiple times.
266
283
*/
267
284
List <BigDecimal > getBigDecimalList (String columnName );
268
285
269
286
/**
270
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
287
+ * @param columnIndex
288
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
271
289
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
272
290
* each element in the list multiple times.
273
291
*/
274
292
List <String > getStringList (int columnIndex );
275
293
276
294
/**
277
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
295
+ * @param columnName
296
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
278
297
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
279
298
* each element in the list multiple times.
280
299
*/
281
300
List <String > getStringList (String columnName );
282
301
283
302
/**
284
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
303
+ * @param columnIndex
304
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
285
305
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
286
306
* each element in the list multiple times.
287
307
*/
@@ -290,7 +310,8 @@ default List<String> getJsonList(int columnIndex) {
290
310
};
291
311
292
312
/**
293
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
313
+ * @param columnName
314
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
294
315
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
295
316
* each element in the list multiple times.
296
317
*/
@@ -299,7 +320,8 @@ default List<String> getJsonList(String columnName) {
299
320
};
300
321
301
322
/**
302
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
323
+ * @param columnIndex
324
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
303
325
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
304
326
* each element in the list multiple times.
305
327
*/
@@ -308,7 +330,8 @@ default List<String> getPgJsonbList(int columnIndex) {
308
330
};
309
331
310
332
/**
311
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
333
+ * @param columnName
334
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
312
335
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
313
336
* each element in the list multiple times.
314
337
*/
@@ -317,56 +340,64 @@ default List<String> getPgJsonbList(String columnName) {
317
340
};
318
341
319
342
/**
320
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
343
+ * @param columnIndex
344
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
321
345
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
322
346
* each element in the list multiple times.
323
347
*/
324
348
List <ByteArray > getBytesList (int columnIndex );
325
349
326
350
/**
327
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
351
+ * @param columnName
352
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
328
353
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
329
354
* each element in the list multiple times.
330
355
*/
331
356
List <ByteArray > getBytesList (String columnName );
332
357
333
358
/**
334
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
359
+ * @param columnIndex
360
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
335
361
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
336
362
* access each element in the list multiple times.
337
363
*/
338
364
List <Timestamp > getTimestampList (int columnIndex );
339
365
340
366
/**
341
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
367
+ * @param columnName
368
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
342
369
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
343
370
* access each element in the list multiple times.
344
371
*/
345
372
List <Timestamp > getTimestampList (String columnName );
346
373
347
374
/**
348
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
375
+ * @param columnIndex
376
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
349
377
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
350
378
* each element in the list multiple times.
351
379
*/
352
380
List <Date > getDateList (int columnIndex );
353
381
354
382
/**
355
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
383
+ * @param columnName
384
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
356
385
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
357
386
* each element in the list multiple times.
358
387
*/
359
388
List <Date > getDateList (String columnName );
360
389
361
390
/**
362
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
391
+ * @param columnIndex
392
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
363
393
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
364
394
* access each element in the list multiple times.
365
395
*/
366
396
List <Struct > getStructList (int columnIndex );
367
397
368
398
/**
369
- * Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
399
+ * @param columnName
400
+ * @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
370
401
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
371
402
* access each element in the list multiple times.
372
403
*/
0 commit comments