The query language supports method invocation inside query expressions.
The query processor maps attributes in query strings using the attribute rules described in Object Attributes. Methods declared to return
void evaluate to
null when invoked through the query processor.
If you know that the attribute name maps to a public method that takes no parameters, you can simply include the method name in the query string as an attribute. For example,
emps.isEmpty is equivalent to
emps.isEmpty() . In the following example, the query invokes
isEmpty on positions, and returns the set of all portfolios with no positions.
SELECT DISTINCT * FROM /portfolios WHERE positions.isEmpty
The client also supports the invocation of public methods with parameters. To invoke methods with parameters, include the method name as an attribute in the query string and provide the method arguments between parentheses. You can only use constants in the query strings.