Native Query syntax allows you to specify a comparator, which will be used to sort the results:
final ObjectSet<Pilot> pilots = container.query(new Predicate<Pilot>() { @Override public boolean match(Pilot o) { return o.getAge() > 18; } }, new QueryComparator<Pilot>() { public int compare(Pilot pilot, Pilot pilot1) { return pilot.getName().compareTo(pilot1.getName()); } });