public static void retrieveSorted(ObjectContainer db) {
Query query = db.query();
query.constrain(Pilot.class);
query.descend("name").orderAscending();
ObjectSet result = query.execute();
listResult(result);
query.descend("name").orderDescending();
result = query.execute();
listResult(result);
}