Code example for SearchControls

Methods: setSearchScope

0
     * 
     * @param searchSubtree set to true to enable searching of the entire tree below the <tt>groupSearchBase</tt>. 
     */ 
    public void setSearchSubtree(boolean searchSubtree) {
        int searchScope = searchSubtree ? SearchControls.SUBTREE_SCOPE : SearchControls.ONELEVEL_SCOPE;
        searchControls.setSearchScope(searchScope);
    } 
 
    /** 
     * Sets the corresponding property on the underlying template, avoiding specific issues with Active Directory. 
     * 
     *   @see LdapTemplate#setIgnoreNameNotFoundException(boolean) 
     */ 
    public void setIgnorePartialResultException(boolean ignore) {
        getLdapTemplate().setIgnorePartialResultException(ignore);
    } 
 
    /** 
     * Returns the current LDAP template. 
     * Method available so that classes extending this can override the template used  
Contextual code suggestions in your IDE  Get Codota for Java