Interface NarrowExecutor
public interface NarrowExecutor
Based on a
NarrowExecutor.QueryInfo
instance, perform a query whose results are filtered. The filtering
is intended to narrow the results based on contextual information, such as sandbox or multitenant
state.- Author:
- Jeff Fischer
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(NarrowExecutor.QueryInfo queryInfo, PersistenceContainer persistenceContainer) Given query information, execute a fetch query against the datastore that presumably filters results beyond what was defined in the original query.default NarrowExecutor
withSupportsMarketplace
(boolean sandboxPropagation) Whether or not theNarrowExecutor
should allow support for marketplace catalog discrimination viaMarketplaceApplicationCatalog
.
-
Method Details
-
execute
Given query information, execute a fetch query against the datastore that presumably filters results beyond what was defined in the original query. A common narrowing task is to further filter results based on sandbox or multitenancy aspects.- Parameters:
queryInfo
- Information regarding the requested query, including the original query itselfpersistenceContainer
- Facilitator for executing the narrowed query against the db platform- Returns:
- A result object. This can take the form of a Page, Collection, Optional or entity
type. Most of the time, a
ResultProcessor
will interpret the Object result before passing to the upstream caller. - Throws:
UnsupportedPageableTypeException
- Thrown if the type ofqueryInfo#pageable
is not supported. By default onlyDefaultPageRequest
orNarrowedPageable
are supported. Any other type will result in unexpected or undeterministic results.DefaultPageRequest
is only expected in the case where no pagination info was provided by the original caller (usually via the REST API).
-
withSupportsMarketplace
Whether or not theNarrowExecutor
should allow support for marketplace catalog discrimination viaMarketplaceApplicationCatalog
.- Parameters:
sandboxPropagation
- Whether or not theNarrowExecutor
should allow support for marketplace catalog discrimination- Returns:
- The configured instance
-