* @param itemOffer
* @param order
* @return whether or not a suitable qualifier/target pair was found and marked
*/
protected boolean markRelatedQualifiersAndTargets(PromotableCandidateItemOffer itemOffer, PromotableOrder order) {
OrderItemHolder orderItemHolder = new OrderItemHolder(null);
for (Entry<OfferItemCriteria, List<PromotableOrderItem>> entry : itemOffer.getCandidateQualifiersMap().entrySet()) {
OfferItemCriteria itemCriteria = entry.getKey();
List<PromotableOrderItem> promotableItems = entry.getValue();
List<PromotableOrderItemPriceDetail> priceDetails = buildPriceDetailListFromOrderItems(promotableItems);
int qualifierQtyNeeded = offerServiceUtilities.markRelatedQualifiersAndTargetsForItemCriteria(itemOffer, order,
orderItemHolder, itemCriteria, priceDetails, this);
if (qualifierQtyNeeded != 0) {
return false;
}
}
return markTargets(itemOffer, order, orderItemHolder.getOrderItem(), false);
}