Interface CategoryAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- Type Parameters:
D
- the type ofTrackable
entity which is the persistent counterpart to aCategoryAsset
- All Superinterfaces:
CustomizedCategoryAssetRepository<D>
,com.broadleafcommerce.common.extension.DomainTypeAware
,com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
,org.springframework.data.repository.Repository<D,
,String> com.broadleafcommerce.data.tracking.core.TrackableRepository<D>
,com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>
- All Known Subinterfaces:
JpaCategoryAssetRepository<D>
@NoRepositoryBean
public interface CategoryAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>, CustomizedCategoryAssetRepository<D>
Repository
for persistent counter-parts of CategoryAsset
.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByCategoryContextIdIn
(Collection<String> categoryContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the list ofCategoryAssets
bycategoryId
.findAllByCategoryContextIdInAndContextIdNotInAndPrimaryTrue
(Iterable<String> categoryContextIds, Iterable<String> assetIdsToExclude, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryCategoryAsset
for the given category IDs excluding given asset IDs.findByCategoryContextId
(String categoryContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of theCategoryAssets
for aCategory
by ID.findByCategoryContextIdAndPrimaryTrue
(String categoryContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryCategoryAsset
for the givenCategoryAsset.categoryId
.Methods inherited from interface com.broadleafcommerce.catalog.repository.asset.CustomizedCategoryAssetRepository
searchAllWithCategoryContextId
Methods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged
Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRepository
archive, existsByContextId, findAll, findAll, findAll, findAll, findAll, findAll, findAllByContextId, findByContextId, findByContextIdAndCatalog, findByNativeId, findDeployable, findMaxSortMember, findMinSortMember, findOriginal, findPromotable, findPromoteOrientedItems, findRebasable, findRejectable, findRevertable, findTarget, getDomainType, getEntityInformation, getTrackableBehaviorUtil, getTypesToRegisterInMappingContext, pruneChangeDetails, pruneRestingNotificationStates, purgeObsoleteSandboxData, save, saveAll, setTrackableBehaviorUtil
Methods inherited from interface com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor
exists, findAll, findAll, findAll, findAll
-
Method Details
-
findByCategoryContextIdAndPrimaryTrue
@Policy(operationTypes=READ) Optional<D> findByCategoryContextIdAndPrimaryTrue(String categoryContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryCategoryAsset
for the givenCategoryAsset.categoryId
.- Parameters:
categoryContextId
- the value to match againstCategoryAsset.categoryId
contextInfo
- context information around sandboxing and multitenant state- Returns:
- an optional containing the primary asset for a category, empty otherwise
-
findByCategoryContextId
@Policy(operationTypes=READ) Stream<D> findByCategoryContextId(String categoryContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds all of theCategoryAssets
for aCategory
by ID.- Specified by:
findByCategoryContextId
in interfaceCustomizedCategoryAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- Parameters:
categoryContextId
- Id of the category which's assets to readcontextInfo
- context information around sandboxing and multitenant state- Returns:
- all of the
CategoryAssets
for aCategory
by ID.
-
findAllByCategoryContextIdInAndContextIdNotInAndPrimaryTrue
@Policy(operationTypes=READ) List<D> findAllByCategoryContextIdInAndContextIdNotInAndPrimaryTrue(Iterable<String> categoryContextIds, Iterable<String> assetIdsToExclude, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryCategoryAsset
for the given category IDs excluding given asset IDs.- Parameters:
categoryContextIds
- IDs of the categories for which to find primary assetsassetIdsToExclude
- IDs of the assets to excludecontextInfo
- context information around sandboxing and multitenant state- Returns:
- the primary
CategoryAsset
for the given category IDs excluding given asset IDs.
-
findAllByCategoryContextIdIn
@Policy(operationTypes=READ) List<D> findAllByCategoryContextIdIn(Collection<String> categoryContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the list ofCategoryAssets
bycategoryId
.- Parameters:
categoryContextIds
- Category IDs to match againstcontextInfo
- Request context information around sandbox and multitenant state- Returns:
- Finds the list of
CategoryAssets
bycategoryId
.
-