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
  • Constructor Details

    • 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 Details

    • 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>