Interface CustomizedCategoryRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Known Subinterfaces:
CategoryRepository<D>
,JpaCategoryRepository<D>
- All Known Implementing Classes:
JpaCustomizedCategoryRepository
public interface CustomizedCategoryRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to
Category
maintenance and filtering.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByContextId
(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns all theCategories
that match thecontextIds
.findAllByContextIdIn
(Collection<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves all categories whose context IDs match any of the given IDs.findAllByUrls
(Iterable<String> urls, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds categories by the given urls.Finds a category by the given url.
-
Method Details
-
findAllByContextIdIn
@Policy(operationTypes=READ) Stream<D> findAllByContextIdIn(@NonNull Collection<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Retrieves all categories whose context IDs match any of the given IDs.- Parameters:
contextIds
- the context IDs to query forcontextInfo
- context information around sandbox and multitenant state- Returns:
- all categories whose context IDs match any of the given IDs
-
findByUrl
@Policy(operationTypes=READ) Optional<D> findByUrl(String url, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds a category by the given url.- Parameters:
url
- the url to look bycontext
- the current context to look in- Returns:
- The Category matching the
url
, orOptional.empty()
if none found
-
findAllByUrls
@Policy(operationTypes=READ) List<D> findAllByUrls(Iterable<String> urls, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Finds categories by the given urls.- Parameters:
urls
- the urls to look bycontext
- the current context to look in- Returns:
- The Category matching the
urls
.
-
findAllByContextId
@Policy(operationTypes=READ) List<D> findAllByContextId(Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Returns all theCategories
that match thecontextIds
.- Parameters:
contextIds
- IDs to match againstcontext
- the current context to look in- Returns:
- All the
Categories
that match thecontextIds
.
-