
com.avaje.ebean.Page Maven / Gradle / Ivy
The newest version!
package com.avaje.ebean;
import java.util.List;
/**
* 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
*
* @param
* the entity bean type
*
* @see Query#findPagingList(int)
* @see PagingList
*/
public interface Page {
/**
* Return the list of entities for this page.
*/
public List getList();
/**
* Return the total row count for all pages.
*/
public int getTotalRowCount();
/**
* Return the total number of pages.
*/
public int getTotalPageCount();
/**
* Return the index position of this page.
*/
public int getPageIndex();
/**
* Return true if there is a next page.
*/
public boolean hasNext();
/**
* Return true if there is a previous page.
*/
public boolean hasPrev();
/**
* Return the next page.
*/
public Page next();
/**
* Return the previous page.
*/
public Page prev();
/**
* 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.
*
* @param to
* String to put between the first and last row
* @param of
* String to put between the last row and the total row count
*
* @return String of the format XtoYofZ.
*/
public String getDisplayXtoYofZ(String to, String of);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy