The atg.repository.QueryBuilder interface defines the available query operations that repositories 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. Queries can use standard logical query operations such as AND, OR, NOT, EQUALS, GREATER THAN, LESS THAN OR EQUALS, and more complicated query operations such as collection inclusion, and pattern matching.

The QueryBuilder implementation is not required 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: