Interface PageableConfiguration
- All Known Subinterfaces:
KeysetPageableConfiguration
public interface PageableConfiguration
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescriptionReturns the pageable to fall back to when no page configuration is given.intReturns the allowed maximum page size.Returns the name of the query parameter to use for the offset.Returns the name of the query parameter to use for the page.Returns the name prefix to use when extracting query parameters.Returns the name of the query parameter to use for the pageSize.Returns the name of the query parameter to use for the sort.booleanReturns whether the page parameter is 1-based rather than 0-based.voidsetFallbackPageable(Pageable fallbackPageable) Sets the pageable to use when no page configuration is given.voidsetMaxPageSize(int maxPageSize) Sets the allowed maximum page size.voidsetOffsetParameterName(String offsetParameterName) Sets the name of the query parameter that should be used to extract the offset value.voidsetOneIndexedParameters(boolean oneIndexedParameters) Sets whether the page parameter is 1-based or 0-based.voidsetPageParameterName(String pageParameterName) Sets the name of the query parameter that should be used to extract the page value.voidSets the query parameter name prefix to use for extracting query parameters.voidsetSizeParameterName(String sizeParameterName) Sets the name of the query parameter that should be used to extract the pageSize value.voidsetSortParameterName(String sortParameterName) Sets the name of the query parameter that should be used to extract the sort value.
-
Method Details
-
getFallbackPageable
Pageable getFallbackPageable()Returns the pageable to fall back to when no page configuration is given.- Returns:
- The fallback pageable
-
setFallbackPageable
Sets the pageable to use when no page configuration is given.- Parameters:
fallbackPageable- The fallback pageable
-
getOffsetParameterName
String getOffsetParameterName()Returns the name of the query parameter to use for the offset.- Returns:
- The query parameter name for the offset
- Since:
- 1.3.0
-
setOffsetParameterName
Sets the name of the query parameter that should be used to extract the offset value.- Parameters:
offsetParameterName- The query parameter name for the offset- Since:
- 1.3.0
-
getPageParameterName
String getPageParameterName()Returns the name of the query parameter to use for the page.- Returns:
- The query parameter name for the page
-
setPageParameterName
Sets the name of the query parameter that should be used to extract the page value.- Parameters:
pageParameterName- The query parameter name for the page
-
getSizeParameterName
String getSizeParameterName()Returns the name of the query parameter to use for the pageSize.- Returns:
- The query parameter name for the page size
-
setSizeParameterName
Sets the name of the query parameter that should be used to extract the pageSize value.- Parameters:
sizeParameterName- The query parameter name for the page size
-
getSortParameterName
String getSortParameterName()Returns the name of the query parameter to use for the sort.- Returns:
- The query parameter name for the sort
-
setSortParameterName
Sets the name of the query parameter that should be used to extract the sort value.- Parameters:
sortParameterName- The query parameter name for the sort
-
getPrefix
String getPrefix()Returns the name prefix to use when extracting query parameters.- Returns:
- The query parameter name prefix
-
setPrefix
Sets the query parameter name prefix to use for extracting query parameters.- Parameters:
prefix- The query parameter name prefix
-
getMaxPageSize
int getMaxPageSize()Returns the allowed maximum page size.- Returns:
- The allowed maximum page size
-
setMaxPageSize
void setMaxPageSize(int maxPageSize) Sets the allowed maximum page size.- Parameters:
maxPageSize- The allowed maximum page size
-
isOneIndexedParameters
boolean isOneIndexedParameters()Returns whether the page parameter is 1-based rather than 0-based.- Returns:
trueif page is 1-based, false if 0-based
-
setOneIndexedParameters
void setOneIndexedParameters(boolean oneIndexedParameters) Sets whether the page parameter is 1-based or 0-based.- Parameters:
oneIndexedParameters-trueif 1-based, false if 0-based
-