public void setSortOrder(int sortOrder) {
        if (!(sortOrder == SessionResultFilter.ASCENDING || sortOrder == SessionResultFilter.DESCENDING)) {
            throw new IllegalArgumentException();
        }
        this.sortOrder = sortOrder;
    }
Sets the sort type. Valid arguments are SessionResultFilter.ASCENDING for
ascending sorting or SessionResultFilter.DESCENDING for descending sorting.
Descending sorting is: 3, 2, 1, etc. Ascending sorting is 1, 2, 3, etc.

@param sortOrder the order that results will be sorted in.
xmppserver/src/main/java/org/jivesoftware/openfire/SessionResultFilter.java