0
I’m using the FullEntityRepository
of deltaspike
, the Response
has to be a status 204
if successful, and status 400
if not. Any tips?
Service layer:
@Transactional
public void deletar(Integer id){
MotivoConcessao motivoConcessaoParaDeletar = repositorio.findBy(id);
repositorio.remove(motivoConcessaoParaDeletar);
}
Camada resource:
@DELETE
@Path("{id}")
public Response deletar(@PathParam("id") @Min(value = 1, message = "{recursomotivoconcessao.id.min}") Integer id) {
return Response.status(204).entity(servico.deletar(id)).build();
}
The variable
repositorio
is of what class?– Felipe Marinho
And the Fullentityrepository guy, the deltaspike. You can help me with that?
– João Victor