T - The domain object type stored in this list.public abstract class PaginatedList<T>
extends java.lang.Object
implements java.util.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.
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.util.List<T> |
allResults
All currently loaded results for this list
|
protected boolean |
allResultsLoaded
Tracks if all results have been loaded yet or not
|
protected java.lang.Class<T> |
clazz
The class annotated with DynamoDB tags declaring how to load/store
objects into DynamoDB
|
protected AmazonDynamoDB |
dynamo
The client for working with DynamoDB
|
protected DynamoDBMapper |
mapper
Reference to the DynamoDB mapper for marshalling DynamoDB attributes back
into objects
|
protected java.util.List<T> |
nextResults
Lazily loaded next results waiting to be added into allResults
|
| コンストラクタと説明 |
|---|
PaginatedList(DynamoDBMapper mapper,
java.lang.Class<T> clazz,
AmazonDynamoDB dynamo) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
add(int arg0,
T arg1) |
boolean |
add(T arg0) |
boolean |
addAll(java.util.Collection<? extends T> arg0) |
boolean |
addAll(int arg0,
java.util.Collection<? extends T> arg1) |
protected abstract boolean |
atEndOfResults()
Returns whether we have reached the end of the result set.
|
void |
clear() |
boolean |
contains(java.lang.Object arg0)
Returns whether the collection contains the given element.
|
boolean |
containsAll(java.util.Collection<?> arg0) |
protected abstract java.util.List<T> |
fetchNextPage()
Fetches the next page of results (which may be empty) and returns any
items found.
|
T |
get(int n)
Returns the Nth element of the list.
|
int |
indexOf(java.lang.Object arg0)
Returns the first index of the object given in the list.
|
boolean |
isEmpty()
Returns whether the collection is empty.
|
java.util.Iterator<T> |
iterator()
Returns an iterator over this list that lazily initializes results as
necessary.
|
int |
lastIndexOf(java.lang.Object arg0) |
java.util.ListIterator<T> |
listIterator() |
java.util.ListIterator<T> |
listIterator(int arg0) |
void |
loadAllResults()
Eagerly loads all results for this list.
|
T |
remove(int arg0) |
boolean |
remove(java.lang.Object arg0) |
boolean |
removeAll(java.util.Collection<?> arg0) |
boolean |
retainAll(java.util.Collection<?> arg0) |
T |
set(int arg0,
T arg1) |
int |
size() |
java.util.List<T> |
subList(int arg0,
int arg1)
Returns a sub-list in the range specified, loading more results as
necessary.
|
java.lang.Object[] |
toArray() |
<X> X[] |
toArray(X[] a) |
protected final DynamoDBMapper mapper
protected final java.lang.Class<T> clazz
protected final AmazonDynamoDB dynamo
protected boolean allResultsLoaded
protected final java.util.List<T> allResults
protected final java.util.List<T> nextResults
public PaginatedList(DynamoDBMapper mapper, java.lang.Class<T> clazz, AmazonDynamoDB dynamo)
public void loadAllResults()
protected abstract java.util.List<T> fetchNextPage()
protected abstract boolean atEndOfResults()
public java.util.Iterator<T> iterator()
public boolean isEmpty()
public T get(int n)
get インタフェース内 java.util.List<T>public boolean contains(java.lang.Object arg0)
public java.util.List<T> subList(int arg0, int arg1)
subList インタフェース内 java.util.List<T>public int indexOf(java.lang.Object arg0)
indexOf インタフェース内 java.util.List<T>public int size()
public boolean containsAll(java.util.Collection<?> arg0)
public int lastIndexOf(java.lang.Object arg0)
lastIndexOf インタフェース内 java.util.List<T>public java.lang.Object[] toArray()
public <X> X[] toArray(X[] a)
public java.util.ListIterator<T> listIterator()
listIterator インタフェース内 java.util.List<T>public java.util.ListIterator<T> listIterator(int arg0)
listIterator インタフェース内 java.util.List<T>public boolean remove(java.lang.Object arg0)
public boolean removeAll(java.util.Collection<?> arg0)
public boolean retainAll(java.util.Collection<?> arg0)
public boolean add(T arg0)
public boolean addAll(java.util.Collection<? extends T> arg0)
public boolean addAll(int arg0,
java.util.Collection<? extends T> arg1)
addAll インタフェース内 java.util.List<T>