예제 #1
0
 @Override
 public List<Ticket> getBookedTickets(User user, int pageSize, int pageNum) {
   int paginationSize = pageSize * (pageNum - 1);
   return jdbcTemplateObject.query(
       SELECT_TICKET_BY_USER,
       new Object[] {user.getId(), paginationSize, pageSize},
       ticketRowMapper);
 }
예제 #2
0
 public boolean delete(User user) {
   return nonNull(user) ? deleteById(user.getId()) : false;
 }
예제 #3
0
 public User update(User user) {
   Object updatedUser = bookingStore.update(USER_BEAN + ":" + user.getId(), user);
   return nonNull(updatedUser) ? (User) updatedUser : null;
 }