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
    • Method Detail

      • execute

        Object execute​(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. 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 itself
        persistenceContainer - 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 of queryInfo#pageable is not supported. By default only DefaultPageRequest or NarrowedPageable 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

        default NarrowExecutor withSupportsMarketplace​(boolean sandboxPropagation)
        Whether or not the NarrowExecutor should allow support for marketplace catalog discrimination via MarketplaceApplicationCatalog.
        Parameters:
        sandboxPropagation - Whether or not the NarrowExecutor should allow support for marketplace catalog discrimination
        Returns:
        The configured instance