Пример #1
0
  private WebErrors validatePsqy(Psqy bean, HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    Long id = bean.getId();

    errors.ifNull(id, "id");
    vldPsqyExist(id, errors);
    return errors;
  }
Пример #2
0
 private WebErrors validateDelete(String[] ids, HttpServletRequest request) {
   WebErrors errors = WebErrors.create(request);
   errors.ifEmpty(ids, "ids");
   for (String id : ids) {
     vldExist(id, errors);
   }
   return errors;
 }
Пример #3
0
  private WebErrors validateUpdate(Fws bean, HttpServletRequest request) {
    WebErrors errors = WebErrors.create(request);
    String id = bean.getId();

    errors.ifNull(id, "id");
    vldExist(id, errors);
    return errors;
  }
Пример #4
0
 private WebErrors validateSave(Organization organization, HttpServletRequest request) {
   WebErrors errors = WebErrors.create(request);
   //		Dls lsfc=fwsMng.findByFctypeId(bean.getFctypeId().getId(), bean.getWebsite().getId());
   if (organization == null || organization.getId() < 1) {
     errors.addError("服务商组织机构不存在");
   }
   return errors;
 }
Пример #5
0
 private WebErrors validateUpdateTagNames(
     Long[] wids, String[] tagNames, HttpServletRequest request) {
   WebErrors errors = WebErrors.create(request);
   errors.ifEmpty(wids, "wids");
   errors.ifEmpty(tagNames, "tagNames");
   if (errors.hasErrors()) {
     return errors;
   }
   if (wids.length != tagNames.length) {
     errors.addErrorString("wids length must equals tagNames length");
     return errors;
   }
   for (int i = 0, len = wids.length; i < len; i++) {
     vldExist(wids[i], errors);
     if (errors.hasErrors()) {
       return errors;
     }
   }
   return errors;
 }
Пример #6
0
 private WebErrors validateEdit(String id, HttpServletRequest request) {
   WebErrors errors = WebErrors.create(request);
   errors.ifNull(id, "id");
   vldExist(id, errors);
   return errors;
 }
Пример #7
0
 private WebErrors validateSave(ProductTag bean, HttpServletRequest request) {
   WebErrors errors = WebErrors.create(request);
   bean.setWebsite(SiteUtils.getWeb(request));
   return errors;
 }