private Ticket createTicketObj(long userId, long eventId, int place, Ticket.Category category) { Ticket ticket = new TicketBean(); ticket.setCategory(category); ticket.setPlace(place); ticket.setEventId(eventId); ticket.setUserId(userId); return ticket; }
@Override public Ticket insert(Ticket ticket) { jdbcTemplateObject.update( INSERT_TICKET, categories.get(ticket.getCategory()), ticket.getEventId(), ticket.getPlace(), ticket.getUserId()); return ticket; }
@Override public boolean delete(Ticket ticket) { return deleteById(ticket.getId()); }