Interface ItemSearchService

    • Method Detail

      • findUniqueItem

        java.util.Optional<ItemModel> findUniqueItem​(@NotNull
                                                     @NotNull ItemSearchRequest request)
        Searches for a single Item matching the request criteria.
        Parameters:
        request - item search request
        Returns:
        an Optional containing the matching item model or an empty Optional, if a matching item is not found.
        Throws:
        NonUniqueItemFoundException - if more than one matching item found for the request criteria.
      • findItems

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

        int countItems​(@NotNull
                       @NotNull ItemSearchRequest request)
        Counts how many items in the platform match the provided request conditions.
        Parameters:
        request - a request specifying the search criteria.
        Returns:
        number of items in the platform matching the search criteria.