Class BaseFilterRequestParam

java.lang.Object
com.skava.foundation.request.BaseFilterRequestParam
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FilterRequestParam

public class BaseFilterRequestParam extends Object implements Serializable

Defines the basic filters

Since:
8.0
Version:
8.0
Author:
Infosys Equinox
See Also:
  • Field Details

    • MAX_PAGE_SIZE

      public static final int MAX_PAGE_SIZE
      Maximum page size
      See Also:
    • cacheKey

      protected String 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

      public com.querydsl.core.types.Predicate getPredicate(Class<?> entityClazz)
      Get Query DSL Predicate.
      Parameters:
      entityClazz - It contains entity to be predicate
      Returns:
      it returns predicate.
    • getCacheKeyById

      public String getCacheKeyById(long id)
      returns cache key when the pageable request can be cached otherwise null.
      Parameters:
      id - Unique ID
      Returns:
      Returns cache key