@RequestMapping(value = "delete") @ResponseBody public void delete(Status status) { try { statusDao.delete(status); } catch (Exception e) { e.printStackTrace(); } }
@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; }
@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; }