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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJpaCustomizedItemListItemRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager typeManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddeleteAllByListIds(Collection<String> listIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Bulk deletes all items that belong to multiple listsprotected JpaCustomizedRepositoryHelper<D>protected com.broadleafcommerce.data.tracking.jpa.filtering.narrow.JpaNarrowingHelperprotected ItemListItemRepository<D>readAllCountsByItemListId(@NonNull Iterable<String> itemListIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Finds the item count per item list.org.springframework.data.domain.Page<D>readByItemListId(String itemListId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, org.springframework.data.domain.Pageable page) Find items belonging to a specific list.voidsetRepository(ItemListItemRepository<D> repository)
-
Field Details
-
ITEM_LIST_ID
- See Also:
-
-
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:
afterPropertiesSetin interfaceorg.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:CustomizedItemListItemRepositoryFind items belonging to a specific list.- Specified by:
readByItemListIdin interfaceCustomizedItemListItemRepository<D extends JpaItemListItem>- Parameters:
itemListId- the ID of the owning item listcontextInfo- the request context informationpage- 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:CustomizedItemListItemRepositoryBulk deletes all items that belong to multiple lists- Specified by:
deleteAllByListIdsin interfaceCustomizedItemListItemRepository<D extends JpaItemListItem>- Parameters:
listIds- list of item list ids to delete fromcontext- 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:CustomizedItemListItemRepositoryFinds the item count per item list.- Specified by:
readAllCountsByItemListIdin interfaceCustomizedItemListItemRepository<D extends JpaItemListItem>- Parameters:
itemListIds- the IDs of the owning item listscontextInfo- 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
-
setRepository
-
getHelper
-