示例#1
0
 private boolean vldExist(Integer id, WebErrors errors) {
   if (errors.ifNull(id, "id")) {
     return true;
   }
   CmsModelItem entity = manager.findById(id);
   if (errors.ifNotExist(entity, CmsModelItem.class, id)) {
     return true;
   }
   return false;
 }
示例#2
0
 private boolean vldExist(Integer id, Integer siteId, WebErrors errors) {
   if (errors.ifNull(id, "id")) {
     return true;
   }
   CmsVoteTopic entity = manager.findById(id);
   if (errors.ifNotExist(entity, CmsVoteTopic.class, id)) {
     return true;
   }
   if (!entity.getSite().getId().equals(siteId)) {
     errors.notInSite(CmsVoteTopic.class, id);
     return true;
   }
   return false;
 }