Пример #1
0
 @RequestMapping(value = "delete")
 @ResponseBody
 public void delete(Status status) {
   try {
     statusDao.delete(status);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Пример #2
0
 @RequestMapping(value = "findByCodeJSON", method = RequestMethod.GET)
 @ResponseBody
 public Status findByCode(Status status) {
   try {
     status = statusDao.findByCod(status.getIdStatus());
     return status;
   } catch (Exception e) {
     e.printStackTrace();
   }
   return null;
 }
Пример #3
0
 @RequestMapping(value = "findAllJSON", method = RequestMethod.GET)
 @ResponseBody
 public List<Status> findAll() {
   List<Status> lista;
   try {
     lista = statusDao.findAll();
     return lista;
   } catch (Exception e) {
     e.printStackTrace();
   }
   return null;
 }