Class PaginatedQueryList<T>
- java.lang.Object
-
- com.amazonaws.services.dynamodbv2.datamodeling.PaginatedList<T>
-
- com.amazonaws.services.dynamodbv2.datamodeling.PaginatedQueryList<T>
-
- Type Parameters:
T
- The type of objects held in this list.
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,List<T>
public class PaginatedQueryList<T> extends PaginatedList<T>
Implementation of the List interface that represents the results from a query in AWS DynamoDB. Paginated results are loaded on demand when the user executes an operation that requires them. Some operations, such as size(), must fetch the entire list, but results are lazily fetched page by page when possible.This is an unmodifiable list, so callers should not invoke any operations that modify this list, otherwise they will throw an UnsupportedOperationException.
- See Also:
PaginatedList
-
-
Field Summary
-
Fields inherited from class com.amazonaws.services.dynamodbv2.datamodeling.PaginatedList
allResults, allResultsLoaded, clazz, dynamo, mapper, nextResults
-
-
Constructor Summary
Constructors Constructor Description PaginatedQueryList(DynamoDBMapper mapper, Class<T> clazz, AmazonDynamoDB dynamo, QueryRequest queryRequest, QueryResult queryResult, DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy, DynamoDBMapperConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
atEndOfResults()
Returns whether we have reached the end of the result set.protected List<T>
fetchNextPage()
Fetches the next page of results (which may be empty) and returns any items found.-
Methods inherited from class com.amazonaws.services.dynamodbv2.datamodeling.PaginatedList
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, loadAllResults, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
PaginatedQueryList
public PaginatedQueryList(DynamoDBMapper mapper, Class<T> clazz, AmazonDynamoDB dynamo, QueryRequest queryRequest, QueryResult queryResult, DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy, DynamoDBMapperConfig config)
-
-
Method Detail
-
atEndOfResults
protected boolean atEndOfResults()
Description copied from class:PaginatedList
Returns whether we have reached the end of the result set.- Specified by:
atEndOfResults
in classPaginatedList<T>
-
fetchNextPage
protected List<T> fetchNextPage()
Description copied from class:PaginatedList
Fetches the next page of results (which may be empty) and returns any items found.- Specified by:
fetchNextPage
in classPaginatedList<T>
-
-