@Override
 @Transactional("blTransactionManager")
 public Order addOfferCode(Order order, OfferCode offerCode, boolean priceOrder)
     throws PricingException, OfferMaxUseExceededException {
   if (!order.getAddedOfferCodes().contains(offerCode)) {
     if (!offerService.verifyMaxCustomerUsageThreshold(
         order.getCustomer(), offerCode.getOffer())) {
       throw new OfferMaxUseExceededException(
           "The customer has used this offer code more than the maximum allowed number of times.");
     }
     order.getAddedOfferCodes().add(offerCode);
     order = save(order, priceOrder);
   }
   return order;
 }
 @Override
 @Transactional("blTransactionManager")
 public Order removeAllOfferCodes(Order order, boolean priceOrder) throws PricingException {
   order.getAddedOfferCodes().clear();
   order = save(order, priceOrder);
   return order;
 }
 public void removeAllAddedOfferCodes() {
   if (delegate.getAddedOfferCodes() != null) {
     delegate.getAddedOfferCodes().clear();
   }
 }