org.springframework.data.web

## Class PageableHandlerMethodArgumentResolver

- java.lang.Object
- - org.springframework.data.web.PageableHandlerMethodArgumentResolverSupport
  - - org.springframework.data.web.PageableHandlerMethodArgumentResolver

All Implemented Interfaces:
  PageableArgumentResolver, HandlerMethodArgumentResolver

Direct Known Subclasses:
  HateoasPageableHandlerMethodArgumentResolver

    public class PageableHandlerMethodArgumentResolver
    extends PageableHandlerMethodArgumentResolverSupport
    implements PageableArgumentResolver

Extracts paging information from web requests and thus allows injecting `Pageable` instances into controller methods. Request properties to be parsed can be configured. Default configuration uses request parameters beginning with `PageableHandlerMethodArgumentResolverSupport.DEFAULT_PAGE_PARAMETER` `PageableHandlerMethodArgumentResolverSupport.DEFAULT_QUALIFIER_DELIMITER`.

Since:
  1.6
Author:
  Oliver Gierke, Nick Williams, Mark Paluch, Christoph Strobl

### Constructor Summary

Constructors
Constructor and Description
`PageableHandlerMethodArgumentResolver()` Constructs an instance of this resolved with a default `SortHandlerMethodArgumentResolver`.
`PageableHandlerMethodArgumentResolver(SortArgumentResolver sortResolver)` Constructs an instance of this resolver with the specified `SortArgumentResolver`.
`PageableHandlerMethodArgumentResolver(SortHandlerMethodArgumentResolver sortResolver)` Constructs an instance of this resolver with the specified `SortHandlerMethodArgumentResolver`.

### Method Summary

All Methods Instance Methods Concrete Methods
`Pageable` `resolveArgument(MethodParameter methodParameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory)` Resolves a `Pageable` method parameter into an argument value from a given request.
`boolean` `supportsParameter(MethodParameter parameter)`

### Methods inherited from class org.springframework.data.web.PageableHandlerMethodArgumentResolverSupport

`getMaxPageSize, getPageable, getPageParameterName, getParameterNameToUse, getSizeParameterName, isFallbackPageable, isOneIndexedParameters, setFallbackPageable, setMaxPageSize, setOneIndexedParameters, setPageParameterName, setPrefix, setQualifierDelimiter, setSizeParameterName`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PageableHandlerMethodArgumentResolver

    public PageableHandlerMethodArgumentResolver()

Constructs an instance of this resolved with a default `SortHandlerMethodArgumentResolver`.

#### PageableHandlerMethodArgumentResolver

    public PageableHandlerMethodArgumentResolver(SortHandlerMethodArgumentResolver sortResolver)

Constructs an instance of this resolver with the specified `SortHandlerMethodArgumentResolver`.

Parameters:
  `sortResolver` - the sort resolver to use

#### PageableHandlerMethodArgumentResolver

    public PageableHandlerMethodArgumentResolver(@Nullable
                                                 SortArgumentResolver sortResolver)

Constructs an instance of this resolver with the specified `SortArgumentResolver`.

Parameters:
  `sortResolver` - the sort resolver to use
Since:
  1.13

### Method Detail

#### supportsParameter

    public boolean supportsParameter(MethodParameter parameter)

Specified by:
  `supportsParameter` in interface `HandlerMethodArgumentResolver`

#### resolveArgument

    public Pageable resolveArgument(MethodParameter methodParameter,
                                    @Nullable
                                    ModelAndViewContainer mavContainer,
                                    NativeWebRequest webRequest,
                                    @Nullable
                                    WebDataBinderFactory binderFactory)

Description copied from interface: `PageableArgumentResolver`
Resolves a `Pageable` method parameter into an argument value from a given request.

Specified by:
  `resolveArgument` in interface `PageableArgumentResolver`
Specified by:
  `resolveArgument` in interface `HandlerMethodArgumentResolver`
Parameters:
  `methodParameter` - the method parameter to resolve. This parameter must have previously been passed to `HandlerMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)` which must have returned `true`.
  `mavContainer` - the ModelAndViewContainer for the current request
  `webRequest` - the current request
  `binderFactory` - a factory for creating `WebDataBinder` instances
Returns:
  the resolved argument value.