Interface RsqlCustomOperator<T extends Comparable<?>>
- Type Parameters:
T- the type of the operand that this operator handles
public interface RsqlCustomOperator<T extends Comparable<?>>
Interface for defining custom RSQL operators.
Implementing this interface allows you to add new operators to the RSQL parser
and define how they should be converted into JPA Predicates.
-
Method Summary
Modifier and TypeMethodDescriptioncz.jirutka.rsql.parser.ast.ComparisonOperatorReturns the RSQLComparisonOperatorfor this custom operator.getType()Returns the Java type of the operand that this operator handles.jakarta.persistence.criteria.PredicatetoPredicate(io.github.perplexhub.rsql.RSQLCustomPredicateInput input) Converts the RSQL operator and its input into a JPAPredicate.
-
Method Details
-
getComparisonOperator
cz.jirutka.rsql.parser.ast.ComparisonOperator getComparisonOperator()Returns the RSQLComparisonOperatorfor this custom operator.- Returns:
- the comparison operator
-
getType
Returns the Java type of the operand that this operator handles.- Returns:
- the operand type
-
toPredicate
jakarta.persistence.criteria.Predicate toPredicate(io.github.perplexhub.rsql.RSQLCustomPredicateInput input) Converts the RSQL operator and its input into a JPAPredicate.- Parameters:
input- the input containing the criteria builder, root, and values- Returns:
- the JPA predicate
-