public class PageableHandlerMethodArgumentResolver extends PageableHandlerMethodArgumentResolverSupport implements PageableArgumentResolver
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
.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 . |
Modifier and Type | Method and Description |
---|---|
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) |
getMaxPageSize, getPageable, getPageParameterName, getParameterNameToUse, getSizeParameterName, isFallbackPageable, isOneIndexedParameters, setFallbackPageable, setMaxPageSize, setOneIndexedParameters, setPageParameterName, setPrefix, setQualifierDelimiter, setSizeParameterName
public PageableHandlerMethodArgumentResolver()
SortHandlerMethodArgumentResolver
.public PageableHandlerMethodArgumentResolver(SortHandlerMethodArgumentResolver sortResolver)
SortHandlerMethodArgumentResolver
.sortResolver
- the sort resolver to usepublic PageableHandlerMethodArgumentResolver(@Nullable SortArgumentResolver sortResolver)
SortArgumentResolver
.sortResolver
- the sort resolver to usepublic boolean supportsParameter(MethodParameter parameter)
supportsParameter
in interface HandlerMethodArgumentResolver
public Pageable resolveArgument(MethodParameter methodParameter, @Nullable ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable WebDataBinderFactory binderFactory)
PageableArgumentResolver
Pageable
method parameter into an argument value from a given request.resolveArgument
in interface PageableArgumentResolver
resolveArgument
in interface HandlerMethodArgumentResolver
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 requestwebRequest
- the current requestbinderFactory
- a factory for creating WebDataBinder
instancesCopyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.