The atg.repository.QueryBuilder interface defines the available query operations that repositories should support. The QueryBuilder interface enables you to build Query objects that can be passed to the repository. A Query is constructed from QueryExpressions. Each Query relates one or more QueryExpressions and a query operation. There are standard logical query operations, such as AND, OR, NOT, EQUALS, GREATER THAN, LESS THAN OR EQUALS, plus more complicated query operations like collection inclusion, pattern matching, and others. The implementation of QueryBuilder does not have to support all query operations — it depends on what query features the data store supports. For unsupported query operations, the method should throw a RepositoryException. You can use the atg.repository.QueryOptions class to limit the size of a query’s result set or otherwise modify the query.

Query Creation Example

The following example creates a query that returns all repository items whose gender property is female:

loading table of contents...