Spring Data Core

org.springframework.data.querydsl
Class QPageRequest

java.lang.Object
  extended by org.springframework.data.domain.AbstractPageRequest
      extended by org.springframework.data.querydsl.QPageRequest
All Implemented Interfaces:
Serializable, Pageable

public class QPageRequest
extends AbstractPageRequest

Basic Java Bean implementation of Pageable with support for QueryDSL.

Author:
Thomas Darimont
See Also:
Serialized Form

Constructor Summary
QPageRequest(int page, int size)
          Creates a new QPageRequest.
QPageRequest(int page, int size, com.mysema.query.types.OrderSpecifier<?>... orderSpecifiers)
          Creates a new QPageRequest with the given OrderSpecifiers applied.
QPageRequest(int page, int size, QSort sort)
          Creates a new QPageRequest with sort parameters applied.
 
Method Summary
 Pageable first()
          Returns the Pageable requesting the first page.
 QSort getSort()
          Returns the sorting parameters.
 Pageable next()
          Returns the Pageable requesting the next Page.
 Pageable previous()
          Returns the Pageable requesting the previous Page.
 
Methods inherited from class org.springframework.data.domain.AbstractPageRequest
equals, getOffset, getPageNumber, getPageSize, hashCode, hasPrevious, previousOrFirst
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QPageRequest

public QPageRequest(int page,
                    int size)
Creates a new QPageRequest. Pages are zero indexed, thus providing 0 for page will return the first page.

Parameters:
page -
size -

QPageRequest

public QPageRequest(int page,
                    int size,
                    com.mysema.query.types.OrderSpecifier<?>... orderSpecifiers)
Creates a new QPageRequest with the given OrderSpecifiers applied.

Parameters:
page -
size -
orderSpecifiers - must not be null or empty;

QPageRequest

public QPageRequest(int page,
                    int size,
                    QSort sort)
Creates a new QPageRequest with sort parameters applied.

Parameters:
page -
size -
sort -
Method Detail

getSort

public QSort getSort()
Description copied from interface: Pageable
Returns the sorting parameters.

Returns:

next

public Pageable next()
Description copied from interface: Pageable
Returns the Pageable requesting the next Page.

Specified by:
next in interface Pageable
Specified by:
next in class AbstractPageRequest
Returns:

previous

public Pageable previous()
Description copied from class: AbstractPageRequest
Returns the Pageable requesting the previous Page.

Specified by:
previous in class AbstractPageRequest
Returns:

first

public Pageable first()
Description copied from interface: Pageable
Returns the Pageable requesting the first page.

Specified by:
first in interface Pageable
Specified by:
first in class AbstractPageRequest
Returns:

Spring Data Core

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.