@Override
  public R orderBy(Ordering first, Ordering... rest) {
    if (!query.collations().isEmpty()) {
      throw new IllegalStateException("OrderBy was already set");
    }

    final List<Ordering> orderings = new ArrayList<>();
    orderings.add(first);
    orderings.addAll(Arrays.asList(rest));

    final List<Collation> collations = orderings.stream().map(x -> (Collation) x).collect(Collectors.toList());
    return newReader(query.addCollations(collations));
  }
Expose current query (used mostly for SPIs)
criteria/common/src/org/immutables/criteria/repository/AbstractReader.java