14 Nov
2012
14 Nov
'12
5:57 a.m.
I succeeded in obtaining ordered XWiki Objects from a specific page with XWQL, but it was too slow since it queried the entire wiki. Since I just need objects from a specific page, I don't need the overhead of querying the entire wiki DB. To order objects obtained by $doc.getObjects("Class"), it seems I need a Comparator class that I can pass to a collection sort method. To compare fields, I need to extract types from the fields the Comparator is given in its constructor, which I don't have an idea of. How do I implement a Comparator that compares objects according to given fields?