Code example for SearchControls

Methods: setSearchScope

0
     * 
     * @param searchSubtree true the underlying search controls should be set to SearchControls.SUBTREE_SCOPE 
     * rather than SearchControls.ONELEVEL_SCOPE. 
     */ 
    public void setSearchSubtree(boolean searchSubtree) {
        searchControls.setSearchScope(searchSubtree ? SearchControls.SUBTREE_SCOPE : SearchControls.ONELEVEL_SCOPE);
    } 
 
    /** 
     * The time to wait before the search fails; the default is zero, meaning forever. 
     * 
     * @param searchTimeLimit the time limit for the search (in milliseconds). 
     */ 
    public void setSearchTimeLimit(int searchTimeLimit) {
        searchControls.setTimeLimit(searchTimeLimit);
    } 
 
    /** 
     * Specifies the attributes that will be returned as part of the search. 
     *<p> 
Contextual code suggestions in your IDE  Get Codota for Java