@Override
    public QueryCriteria visit(OrQueryCriteria criteria, List<AttributeReference.Key> arg) {
      QueryCriteria subQuery1 = criteria.getSubQueryCriteria1().accept(this, arg);
      QueryCriteria subQuery2 = criteria.getSubQueryCriteria2().accept(this, arg);

      if (subQuery1.equals(criteria.getSubQueryCriteria1())
          && subQuery2.equals(criteria.getSubQueryCriteria2())) {
        return criteria;
      }

      return new OrQueryCriteria(subQuery1, subQuery2);
    }
    @Override
    public QueryCriteria visit(OrQueryCriteria criteria, Void arg) {
      QueryCriteria subQuery1 = criteria.getSubQueryCriteria1().accept(this, null);
      QueryCriteria subQuery2 = criteria.getSubQueryCriteria2().accept(this, null);

      if (subQuery1.equals(criteria.getSubQueryCriteria1())
          && subQuery2.equals(criteria.getSubQueryCriteria2())) {
        return criteria;
      }

      return new OrQueryCriteria(subQuery1, subQuery2);
    }