Package com.swinarta.sunflower.server.model

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse.addError()


      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-4);
     
      try{
        String contraintMsg = dive.getCause().getCause().getMessage();
        if(StringUtils.indexOf(contraintMsg, "key 'sku'") > 0){
          resp1.addError("sku", "SKU Found");
        }else if(StringUtils.indexOf(contraintMsg, "key 'barcode'") > 0){
          resp1.addError("barcode", "Barcode Found");
        }       
        return resp1;       
      }catch (Exception e) {
View Full Code Here


      try{
        String contraintMsg = dive.getCause().getCause().getMessage();
        if(StringUtils.indexOf(contraintMsg, "key 'sku'") > 0){
          resp1.addError("sku", "SKU Found");
        }else if(StringUtils.indexOf(contraintMsg, "key 'barcode'") > 0){
          resp1.addError("barcode", "Barcode Found");
        }       
        return resp1;       
      }catch (Exception e) {
        e.printStackTrace();
        SgwtRestErrorResponse resp2 = new SgwtRestErrorResponse(-1);
View Full Code Here

        }       
        return resp1;       
      }catch (Exception e) {
        e.printStackTrace();
        SgwtRestErrorResponse resp2 = new SgwtRestErrorResponse(-1);
        resp2.addError("exeption", e.getMessage());
        return resp2;       
      }
    } catch (Exception e) {
      e.printStackTrace();
      SgwtRestErrorResponse resp3 = new SgwtRestErrorResponse(-1);
View Full Code Here

        return resp2;       
      }
    } catch (Exception e) {
      e.printStackTrace();
      SgwtRestErrorResponse resp3 = new SgwtRestErrorResponse(-1);
      resp3.addError("exeption", e.getMessage());
      return resp3;
    }
   
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(resp);
    return ret;
View Full Code Here

     
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-4);
     
      String contraintMsg = dive.getCause().getCause().getMessage();
      if(StringUtils.indexOf(contraintMsg, "sku") > 0){
        resp1.addError("sku", "SKU Found");
      }else if(StringUtils.indexOf(contraintMsg, "barcode") > 0){
        resp1.addError("barcode", "Barcode Found");
      }       
      return resp1;       
    } catch (Exception e) {
View Full Code Here

     
      String contraintMsg = dive.getCause().getCause().getMessage();
      if(StringUtils.indexOf(contraintMsg, "sku") > 0){
        resp1.addError("sku", "SKU Found");
      }else if(StringUtils.indexOf(contraintMsg, "barcode") > 0){
        resp1.addError("barcode", "Barcode Found");
      }       
      return resp1;       
    } catch (Exception e) {
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exeption", e.getMessage());
View Full Code Here

        resp1.addError("barcode", "Barcode Found");
      }       
      return resp1;       
    } catch (Exception e) {
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exeption", e.getMessage());
      return resp1;       
    }

    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(resp);
    return ret;
View Full Code Here

    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;       
    }
   
    return new SgwtRestFetchResponseBase(resp);
 
View Full Code Here

      DisplayReceivingOrder dro = mapper.map(roResp, DisplayReceivingOrder.class);
      resp = dro;
    } catch (Exception e) {
      e.printStackTrace();
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exception", e.getMessage());
      return resp1;       
    }
   
    SgwtRestFetchResponseBase ret = new SgwtRestFetchResponseBase(resp);
    return ret;
View Full Code Here

      }
      DisplaySearchReturnToSupplier dret = mapper.map(retResp, DisplaySearchReturnToSupplier.class);
      resp = dret;
    } catch (Exception e) {
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exception", e.getMessage());
      return resp1;       
    }
   
    return new SgwtRestFetchResponseBase(resp);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.