Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 @Override
 public Ticket insert(Ticket ticket) {
   jdbcTemplateObject.update(
       INSERT_TICKET,
       categories.get(ticket.getCategory()),
       ticket.getEventId(),
       ticket.getPlace(),
       ticket.getUserId());
   return ticket;
 }
Ejemplo n.º 3
0
 @Override
 public boolean delete(Ticket ticket) {
   return deleteById(ticket.getId());
 }