Spring Data Core

org.springframework.data.domain
Interface Pageable

All Known Implementing Classes:
PageRequest

public interface Pageable

Abstract interface for pagination information.

Author:
Oliver Gierke

Method Summary
 Pageable first()
          Returns the Pageable requesting the first page.
 int getOffset()
          Returns the offset to be taken according to the underlying page and page size.
 int getPageNumber()
          Returns the page to be returned.
 int getPageSize()
          Returns the number of items to be returned.
 Sort getSort()
          Returns the sorting parameters.
 boolean hasPrevious()
          Returns whether there's a previous Pageable we can access from the current one.
 Pageable next()
          Returns the Pageable requesting the next Page.
 Pageable previousOrFirst()
          Returns the previous Pageable or the first Pageable if the current one already is the first one.
 

Method Detail

getPageNumber

int getPageNumber()
Returns the page to be returned.

Returns:
the page to be returned.

getPageSize

int getPageSize()
Returns the number of items to be returned.

Returns:
the number of items of that page

getOffset

int getOffset()
Returns the offset to be taken according to the underlying page and page size.

Returns:
the offset to be taken

getSort

Sort getSort()
Returns the sorting parameters.

Returns:

next

Pageable next()
Returns the Pageable requesting the next Page.

Returns:

previousOrFirst

Pageable previousOrFirst()
Returns the previous Pageable or the first Pageable if the current one already is the first one.

Returns:

first

Pageable first()
Returns the Pageable requesting the first page.

Returns:

hasPrevious

boolean hasPrevious()
Returns whether there's a previous Pageable we can access from the current one. Will return false in case the current Pageable already refers to the first page.

Returns:

Spring Data Core

Copyright © 2011-2013-2013 Pivotal. All Rights Reserved.