Class Overview
Wraps an ListIterator in a paged implementation. You can directly retrieve a specific page via get(n) or get an
Iterator
and iterate the results a page at a time.
Public Constructors
public
EntityPagedList
(int pageSize, EntityFactory<E> entityFactory, EntityCondition entityCondition, List<String> orderBy)
Parameters
pageSize
| desired pageSize, must be greater than 0 |
entityFactory
| EntityFactory used to return List from a List |
entityCondition
| Condition to perform search in database |
orderBy
| List of fields to order by
|
Public Methods
public
List<E>
getCompleteList
()
public
List<E>
getPage
(int pageNumber)
Parameters
pageNumber
| page to retrieve, if the page does not exist throws an IllegalArgumentException |
Returns
- Lsit containing the items in the page
public
int
getPageSize
()
Iterate over the database results a page at a time