org.springframework.data.web
Class PageableArgumentResolver
java.lang.Object
org.springframework.data.web.PageableArgumentResolver
- All Implemented Interfaces:
- WebArgumentResolver
public class PageableArgumentResolver
- extends Object
- implements WebArgumentResolver
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 properties
beginning with DEFAULT_PREFIX
DEFAULT_SEPARATOR
.
- Author:
- Oliver Gierke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PageableArgumentResolver
public PageableArgumentResolver()
setFallbackPagable
public void setFallbackPagable(Pageable fallbackPagable)
- Setter to configure a fallback instance of
Pageable
that is being
used to back missing parameters. Defaults to
.
- Parameters:
fallbackPagable
- the fallbackPagable to set
setPrefix
public void setPrefix(String prefix)
- Setter to configure the prefix of request parameters to be used to
retrieve paging information. Defaults to
DEFAULT_PREFIX
.
- Parameters:
prefix
- the prefix to set
setSeparator
public void setSeparator(String separator)
- Setter to configure the separator between prefix and actual property
value. Defaults to
DEFAULT_SEPARATOR
.
- Parameters:
separator
- the separator to set
resolveArgument
public Object resolveArgument(MethodParameter methodParameter,
NativeWebRequest webRequest)
- Specified by:
resolveArgument
in interface WebArgumentResolver
Copyright © 2011. All Rights Reserved.