@Transactional(propagation = Propagation.REQUIRED) public void delete(Prova Prova) { repository.excluir(Prova); }
@Transactional(propagation = Propagation.REQUIRED) public void delete(int id) { repository.excluirPor(id); }
@Transactional(propagation = Propagation.REQUIRED) public Prova update(int id, Prova prova) { prova = repository.buscarPor(id); return repository.alterar(0, prova); }
@Transactional(propagation = Propagation.REQUIRED) public Prova update(Prova prova) { return repository.alterar(0, prova); }
@Transactional(propagation = Propagation.REQUIRED) public void create(Prova prova) { prepararInsert(prova); repository.inserir(prova); }
@Transactional public Prova read(int id) { return repository.buscarPor(id); }
@Transactional public List<Prova> list() { return repository.listar(); }