Package io.micronaut.data.runtime.config
Class DataConfiguration.PageableConfiguration
java.lang.Object
io.micronaut.data.runtime.config.DataConfiguration.PageableConfiguration
- Enclosing class:
- DataConfiguration
@ConfigurationProperties("pageable")
public static class DataConfiguration.PageableConfiguration
extends Object
Configuration for pageable.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
boolean
void
setDefaultPageSize
(int defaultPageSize) Sets the default page size when bindingPageable
objects and no size parameter is used.void
setMaxPageSize
(int maxPageSize) Sets the maximum page size when bindingPageable
objects.void
setPageParameterName
(String pageParameterName) void
setSizeParameterName
(String sizeParameterName) void
setSortDelimiter
(String sortDelimiter) void
setSortIgnoreCase
(boolean sortIgnoreCase) void
setSortParameterName
(String sortParameterName)
-
Field Details
-
DEFAULT_MAX_PAGE_SIZE
public static final int DEFAULT_MAX_PAGE_SIZE- See Also:
-
DEFAULT_SORT_IGNORE_CASE
public static final boolean DEFAULT_SORT_IGNORE_CASE- See Also:
-
DEFAULT_SORT_PARAMETER
- See Also:
-
DEFAULT_SIZE_PARAMETER
- See Also:
-
DEFAULT_PAGE_PARAMETER
- See Also:
-
PREFIX
- See Also:
-
-
Constructor Details
-
PageableConfiguration
public PageableConfiguration()
-
-
Method Details
-
isSortIgnoreCase
public boolean isSortIgnoreCase()- Returns:
- Whether sort ignores case.
-
setSortIgnoreCase
public void setSortIgnoreCase(boolean sortIgnoreCase) - Parameters:
sortIgnoreCase
- Whether sort ignores case
-
getSortDelimiterPattern
- Returns:
- The delimiter to use to calculate sort order. Defaults to
,
.
-
setSortDelimiter
- Parameters:
sortDelimiter
- The delimiter to use to calculate sort order. Defaults to,
.
-
getMaxPageSize
public int getMaxPageSize()- Returns:
- The maximum page size when binding
Pageable
objects.
-
setMaxPageSize
public void setMaxPageSize(int maxPageSize) Sets the maximum page size when bindingPageable
objects.- Parameters:
maxPageSize
- The max page size
-
getDefaultPageSize
public int getDefaultPageSize()- Returns:
- the page size to use when binding
Pageable
objects and no size parameter is used. By default is set to the same vale asmaxPageSize
-
setDefaultPageSize
public void setDefaultPageSize(int defaultPageSize) Sets the default page size when bindingPageable
objects and no size parameter is used. Should be smaller or equal thanmaxPageSize
.- Parameters:
defaultPageSize
- The default page size
-
getSortParameterName
- Returns:
- The default sort parameter name
-
setSortParameterName
- Parameters:
sortParameterName
- The default sort parameter name
-
getSizeParameterName
- Returns:
- The default size parameter name
-
setSizeParameterName
- Parameters:
sizeParameterName
- The default size parameter name
-
getPageParameterName
- Returns:
- The default page parameter name
-
setPageParameterName
- Parameters:
pageParameterName
- Sets the default page parameter name
-