LOG.warn("Clone implementation missing in inheritance hierarchy outside of Broadleaf: " +
clonedOrderItem.getClass().getName(), e);
}
if (candidateItemOffers != null) {
for (CandidateItemOffer candidate : candidateItemOffers) {
CandidateItemOffer clone = candidate.clone();
clone.setOrderItem(clonedOrderItem);
clonedOrderItem.getCandidateItemOffers().add(clone);
}
}
if (orderItemAttributeMap != null && !orderItemAttributeMap.isEmpty()) {
for (OrderItemAttribute attribute : orderItemAttributeMap.values()) {
OrderItemAttribute clone = attribute.clone();
clone.setOrderItem(clonedOrderItem);
clonedOrderItem.getOrderItemAttributes().put(clone.getName(), clone);
}
}
if (CollectionUtils.isNotEmpty(childOrderItems)) {
for (OrderItem childOrderItem : childOrderItems) {
OrderItem clone = childOrderItem.clone();
clone.setParentOrderItem(clonedOrderItem);
clonedOrderItem.getChildOrderItems().add(clone);
}
}
clonedOrderItem.setCategory(category);