@Component(value="cuba_RestFilterParser")
public class RestFilterParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
RestFilterParser() |
Modifier and Type | Method and Description |
---|---|
RestFilterParseResult |
parse(java.lang.String filterJson,
MetaClass metaClass)
Parses the JSON with entities filter and returns an object with JPQL query string and query parameters.
|
public static final java.lang.String NAME
public RestFilterParseResult parse(java.lang.String filterJson, MetaClass metaClass) throws RestFilterParseException
{ "conditions": [ { "group": "OR", "conditions": [ { "property": "stringField", "operator": "<>", "value": "stringValue" }, { "property": "intField", "operator": ">", "value": 100 } ] }, { "property": "booleanField", "operator": "=", "value": true } ] }
Conditions here may be of two types: property condition and group condition (AND and OR) . Root conditions are automatically placed to the group condition of type AND.
RestFilterParseException