use of org.hisp.dhis.organisationunit.comparator.OrganisationUnitParentCountComparator in project dhis2-core by dhis2.
the class OrganisationUnitObjectBundleHook method sortOrganisationUnits.
private void sortOrganisationUnits(ObjectBundle bundle) {
List<IdentifiableObject> nonPersistedObjects = bundle.getObjects(OrganisationUnit.class, false);
List<IdentifiableObject> persistedObjects = bundle.getObjects(OrganisationUnit.class, true);
nonPersistedObjects.sort(new OrganisationUnitParentCountComparator());
persistedObjects.sort(new OrganisationUnitParentCountComparator());
}
Aggregations