Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.data.domain
Class PageRequest

    java.lang.Object
      org.springframework.data.domain.PageRequest

All Implemented Interfaces:
  Serializable, Pageable

    public class PageRequest

extends Object
implements Pageable, Serializable

Basic Java Bean implementation of `Pageable`.

Author:
  Oliver Gierke
See Also:
  Serialized Form

Constructor Summary
`PageRequest(int page, int size)` Creates a new `PageRequest`.
`PageRequest(int page, int size, Sort.Direction direction, String... properties)` Creates a new `PageRequest` with sort parameters applied.
`PageRequest(int page, int size, Sort sort)` Creates a new `PageRequest` with sort parameters applied.

Method Summary
`boolean` | `equals(Object obj)`
`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.
`int` | `hashCode()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PageRequest

    public PageRequest(int page,
                       int size)

  Creates a new `PageRequest`. Pages are zero indexed, thus providing 0 for `page` will return the first page.

  Parameters:
    `size` -
    `page` -

### PageRequest

    public PageRequest(int page,
                       int size,
                       Sort.Direction direction,
                       String... properties)

  Creates a new `PageRequest` with sort parameters applied.

  Parameters:
    `page` -
    `size` -
    `direction` -
    `properties` -

### PageRequest

    public PageRequest(int page,
                       int size,
                       Sort sort)

  Creates a new `PageRequest` with sort parameters applied.

  Parameters:
    `page` -
    `size` -
    `sort` -

Method Detail

### getPageSize

    public int getPageSize()

  Description copied from interface: `Pageable`
  Returns the number of items to be returned.

  Specified by:
    `getPageSize` in interface `Pageable`
  Returns:
    the number of items of that page

### getPageNumber

    public int getPageNumber()

  Description copied from interface: `Pageable`
  Returns the page to be returned.

  Specified by:
    `getPageNumber` in interface `Pageable`
  Returns:
    the page to be returned.

### getOffset

    public int getOffset()

  Description copied from interface: `Pageable`
  Returns the offset to be taken according to the underlying page and page size.

  Specified by:
    `getOffset` in interface `Pageable`
  Returns:
    the offset to be taken

### getSort

    public Sort getSort()

  Description copied from interface: `Pageable`
  Returns the sorting parameters.

  Specified by:
    `getSort` in interface `Pageable`
  Returns:

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.