Class DefaultItemSearchService

  • All Implemented Interfaces:
    ItemSearchService

    public class DefaultItemSearchService
    extends java.lang.Object
    implements ItemSearchService
    Default implementation of ItemSearchService
    • Constructor Detail

      • DefaultItemSearchService

        public DefaultItemSearchService()
    • Method Detail

      • findUniqueItem

        public java.util.Optional<ItemModel> findUniqueItem​(ItemSearchRequest request)
        Description copied from interface: ItemSearchService
        Searches for a single Item matching the request criteria.
        Specified by:
        findUniqueItem in interface ItemSearchService
        Parameters:
        request - item search request
        Returns:
        an Optional containing the matching item model or an empty Optional, if a matching item is not found.
      • findItems

        @NotNull
        public @NotNull ItemSearchResult<ItemModel> findItems​(ItemSearchRequest request)
        Description copied from interface: ItemSearchService
        Searches for Items in the platform based on the provided request criteria.
        Specified by:
        findItems in interface ItemSearchService
        Parameters:
        request - a request containing search conditions, i.e. type of items to find, pagination parameters, etc
        Returns:
        result of the item search.
      • countItems

        public int countItems​(ItemSearchRequest request)
        Description copied from interface: ItemSearchService
        Counts how many items in the platform match the provided request conditions.
        Specified by:
        countItems in interface ItemSearchService
        Parameters:
        request - a request specifying the search criteria.
        Returns:
        number of items in the platform matching the search criteria.
      • setFlexSearchQueryGenerator

        public void setFlexSearchQueryGenerator​(FlexSearchQueryGenerator flexSearchQueryGenerator)
      • setFlexibleSearchService

        public void setFlexibleSearchService​(FlexibleSearchService flexibleSearchService)