Class RSQLFilterParser
java.lang.Object
com.broadleafcommerce.data.tracking.core.filtering.fetch.rsql.RSQLFilterParser
- All Implemented Interfaces:
FilterParser<cz.jirutka.rsql.parser.ast.Node>
public class RSQLFilterParser
extends Object
implements FilterParser<cz.jirutka.rsql.parser.ast.Node>
Default implementation of
JpaFilterParser
. Expects filter strings to be formatted
according to the following syntax rules:
- A valid RSQL string as described here: https://github.com/jirutka/rsql-parser
- There is an additional '=between=' operator that supports finding matches between a range of two values. This is usually used with numbers or dates. Syntax is [field]=between=(val1,val2)
- There is an additional '=isnull=' operator that supports finding matches whose field value is or is not null. Syntax is [field]=isnull=[true/false]
- Author:
- Jeff Fischer
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
RSQLFilterParser
public RSQLFilterParser()
-
-
Method Details
-
parse
Description copied from interface:FilterParser
Parse a String containing a structured list of filter params into the appropriate query criteria type to be passed to the persistence layer query. Will throw aParseException
if unable to parse the supplied filters string.- Specified by:
parse
in interfaceFilterParser<cz.jirutka.rsql.parser.ast.Node>
- Parameters:
filters
- The String containing the structured list of filter params- Returns:
- The query criteria defined by the generic type
-