Class EntityQueryFacadeResolver

java.lang.Object
com.foreach.across.modules.entity.query.EntityQueryFacadeResolver

@Service public class EntityQueryFacadeResolver extends Object
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