Examples of SgwtRestErrorResponse


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

        retResp = coreManager.save(ReturnToSupplier.class, ret);
      }
      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

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 = det;
       
      } catch (Exception e) {
        SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
        resp1.addError("exception", e.getMessage());
        return resp1;       
      }   
     
    }else if(request.getOperationType() == OPERATION_TYPE.REMOVE){
      ReturnToSupplierDetail retd = coreManager.get(ReturnToSupplierDetail.class, id);
View Full Code Here

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

 
    try {
      resp = coreManager.save(Supplier.class, supp);
    }catch (DataIntegrityViolationException dive){

      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-4);

      String contraintMsg = dive.getCause().getCause().getMessage();
      if(StringUtils.indexOf(contraintMsg, "supplier_id") > 0){
        resp1.addError("supplierCode", "Supplier Code Found");
      }       
      return resp1;       
    } catch (Exception e) {
      SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);
      resp1.addError("exception", e.getMessage());
      return resp1;       
    }

    SgwtRestFetchResponseBase ret = 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.