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 TypeMethodDescriptionevaluateRSQLExpression
(cz.jirutka.rsql.parser.ast.ComparisonNode comparisonNode, P product) Evaluated the expression against a product based on a comparisonNode
.evaluateRSQLExpression
(cz.jirutka.rsql.parser.ast.LogicalNode logicalNode, P product) Evaluated the expression against a product based on a logicalNode
.evaluateRSQLExpression
(cz.jirutka.rsql.parser.ast.Node node, P product) Evaluated the expression against a product based on a genericNode
.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
Evaluated the expression against a product based on a genericNode
.- Parameters:
node
- A generic node structure in a structured RSQL queryproduct
- The product to evaluate against- Returns:
- true if the product matches the criteria, false otherwise
-
evaluateRSQLExpression
Evaluated the expression against a product based on a logicalNode
. Logical nodes are 'and'/'or' combinations of comparison nodes.- Parameters:
logicalNode
- A logical node structure in a structured RSQL queryproduct
- The product to evaluate against- Returns:
- true if the product matches the criteria, false otherwise
-
evaluateRSQLExpression
Evaluated the expression against a product based on a comparisonNode
. Comparison nodes filter values on a specific field.- Parameters:
comparisonNode
- A comparison node structure in a structured RSQL queryproduct
- 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 productoperator
- The type of comparison (=,!=,lt,etc...)arguments
- One or more values to check against the fieldproduct
- The product to evaluate against- Returns:
- true if the product matches the criteria, false otherwise
-