Interface ProductAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>

Type Parameters:
D - the type of Trackable entity which is the persistent counterpart to a ProductAsset
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 Type
    Method
    Description
    findAllByProductContextIdInAndContextIdNotInAndPrimaryTrue(Iterable<String> productContextIds, Iterable<String> assetIdsToExclude, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the primary ProductAssets for the given product IDs excluding given asset IDs.
    findAllByProductContextIdInAndPrimaryTrue(Iterable<String> productContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the primary ProductAssets for the given product IDs.
    findByProductContextIdAndPrimaryTrue(String productContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the primary ProductAsset for the given ProductAsset.productId.

    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 primary ProductAsset for the given ProductAsset.productId.
      Parameters:
      productContextId - the value to match against ProductAsset.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 primary ProductAssets for the given product IDs.
      Parameters:
      productContextIds - IDs of the products for which to find primary assets
      contextInfo - 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 primary ProductAssets for the given product IDs excluding given asset IDs.
      Parameters:
      productContextIds - IDs of the products for which to find primary assets
      assetIdsToExclude - IDs of the assets to exclude
      contextInfo - context information around sandboxing and multitenant state
      Returns:
      the primary ProductAssets for the given product IDs excluding given asset IDs.