Class EntityQueryFacadeResolver
java.lang.Object
com.foreach.across.modules.entity.query.EntityQueryFacadeResolver
Resolver service to find the most appropriate
EntityQueryFacade
to use for a given context.
Will inspect the EntityConfiguration
, EntityAssociation
or EntityViewFactory
attributes
for the presence of an EntityQueryFacadeFactory
. If there is one, it will always use that instance to
create an EntityQueryFacade
.
If no EntityQueryFacadeFactory
is found, an attribute of type EntityQueryFacade
will be used instead.
If no EntityQueryFacadeFactory
or EntityQueryFacade
is available, a default instance will be created using
the EntityPropertyRegistry
of the root EntityConfiguration
that is being requested.
In order to automatically create an instance, a EntityQueryExecutor
attribute must be present in one of the collections.
The attribute collections will always be inspected in order of specificity, where the most specific collection having
one of the expected values will end up being used. The order of specificity is
EntityViewFactory
> EntityAssociation
> EntityConfiguration
.- Since:
- 3.1.0
- Author:
- Arne Vandamme
-
Constructor Summary
ConstructorDescriptionEntityQueryFacadeResolver
(EntityRegistry entityRegistry, EntityQueryParserFactory entityQueryParserFactory) -
Method Summary
Modifier and TypeMethodDescription<U> EntityQueryFacade<U>
forEntityAssociation
(EntityAssociation association) <U> EntityQueryFacade<U>
forEntityConfiguration
(EntityConfiguration entityConfiguration) <U> EntityQueryFacade<U>
forEntityType
(Class<U> entityType) <U> EntityQueryFacade<U>
forEntityViewContext
(EntityViewContext viewContext) <U> EntityQueryFacade<U>
forEntityViewRequest
(EntityViewRequest viewRequest)
-
Constructor Details
-
EntityQueryFacadeResolver
public EntityQueryFacadeResolver(EntityRegistry entityRegistry, EntityQueryParserFactory entityQueryParserFactory)
-
-
Method Details
-
forEntityType
-
forEntityViewRequest
-
forEntityViewContext
-
forEntityAssociation
-
forEntityConfiguration
-