Fluent builder for the criteria used to search or look up product SKUs in the catalogue. Obtained from CatalogManager, configured by chaining the criteria setter methods, then executed with either search, for a paginated result page, or findInHierarchy, for a simple result limited to a maximum count and expanded up through parent organisations.
Group: Builders
Methods
search(SearchProperties props) · findInHierarchy(int maxResults) · productSku(ProductSku p) · productSkuIds(List<Long> s) · query(String s) · deleted(Boolean s) · categories(List<Category> s) · categoryIds(List<Long> s) · product(Product s) · productId(Long id) · store(ECommerceStore s)
search(SearchProperties props)
Returns: List<ProductSku>
Searches through SKUs in this account for those which match the criteria configured on this builder, returning one page of results.
| Parameter | Description |
|---|---|
props | the paging and sorting options for the result page |
findInHierarchy(int maxResults)
Returns: List<ProductSku>
Searches for SKUs matching the criteria configured on this builder, including through parent organisations. Accepts only a maximum result count rather than a page size and offset, so does not support pagination.
| Parameter | Description |
|---|---|
maxResults | the maximum number of matching SKUs to return |
productSku(ProductSku p)
Returns: SkuSearchBuilder
Adds a specific SKU that results must match.
| Parameter | Description |
|---|---|
p | the SKU to add to the match set |
productSkuIds(List<Long> s)
Returns: SkuSearchBuilder
Restricts results to the SKUs with the given database ids. Ids that do not resolve to an existing SKU are silently skipped.
| Parameter | Description |
|---|---|
s | the SKU ids to match, or null to leave the SKU restriction unset |
query(String s)
Returns: SkuSearchBuilder
Sets a free-text query to match against SKU title and name.
| Parameter | Description |
|---|---|
s | the query text |
deleted(Boolean s)
Returns: SkuSearchBuilder
Sets whether deleted SKUs should be excluded from the search.
| Parameter | Description |
|---|---|
s | if true, only SKUs without a deleted date are matched; if null, deleted status is not filtered |
categories(List<Category> s)
Returns: SkuSearchBuilder
Restricts results to SKUs whose product is in any of the given categories.
| Parameter | Description |
|---|---|
s | the categories to match, or null to leave the category restriction unset |
categoryIds(List<Long> s)
Returns: SkuSearchBuilder
Restricts results to SKUs whose product is in any of the categories with the given database ids. Ids that do not resolve to an existing category are silently skipped.
| Parameter | Description |
|---|---|
s | the category ids to match, or null to leave the category restriction unset |
product(Product s)
Returns: SkuSearchBuilder
Restricts results to SKUs belonging to the given product.
| Parameter | Description |
|---|---|
s | the product to match |
productId(Long id)
Returns: SkuSearchBuilder
Restricts results to SKUs belonging to the product with the given database id. If the id does not resolve to an existing product, the restriction is left unset.
| Parameter | Description |
|---|---|
id | the product id to match, or null to leave the product restriction unset |
store(ECommerceStore s)
Returns: SkuSearchBuilder
Restricts results to SKUs whose product is sold in the given store.
| Parameter | Description |
|---|---|
s | the store to match |