
org.eweb4j.orm.Page Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eweb4j-all Show documentation
Show all versions of eweb4j-all Show documentation
easy web framework for java, full-stack
The newest version!
package org.eweb4j.orm;
import java.util.Collection;
/**
* 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 Collection getList();
/**
* Return the total row count for all pages.
*/
public long getTotalRowCount();
/**
* Return the total number of pages.
*/
public long 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