T
- The domain object type stored in this list.PaginatedList
instead.@Deprecated public abstract class PaginatedList<T> extends Object implements List<T>
Pages of results are fetched lazily from DynamoDB as they are needed. Some
methods, such as size()
and
toArray()
, require fetching the entire result set
eagerly. See the javadoc of individual methods for details on which are lazy.
Modifier and Type | Field and Description |
---|---|
protected List<T> |
allResults
Deprecated.
All currently loaded results for this list
|
protected boolean |
allResultsLoaded
Deprecated.
Tracks if all results have been loaded yet or not
|
protected Class<T> |
clazz
Deprecated.
The class annotated with DynamoDB tags declaring how to load/store
objects into DynamoDB
|
protected AmazonDynamoDB |
dynamo
Deprecated.
The client for working with DynamoDB
|
protected DynamoDBMapper |
mapper
Deprecated.
Reference to the DynamoDB mapper for marshalling DynamoDB attributes back
into objects
|
protected List<T> |
nextResults
Deprecated.
Lazily loaded next results waiting to be added into allResults
|
Constructor and Description |
---|
PaginatedList(DynamoDBMapper mapper,
Class<T> clazz,
AmazonDynamoDB dynamo)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int arg0,
T arg1)
Deprecated.
|
boolean |
add(T arg0)
Deprecated.
|
boolean |
addAll(Collection<? extends T> arg0)
Deprecated.
|
boolean |
addAll(int arg0,
Collection<? extends T> arg1)
Deprecated.
|
protected abstract boolean |
atEndOfResults()
Deprecated.
Returns whether we have reached the end of the result set.
|
void |
clear()
Deprecated.
|
boolean |
contains(Object arg0)
Deprecated.
Returns whether the collection contains the given element.
|
boolean |
containsAll(Collection<?> arg0)
Deprecated.
|
protected abstract List<T> |
fetchNextPage()
Deprecated.
Fetches the next page of results (which may be empty) and returns any
items found.
|
T |
get(int n)
Deprecated.
Returns the Nth element of the list.
|
int |
indexOf(Object arg0)
Deprecated.
Returns the first index of the object given in the list.
|
boolean |
isEmpty()
Deprecated.
Returns whether the collection is empty.
|
Iterator<T> |
iterator()
Deprecated.
Returns an iterator over this list that lazily initializes results as
necessary.
|
int |
lastIndexOf(Object arg0)
Deprecated.
|
ListIterator<T> |
listIterator()
Deprecated.
|
ListIterator<T> |
listIterator(int arg0)
Deprecated.
|
void |
loadAllResults()
Deprecated.
Eagerly loads all results for this list.
|
T |
remove(int arg0)
Deprecated.
|
boolean |
remove(Object arg0)
Deprecated.
|
boolean |
removeAll(Collection<?> arg0)
Deprecated.
|
boolean |
retainAll(Collection<?> arg0)
Deprecated.
|
T |
set(int arg0,
T arg1)
Deprecated.
|
int |
size()
Deprecated.
|
List<T> |
subList(int arg0,
int arg1)
Deprecated.
Returns a sub-list in the range specified, loading more results as
necessary.
|
Object[] |
toArray()
Deprecated.
|
<X> X[] |
toArray(X[] a)
Deprecated.
|
protected final DynamoDBMapper mapper
protected final Class<T> clazz
protected final AmazonDynamoDB dynamo
protected boolean allResultsLoaded
protected final List<T> allResults
public PaginatedList(DynamoDBMapper mapper, Class<T> clazz, AmazonDynamoDB dynamo)
public void loadAllResults()
protected abstract List<T> fetchNextPage()
protected abstract boolean atEndOfResults()
public Iterator<T> iterator()
public boolean isEmpty()
public T get(int n)
public boolean contains(Object arg0)
public List<T> subList(int arg0, int arg1)
public int indexOf(Object arg0)
public int size()
public boolean containsAll(Collection<?> arg0)
containsAll
in interface Collection<T>
containsAll
in interface List<T>
public int lastIndexOf(Object arg0)
lastIndexOf
in interface List<T>
public Object[] toArray()
public <X> X[] toArray(X[] a)
public ListIterator<T> listIterator()
listIterator
in interface List<T>
public ListIterator<T> listIterator(int arg0)
listIterator
in interface List<T>
public boolean remove(Object arg0)
public boolean removeAll(Collection<?> arg0)
public boolean retainAll(Collection<?> arg0)
public boolean add(T arg0)
public boolean addAll(Collection<? extends T> arg0)
public boolean addAll(int arg0, Collection<? extends T> arg1)
Copyright © 2014. All rights reserved.