com.atlassian.jira.entity
Class EntityPagedList<E>
java.lang.Object
com.atlassian.jira.entity.EntityPagedList<E>
- All Implemented Interfaces:
- PagedList<E>
public class EntityPagedList<E>
- extends Object
- implements PagedList<E>
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.
- Since:
- v6.1
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityPagedList
public EntityPagedList(int pageSize,
EntityFactory<E> entityFactory,
org.ofbiz.core.entity.EntityCondition entityCondition,
List<String> orderBy)
- Parameters:
pageSize
- desired pageSize, must be greater than 0entityFactory
- EntityFactory used to return List from a ListentityCondition
- Condition to perform search in databaseorderBy
- List of fields to order by
getPage
public List<E> getPage(int pageNumber)
- Specified by:
getPage
in interface PagedList<E>
- Parameters:
pageNumber
- page to retrieve, if the page does not exist throws an IllegalArgumentException
- Returns:
- Lsit containing the items in the page
iterator
public Iterator<List<E>> iterator()
- Iterate over the database results a page at a time
- Specified by:
iterator
in interface PagedList<E>
getCompleteList
public List<E> getCompleteList()
- Specified by:
getCompleteList
in interface PagedList<E>
getSize
public int getSize()
- Specified by:
getSize
in interface PagedList<E>
getPageSize
public int getPageSize()
- Specified by:
getPageSize
in interface PagedList<E>
Copyright © 2002-2013 Atlassian. All Rights Reserved.