tmp = ( DbSearchResult ) decorated.next();
tmp = ( SearchResult ) decorated.next();
    private void prefetch() throws NamingException    {        DbSearchResult tmp = null;        while( decorated.hasMore() )        {            boolean accepted = true;            tmp = ( DbSearchResult ) decorated.next();            // don't waste using a for loop if we got 0 or 1 element            if ( filters.isEmpty() )            {                this.prefetched = tmp;                return;            }            else if ( filters.size() == 1 )            {                accepted = ( ( SearchResultFilter ) filters.get( 0 ) )                        .accept( ctx, tmp, searchControls );                if ( accepted )                {                    this.prefetched = tmp;                    return;                }                continue;            }            // apply all filters shorting their application on result denials            for ( int ii = 0; ii < filters.size(); ii ++ )            {                SearchResultFilter filter = ( SearchResultFilter ) filters.get( ii );                accepted &= filter.accept( ctx, tmp, searchControls );                if ( ! accepted )                {                    continue;                }            }            /*             * If we get here then a result has been accepted by all the             * filters so we set the result as the prefetched value to return             * on the following call to the next() or nextElement() methods             */            this.prefetched = tmp;            return;        }        /*         * If we get here then no result was found to be accepted by all         * filters before we exhausted the decorated enumeration so we close         */        close();    }