pl.slawas.paging
Class Page

java.lang.Object
  extended by pl.slawas.paging.Page
All Implemented Interfaces:
java.io.Serializable

public class Page
extends java.lang.Object
implements java.io.Serializable

Page - definicja strony wyników. Implementację zaczerpnąłem z projektu WPLucene.

Version:
$Revision: 1.4 $
Author:
Slawomir Cichy <slawas@slawas.pl>, Patryk Makuch <pmakuch@slawas.pl>
See Also:
Serialized Form

Field Summary
static int DEFAULT_MAX_PAGES
          Domyślna maksymalna liczba stron wyników zapytania SQL
static int DEFAULT_PAGE_NR
          Domyślny numer strony stronicowanego wyniku zapytania.
static int DEFAULT_PAGE_SIZE
          Domyślny rozmiar storny, czyli liczba wierszy przezentowana w stronicowanym wyniku zapytania
static int MIN_PAGE_NR
          Minimalny numer strony stronicowanego wyniku zapytania.
 
Constructor Summary
Page()
           
Page(int number)
           
Page(int size, int number)
           
 
Method Summary
 int getFirstRowNumber()
           
 int getLastRowNumber()
           
 int getNumber()
           
 int getNumberOfRowsOnThePage()
          Liczba wierszy na stronie
 int getSize()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_PAGE_SIZE

public static final int DEFAULT_PAGE_SIZE
Domyślny rozmiar storny, czyli liczba wierszy przezentowana w stronicowanym wyniku zapytania

See Also:
Constant Field Values

DEFAULT_PAGE_NR

public static final int DEFAULT_PAGE_NR
Domyślny numer strony stronicowanego wyniku zapytania.

See Also:
Constant Field Values

MIN_PAGE_NR

public static final int MIN_PAGE_NR
Minimalny numer strony stronicowanego wyniku zapytania.

See Also:
Constant Field Values

DEFAULT_MAX_PAGES

public static int DEFAULT_MAX_PAGES
Domyślna maksymalna liczba stron wyników zapytania SQL

Constructor Detail

Page

public Page()

Page

public Page(int number)
Parameters:
number - nr strony

Page

public Page(int size,
            int number)
Parameters:
size - rozmiar strony, czyli maksymalna liczba wyników zapytania na stronie
number - nr strony
Method Detail

getSize

public int getSize()

getNumber

public int getNumber()

getFirstRowNumber

public int getFirstRowNumber()
Returns:
the firstRowNumber

getLastRowNumber

public int getLastRowNumber()
Returns:
the endPosition

getNumberOfRowsOnThePage

public int getNumberOfRowsOnThePage()
Liczba wierszy na stronie

Returns:
liczba wierszy na stronie wyznaczoną poprzez różnicę pomiędzy lastRowNumber oraz firstRowNumber

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2014 Sci Software. All Rights Reserved.