Class JpaCustomizedPriceListRepository<D extends JpaPriceList>
java.lang.Object
com.broadleafcommerce.pricing.provider.jpa.repository.JpaCustomizedPriceListRepository<D>
- All Implemented Interfaces:
 CustomizedPriceListRepository<D>,org.springframework.beans.factory.InitializingBean
@NoRepositoryBean
public class JpaCustomizedPriceListRepository<D extends JpaPriceList>
extends Object
implements CustomizedPriceListRepository<D>, org.springframework.beans.factory.InitializingBean
Repository fragment for 
JpaPriceListRepositorythat includes custom JPA query methods.- Author:
 - Chad Harchar (charchar)
 
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionJpaCustomizedPriceListRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidorg.springframework.data.domain.Page<D>findAllByContextIdIn(Iterable<String> contextIds, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) findAllByCurrencyIn(List<javax.money.CurrencyUnit> currencies, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) The common use-case will be to find all persistentPriceListsthat target a given currency or fallback currency.findAllByUserTargetsInAndCurrencyIn(Iterable<UserTarget> userTargets, Iterable<javax.money.CurrencyUnit> currencies, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) The common use-case will be to find all persistentPriceListswhosePriceList.getUserTargets()intersect with theuserTargetsprovided that match the passed in currencies.protected jakarta.persistence.EntityManagergetEm()protected jakarta.persistence.EntityManagerReturns the entity manager used for this repository.protected PriceListRepository<D>protected Class<?>getUserTargetType(Class<D> priceListType) voidsetRepository(PriceListRepository<D> repository)  
- 
Field Details
- 
repository
 
 - 
 - 
Constructor Details
- 
JpaCustomizedPriceListRepository
public JpaCustomizedPriceListRepository(com.broadleafcommerce.data.tracking.core.TrackableBehaviorUtil behaviorUtil, com.broadleafcommerce.data.tracking.jpa.filtering.fetch.rsql.JpaFiltersCriteriaBuilder criteriaBuilder, com.broadleafcommerce.common.jpa.RepositoryEntityTypeManager repositoryEntityTypeManager)  
 - 
 - 
Method Details
- 
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
 afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
 - 
findAllByUserTargetsInAndCurrencyIn
@NonNull public List<D> findAllByUserTargetsInAndCurrencyIn(@NonNull Iterable<UserTarget> userTargets, @NonNull Iterable<javax.money.CurrencyUnit> currencies, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:CustomizedPriceListRepositoryThe common use-case will be to find all persistentPriceListswhosePriceList.getUserTargets()intersect with theuserTargetsprovided that match the passed in currencies.- Specified by:
 findAllByUserTargetsInAndCurrencyInin interfaceCustomizedPriceListRepository<D extends JpaPriceList>
 - 
getUserTargetType
 - 
findAllByCurrencyIn
@NonNull public List<D> findAllByCurrencyIn(@NonNull List<javax.money.CurrencyUnit> currencies, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:CustomizedPriceListRepositoryThe common use-case will be to find all persistentPriceListsthat target a given currency or fallback currency.- Specified by:
 findAllByCurrencyInin interfaceCustomizedPriceListRepository<D extends JpaPriceList>
 - 
findAllByContextIdIn
@NonNull public org.springframework.data.domain.Page<D> findAllByContextIdIn(@NonNull Iterable<String> contextIds, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
 findAllByContextIdInin interfaceCustomizedPriceListRepository<D extends JpaPriceList>
 - 
getEntityManager
protected jakarta.persistence.EntityManager getEntityManager()Returns the entity manager used for this repository. It is strongly advised to use this method over getEm() or directly calling the entity manager as this will have greater backwards compatibility.- Returns:
 - the entity manager
 
 - 
getManagedType
 - 
getRepository
 - 
setRepository
 - 
getEm
protected jakarta.persistence.EntityManager getEm() 
 -