use of org.broadleafcommerce.common.structure.dto.ItemCriteriaDTO in project BroadleafCommerce by BroadleafCommerce.
the class PageServiceUtility method buildItemCriteriaDTOList.
protected List<ItemCriteriaDTO> buildItemCriteriaDTOList(Page page) {
List<ItemCriteriaDTO> itemCriteriaDTOList = new ArrayList<ItemCriteriaDTO>();
for (PageItemCriteria criteria : page.getQualifyingItemCriteria()) {
ItemCriteriaDTO criteriaDTO = new ItemCriteriaDTO();
criteriaDTO.setMatchRule(criteria.getMatchRule());
criteriaDTO.setQty(criteria.getQuantity());
itemCriteriaDTOList.add(criteriaDTO);
}
return itemCriteriaDTOList;
}
use of org.broadleafcommerce.common.structure.dto.ItemCriteriaDTO in project BroadleafCommerce by BroadleafCommerce.
the class StructuredContentServiceImpl method buildItemCriteriaDTOList.
protected List<ItemCriteriaDTO> buildItemCriteriaDTOList(StructuredContent sc) {
List<ItemCriteriaDTO> itemCriteriaDTOList = new ArrayList<>();
Set<StructuredContentItemCriteria> qualifyingItemCriteria = SetUtils.emptyIfNull(sc.getQualifyingItemCriteria());
for (StructuredContentItemCriteria criteria : qualifyingItemCriteria) {
ItemCriteriaDTO criteriaDTO = entityConfiguration.createEntityInstance(ItemCriteriaDTO.class.getName(), ItemCriteriaDTO.class);
criteriaDTO.setMatchRule(criteria.getMatchRule());
criteriaDTO.setQty(criteria.getQuantity());
itemCriteriaDTOList.add(criteriaDTO);
}
return itemCriteriaDTOList;
}
Aggregations