Class JpaCustomizedItemListItemRepository<D extends JpaItemListItem>

java.lang.Object
com.broadleafcommerce.cart.provider.jpa.repository.JpaCustomizedItemListItemRepository<D>
All Implemented Interfaces:
CustomizedItemListItemRepository<D>, org.springframework.beans.factory.InitializingBean

public class JpaCustomizedItemListItemRepository<D extends JpaItemListItem> extends Object implements CustomizedItemListItemRepository<D>, org.springframework.beans.factory.InitializingBean
JPA implementation of a customized item list item repository.
Author:
Jacob Mitash
  • Field Details

  • Constructor Details

    • JpaCustomizedItemListItemRepository

      public JpaCustomizedItemListItemRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager typeManager)
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • readByItemListId

      public org.springframework.data.domain.Page<D> readByItemListId(String itemListId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, @Nullable org.springframework.data.domain.Pageable page)
      Description copied from interface: CustomizedItemListItemRepository
      Find items belonging to a specific list.
      Specified by:
      readByItemListId in interface CustomizedItemListItemRepository<D extends JpaItemListItem>
      Parameters:
      itemListId - the ID of the owning item list
      contextInfo - the request context information
      page - the requested page of results from the database
      Returns:
      a page of item lists items owned by the item list
    • deleteAllByListIds

      @Transactional("cartTransactionManager") public void deleteAllByListIds(Collection<String> listIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Description copied from interface: CustomizedItemListItemRepository
      Bulk deletes all items that belong to multiple lists
      Specified by:
      deleteAllByListIds in interface CustomizedItemListItemRepository<D extends JpaItemListItem>
      Parameters:
      listIds - list of item list ids to delete from
      context - the request context information
    • readAllCountsByItemListId

      public Map<String,Long> readAllCountsByItemListId(@NonNull @NonNull Iterable<String> itemListIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: CustomizedItemListItemRepository
      Finds the item count per item list.
      Specified by:
      readAllCountsByItemListId in interface CustomizedItemListItemRepository<D extends JpaItemListItem>
      Parameters:
      itemListIds - the IDs of the owning item lists
      contextInfo - the request context information
      Returns:
      a map of item list IDs and its associated item count
    • getNarrowingHelper

      protected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelper getNarrowingHelper()
    • getRepository

      protected ItemListItemRepository<D> getRepository()
    • setRepository

      @Autowired @Lazy public void setRepository(ItemListItemRepository<D> repository)
    • getHelper

      protected JpaCustomizedRepositoryHelper<D> getHelper()