A compiler that can create a Filter from a string representation using the
following grammar (note the Java-like syntax):
String literals should have double-quotes.
true/false are treated as boolean literals
digits are treated as numbers
the string value 'null' (no quotes) is treated as null
fully-qualified constants are resolved to enums
everything else is assumed to be the property name
Leafs:
Any comparison operator can be prepended with an 'i' to signify a
case-insensitive comparison (for example - i==, i!=, etc...).
EQ - propertyName == value
NE - propertyName != value
LT - propertyName < value
GT - propertyName > value
LE - propertyName <= value
GE - propertyName >= value
IN - propertyName.in({ "foo", "bar", "baz" }) (or inIgnoreCase())
CONTAINS_ALL - propertyName.containsAll({ "foo", "bar", "baz" })
(or containsAllIgnoreCase())
ISNULL - propertyName.isNull()
NOTNULL - propertyName.notNull()
ISEMPTY - propertyName.isEmpty()
LIKE
- EXACT - propertyName == value
- START - propertyName.startsWith(value) (or startsWithIgnoreCase())
- END - propertyName.endsWith(value) (or endsWithIgnoreCase())
- ANYWHERE - propertyName.contains(value) (or containsIgnoreCase())
JOIN - propertyName.join(ClassName.propertyName)
COLLECTION_CONDITION -
propertyName.collectionCondition("fooProp == \"bar\"")
Note that the parameter to collectionCondition() is the string
representation (with quotes escaped) of the collection element filter.
SUBQUERY
propertyName.subquery("firstname", sailpoint.object.Bundle, "name", "riskScoreWeight > 500");
A subquery takes the following parameters:
- property
- subquery class
- subquery property
- subquery filter: Either a string representation of a filter (with
quotes escaped) or null.
Composites:
AND - (expr && expr)
OR - (expr || expr)
NOT - !(expr)
.