/** * Sets the scope. Must be one of {@link SearchScope#OBJECT}, * {@link SearchScope#ONELEVEL} or {@link SearchScope#SUBTREE}, * otherwise {@link SearchScope#OBJECT} is assumed as default. * * @param scope the new scope */ public void setScope( int scope ) { try { this.scope = SearchScope.getSearchScope( scope ); } catch ( IllegalArgumentException iae ) { this.scope = SearchScope.OBJECT; } }
/** * Gets the SearchScope enumerated type for the corresponding * scope value of either base, one or sub. * * @param scope the scope value to get SearchScope for * @return the SearchScope enumerated type for the LDAP URL scope value */ public static int getSearchScope( String scope ) { if ( "base".equalsIgnoreCase( scope ) ) { return OBJECT.getScope(); } else if ( "one".equalsIgnoreCase( scope ) ) { return ONELEVEL.getScope(); } else if ( "sub".equalsIgnoreCase( scope ) ) { return SUBTREE.getScope(); } else { throw new IllegalArgumentException( I18n.err( I18n.ERR_13502_UNKNOWN_LDAP_URL_SCOPE, scope ) ); } }
/** * {@inheritDoc} */ @Override public int hashCode() { int h = 37; h = h * 17 + ( ( baseObject == null ) ? 0 : baseObject.hashCode() ); h = h * 17 + ( ( searchScope == null ) ? 0 : searchScope.hashCode() ); return h; }
sb.append( scope.getLdapUrlValue() ); sb.append( scope.getLdapUrlValue() ); break;
else if ( !searchScope.equals( other.searchScope ) )
sb.append( scope.getLdapUrlValue() ); sb.append( scope.getLdapUrlValue() ); break;
else if ( !searchScope.equals( other.searchScope ) )
/** * Gets the SearchScope enumerated type for the corresponding * scope value of either base, one or sub. * * @param scope the scope value to get SearchScope for * @return the SearchScope enumerated type for the LDAP URL scope value */ public static int getSearchScope( String scope ) { if ( "base".equalsIgnoreCase( scope ) ) { return OBJECT.getScope(); } else if ( "one".equalsIgnoreCase( scope ) ) { return ONELEVEL.getScope(); } else if ( "sub".equalsIgnoreCase( scope ) ) { return SUBTREE.getScope(); } else { throw new IllegalArgumentException( I18n.err( I18n.ERR_13502_UNKNOWN_LDAP_URL_SCOPE, scope ) ); } }
/** * Sets the scope. Must be one of {@link SearchScope#OBJECT}, * {@link SearchScope#ONELEVEL} or {@link SearchScope#SUBTREE}, * otherwise {@link SearchScope#OBJECT} is assumed as default. * * @param scope the new scope */ public void setScope( int scope ) { try { this.scope = SearchScope.getSearchScope( scope ); } catch ( IllegalArgumentException iae ) { this.scope = SearchScope.OBJECT; } }
/** * {@inheritDoc} */ @Override public int hashCode() { int h = 37; h = h * 17 + ( ( baseObject == null ) ? 0 : baseObject.hashCode() ); h = h * 17 + ( ( searchScope == null ) ? 0 : searchScope.hashCode() ); return h; }
sb.append( scope.getLdapUrlValue() ); sb.append( scope.getLdapUrlValue() ); break;
/** * Gets the SearchScope enumerated type for the corresponding * scope value of either base, one or sub. * * @param scope the scope value to get SearchScope for * @return the SearchScope enumerated type for the LDAP URL scope value */ public static int getSearchScope( String scope ) { if ( "base".equalsIgnoreCase( scope ) ) { return OBJECT.getScope(); } else if ( "one".equalsIgnoreCase( scope ) ) { return ONELEVEL.getScope(); } else if ( "sub".equalsIgnoreCase( scope ) ) { return SUBTREE.getScope(); } else { throw new IllegalArgumentException( I18n.err( I18n.ERR_13502_UNKNOWN_LDAP_URL_SCOPE, scope ) ); } }
/** * Sets the scope. Must be one of {@link SearchScope#OBJECT}, * {@link SearchScope#ONELEVEL} or {@link SearchScope#SUBTREE}, * otherwise {@link SearchScope#OBJECT} is assumed as default. * * @param scope the new scope */ public void setScope( int scope ) { try { this.scope = SearchScope.getSearchScope( scope ); } catch ( IllegalArgumentException iae ) { this.scope = SearchScope.OBJECT; } }
hash = hash * 17 + scope.hashCode(); hash = hash * 17 + Long.valueOf( sizeLimit ).hashCode(); hash = hash * 17 + timeLimit;
SchemaConstants.ADS_SEARCH_BASE_DN, replica.getSearchCriteria().getBase().getName(), SchemaConstants.ADS_REPL_LAST_SENT_CSN, replica.getLastSentCsn(), SchemaConstants.ADS_REPL_SEARCH_SCOPE, replica.getSearchCriteria().getScope().getLdapUrlValue(), SchemaConstants.ADS_REPL_REFRESH_N_PERSIST, String.valueOf( replica.isRefreshNPersist() ), SchemaConstants.ADS_REPL_SEARCH_FILTER, replica.getSearchFilter(),
searchRequest.setScope( SearchScope.getSearchScope( scope ) );
hash = hash * 17 + scope.hashCode(); hash = hash * 17 + Long.valueOf( sizeLimit ).hashCode(); hash = hash * 17 + timeLimit;
searchRequest.setScope( SearchScope.getSearchScope( scope ) );