Interface RSQLEvaluationService<P extends Product>

All Known Implementing Classes:
DefaultRSQLEvaluationService

public interface RSQLEvaluationService<P extends Product>
Service to parse RSQL Nodes and evaluate the query rules against a product.
Author:
mariestandeven
  • Method Summary

    Modifier and Type
    Method
    Description
    evaluateRSQLExpression(cz.jirutka.rsql.parser.ast.ComparisonNode comparisonNode, P product)
    Evaluated the expression against a product based on a comparison Node.
    evaluateRSQLExpression(cz.jirutka.rsql.parser.ast.LogicalNode logicalNode, P product)
    Evaluated the expression against a product based on a logical Node.
    evaluateRSQLExpression(cz.jirutka.rsql.parser.ast.Node node, P product)
    Evaluated the expression against a product based on a generic Node.
    evaluateRSQLExpression(String selector, cz.jirutka.rsql.parser.ast.ComparisonOperator operator, List<String> arguments, P product)
    Evaluated the expression against a product based on a set of comparison parameters.
  • Method Details

    • evaluateRSQLExpression

      Boolean evaluateRSQLExpression(cz.jirutka.rsql.parser.ast.Node node, P product)
      Evaluated the expression against a product based on a generic Node.
      Parameters:
      node - A generic node structure in a structured RSQL query
      product - The product to evaluate against
      Returns:
      true if the product matches the criteria, false otherwise
    • evaluateRSQLExpression

      Boolean evaluateRSQLExpression(cz.jirutka.rsql.parser.ast.LogicalNode logicalNode, P product)
      Evaluated the expression against a product based on a logical Node. Logical nodes are 'and'/'or' combinations of comparison nodes.
      Parameters:
      logicalNode - A logical node structure in a structured RSQL query
      product - The product to evaluate against
      Returns:
      true if the product matches the criteria, false otherwise
    • evaluateRSQLExpression

      Boolean evaluateRSQLExpression(cz.jirutka.rsql.parser.ast.ComparisonNode comparisonNode, P product)
      Evaluated the expression against a product based on a comparison Node. Comparison nodes filter values on a specific field.
      Parameters:
      comparisonNode - A comparison node structure in a structured RSQL query
      product - The product to evaluate against
      Returns:
      true if the product matches the criteria, false otherwise
    • evaluateRSQLExpression

      Boolean evaluateRSQLExpression(String selector, cz.jirutka.rsql.parser.ast.ComparisonOperator operator, List<String> arguments, P product)
      Evaluated the expression against a product based on a set of comparison parameters.
      Parameters:
      selector - The field on the product
      operator - The type of comparison (=,!=,lt,etc...)
      arguments - One or more values to check against the field
      product - The product to evaluate against
      Returns:
      true if the product matches the criteria, false otherwise