Package com.skava.auth.util
Class QueryDSLSearchUtil
java.lang.Object
com.skava.auth.util.QueryDSLSearchUtil
- Direct Known Subclasses:
SearchUtil
Utility class for search operations using QueryDSL libraries.
- Author:
- Infosys Equinox
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> String
convertFilter
(String filter, jakarta.persistence.EntityManager entityManager, Class<T> entityType) This method will convert the old filter format to QueryDSL format.static <T,
I> org.springframework.data.domain.Page<T> searchEntitiesByBusinessId
(String filter, Long businessId, org.springframework.data.domain.PageRequest pageRequest, Class<T> entityType, org.springframework.data.querydsl.QuerydslPredicateExecutor<T> repository, org.springframework.data.repository.PagingAndSortingRepository<T, I> pagingRepository, jakarta.persistence.EntityManager entityManager) This method is used to search entity.static <T> org.springframework.data.domain.Page<T>
searchEntitiesByCollectionIdAndBusinessId
(String filter, Long collectionId, Long businessId, org.springframework.data.domain.PageRequest pageRequest, Class<T> entityType, org.springframework.data.querydsl.QuerydslPredicateExecutor<T> repository, jakarta.persistence.EntityManager entityManager) This method is used to search entity.
-
Field Details
-
SEARCH_KEY_INDEX
protected static final int SEARCH_KEY_INDEX- See Also:
-
SEARCH_OPERATION_INDEX
protected static final int SEARCH_OPERATION_INDEX- See Also:
-
SEARCH_VALUES_INDEX
protected static final int SEARCH_VALUES_INDEX- See Also:
-
GREATER_THAN_OPERATION
- See Also:
-
LESSER_THAN_OPERATION
- See Also:
-
EQUAL_OPERATION
- See Also:
-
-
Constructor Details
-
QueryDSLSearchUtil
protected QueryDSLSearchUtil()protected constructor.
-
-
Method Details
-
convertFilter
public static <T> String convertFilter(String filter, jakarta.persistence.EntityManager entityManager, Class<T> entityType) This method will convert the old filter format to QueryDSL format. -
searchEntitiesByCollectionIdAndBusinessId
public static <T> org.springframework.data.domain.Page<T> searchEntitiesByCollectionIdAndBusinessId(String filter, Long collectionId, Long businessId, org.springframework.data.domain.PageRequest pageRequest, Class<T> entityType, org.springframework.data.querydsl.QuerydslPredicateExecutor<T> repository, jakarta.persistence.EntityManager entityManager) This method is used to search entity.- Type Parameters:
T
- a template value.- Parameters:
filter
- aString
object.collectionId
- aLong
object.businessId
- aLong
object.pageRequest
- aPageRequest
object.entityType
- aClass
object.repository
- aQuerydslPredicateExecutor
object.entityManager
- aEntityManager
object- Returns:
- a
Page
of entity object.
-
searchEntitiesByBusinessId
public static <T,I> org.springframework.data.domain.Page<T> searchEntitiesByBusinessId(String filter, Long businessId, org.springframework.data.domain.PageRequest pageRequest, Class<T> entityType, org.springframework.data.querydsl.QuerydslPredicateExecutor<T> repository, org.springframework.data.repository.PagingAndSortingRepository<T, I> pagingRepository, jakarta.persistence.EntityManager entityManager) This method is used to search entity.- Type Parameters:
T
- a template value.I
- an identifier template of the entity.- Parameters:
filter
- aString
object.businessId
- aLong
object.pageRequest
- aPageRequest
object.entityType
- aClass
object.repository
- aQuerydslPredicateExecutor
object.entityManager
- aEntityManager
objectpagingRepository
- the pagingRepository- Returns:
- a
Page
of entity object.
-