Filtered
Query
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 query
Link copied to clipboard
entityManager
manage the
entities
Link copied to clipboard
predicates
the list of predicates to apply to the query
Link copied to clipboard
rawFilters
the filters all together in raw format
Functions
Link copied to clipboard
Method 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 to get the entities executing the
query
Method to get the paginated entities
executing the query
Link copied to clipboard
Method to prepare the query adding the
predicates