Class PredicateUtil

java.lang.Object
com.skava.address.util.PredicateUtil

public final class PredicateUtil extends Object
This is final class to use for filter and sort logic using query dsl
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.querydsl.core.types.Predicate
    getPredicate(Class<?> entityClazz, com.skava.core.qdsl.filter.EcomFilters filters)
    Get Querydsl Predicate
    static com.querydsl.core.types.Predicate
    getPredicate(Class<?> entityClazz, String expression)
    Get Querydsl Predicate
    static org.springframework.data.domain.Sort
    getSort(Class<?> entityClazz, com.skava.core.qdsl.sort.EcomSorts ecomSort)
    Get Sort This is method to construct query with filer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getSort

      public static org.springframework.data.domain.Sort getSort(Class<?> entityClazz, com.skava.core.qdsl.sort.EcomSorts ecomSort)
      Get Sort This is method to construct query with filer.
      Parameters:
      entityClazz - the entity clazz
      ecomSort - the ecom sort
      Returns:
      the sort
    • getPredicate

      public static com.querydsl.core.types.Predicate getPredicate(Class<?> entityClazz, com.skava.core.qdsl.filter.EcomFilters filters)
      Get Querydsl Predicate
      Parameters:
      entityClazz - It contains entitiy to be predicate
      filters - It contains filters to be applied.
      Returns:
      it returns predicate.
    • getPredicate

      public static com.querydsl.core.types.Predicate getPredicate(Class<?> entityClazz, String expression)
      Get Querydsl Predicate
      Parameters:
      entityClazz - It contains entitiy to be predicate
      expression - It contains filters to be applied.
      Returns:
      it returns predicate.