Examples of SgwtRestErrorResponse


Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

      }     
     
      resp = det;
     
    }catch (Exception e) {
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exception", e.getMessage());
      return resp1;       
    }

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

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

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

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

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

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

      ro = coreManager.save(ReceivingOrder.class, ro);

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

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

        }     
       
        resp = det;
       
      } catch (Exception e) {
        SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
        resp1.addError("exception", e.getMessage());
        return resp1;       
      }   
     
    }else if(request.getOperationType() == OPERATION_TYPE.REMOVE){
      PurchasingOrderDetail pod = coreManager.get(PurchasingOrderDetail.class, id);
View Full Code Here

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

      }     
     
      resp = det;     
     
    }catch (Exception e) {
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exception", e.getMessage());
      return resp1;       
    }

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

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

           
      resp = mapper.map(savedProduct, DisplayProduct.class);
    }catch (DataIntegrityViolationException dive){
     
      dive.printStackTrace();
      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) {
        e.printStackTrace();
        SgwtRestErrorResponse resp2 = new SgwtRestErrorResponse(-1);
        resp2.addError("exeption", e.getMessage());
        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

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

    try {
      Product savedProduct = coreManager.save(Product.class, p);
      resp = mapper.map(savedProduct, DisplayProduct.class);
    }catch (DataIntegrityViolationException dive){
     
      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) {
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exeption", e.getMessage());
      return resp1;       
    }

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

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

   
    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

Examples of com.swinarta.sunflower.server.model.SgwtRestErrorResponse

      }
      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
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.