QueryDSL
QueryDSL provides a way to express type-safe queries. Apache Causeway’s integration with QueryDSL provides the following capabilities:
-
Intended to be subclassed (it is
abstract), and parameterized by the entity and its corresponding "Q" query class, this class provides a set of finder methods for a specified entity.These finder methods take queries written as QueryDSL expressions. More discussion on writing queries can be found here.
Internally, this class delegates to QueryDslSupport.
-
QueryDslSupport and DetachedQueryFactory
Provides the mechanism to construct arbitrary queries against any entity.
The query expressions from QueryDslSupport are attached, meaning they can be submitted directly to the database. Those from DetachedQueryFactory are detached; they cannot be submitted directly. Instead, they are intended to be combined with the attached queries, e.g. in subqueries.
The QueryDslSupport service is abstract, while the the JPA/EclipseLink persistence mechanism provides the concrete implementations.
-
AutoCompleteGeneratedQueryService
Primarily used internally to provide support for autocomplete (using @Property and optionally @DomainObject). However, the service can also be called directly by the application if required.
More discussion on using the annotations can be found here.