Hi
I have two questions:
The search method
Code:
public PagedResult getAllPersons(PagedResultsCookie cookie) {
final int PAGE_SIZE = 10;
PagedResultsDirContextProcessor pager = new PagedResultsDirContextProcessor(PAGE_SIZE, cookie);
//SortControlDirContextProcessor sorter = new SortControlDirContextProcessor("uid");
AggregateDirContextProcessor processor = new AggregateDirContextProcessor();
//processor.addDirContextProcessor(sorter);
processor.addDirContextProcessor(pager);
SearchControls searchControls = new SearchControls();
searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE);
searchControls.setReturningObjFlag(true);
AndFilter filter = new AndFilter();
filter.and(new EqualsFilter("objectClass", "Person"));
List people = ldapTemplate.search(DistinguishedName.EMPTY_PATH, filter.encode(), searchControls, getContextMapper(), processor);
return new PagedResult(people, pager.getCookie());
}
It's ok.
How can I get total of the ldap base?
I have more than 3000 entry.
And I can't sort by cn or uid for example.
How can I do this?