@Override
    Integer redactEntity(Criteria criteria, AbstractDao dao) throws DaoException {
        Integer idDirection = (Integer) criteria.getParam(DAO_ID_DIRECTION);
        if (idDirection != null) {
            return updateDirection(criteria, dao);
        } else {
            return createDirection(criteria, dao);
        }
    }