FilteredQuery
The FilteredQuery<T>
class is an abstract helper designed to facilitate the dynamic creation and execution of filtered queries using JPA Criteria API. It is structured to simplify filtering, querying, and pagination of entities from a database while allowing custom predicates to be added dynamically by subclasses
Author
Tecknobit - N7ghtm4r3
Since
1.0.5
Parameters
<T>
Type of the entities to retrieve
Constructors
Link copied to clipboard
Constructor to init the FilteredQuery
Properties
Link copied to clipboard
criteriaBuilder
the builder to add the criteria to filter the queryLink copied to clipboard
entityManager
manage the entitiesLink copied to clipboard
predicates
the list of predicates to apply to the queryLink copied to clipboard
rawFilters
the filters all together in raw formatFunctions
Link copied to clipboard
Method used to extract from the rawFilters the specific set of filters
Link copied to clipboard
Wrapper method to fill all the predicates dynamically
Link copied to clipboard
Method used to get the entities executing the query
Method used to get the paginated entities executing the query
Link copied to clipboard
Method used to prepare the query adding the predicates