Interface ProductAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- Type Parameters:
D
- the type ofTrackable
entity which is the persistent counterpart to aProductAsset
- All Superinterfaces:
CustomizedProductAssetRepository<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:
JpaProductAssetRepository<D>
@NoRepositoryBean
public interface ProductAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
extends com.broadleafcommerce.data.tracking.core.TrackableRepository<D>, com.broadleafcommerce.data.tracking.core.TrackableRsqlFilterExecutor<D>, CustomizedProductAssetRepository<D>
Repository
for persistent counter-parts of ProductAsset
.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByProductContextIdInAndContextIdNotInAndPrimaryTrue
(Iterable<String> productContextIds, Iterable<String> assetIdsToExclude, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryProductAssets
for the given product IDs excluding given asset IDs.findAllByProductContextIdInAndPrimaryTrue
(Iterable<String> productContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryProductAssets
for the given product IDs.findByProductContextIdAndPrimaryTrue
(String productContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryProductAsset
for the givenProductAsset.productId
.Methods inherited from interface com.broadleafcommerce.catalog.repository.asset.CustomizedProductAssetRepository
countNonProductionRecordsByProductIdsInTenant, findAllByProductContextIdIn, findAllByProductContextIdIn, searchAllWithProductContextId
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
-
findByProductContextIdAndPrimaryTrue
@Policy(operationTypes=READ) Optional<D> findByProductContextIdAndPrimaryTrue(String productContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryProductAsset
for the givenProductAsset.productId
.- Parameters:
productContextId
- the value to match againstProductAsset.productId
contextInfo
- context information around sandboxing and multitenant state- Returns:
- an optional containing the primary asset for a product, empty otherwise
-
findAllByProductContextIdInAndPrimaryTrue
@Policy(operationTypes=READ) List<D> findAllByProductContextIdInAndPrimaryTrue(Iterable<String> productContextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryProductAssets
for the given product IDs.- Parameters:
productContextIds
- IDs of the products for which to find primary assetscontextInfo
- context information around sandboxing and multitenant state- Returns:
- the primary
ProductAssets
for the given product IDs.
-
findAllByProductContextIdInAndContextIdNotInAndPrimaryTrue
@Policy(operationTypes=READ) List<D> findAllByProductContextIdInAndContextIdNotInAndPrimaryTrue(Iterable<String> productContextIds, Iterable<String> assetIdsToExclude, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryProductAssets
for the given product IDs excluding given asset IDs.- Parameters:
productContextIds
- IDs of the products for which to find primary assetsassetIdsToExclude
- IDs of the assets to excludecontextInfo
- context information around sandboxing and multitenant state- Returns:
- the primary
ProductAssets
for the given product IDs excluding given asset IDs.
-