protected int compareDocuments(Document d1, Document d2) { return d1.getCreatedDatetime().compareTo(d2.getCreatedDatetime()); }