pt.digitalis.dif.utils
Class Pagination

java.lang.Object
  extended by pt.digitalis.dif.utils.Pagination

public class Pagination
extends Object

Abstracts the various implementations of pagination

Author:
Fábio Souto fsouto@digitalis.pt
Created on:
9 de Nov de 2011

Constructor Summary
Pagination(Integer page, Integer rowsPerPage)
          Instantiates a new pagination object.
 
Method Summary
 int getEndRow()
          Get the end row
 int getPage()
          Get the page to be fetched
 int getRowsPerPage()
          Get the limit of results per page
 int getStartRow()
          Get the start row
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pagination

public Pagination(Integer page,
                  Integer rowsPerPage)
Instantiates a new pagination object. The limit is always required, and at least one of the two parameters (page or start)

Parameters:
page - The page to be presented or null (start required)
rowsPerPage - The limit of results per page
Method Detail

getEndRow

public int getEndRow()
Get the end row

Returns:
the end row

getPage

public int getPage()
Get the page to be fetched

Returns:
The page to be fetched

getRowsPerPage

public int getRowsPerPage()
Get the limit of results per page

Returns:
The limit of results per page

getStartRow

public int getStartRow()
Get the start row

Returns:
the start row


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.