@GET @Path("/del/{id}") @Consumes("application/json") @Produces("application/json") @Transactional(propagation = Propagation.REQUIRED) public Response del(@PathParam("id") Long id) { try { iclubQuoteStatusDAO.delete(iclubQuoteStatusDAO.findById(id)); return Response.ok().build(); } catch (Exception e) { LOGGER.error(e, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } }
@GET @Path("/get/{id}") @Produces("application/json") @Transactional(propagation = Propagation.REQUIRED) public IclubQuoteStatusModel getById(@PathParam("id") Long id) { IclubQuoteStatusModel model = new IclubQuoteStatusModel(); try { IclubQuoteStatus bean = iclubQuoteStatusDAO.findById(id); model = IclubQuoteStatusTrans.fromORMtoWS(bean); } catch (Exception e) { LOGGER.error(e, e); } return model; }