Class GreaterThanConditionalSearchCriteria
java.lang.Object
com.samupert.univpm.eurostat.filtering.criteria.conditional.ConditionalSearchCriteria<Number>
com.samupert.univpm.eurostat.filtering.criteria.conditional.GreaterThanConditionalSearchCriteria
- All Implemented Interfaces:
SearchCriteriaSpecification
,Serializable
,org.springframework.data.jpa.domain.Specification<MonetaryPoverty>
The conditional search criteria specification that checks if the field value is greater than the given value. See
The JSON filter is:
Specification
.
The JSON filter is:
{ "operation": "$gt", "fieldName": "timePeriod", "value": 2018 }
- See Also:
-
Field Summary
Fields inherited from class com.samupert.univpm.eurostat.filtering.criteria.conditional.ConditionalSearchCriteria
fieldName, value
Fields inherited from interface org.springframework.data.jpa.domain.Specification
serialVersionUID
-
Constructor Summary
ConstructorDescriptionGreaterThanConditionalSearchCriteria
(String fieldName, Object value) Creates a new instance of theGreaterThanConditionalSearchCriteria
class. -
Method Summary
Modifier and TypeMethodDescriptionprotected jakarta.persistence.criteria.Predicate
getPredicate
(jakarta.persistence.criteria.Root<MonetaryPoverty> root, jakarta.persistence.criteria.CriteriaQuery<?> query, jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder) Wrapper method that returns the predicate of the search criteria.Gets the list of supported field types of the search criteria.Methods inherited from class com.samupert.univpm.eurostat.filtering.criteria.conditional.ConditionalSearchCriteria
toPredicate, validateFieldName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.jpa.domain.Specification
and, or
-
Constructor Details
-
GreaterThanConditionalSearchCriteria
public GreaterThanConditionalSearchCriteria(String fieldName, Object value) throws ClassCastException Creates a new instance of theGreaterThanConditionalSearchCriteria
class.- Parameters:
fieldName
- The field name to filter.value
- The value to filter.- Throws:
ClassCastException
- Thrown if the value is not aNumber
.
-
-
Method Details
-
getPredicate
protected jakarta.persistence.criteria.Predicate getPredicate(jakarta.persistence.criteria.Root<MonetaryPoverty> root, jakarta.persistence.criteria.CriteriaQuery<?> query, jakarta.persistence.criteria.CriteriaBuilder criteriaBuilder) Description copied from class:ConditionalSearchCriteria
Wrapper method that returns the predicate of the search criteria.- Specified by:
getPredicate
in classConditionalSearchCriteria<Number>
- Parameters:
root
- A root type in the from clause. Query roots always reference entities.query
- The query to be built.criteriaBuilder
- The criteria builder to be used.- Returns:
- The predicate of the search criteria.
-
getSupportedFieldTypes
Description copied from class:ConditionalSearchCriteria
Gets the list of supported field types of the search criteria.- Specified by:
getSupportedFieldTypes
in classConditionalSearchCriteria<Number>
- Returns:
- The list of supported field types of the search criteria.
-