Interface ItemSearchService
-
- All Known Implementing Classes:
DefaultItemSearchService,ValidatingItemSearchService
public interface ItemSearchServiceA service for searching items in the platform.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcountItems(@NotNull ItemSearchRequest request)Counts how many items in the platform match the provided request conditions.@NotNull ItemSearchResult<ItemModel>findItems(@NotNull ItemSearchRequest request)Searches forItems in the platform based on the provided request criteria.java.util.Optional<ItemModel>findUniqueItem(@NotNull ItemSearchRequest request)Searches for a singleItemmatching therequestcriteria.
-
-
-
Method Detail
-
findUniqueItem
java.util.Optional<ItemModel> findUniqueItem(@NotNull @NotNull ItemSearchRequest request)
Searches for a singleItemmatching therequestcriteria.- 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 forItems 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.
-
-