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 Type
    Method
    Description
    cz.jirutka.rsql.parser.ast.ComparisonOperator
    Returns the RSQL ComparisonOperator for this custom operator.
    Returns the Java type of the operand that this operator handles.
    jakarta.persistence.criteria.Predicate
    toPredicate(io.github.perplexhub.rsql.RSQLCustomPredicateInput input)
    Converts the RSQL operator and its input into a JPA Predicate.
  • Method Details

    • getComparisonOperator

      cz.jirutka.rsql.parser.ast.ComparisonOperator getComparisonOperator()
      Returns the RSQL ComparisonOperator for this custom operator.
      Returns:
      the comparison operator
    • getType

      Class<T> 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 JPA Predicate.
      Parameters:
      input - the input containing the criteria builder, root, and values
      Returns:
      the JPA predicate