private Integer updateDirection(Criteria criteria, AbstractDao dao) throws DaoException {
        Integer idDirection = (Integer) criteria.getParam(DAO_ID_DIRECTION);
        if (idDirection != null) {
            Criteria beans = new Criteria();
            beans.addParam(DAO_ID_DIRECTION, idDirection);
            dao.updateDirection(beans, criteria);
        }
        Integer idDescription = (Integer) criteria.getParam(DAO_ID_DESCRIPTION);
        if (idDescription != null) {
            Criteria beans = new Criteria();
            beans.addParam(DAO_ID_DESCRIPTION, idDescription);
            dao.updateDescription(beans, criteria);
            Criteria crit = new Criteria();
            crit.addParam(DAO_ID_DIRECTION, idDirection);
            dao.updateDirectionCountryLinks(crit, criteria);
            dao.updateDirectionCityLinks(crit, criteria);
            dao.updateDirectionStayHotels(crit, criteria);
        }
        return idDirection;
    }