return mappingService.map(persisted, TicketVO.class);
}
@RequestMapping(value = "/{ticketId}", method = RequestMethod.PUT)
public TicketVO replace(@PathVariable long ticketId, @Valid @RequestBody TicketVO ticket) {
Ticket previouslyPersisted = ticketService.get(ticketId);
Ticket newTicket = mappingService.map(ticket, Ticket.class);
newTicket.setId(previouslyPersisted.getId());
Ticket persisted = ticketService.store(newTicket);
return mappingService.map(persisted, TicketVO.class);
}