Class ProductOptionDaoImpl
java.lang.Object
org.broadleafcommerce.core.catalog.dao.ProductOptionDaoImpl
- All Implemented Interfaces:
ProductOptionDao
@Repository("blProductOptionDao")
public class ProductOptionDaoImpl
extends Object
implements ProductOptionDao
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.persistence.EntityManagerprotected org.broadleafcommerce.common.persistence.EntityConfigurationprotected org.broadleafcommerce.common.sandbox.SandBoxHelper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidattachArchivalConditionIfPossible(Class<?> clazz, jakarta.persistence.criteria.Path<?> path, jakarta.persistence.criteria.CriteriaBuilder cb, List<jakarta.persistence.criteria.Predicate> predicates) protected jakarta.persistence.criteria.PredicatebuildSkuDomainPredicate(jakarta.persistence.criteria.CriteriaBuilder cb, jakarta.persistence.criteria.Path fieldName, List<Long> possibleSkuIds) countAllowedValuesForProductOptionById(Long productOptionId) countProductsUsingProductOptionById(Long productOptionId) filterCandidateSkusForArchivedStatus(List<Sku> candidateSkus) Returns a list ofAssignedProductOptionDTOfound for given theProduct.findAssignedProductOptionsByProductId(Long productId) Returns a list ofAssignedProductOptionDTOfound for given the productId.findProductIdsUsingProductOptionById(Long productOptionId, int start, int pageSize) Returns a paginated list of Product Ids that are using the passed in ProductOption IDreadSkuIdsForProductOptionValues(Long productId, String attributeName, String attributeValue, List<Long> possibleSkuIds) saveProductOption(ProductOption option) translateItemAttributeValue(OrderItemAttribute itemAttribute, ProductOption productOption) Returns a translated String attribute value for OrderItemAttribute
-
Field Details
-
em
protected jakarta.persistence.EntityManager em -
entityConfiguration
protected org.broadleafcommerce.common.persistence.EntityConfiguration entityConfiguration -
sandBoxHelper
protected org.broadleafcommerce.common.sandbox.SandBoxHelper sandBoxHelper
-
-
Constructor Details
-
ProductOptionDaoImpl
public ProductOptionDaoImpl()
-
-
Method Details
-
readAllProductOptions
- Specified by:
readAllProductOptionsin interfaceProductOptionDao
-
saveProductOption
- Specified by:
saveProductOptionin interfaceProductOptionDao
-
readProductOptionById
- Specified by:
readProductOptionByIdin interfaceProductOptionDao
-
readProductOptionValueById
- Specified by:
readProductOptionValueByIdin interfaceProductOptionDao
-
findAssignedProductOptionsByProductId
Description copied from interface:ProductOptionDaoReturns a list ofAssignedProductOptionDTOfound for given the productId.- Specified by:
findAssignedProductOptionsByProductIdin interfaceProductOptionDao- Returns:
-
findAssignedProductOptionsByProduct
Description copied from interface:ProductOptionDaoReturns a list ofAssignedProductOptionDTOfound for given theProduct.- Specified by:
findAssignedProductOptionsByProductin interfaceProductOptionDao- Returns:
-
countAllowedValuesForProductOptionById
- Specified by:
countAllowedValuesForProductOptionByIdin interfaceProductOptionDao
-
readSkuIdsForProductOptionValues
public List<Long> readSkuIdsForProductOptionValues(Long productId, String attributeName, String attributeValue, List<Long> possibleSkuIds) - Specified by:
readSkuIdsForProductOptionValuesin interfaceProductOptionDao
-
filterCandidateSkusForArchivedStatus
-
attachArchivalConditionIfPossible
-
buildSkuDomainPredicate
-
countProductsUsingProductOptionById
- Specified by:
countProductsUsingProductOptionByIdin interfaceProductOptionDao
-
findProductIdsUsingProductOptionById
public List<Long> findProductIdsUsingProductOptionById(Long productOptionId, int start, int pageSize) Description copied from interface:ProductOptionDaoReturns a paginated list of Product Ids that are using the passed in ProductOption ID- Specified by:
findProductIdsUsingProductOptionByIdin interfaceProductOptionDao- Returns:
-
translateItemAttributeValue
public String translateItemAttributeValue(OrderItemAttribute itemAttribute, ProductOption productOption) Description copied from interface:ProductOptionDaoReturns a translated String attribute value for OrderItemAttribute- Specified by:
translateItemAttributeValuein interfaceProductOptionDao- Returns:
-