directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Zoerner <ste...@labeo.de>
Subject Re: Using a CoreSession in embeded mode to perform a search
Date Fri, 22 May 2009 07:40:01 GMT
Hi Emmanuel!

Emmanuel Lecharny wrote:
>> I am not happy with the use of CursorIterator (especially the cast). 
>> Anybody a better idea how to perform a search and process the results 
>> from an embedded server?
> 
> You don't have to use a CursorIterator. Once you get a cursor, you can 
> do something like :
> 
> cursor.beforeFirst(); // To position the cursor at the beginning
> 
> while (cursor.next() )
> {
>    ServerEntry entry = cursor.get();
> }
> 
> No need to cast, and the entry you get is a clone.

I was blind. Thanks E, works great!
Greetings from Hamburg,
    Stefan


Mime
View raw message