Examples of EntryFilteringCursor


Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor

        searchCtx.setDn( dn );
        ExprNode filter = FilterParser.parse( "(ObjectClass=domain)" );
        searchCtx.setFilter( filter );
        searchCtx.setScope( SearchScope.SUBTREE );
       
        EntryFilteringCursor cursor = partition.search( searchCtx );
       
        assertNotNull( cursor );
       
        Set<String> expectedDns = new HashSet<String>();
        expectedDns.add( entry1.getDn().getNormName() );
        expectedDns.add( entry2.getDn().getNormName() );
        expectedDns.add( entry3.getDn().getNormName() );
       
        cursor.beforeFirst();
        int nbRes = 0;
       
        while ( cursor.next() )
        {
            Entry entry = cursor.get();
            assertNotNull( entry );
            nbRes++;
           
            expectedDns.remove( entry.getDn().getNormName() );
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.