All repositories have the ability to execute queries. A query is a request to find all items of a particular item type that fits a certain set of criteria. Those criteria are specified in terms of the item type’s properties. For example: “Find all Person items whose age property is greater than 30.”

The Repository API can express a wide variety of queries, including queries that match patterns in text, query through collections, or even query through complex values. Queries can also specify the order in which to return results, and can specify which results from a large result set to return. For example, a query can return a subset of Person items as follows:

Queries can be built and executed with the Repository API. For complex queries, this can be a tedious task. In these cases, or in cases where the Repository API should not be used directly, queries can be represented in a textual form called Repository Query Language (RQL). See the Repository Query Language section of this chapter for details of this language and other information about repository queries. In most cases, however, repository queries can be constructed easily with targeting UI components in the ATG Control Center.

loading table of contents...