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