Package com.skava.foundation.request
Class BaseFilterRequestParam
java.lang.Object
com.skava.foundation.request.BaseFilterRequestParam
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
FilterRequestParam
Defines the basic filters
- Since:
- 8.0
- Version:
- 8.0
- Author:
- Infosys Equinox
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
It is a sort text for the request.static final int
Maximum page size -
Constructor Summary
ConstructorsConstructorDescriptionBaseFilterRequestParam
(int page, int size, org.springframework.data.domain.Sort sort, String filters) -
Method Summary
Modifier and TypeMethodDescriptiongetCacheKeyById
(long id) returns cache key when the pageable request can be cached otherwise null.org.springframework.data.domain.Pageable
Creates Pageable object with page, size and sortcom.querydsl.core.types.Predicate
getPredicate
(Class<?> entityClazz) Get Query DSL Predicate.
-
Field Details
-
MAX_PAGE_SIZE
public static final int MAX_PAGE_SIZEMaximum page size- See Also:
-
cacheKey
It is a sort text for the request.
-
-
Constructor Details
-
BaseFilterRequestParam
public BaseFilterRequestParam(int page, int size, org.springframework.data.domain.Sort sort, String filters) - Parameters:
page
- Indicates the starting index of the item to be responded by the API.size
- Specifies the maximum number of items responded to the request.sort
- Specifies the sort field with ascending or descending order. The default value is ascending order.filters
- Holds the simple or complex query criteria based on the available fields to limit returned results.
-
-
Method Details
-
getPageable
public org.springframework.data.domain.Pageable getPageable()Creates Pageable object with page, size and sort- Returns:
- A new Pageable object
-
getPredicate
Get Query DSL Predicate.- Parameters:
entityClazz
- It contains entity to be predicate- Returns:
- it returns predicate.
-
getCacheKeyById
returns cache key when the pageable request can be cached otherwise null.- Parameters:
id
- Unique ID- Returns:
- Returns cache key
-