Code example for SearchControls

Methods: setCountLimit

0
        super(configuration, contextSource, userName, password, path);
    } 
 
    @Override 
    public void search(String baseDN, String filter, String displayFilter, SearchControls searchControls, NameClassPairCallbackHandler handler) {
        searchControls.setCountLimit(1000); //SIMPLE mode will limit have a limitation of 1000 results - as this is used
        //only by development, this is a reasonable limitation 
        pagedSearch(baseDN, filter, displayFilter, searchControls, handler);
 
    } 
 
    @Override 
    protected DirContextAuthenticationStrategy buildContextAuthenticationStategy() { 
        return new SimpleDirContextAuthenticationStrategy(); 
    } 
 
    @Override 
    public void adjustUserName(LdapProviderType ldapProviderType) {
        StringBuilder userDNSb = new StringBuilder();
 
Connect your IDE to all the code out there  Get Codota for Java