public class RestfulCollection<T> extends Object
| Constructor and Description |
|---|
RestfulCollection(List<T> entry)
Creates a new RestfulCollection that includes a complete set of entries.
|
RestfulCollection(List<T> entry,
int startIndex,
int totalResults)
Helper constructor for un-paged collection,
Use
RestfulCollection(java.util.List, int, int, int) in paginated context |
RestfulCollection(List<T> entry,
int startIndex,
int totalResults,
int itemsPerPage)
Create a paginated collection response.
|
| Modifier and Type | Method and Description |
|---|---|
List<T> |
getEntry() |
int |
getItemsPerPage() |
int |
getStartIndex() |
int |
getTotalResults() |
boolean |
isFiltered() |
boolean |
isSorted() |
boolean |
isUpdatedSince() |
void |
setEntry(List<T> entry) |
void |
setFiltered(boolean filtered) |
void |
setItemsPerPage(int itemsPerPage) |
void |
setSorted(boolean sorted) |
void |
setStartIndex(int startIndex) |
void |
setTotalResults(int totalResults) |
void |
setUpdatedSince(boolean updatedSince) |
public RestfulCollection(List<T> entry)
entry - a list of entriespublic RestfulCollection(List<T> entry, int startIndex, int totalResults, int itemsPerPage)
entry - paginated entriesstartIndex - the index corresponding to the first element of {entry}totalResults - the total size of the resultsetitemsPerPage - the size of the pagination, generally set to the user-specified count parameter. Clamped to the totalResults size automaticallypublic RestfulCollection(List<T> entry, int startIndex, int totalResults)
RestfulCollection(java.util.List, int, int, int) in paginated contextpublic int getStartIndex()
public void setStartIndex(int startIndex)
public int getTotalResults()
public void setItemsPerPage(int itemsPerPage)
public int getItemsPerPage()
public void setTotalResults(int totalResults)
public boolean isFiltered()
public void setFiltered(boolean filtered)
public boolean isSorted()
public void setSorted(boolean sorted)
public boolean isUpdatedSince()
public void setUpdatedSince(boolean updatedSince)
Copyright © 2007-2012. All Rights Reserved.