Package com.swinarta.sunflower.server.model

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


    }catch (DataIntegrityViolationException dive){
      SgwtRestErrorResponse resp = new SgwtRestErrorResponse(-4);
     
      String contraintMsg = dive.getCause().getCause().getMessage();
      if(StringUtils.indexOf(contraintMsg, "key 2") > 0){
        resp.addError("supplierCode", "Supplier Code Found");
      }       
      return resp;       

    }catch (Exception e) {
      e.printStackTrace();
View Full Code Here


      return resp;       

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

      }
     
      resp = dispDet;
    } 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

      }
      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

      DisplaySearchReturnToSupplier dret = mapper.map(retResp, DisplaySearchReturnToSupplier.class);
      resp = dret;
     
    } 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

     
      try{
        respSelling = coreManager.save(Selling.class, s);
      }catch (Exception e) {
        SgwtRestErrorResponse resp = new SgwtRestErrorResponse(SgwtRestResponseBase.RESPONSE_FAILURE);
        resp.addError("exception", e.getMessage());
        return resp;
      }
     
    }else if(request.getOperationType() == OPERATION_TYPE.ADD){
                 
View Full Code Here

      try{
        respSelling = coreManager.save(Selling.class, s);
      }catch (Exception e) {
        e.printStackTrace();
        SgwtRestErrorResponse resp = new SgwtRestErrorResponse(-1);
        resp.addError("exception", e.getMessage());
        return resp;
      }
    }
   
    DisplaySelling displaySelling = null;
View Full Code Here

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

           
      try{
        respBuying = coreManager.save(Buying.class, b);
      }catch (Exception e) {
        SgwtRestErrorResponse resp = new SgwtRestErrorResponse(SgwtRestResponseBase.RESPONSE_FAILURE);
        resp.addError("exception", e.getMessage());
        return resp;
      }
     
    }else if(request.getOperationType() == OPERATION_TYPE.ADD){
     
View Full Code Here

      try{
        respBuying = coreManager.save(Buying.class, b);
      }catch (Exception e) {
        e.printStackTrace();
        SgwtRestErrorResponse resp = new SgwtRestErrorResponse(-1);
        resp.addError("exception", e.getMessage());
        return 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.