com.avaje.ebean
Interface Page<T>

Type Parameters:
T - the entity bean type

public interface Page<T>

Represents a Page of results that is part of a PagingList.

Typically a Page represents the data that is shown to the user at a single time - and the user 'pages' through a large list.

Author:
rbygrave
See Also:
Query.findPagingList(int), PagingList

Method Summary
 String getDisplayXtoYofZ(String to, String of)
          Helper method to return a "X to Y of Z" string for this page where X is the first row, Y the last row and Z the total row count.
 List<T> getList()
          Return the list of entities for this page.
 int getPageIndex()
          Return the index position of this page.
 int getTotalPageCount()
          Return the total number of pages.
 int getTotalRowCount()
          Return the total row count for all pages.
 boolean hasNext()
          Return true if there is a next page.
 boolean hasPrev()
          Return true if there is a previous page.
 Page<T> next()
          Return the next page.
 Page<T> prev()
          Return the previous page.
 

Method Detail

getList

List<T> getList()
Return the list of entities for this page.


getTotalRowCount

int getTotalRowCount()
Return the total row count for all pages.


getTotalPageCount

int getTotalPageCount()
Return the total number of pages.


getPageIndex

int getPageIndex()
Return the index position of this page.


hasNext

boolean hasNext()
Return true if there is a next page.


hasPrev

boolean hasPrev()
Return true if there is a previous page.


next

Page<T> next()
Return the next page.


prev

Page<T> prev()
Return the previous page.


getDisplayXtoYofZ

String getDisplayXtoYofZ(String to,
                         String of)
Helper method to return a "X to Y of Z" string for this page where X is the first row, Y the last row and Z the total row count.

Parameters:
to - String to put between the first and last row
of - String to put between the last row and the total row count
Returns:
String of the format XtoYofZ.


Copyright © 2010. All Rights Reserved.