Package com.swinarta.sunflower.core.model

Examples of com.swinarta.sunflower.core.model.Promo


    Integer promoId = RequestUtil.getInteger(request.getData().get("promoId"));
    Integer productId = RequestUtil.getInteger(request.getData().get("productId"));
    Serializable resp = null;
   
    try {
      Promo promo = coreManager.get(Promo.class, promoId);
      Product product = coreManager.get(Product.class, productId);
     
      PromoDetail det = new PromoDetail();
      det.setProduct(product);
      det.setPromo(promo);
View Full Code Here


    String promoTypeStr = RequestUtil.getString(req.getData().get("promoTypeStr"));
    Double promoValue = RequestUtil.getDouble(req.getData().get("promoValue"));
    String description = RequestUtil.getString(req.getData().get("description"));

    Promo promo = new Promo();
    promo.setStartDate(startDate);
    promo.setEndDate(endDate);
    promo.setPromoType(PromoType.fromString(promoTypeStr));
    promo.setPromoValue(promoValue);
    promo.setDescription(description);
   
    try {
      Promo promoResp = coreManager.save(Promo.class, promo);
      resp = promoResp;
    } catch (Exception e) {
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exception", e.getMessage());
      return resp1;       
View Full Code Here

    Integer productId = RequestUtil.getInteger(getRequestAttributes().get("productId"));
   
    Date startDate = RequestUtil.getDate(getRequestAttributes().get("startDate"));
    Date endDate = RequestUtil.getDate(getRequestAttributes().get("endDate"));

    Promo promo = coreManager.getPromo(productId, startDate, endDate);
    DisplayPromo disp = null;
   
    if(promo != null){
      disp = mapper.map(promo, DisplayPromo.class);
    }
View Full Code Here

TOP

Related Classes of com.swinarta.sunflower.core.model.Promo

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.