Interface BatchGetResultPageIterable
-
- All Superinterfaces:
Iterable<BatchGetResultPage>
,SdkIterable<BatchGetResultPage>
@ThreadSafe public interface BatchGetResultPageIterable extends SdkIterable<BatchGetResultPage>
Defines the result ofDynamoDbEnhancedClient.batchGetItem(software.amazon.awssdk.enhanced.dynamodb.model.BatchGetItemEnhancedRequest)
operation.The result can be accessed either through iterable
BatchGetResultPage
s or flattened items across all pages viaresultsForTable(software.amazon.awssdk.enhanced.dynamodb.MappedTableResource<T>)
Example:
1) Iterating through pages
batchResults.forEach(page -> { page.resultsForTable(firstItemTable).forEach(item -> System.out.println(item)); page.resultsForTable(secondItemTable).forEach(item -> System.out.println(item)); });
results.resultsForTable(firstItemTable).forEach(item -> System.out.println(item)); results.resultsForTable(secondItemTable).forEach(item -> System.out.println(item));
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static BatchGetResultPageIterable
create(SdkIterable<BatchGetResultPage> pageIterable)
default <T> SdkIterable<T>
resultsForTable(MappedTableResource<T> mappedTable)
Retrieve all items belonging to the supplied table across all pages.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface software.amazon.awssdk.core.pagination.sync.SdkIterable
stream
-
-
-
-
Method Detail
-
create
static BatchGetResultPageIterable create(SdkIterable<BatchGetResultPage> pageIterable)
-
resultsForTable
default <T> SdkIterable<T> resultsForTable(MappedTableResource<T> mappedTable)
Retrieve all items belonging to the supplied table across all pages.- Type Parameters:
T
- the type of the table items- Parameters:
mappedTable
- the table to retrieve items for- Returns:
- iterable items
-
-