* I the base is not an alias or i alias dereerencing does not * occur on inding the base then we set the eective base to the
* If the base is not an alias or if alias dereerencing does not * occur on finding the base then we set the effective base to the
    public NamingEnumeration search( Name base, Map env, ExprNode filter,                                     SearchControls searchCtls )        throws NamingException    {        Name effectiveBase = null;        BigInteger baseId = db.getEntryId( base.toString() );        String aliasedBase = ( String ) db.getAliasIndex().reverseLookup( baseId );        DerefAliasesEnum mode = DerefAliasesEnum.getEnum( env );        // --------------------------------------------------------------------        // Determine the eective base with aliases        // --------------------------------------------------------------------        /*         * I the base is not an alias or i alias dereerencing does not         * occur on inding the base then we set the eective base to the         * given base.         */        if ( null == aliasedBase || ! mode.derefFindingBase() )        {            effectiveBase = base;        }        /*         * I the base is an alias and alias dereerencing does occur on         * inding the base then we set the eective base to the alias target         * gotten rom the alias index.         */        else if ( null != aliasedBase ) // mode = FINDING || ALWAYS        {            effectiveBase = new LdapName( aliasedBase );        }        /*         * I the base not an alias the we just set the base to the given base         */        else        {            effectiveBase = base;        }        // Add the scope node using the eective base to the ilter        BranchNode root = new BranchNode( AbstractExprNode.AND );        ExprNode node = new ScopeNode( env, effectiveBase.toString(),            searchCtls.getSearchScope() );        root.getChildren().add( node );        root.getChildren().add( filter );        // Annotate the node with the optimizer and return search enumeration.        optimizer.annotate( root );        return enumerator.enumerate( root );    }