private Criteria[] prepareTourUpdate(Criteria criteria, AbstractDao dao) throws DaoException {
        Criteria[] crit = new Criteria[]{new Criteria(), new Criteria()};
        crit[0].addParam(DAO_ID_TOUR, criteria.getParam(DAO_ID_TOUR));
        crit[0].addParam(DAO_TOUR_SELECT_FOR_UPDATE, true);
        List<Tour> tours = dao.findTours(crit[0]);
        if (tours.isEmpty()) {
            throw new DaoException("Tour not found.");
        }
        Integer freeSeats = tours.get(0).getFreeSeats();
        Integer orderSeats = (Integer) criteria.getParam(DAO_ORDER_SEATS);
        if (freeSeats < orderSeats) {
            throw new DaoLogicException("message.tourFreeSeats");
        }
        crit[1].addParam(DAO_TOUR_FREE_SEATS, freeSeats - orderSeats);
        return crit;
    }