Interface QueryEnhancerFactory
public interface QueryEnhancerFactory
Encapsulates different strategies for the creation of a
QueryEnhancer from a ParametrizedQuery.- Since:
- 4.0
- Author:
- Diego Krupitza, Greg Turnquist, Mark Paluch, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptioncreate(QueryProvider query) Creates a newQueryEnhancerfor the given query.static QueryEnhancerFactoryforQuery(DeclaredQuery query) Creates a newQueryEnhancerFactoryfor the givenDeclaredQuery.booleansupports(DeclaredQuery query) Returns whether this QueryEnhancerFactory supports the givenDeclaredQuery.
-
Method Details
-
supports
Returns whether this QueryEnhancerFactory supports the givenDeclaredQuery.- Parameters:
query- the query to be enhanced and introspected.- Returns:
trueif this QueryEnhancer supports the given query;falseotherwise.
-
create
Creates a newQueryEnhancerfor the given query.- Parameters:
query- the query to be enhanced and introspected.- Returns:
- the query enhancer to be used.
-
forQuery
Creates a newQueryEnhancerFactoryfor the givenDeclaredQuery.- Parameters:
query- must not be null.- Returns:
- an implementation of
QueryEnhancerthat suits the query the most
-