Code example for SearchControls

Methods: getCountLimitgetDerefLinkFlaggetReturningAttributesgetSearchScopegetTimeLimit

0
     * the search to return DirContextAdapter instances. 
     * @param originalControls 
     * @return 
     */ 
    private static SearchControls buildControls(SearchControls originalControls) {
        return new SearchControls(originalControls.getSearchScope(),
                originalControls.getCountLimit(),
                originalControls.getTimeLimit(),
                originalControls.getReturningAttributes(),
                RETURN_OBJECT,
                originalControls.getDerefLinkFlag());
    } 
 
    /** 
     * Sets the search controls which will be used for search operations by the template. 
     * 
     * @param searchControls the SearchControls instance which will be cached in the template. 
     */ 
    public void setSearchControls(SearchControls searchControls) {
        this.searchControls = searchControls;
Experience pair programming with AI  Get Codota for Java