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

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


       
        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


        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

        // 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

        {
            SchemaManager schemaManager = session.getDirectoryService().getSchemaManager();
            cursor = session.search( searchBaseDn, SearchScope.SUBTREE,
                getFilter( schemaManager, principal ), AliasDerefMode.DEREF_ALWAYS, null );
   
            cursor.beforeFirst();
            if ( cursor.next() )
            {
                Entry entry = cursor.get();
                LOG.debug( "Found entry {} for kerberos principal name {}", entry, principal );
               
View Full Code Here

                .search( base, scope, exprNode, aliasDerefMode, null );

            // advancing the cursor forward and backward must give the same result
            for ( int count = 1; count < 20; count++ )
            {
                cursor.beforeFirst();

                List<String> nextResults = new ArrayList<String>();
                while ( nextResults.size() < count && cursor.next() )
                {
                    nextResults.add( cursor.get().getDn().getName() );
View Full Code Here

        List<String> nextResults = new ArrayList<String>();

        ExprNode exprNode = FilterParser.parse(getService().getSchemaManager(), filter);
        EntryFilteringCursor cursor = getService().getAdminSession().search( new Dn( base ), scope, exprNode,
            aliasDerefMode, null );
        cursor.beforeFirst();
        while ( cursor.next() )
        {
            nextResults.add( cursor.get().getDn().getName() );
        }
View Full Code Here

                SearchScope.SUBTREE,
                filter,
                AliasDerefMode.DEREF_ALWAYS,
                returningAttributes );
           
            cursor.beforeFirst();
           
            Entry entry = null;
           
            while ( cursor.next() )
            {
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.