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

Type Parameters:
D - the type of Trackable entity which is the persistent counterpart to a CategoryAsset
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 Type
    Method
    Description
    findAllByCategoryContextIdIn(Collection<String> categoryContextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the list of CategoryAssets by categoryId.
    findAllByCategoryContextIdInAndContextIdNotInAndPrimaryTrue(Iterable<String> categoryContextIds, Iterable<String> assetIdsToExclude, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the primary CategoryAsset for the given category IDs excluding given asset IDs.
    findByCategoryContextId(String categoryContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all of the CategoryAssets for a Category by ID.
    findByCategoryContextIdAndPrimaryTrue(String categoryContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds the primary CategoryAsset for the given CategoryAsset.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 primary CategoryAsset for the given CategoryAsset.categoryId.
      Parameters:
      categoryContextId - the value to match against CategoryAsset.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 the CategoryAssets for a Category by ID.
      Specified by:
      findByCategoryContextId in interface CustomizedCategoryAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
      Parameters:
      categoryContextId - Id of the category which's assets to read
      contextInfo - context information around sandboxing and multitenant state
      Returns:
      all of the CategoryAssets for a Category 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 primary CategoryAsset for the given category IDs excluding given asset IDs.
      Parameters:
      categoryContextIds - IDs of the categories for which to find primary assets
      assetIdsToExclude - IDs of the assets to exclude
      contextInfo - 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 of CategoryAssets by categoryId.
      Parameters:
      categoryContextIds - Category IDs to match against
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      Finds the list of CategoryAssets by categoryId.