@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); }
public boolean delete(User user) { return nonNull(user) ? deleteById(user.getId()) : false; }
public User update(User user) { Object updatedUser = bookingStore.update(USER_BEAN + ":" + user.getId(), user); return nonNull(updatedUser) ? (User) updatedUser : null; }