Interface PromotionalCategoryProductService<P extends PromotionalCategoryProduct>
- All Superinterfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
- All Known Implementing Classes:
DefaultPromotionalCategoryProductService
public interface PromotionalCategoryProductService<P extends PromotionalCategoryProduct>
extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
Service API for
PromotionalCategoryProducts
. Supported by
PromotionalCategoryProductRepository
.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionreadAllByCategoryIdsIn
(Collection<String> categoryIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all the PromotionalCategoryProduct relationships in the database associated with the given category context IDs.readAllByProductIdsIn
(Collection<String> productIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the PromotionalCategoryProduct relationships in the database associated with the given product context IDs.org.springframework.data.domain.Page<P>
readByCategoryContextIdAndType
(String categoryContextId, String type, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the category promotional products in the database associated with the given category context ID, optionally filtered by the relationship type.readByCategoryId
(String categoryContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the PromotionalCategoryProduct relationships in the database associated with the given category context ID.readByJoinedIds
(String productId, String categoryId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Query for a PromotionalCategoryProduct that joins a given product and category.Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Method Details
-
readByCategoryContextIdAndType
@NonNull org.springframework.data.domain.Page<P> readByCategoryContextIdAndType(@NonNull String categoryContextId, @Nullable String type, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the category promotional products in the database associated with the given category context ID, optionally filtered by the relationship type.- Parameters:
categoryContextId
- the category context ID to find the relations forpage
- the requested page of results from the databasetype
- the type of promotion to filter by (optional)contextInfo
- the context to query within- Returns:
- the category promotional products in the database that match the given category context ID
-
readByJoinedIds
Optional<P> readByJoinedIds(String productId, String categoryId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Query for a PromotionalCategoryProduct that joins a given product and category.- Parameters:
productId
- the product context IDcategoryId
- the category context IDcontextInfo
- context surrounding sandboxing and multitenant state- Returns:
- an
Optional
that is either empty or contains the PromotionalCategoryProduct that was found
-
readByCategoryId
@NonNull List<P> readByCategoryId(@NonNull String categoryContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the PromotionalCategoryProduct relationships in the database associated with the given category context ID.- Parameters:
categoryContextId
- the category context ID to find the relationships forcontextInfo
- the context to query within- Returns:
- the PromotionalCategoryProduct relationships in the database that match the given category context ID
-
readAllByProductIdsIn
@NonNull List<P> readAllByProductIdsIn(@NonNull Collection<String> productIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all of the PromotionalCategoryProduct relationships in the database associated with the given product context IDs.- Parameters:
productIds
- the product context IDs to find the relationships forcontextInfo
- the context to query within- Returns:
- the PromotionalCategoryProduct relationships in the database that match the given product context IDs
-
readAllByCategoryIdsIn
@NonNull List<P> readAllByCategoryIdsIn(@NonNull Collection<String> categoryIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Reads all the PromotionalCategoryProduct relationships in the database associated with the given category context IDs.- Parameters:
categoryIds
- the category context IDs to find the relationships forcontextInfo
- the context to query within- Returns:
- the PromotionalCategoryProduct relationships in the database that match the given category context IDs
-
getRepositoryDomain
-