com.geekologue.md4j.dao
Interface Page

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
HbmQueryResultPage

public interface Page
extends java.io.Serializable

Instances of this class are created by DAOs when "paged" results are requested. The created instance contains a page of results matching a query, along with other information such as the number of the page, the number of results per page, the total number of results etc.


Method Summary
 int getFirstResultIndex()
          Get the index of the first result in the page
 java.util.List getList()
          Get the page of results as the list
 int getPageNumber()
          Get the page number
 java.util.Map getParentOptions()
           
 int getTotalPageCount()
          Get the total number of pages that can be used to divide the total results using the current page size.
 int getTotalResultCount()
           
 boolean isFirst()
          See if this page is the first
 boolean isLast()
          See if this page is the last
 void setList(java.util.List list)
          Set the list of results for this page.
 

Method Detail

getTotalResultCount

int getTotalResultCount()
Returns:
Returns the total number of results the query can return, of which this page instance contains a subset.

getTotalPageCount

int getTotalPageCount()
Get the total number of pages that can be used to divide the total results using the current page size.

Returns:
the total number of pages

isFirst

boolean isFirst()
See if this page is the first

Returns:
true if first, false otherwise

isLast

boolean isLast()
See if this page is the last

Returns:
true if last, false otherwise

getList

java.util.List getList()
Get the page of results as the list

Returns:
the list containing the results for this page

setList

void setList(java.util.List list)
Set the list of results for this page. You may want to use this method after processing the list obtained via getList()

Parameters:
list - the list of results to set for this page

getPageNumber

int getPageNumber()
Get the page number

Returns:
the page number as given to the constructor

getFirstResultIndex

int getFirstResultIndex()
Get the index of the first result in the page


getParentOptions

java.util.Map getParentOptions()


Copyright © 2003-2007 Manos Batsis. All Rights Reserved.