|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectcom.amazonaws.mobileconnectors.dynamodbv2.dynamodbmapper.PaginatedList<T>
T - The domain object type stored in this list.public abstract class PaginatedList<T>
Unmodifiable list supporting paginated result sets from Amazon DynamoDB.
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.
| Constructor Summary | |
|---|---|
PaginatedList(DynamoDBMapper mapper,
java.lang.Class<T> clazz,
AmazonDynamoDB dynamo)
Constructs a PaginatedList instance using the default PaginationLoadingStrategy |
|
PaginatedList(DynamoDBMapper mapper,
java.lang.Class<T> clazz,
AmazonDynamoDB dynamo,
DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy)
Constructs a PaginatedList instance. |
|
| Method Summary | ||
|---|---|---|
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)
|
|
void |
clear()
|
|
boolean |
contains(java.lang.Object arg0)
Returns whether the collection contains the given element. |
|
boolean |
containsAll(java.util.Collection<?> arg0)
|
|
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()
|
|
|
toArray(X[] a)
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public PaginatedList(DynamoDBMapper mapper,
java.lang.Class<T> clazz,
AmazonDynamoDB dynamo)
public PaginatedList(DynamoDBMapper mapper,
java.lang.Class<T> clazz,
AmazonDynamoDB dynamo,
DynamoDBMapperConfig.PaginationLoadingStrategy paginationLoadingStrategy)
mapper - The mapper for marshalling DynamoDB attributes into objects.clazz - The class of the annotated model.dynamo - The DynamoDB client for making low-level request calls.paginationLoadingStrategy - The strategy used for loading paginated results. Caller has to
explicitly set this parameter, since the DynamoDBMapperConfig
set in the mapper is not accessible here. If null value is
provided, LAZY_LOADING will be set by default.| Method Detail |
|---|
public void loadAllResults()
Not supported in ITERATION_ONLY mode.
public java.util.Iterator<T> iterator()
If it configured with ITERARTION_ONLY mode, then the iterator could be only retrieved once, and any previously loaded results will be cleared in the memory during the iteration.
iterator in interface java.lang.Iterable<T>iterator in interface java.util.Collection<T>iterator in interface java.util.List<T>public boolean isEmpty()
Not supported in ITERATION_ONLY mode.
isEmpty in interface java.util.Collection<T>isEmpty in interface java.util.List<T>public T get(int n)
Not supported in ITERATION_ONLY mode.
get in interface java.util.List<T>public boolean contains(java.lang.Object arg0)
Not supported in ITERATION_ONLY mode.
contains in interface java.util.Collection<T>contains in interface java.util.List<T>
public java.util.List<T> subList(int arg0,
int arg1)
Not supported in ITERATION_ONLY mode.
subList in interface java.util.List<T>public int indexOf(java.lang.Object arg0)
Not supported in ITERATION_ONLY mode.
indexOf in interface java.util.List<T>public int size()
size in interface java.util.Collection<T>size in interface java.util.List<T>public boolean containsAll(java.util.Collection<?> arg0)
containsAll in interface java.util.Collection<T>containsAll in interface java.util.List<T>public int lastIndexOf(java.lang.Object arg0)
lastIndexOf in interface java.util.List<T>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<T>toArray in interface java.util.List<T>public <X> X[] toArray(X[] a)
toArray in interface java.util.Collection<T>toArray in interface java.util.List<T>public java.util.ListIterator<T> listIterator()
listIterator in interface java.util.List<T>public java.util.ListIterator<T> listIterator(int arg0)
listIterator in interface java.util.List<T>public boolean remove(java.lang.Object arg0)
remove in interface java.util.Collection<T>remove in interface java.util.List<T>public T remove(int arg0)
remove in interface java.util.List<T>public boolean removeAll(java.util.Collection<?> arg0)
removeAll in interface java.util.Collection<T>removeAll in interface java.util.List<T>public boolean retainAll(java.util.Collection<?> arg0)
retainAll in interface java.util.Collection<T>retainAll in interface java.util.List<T>
public T set(int arg0,
T arg1)
set in interface java.util.List<T>public boolean add(T arg0)
add in interface java.util.Collection<T>add in interface java.util.List<T>
public void add(int arg0,
T arg1)
add in interface java.util.List<T>public boolean addAll(java.util.Collection<? extends T> arg0)
addAll in interface java.util.Collection<T>addAll in interface java.util.List<T>
public boolean addAll(int arg0,
java.util.Collection<? extends T> arg1)
addAll in interface java.util.List<T>public void clear()
clear in interface java.util.Collection<T>clear in interface java.util.List<T>
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||