Package com.skava.address.util
Class PredicateUtil
java.lang.Object
com.skava.address.util.PredicateUtil
This is final class to use for filter and sort logic using query dsl
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.querydsl.core.types.Predicate
getPredicate
(Class<?> entityClazz, com.skava.core.qdsl.filter.EcomFilters filters) Get Querydsl Predicatestatic com.querydsl.core.types.Predicate
getPredicate
(Class<?> entityClazz, String expression) Get Querydsl Predicatestatic org.springframework.data.domain.Sort
Get Sort This is method to construct query with filer.
-
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 clazzecomSort
- 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 predicatefilters
- 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 predicateexpression
- It contains filters to be applied.- Returns:
- it returns predicate.
-