Package org.apache.directory.server.core.filtering

Examples of org.apache.directory.server.core.filtering.EntryFilteringCursor.beforeFirst()


        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();
View Full Code Here


            SearchOperationContext searchOperationContext = new SearchOperationContext( adminSession, suffixDn, referralFilter, searchControl );
            searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
            EntryFilteringCursor cursor = nexus.search( searchOperationContext );
           
            // Move to the first entry in the cursor
            cursor.beforeFirst();
           
            while ( cursor.next() )
            {
                ServerEntry entry = cursor.get();
View Full Code Here

            referralFilter, searchControl );
        searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );
        EntryFilteringCursor cursor = nexus.search( searchOperationContext );
       
        // Move to the first entry in the cursor
        cursor.beforeFirst();
       
        while ( cursor.next() )
        {
            ServerEntry entry = cursor.get();
           
View Full Code Here

        EntryFilteringCursor list;

        try
        {
            list = directoryService.getAdminSession().list( dn, AliasDerefMode.DEREF_ALWAYS, null );
            list.beforeFirst();
            while ( list.next() )
            {
                ClonedServerEntry entry = list.get();
                children.add( ( String ) entry.getDn().getRdn().getNormValue() );
            }
View Full Code Here

        try
        {
            cursor = session.getCoreSession().search( req );
           
            // Position the cursor at the beginning
            cursor.beforeFirst();
            boolean hasRootDSE = false;
           
            while ( cursor.next() )
            {
                if ( hasRootDSE )
View Full Code Here

                {
                    // No cursor : do a search.
                    cursor = session.getCoreSession().search( req );

                    // Position the cursor at the beginning
                    cursor.beforeFirst();
                   
                    // And read the entries
                    readResults( session, req, ldapResult, cursor, sizeLimit );
                }
                finally
View Full Code Here

                // No cursor : do a search.
                cursor = session.getCoreSession().search( req );

                // Position the cursor at the beginning
                cursor.beforeFirst();
               
                // And stores the cursor into the session
                pagedContext.setCursor( cursor );
            }
        }
View Full Code Here

        // Check that we have a cursor or not.
        // No cursor : do a search.
        EntryFilteringCursor cursor = session.getCoreSession().search( req );

        // Position the cursor at the beginning
        cursor.beforeFirst();
       
        /*
         * Iterate through all search results building and sending back responses
         * for each search result returned.
         */
 
View Full Code Here

                try
                {
                    cursor = directoryService.getAdminSession()
                        .search( base, SearchScope.SUBTREE, filter, AliasDerefMode.DEREF_ALWAYS, null );
                   
                    cursor.beforeFirst();
                    if ( cursor.next() ) // there should be only one!
                    {
                        log.debug( "Class {} found under {} search context.", name, base );
                        ServerEntry classEntry = cursor.get();
View Full Code Here

       
        EntryFilteringCursor cursor = coreSession.search( dn, "(ObjectClass=*)", true );
       
        assertNotNull( cursor );
       
        cursor.beforeFirst();
        int nbRes = 0;
       
        while ( cursor.next() )
        {
            Entry entry = cursor.get();
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.