Package com.jada.jpa.entity

Examples of com.jada.jpa.entity.Coupon


          shoppingCartItem.setItem(item);
        }
        iterator = shoppingCartCoupons.iterator();
        while (iterator.hasNext()) {
          ShoppingCartCoupon shoppingCartCoupon = (ShoppingCartCoupon) iterator.next();
          Coupon coupon = (Coupon) em.find(Coupon.class, shoppingCartCoupon.getCoupon().getCouponId());
          shoppingCartCoupon.setCoupon(coupon);
        }
 
        requestId = ContentLookupDispatchAction.getRequestId(request);
 
View Full Code Here


            "order by couponId";
    Query query = em.createQuery(sql);
    query.setParameter("siteId", contentSessionKey.getSiteId());
    iterator = query.getResultList().iterator();
    while (iterator.hasNext()) {
      Coupon coupon = (Coupon) iterator.next();
      ShoppingCartCoupon scCoupon = new ShoppingCartCoupon();
      scCoupon.setCoupon(coupon);
      coupons.add(scCoupon);
    }
    // Ensure coupons are applied in the sequence of priority
View Full Code Here

    }
    return discountTotal;
  }
 
  public void postProcess() throws CouponNotApplicableException, Exception {
    Coupon coupon = shoppingCartCoupon.getCoupon();
    if (String.valueOf(coupon.getCouponScope()).equals(Constants.COUPONSCOPE_ORDER)) {
      applyDiscountToOrder(shoppingCartCoupon.getCouponAmount());
    }
  }
View Full Code Here

    }
    return discountTotal;
  }
 
  public void postProcess() throws CouponNotApplicableException, Exception {
    Coupon coupon = shoppingCartCoupon.getCoupon();
    if (String.valueOf(coupon.getCouponScope()).equals(Constants.COUPONSCOPE_ORDER)) {
      applyDiscountToOrder(shoppingCartCoupon.getCouponAmount());
    }
  }
View Full Code Here

  }

  public boolean isDirty(Coupon value) {
    Iterator<?> iterator = coupons.iterator();
    while (iterator.hasNext()) {
      Coupon coupon = (Coupon) iterator.next();
      if (coupon.equals(value)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

      saveMessages(request, messages);
            ActionForward actionForward = actionMapping.findForward("error");
            return actionForward;
      }
     
        Coupon coupon = CouponDAO.loadByCouponCode(site.getSiteId(), couponCode);
        if (coupon == null) {
        this.initAddressInfo(form, site, shoppingCart, request, messages);
          this.initCartInfo(form, site, shoppingCart, request, messages);
        messages.add("couponCode", new ActionMessage("content.error.coupon.invalid"));
      saveMessages(request, messages);
View Full Code Here

    }
    return discountTotal;
  }
 
  public void postProcess() throws CouponNotApplicableException, Exception {
    Coupon coupon = shoppingCartCoupon.getCoupon();
    if (String.valueOf(coupon.getCouponScope()).equals(Constants.COUPONSCOPE_ORDER)) {
      applyDiscountToOrder(shoppingCartCoupon.getCouponAmount());
    }
  }
View Full Code Here

TOP

Related Classes of com.jada.jpa.entity.Coupon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.