/** * Gets the SearchScope enumerated type for the corresponding * LDAP URL scope value of either base, one or sub. * * @param ldapUrlValue the LDAP URL scope value to get SearchScope for * @return the SearchScope enumerated type for the LDAP URL scope value */ public static int getSearchScope( String ldapUrlValue ) { if ( "base".equalsIgnoreCase( ldapUrlValue ) ) { return OBJECT.getScope(); } else if ( "one".equalsIgnoreCase( ldapUrlValue ) ) { return ONELEVEL.getScope(); } else if ( "sub".equalsIgnoreCase( ldapUrlValue ) ) { return SUBTREE.getScope(); } else { throw new IllegalArgumentException( I18n.err( I18n.ERR_04161, ldapUrlValue ) ); } }
/** * @see Object#hashCode() * @return the instance's hash code */ public int hashCode() { int h = 37; h = h*17 + super.hashCode(); h = h*17 + ( aliasDerefAliases != null ? aliasDerefAliases.hashCode() : 0 ); h = h*17 + ( baseDn != null ? baseDn.hashCode() : 0 ); h = h*17 + scope.getScope(); return h; }
Value.encodeEnumerated( buffer, scope.getScope() );