The query language supports method invocation inside query expressions.
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 native 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.