Set<String> orderProductPromoCodes = UtilGenerics.checkSet(context.get("orderProductPromoCodes"));
if (UtilValidate.isNotEmpty(orderProductPromoCodes)) {
GenericValue orderProductPromoCode = delegator.makeValue("OrderProductPromoCode");
Iterator<String> orderProductPromoCodeIter = orderProductPromoCodes.iterator();
while (orderProductPromoCodeIter.hasNext()) {
orderProductPromoCode.clear();
orderProductPromoCode.set("orderId", orderId);
orderProductPromoCode.set("productPromoCodeId", orderProductPromoCodeIter.next());
toBeStored.add(orderProductPromoCode);
}
}