Interface ProductAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- Type Parameters:
D- the type ofTrackableentity 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 primaryProductAssetsfor the given product IDs excluding given asset IDs.findAllByProductContextIdInAndPrimaryTrue(Iterable<String> productContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryProductAssetsfor the given product IDs.findByProductContextIdAndPrimaryTrue(String productContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the primaryProductAssetfor the givenProductAsset.productId.Methods inherited from interface com.broadleafcommerce.catalog.repository.asset.CustomizedProductAssetRepository
countNonProductionRecordsByProductIdsInTenant, findAllByProductContextIdIn, findAllByProductContextIdIn, searchAllWithProductContextIdMethods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledgedMethods 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, setTrackableBehaviorUtilMethods 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 primaryProductAssetfor the givenProductAsset.productId.- Parameters:
productContextId- the value to match againstProductAsset.productIdcontextInfo- 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 primaryProductAssetsfor 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
ProductAssetsfor 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 primaryProductAssetsfor 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
ProductAssetsfor the given product IDs excluding given asset IDs.
-