com.atlassian.jira.entity
Class EntityPagedList<E>

java.lang.Object
  extended by 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

Constructor Summary
EntityPagedList(int pageSize, EntityFactory<E> entityFactory, org.ofbiz.core.entity.EntityCondition entityCondition, List<String> orderBy)
           
 
Method Summary
 List<E> getCompleteList()
           
 List<E> getPage(int pageNumber)
           
 int getPageSize()
           
 int getSize()
           
 Iterator<List<E>> iterator()
          Iterate over the database results a page at a time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 0
entityFactory - EntityFactory used to return List from a List
entityCondition - Condition to perform search in database
orderBy - List of fields to order by
Method Detail

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-2014 Atlassian. All Rights Reserved.