directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1379692 - in /directory/apacheds/branches/apacheds-mvbt: jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ server-config/src/main/java/org/apache/directory/server/config/ xdbm-partition/src/main/java/...
Date Sat, 01 Sep 2012 05:16:21 GMT
Author: elecharny
Date: Sat Sep  1 05:16:20 2012
New Revision: 1379692

URL: http://svn.apache.org/viewvc?rev=1379692&view=rev
Log:
Removed the generic parameter from the Store, as it's always Entry

Modified:
    directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/branches/apacheds-mvbt/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java

Modified: directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java Sat Sep  1 05:16:20 2012
@@ -240,7 +240,7 @@ public class JdbmStoreTest
         assertNull( jdbmPartition.getAliasIndex() );
         Index<String, Entry, String> index = new JdbmIndex<String, Entry>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID,
             true );
-        ( ( Store<Entry> ) jdbmPartition ).addIndex( index );
+        ( ( Store ) jdbmPartition ).addIndex( index );
         assertNotNull( jdbmPartition.getAliasIndex() );
 
         assertEquals( JdbmPartition.DEFAULT_CACHE_SIZE, jdbmPartition.getCacheSize() );
@@ -260,7 +260,7 @@ public class JdbmStoreTest
         assertNotNull( jdbmPartition.getRdnIndex() );
 
         assertNull( jdbmPartition.getOneAliasIndex() );
-        ( ( Store<Entry> ) jdbmPartition ).addIndex( new JdbmIndex<Long, Entry>(
+        ( ( Store ) jdbmPartition ).addIndex( new JdbmIndex<Long, Entry>(
             ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID, true ) );
         assertNotNull( jdbmPartition.getOneAliasIndex() );
 

Modified: directory/apacheds/branches/apacheds-mvbt/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java Sat Sep  1 05:16:20 2012
@@ -43,6 +43,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.SearchEngine;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.SetCursor;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
@@ -76,7 +77,7 @@ public class ConfigPartitionReader
     private AbstractBTreePartition configPartition;
 
     /** the search engine of the partition */
-    private SearchEngine<Entry> se;
+    private SearchEngine se;
 
     /** the schema manager set in the config partition */
     private SchemaManager schemaManager;
@@ -735,7 +736,10 @@ public class ConfigPartitionReader
         try
         {
             // Do the search
-            cursor = se.cursor( baseDn, AliasDerefMode.NEVER_DEREF_ALIASES, filter, scope );
+            Set<IndexEntry<String, String>> result = se.buildResultSet( baseDn, AliasDerefMode.NEVER_DEREF_ALIASES,
+                filter, scope );
+
+            cursor = new SetCursor<IndexEntry<String, String>>( result );
 
             // First, check if we have some entries to process.
             if ( !cursor.next() )

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java Sat Sep  1 05:16:20 2012
@@ -43,7 +43,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface Store<E>
+public interface Store
 {
     /*
      * W H Y   H A V E   A   S T O R E   I N T E R F A C E  ?
@@ -158,7 +158,7 @@ public interface Store<E>
      * @param index The index to add
      * @throws Exception If the addition failed
      */
-    void addIndex( Index<?, E, String> index ) throws Exception;
+    void addIndex( Index<?, Entry, String> index ) throws Exception;
 
 
     //------------------------------------------------------------------------
@@ -167,49 +167,49 @@ public interface Store<E>
     /**
      * @return The Presence system index
      */
-    Index<String, E, String> getPresenceIndex();
+    Index<String, Entry, String> getPresenceIndex();
 
 
     /**
      * @return The Alias system index
      */
-    Index<String, E, String> getAliasIndex();
+    Index<String, Entry, String> getAliasIndex();
 
 
     /**
      * @return The OneAlias system index
      */
-    Index<String, E, String> getOneAliasIndex();
+    Index<String, Entry, String> getOneAliasIndex();
 
 
     /**
      * @return The SubAlias system index
      */
-    Index<String, E, String> getSubAliasIndex();
+    Index<String, Entry, String> getSubAliasIndex();
 
 
     /**
      * @return The Rdn system index
      */
-    Index<ParentIdAndRdn, E, String> getRdnIndex();
+    Index<ParentIdAndRdn, Entry, String> getRdnIndex();
 
 
     /**
      * @return The ObjectClass system index
      */
-    Index<String, E, String> getObjectClassIndex();
+    Index<String, Entry, String> getObjectClassIndex();
 
 
     /**
      * @return The EntryUUID system index
      */
-    Index<String, E, String> getEntryUuidIndex();
+    Index<String, Entry, String> getEntryUuidIndex();
 
 
     /**
      * @return The EntryCSN system index
      */
-    Index<String, E, String> getEntryCsnIndex();
+    Index<String, Entry, String> getEntryCsnIndex();
 
 
     /**
@@ -261,7 +261,7 @@ public interface Store<E>
      * @return The associated user <strong>or</strong> system index
      * @throws IndexNotFoundException If the index does not exist
      */
-    Index<?, E, String> getIndex( AttributeType attributeType ) throws IndexNotFoundException;
+    Index<?, Entry, String> getIndex( AttributeType attributeType ) throws IndexNotFoundException;
 
 
     /**
@@ -270,7 +270,7 @@ public interface Store<E>
      * @return The associated user index
      * @throws IndexNotFoundException If the index does not exist
      */
-    Index<?, E, String> getUserIndex( AttributeType attributeType ) throws IndexNotFoundException;
+    Index<?, Entry, String> getUserIndex( AttributeType attributeType ) throws IndexNotFoundException;
 
 
     /**
@@ -279,7 +279,7 @@ public interface Store<E>
      * @return The associated system index
      * @throws IndexNotFoundException If the index does not exist
      */
-    Index<?, E, String> getSystemIndex( AttributeType attributeType ) throws IndexNotFoundException;
+    Index<?, Entry, String> getSystemIndex( AttributeType attributeType ) throws IndexNotFoundException;
 
 
     /**

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java Sat Sep  1 05:16:20 2012
@@ -83,4 +83,12 @@ public interface Evaluator<N extends Exp
      * @return the AST for the expression
      */
     N getExpression();
+
+
+    /**
+     * Pretty-print an Evaluator
+     * @param tabs The tabs to add before the evaluator
+     * @return The pretty-printed evaluator and its descendants
+     */
+    String toString( String tabs );
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java Sat Sep  1 05:16:20 2012
@@ -20,9 +20,10 @@
 package org.apache.directory.server.xdbm.search;
 
 
+import java.util.Set;
+
 import org.apache.directory.server.xdbm.IndexEntry;
 import org.apache.directory.shared.ldap.model.constants.JndiPropertyConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.model.message.SearchScope;
@@ -35,7 +36,7 @@ import org.apache.directory.shared.ldap.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public interface SearchEngine<E>
+public interface SearchEngine
 {
     /**
      * @todo put this in the right place
@@ -73,16 +74,17 @@ public interface SearchEngine<E>
 
 
     /**
-     * Conducts a search on a database.
+     * Conducts a search on a database. It returns a set of UUID we found for the 
+     * given filter.
      * 
      * @param base the search base
      * @param aliasDerefMode the alias dereferencing mode to use
      * @param filter the search filter AST root
      * @param scope the Scope
-     * @return enumeration over SearchResults
+     * @return A set of UUID representing the full result, up to he sizeLimit
      * @throws Exception if the search fails
      */
-    Cursor<IndexEntry<String, String>> cursor( Dn base, AliasDerefMode aliasDerefMode, ExprNode filter,
+    Set<IndexEntry<String, String>> buildResultSet( Dn base, AliasDerefMode aliasDerefMode, ExprNode filter,
         SearchScope scope ) throws Exception;
 
 

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java Sat Sep  1 05:16:20 2012
@@ -39,6 +39,14 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.cursor.PresenceCursor;
 import org.apache.directory.server.xdbm.search.cursor.SubstringCursor;
 import org.apache.directory.server.xdbm.search.cursor.SubtreeScopeCursor;
+import org.apache.directory.server.xdbm.search.evaluator.ApproximateEvaluator;
+import org.apache.directory.server.xdbm.search.evaluator.EqualityEvaluator;
+import org.apache.directory.server.xdbm.search.evaluator.GreaterEqEvaluator;
+import org.apache.directory.server.xdbm.search.evaluator.LessEqEvaluator;
+import org.apache.directory.server.xdbm.search.evaluator.OneLevelScopeEvaluator;
+import org.apache.directory.server.xdbm.search.evaluator.PresenceEvaluator;
+import org.apache.directory.server.xdbm.search.evaluator.SubstringEvaluator;
+import org.apache.directory.server.xdbm.search.evaluator.SubtreeScopeEvaluator;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.filter.AndNode;
@@ -58,7 +66,7 @@ import org.apache.directory.shared.util.
 public class CursorBuilder
 {
     /** The database used by this builder */
-    private Store<Entry> db = null;
+    private Store db = null;
 
     /** Evaluator dependency on a EvaluatorBuilder */
     private EvaluatorBuilder evaluatorBuilder;
@@ -70,7 +78,7 @@ public class CursorBuilder
      * @param db database used by this enumerator
      * @param evaluatorBuilder the evaluator builder
      */
-    public CursorBuilder( Store<Entry> db, EvaluatorBuilder evaluatorBuilder )
+    public CursorBuilder( Store db, EvaluatorBuilder evaluatorBuilder )
     {
         this.db = db;
         this.evaluatorBuilder = evaluatorBuilder;
@@ -92,27 +100,27 @@ public class CursorBuilder
 
             case APPROXIMATE:
                 return ( Cursor ) new ApproximateCursor<T>( db,
-                    ( org.apache.directory.server.xdbm.search.evaluator.ApproximateEvaluator<T> ) evaluatorBuilder
+                    ( ApproximateEvaluator<T> ) evaluatorBuilder
                         .build( node ) );
 
             case EQUALITY:
                 return ( Cursor ) new EqualityCursor<T>( db,
-                    ( org.apache.directory.server.xdbm.search.evaluator.EqualityEvaluator<T> ) evaluatorBuilder
+                    ( EqualityEvaluator<T> ) evaluatorBuilder
                         .build( node ) );
 
             case GREATEREQ:
                 return ( Cursor ) new GreaterEqCursor<T>( db,
-                    ( org.apache.directory.server.xdbm.search.evaluator.GreaterEqEvaluator<T> ) evaluatorBuilder
+                    ( GreaterEqEvaluator<T> ) evaluatorBuilder
                         .build( node ) );
 
             case LESSEQ:
                 return ( Cursor ) new LessEqCursor<T>( db,
-                    ( org.apache.directory.server.xdbm.search.evaluator.LessEqEvaluator<T> ) evaluatorBuilder
+                    ( LessEqEvaluator<T> ) evaluatorBuilder
                         .build( node ) );
 
             case PRESENCE:
                 return ( Cursor ) new PresenceCursor( db,
-                    ( org.apache.directory.server.xdbm.search.evaluator.PresenceEvaluator ) evaluatorBuilder
+                    ( PresenceEvaluator ) evaluatorBuilder
                         .build( node ) );
 
             case SCOPE:
@@ -120,20 +128,20 @@ public class CursorBuilder
                 {
                     return ( Cursor ) new OneLevelScopeCursor(
                         db,
-                        ( org.apache.directory.server.xdbm.search.evaluator.OneLevelScopeEvaluator<Entry> ) evaluatorBuilder
+                        ( OneLevelScopeEvaluator<Entry> ) evaluatorBuilder
                             .build( node ) );
                 }
                 else
                 {
                     return ( Cursor ) new SubtreeScopeCursor(
                         db,
-                        ( org.apache.directory.server.xdbm.search.evaluator.SubtreeScopeEvaluator<Entry> ) evaluatorBuilder
+                        ( SubtreeScopeEvaluator ) evaluatorBuilder
                             .build( node ) );
                 }
 
             case SUBSTRING:
                 return ( Cursor ) new SubstringCursor( db,
-                    ( org.apache.directory.server.xdbm.search.evaluator.SubstringEvaluator ) evaluatorBuilder
+                    ( SubstringEvaluator ) evaluatorBuilder
                         .build( node ) );
 
                 /* ---------- LOGICAL OPERATORS ---------- */

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java Sat Sep  1 05:16:20 2012
@@ -27,6 +27,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.search.Optimizer;
+import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.filter.AndNode;
 import org.apache.directory.shared.ldap.model.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.model.filter.AssertionNode;
@@ -53,7 +54,7 @@ import org.apache.directory.shared.ldap.
 public class DefaultOptimizer<E> implements Optimizer
 {
     /** the database this optimizer operates on */
-    private final Store<E> db;
+    private final Store db;
     private String contextEntryId;
 
 
@@ -62,7 +63,7 @@ public class DefaultOptimizer<E> impleme
      *
      * @param db the database this optimizer works for.
      */
-    public DefaultOptimizer( Store<E> db ) throws Exception
+    public DefaultOptimizer( Store db ) throws Exception
     {
         this.db = db;
     }
@@ -351,7 +352,7 @@ public class DefaultOptimizer<E> impleme
     {
         if ( db.hasUserIndexOn( node.getAttributeType() ) )
         {
-            Index<String, E, String> idx = db.getPresenceIndex();
+            Index<String, Entry, String> idx = db.getPresenceIndex();
             return idx.count( node.getAttributeType().getOid() );
         }
         else if ( db.hasSystemIndexOn( node.getAttributeType() ) )

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java Sat Sep  1 05:16:20 2012
@@ -20,12 +20,13 @@
 package org.apache.directory.server.xdbm.search.impl;
 
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.apache.directory.server.core.api.partition.Partition;
 import org.apache.directory.server.i18n.I18n;
-import org.apache.directory.server.xdbm.EmptyIndexCursor;
 import org.apache.directory.server.xdbm.ForwardIndexEntry;
 import org.apache.directory.server.xdbm.IndexEntry;
-import org.apache.directory.server.xdbm.SingletonIndexCursor;
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.server.xdbm.search.Optimizer;
@@ -48,13 +49,13 @@ import org.apache.directory.shared.ldap.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DefaultSearchEngine implements SearchEngine<Entry>
+public class DefaultSearchEngine implements SearchEngine
 {
     /** the Optimizer used by this DefaultSearchEngine */
     private final Optimizer optimizer;
 
     /** the Database this DefaultSearchEngine operates on */
-    private final Store<Entry> db;
+    private final Store db;
 
     /** creates Cursors over entries satisfying filter expressions */
     private final CursorBuilder cursorBuilder;
@@ -75,7 +76,7 @@ public class DefaultSearchEngine impleme
      * @param evaluatorBuilder an expression evaluator builder
      * @param optimizer an optimizer to use during search
      */
-    public DefaultSearchEngine( Store<Entry> db, CursorBuilder cursorBuilder,
+    public DefaultSearchEngine( Store db, CursorBuilder cursorBuilder,
         EvaluatorBuilder evaluatorBuilder, Optimizer optimizer )
     {
         this.db = db;
@@ -99,11 +100,12 @@ public class DefaultSearchEngine impleme
     /**
      * {@inheritDoc}
      */
-    public Cursor<IndexEntry<String, String>> cursor( Dn base, AliasDerefMode aliasDerefMode, ExprNode filter,
+    public Set<IndexEntry<String, String>> buildResultSet( Dn base, AliasDerefMode aliasDerefMode, ExprNode filter,
         SearchScope scope ) throws Exception
     {
         Dn effectiveBase;
         String baseId = db.getEntryId( base );
+        Set<IndexEntry<String, String>> result = new HashSet<IndexEntry<String, String>>();
 
         // Check that we have an entry, otherwise we can immediately get out
         if ( baseId == null )
@@ -111,7 +113,7 @@ public class DefaultSearchEngine impleme
             if ( ( ( Partition ) db ).getSuffixDn().equals( base ) )
             {
                 // The context entry is not created yet, return an empty cursor
-                return new EmptyIndexCursor<String>();
+                return result;
             }
             else
             {
@@ -178,12 +180,10 @@ public class DefaultSearchEngine impleme
 
             if ( evaluator.evaluate( indexEntry ) )
             {
-                return new SingletonIndexCursor<String>( indexEntry );
-            }
-            else
-            {
-                return new EmptyIndexCursor<String>();
+                result.add( indexEntry );
             }
+
+            return result;
         }
 
         // Add the scope node using the effective base to the filter
@@ -195,7 +195,15 @@ public class DefaultSearchEngine impleme
         // Annotate the node with the optimizer and return search enumeration.
         optimizer.annotate( root );
 
-        return ( Cursor ) cursorBuilder.build( root );
+        Cursor<IndexEntry<Object, String>> cursor = ( Cursor ) cursorBuilder.build( root );
+
+        while ( cursor.next() )
+        {
+            IndexEntry indexEntry = cursor.get();
+            result.add( indexEntry );
+        }
+
+        return result;
     }
 
 

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java Sat Sep  1 05:16:20 2012
@@ -61,7 +61,7 @@ import org.apache.directory.shared.util.
  */
 public class EvaluatorBuilder
 {
-    private final Store<Entry> db;
+    private final Store db;
     private final SchemaManager schemaManager;
 
 
@@ -73,7 +73,7 @@ public class EvaluatorBuilder
      * @param schemaManager the schema manager
      * @throws Exception failure to access db or lookup schema in registries
      */
-    public EvaluatorBuilder( Store<Entry> db, SchemaManager schemaManager ) throws Exception
+    public EvaluatorBuilder( Store db, SchemaManager schemaManager ) throws Exception
     {
         this.db = db;
         this.schemaManager = schemaManager;
@@ -114,7 +114,7 @@ public class EvaluatorBuilder
                 }
                 else
                 {
-                    return new SubtreeScopeEvaluator<Entry>( db, ( ScopeNode<String> ) node );
+                    return new SubtreeScopeEvaluator( db, ( ScopeNode<String> ) node );
                 }
 
             case SUBSTRING:

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/StoreUtils.java Sat Sep  1 05:16:20 2012
@@ -54,7 +54,7 @@ public class StoreUtils
      * @param registries oid registries
      * @throws Exception on access exceptions
      */
-    public static void loadExampleData( Store<Entry> store, SchemaManager schemaManager ) throws Exception
+    public static void loadExampleData( Store store, SchemaManager schemaManager ) throws Exception
     {
         Dn suffixDn = new Dn( schemaManager, "o=Good Times Co." );
         long index = 1L;
@@ -193,7 +193,7 @@ public class StoreUtils
      * @param index the UUID number
      * @throws Exception in case of any problems in adding the entry to the store
      */
-    public static void injectEntryInStore( Store<Entry> store, Entry entry, long index ) throws Exception
+    public static void injectEntryInStore( Store store, Entry entry, long index ) throws Exception
     {
         entry.add( SchemaConstants.ENTRY_CSN_AT, CSN_FACTORY.newInstance().toString() );
         entry.add( SchemaConstants.ENTRY_UUID_AT, Strings.getUUID( index ).toString() );

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java Sat Sep  1 05:16:20 2012
@@ -45,7 +45,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.filter.AndNode;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.filter.FilterParser;
@@ -78,7 +77,7 @@ public class AndCursorTest
     private static final Logger LOG = LoggerFactory.getLogger( AndCursorTest.class.getSimpleName() );
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     EvaluatorBuilder evaluatorBuilder;
     CursorBuilder cursorBuilder;
     private static SchemaManager schemaManager;

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java Sat Sep  1 05:16:20 2012
@@ -82,7 +82,7 @@ public class GreaterEqTest
     public static final Logger LOG = LoggerFactory.getLogger( GreaterEqTest.class );
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     static SchemaManager schemaManager = null;
 
 

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java Sat Sep  1 05:16:20 2012
@@ -82,7 +82,7 @@ public class LessEqTest
     public static final Logger LOG = LoggerFactory.getLogger( LessEqTest.class );
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     static SchemaManager schemaManager = null;
 
 

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java Sat Sep  1 05:16:20 2012
@@ -39,7 +39,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.Optimizer;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.filter.FilterParser;
 import org.apache.directory.shared.ldap.model.name.Dn;
@@ -72,7 +71,7 @@ public class NestedFilterTest
     private static final Logger LOG = LoggerFactory.getLogger( NestedFilterTest.class.getSimpleName() );
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     static SchemaManager schemaManager = null;
     EvaluatorBuilder evaluatorBuilder;
     CursorBuilder cursorBuilder;

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java Sat Sep  1 05:16:20 2012
@@ -43,7 +43,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.filter.FilterParser;
 import org.apache.directory.shared.ldap.model.filter.NotNode;
@@ -78,7 +77,7 @@ public class NotCursorTest
     UuidSyntaxChecker uuidSynChecker = new UuidSyntaxChecker();
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     static SchemaManager schemaManager = null;
     EvaluatorBuilder evaluatorBuilder;
     CursorBuilder cursorBuilder;

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java Sat Sep  1 05:16:20 2012
@@ -74,7 +74,7 @@ public class OneLevelScopeTest
     public static final Logger LOG = LoggerFactory.getLogger( OneLevelScopeTest.class );
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     static SchemaManager schemaManager = null;
 
 

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java Sat Sep  1 05:16:20 2012
@@ -44,7 +44,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
 import org.apache.directory.shared.ldap.model.filter.FilterParser;
 import org.apache.directory.shared.ldap.model.filter.OrNode;
@@ -80,7 +79,7 @@ public class OrCursorTest
     private static final Logger LOG = LoggerFactory.getLogger( OrCursorTest.class.getSimpleName() );
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     static SchemaManager schemaManager = null;
     EvaluatorBuilder evaluatorBuilder;
     CursorBuilder cursorBuilder;

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java Sat Sep  1 05:16:20 2012
@@ -42,7 +42,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.evaluator.PresenceEvaluator;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.filter.PresenceNode;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
@@ -70,7 +69,7 @@ public class PresenceTest
     private static final Logger LOG = LoggerFactory.getLogger( PresenceTest.class.getSimpleName() );
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     static SchemaManager schemaManager = null;
 
 

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java Sat Sep  1 05:16:20 2012
@@ -38,7 +38,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.evaluator.SubstringEvaluator;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.filter.SubstringNode;
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
@@ -66,7 +65,7 @@ public class SubstringTest
     private static final Logger LOG = LoggerFactory.getLogger( SubstringTest.class.getSimpleName() );
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     static SchemaManager schemaManager = null;
 
 

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java Sat Sep  1 05:16:20 2012
@@ -75,7 +75,7 @@ public class SubtreeScopeTest
     public static final Logger LOG = LoggerFactory.getLogger( SubtreeScopeTest.class );
 
     File wkdir;
-    Store<Entry> store;
+    Store store;
     static SchemaManager schemaManager = null;
 
 
@@ -169,7 +169,7 @@ public class SubtreeScopeTest
 
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, dn, baseId,
             SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<Entry> evaluator = new SubtreeScopeEvaluator<Entry>( store, node );
+        SubtreeScopeEvaluator evaluator = new SubtreeScopeEvaluator( store, node );
         SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
 
         String[] expected = new String[]
@@ -284,7 +284,7 @@ public class SubtreeScopeTest
         String baseId = store.getEntryId( dn );
 
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, dn, baseId, SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<Entry> evaluator = new SubtreeScopeEvaluator<Entry>( store, node );
+        SubtreeScopeEvaluator evaluator = new SubtreeScopeEvaluator( store, node );
         SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
 
         // --------- Test beforeFirst() ---------
@@ -482,7 +482,7 @@ public class SubtreeScopeTest
         String baseId = store.getEntryId( dn );
 
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, dn, baseId, SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<Entry> evaluator = new SubtreeScopeEvaluator<Entry>( store, node );
+        SubtreeScopeEvaluator evaluator = new SubtreeScopeEvaluator( store, node );
         SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
 
         // --------- Test beforeFirst() ---------
@@ -646,7 +646,7 @@ public class SubtreeScopeTest
             dn,
             baseId,
             SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<Entry> evaluator = new SubtreeScopeEvaluator<Entry>( store, node );
+        SubtreeScopeEvaluator evaluator = new SubtreeScopeEvaluator( store, node );
         SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
 
         // --------- Test beforeFirst() ---------
@@ -897,7 +897,7 @@ public class SubtreeScopeTest
         String baseId = store.getEntryId( dn );
 
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, dn, baseId, SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<Entry> evaluator = new SubtreeScopeEvaluator<Entry>( store, node );
+        SubtreeScopeEvaluator evaluator = new SubtreeScopeEvaluator( store, node );
 
         ForwardIndexEntry<String, String> indexEntry = new ForwardIndexEntry<String, String>();
         indexEntry.setId( Strings.getUUID( 6L ) );
@@ -913,7 +913,7 @@ public class SubtreeScopeTest
         String baseId = store.getEntryId( dn );
 
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_ALWAYS, dn, baseId, SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<Entry> evaluator = new SubtreeScopeEvaluator<Entry>( store, node );
+        SubtreeScopeEvaluator evaluator = new SubtreeScopeEvaluator( store, node );
         assertEquals( node, evaluator.getExpression() );
 
         /*
@@ -945,7 +945,7 @@ public class SubtreeScopeTest
         {
             ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, dn, baseId,
                 SearchScope.SUBTREE );
-            SubtreeScopeEvaluator<Entry> evaluator = new SubtreeScopeEvaluator<Entry>( store, node );
+            SubtreeScopeEvaluator evaluator = new SubtreeScopeEvaluator( store, node );
             cursor = new SubtreeScopeCursor( store, evaluator );
             cursor.get();
         }
@@ -968,7 +968,7 @@ public class SubtreeScopeTest
         {
             ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, dn, baseId,
                 SearchScope.SUBTREE );
-            SubtreeScopeEvaluator<Entry> evaluator = new SubtreeScopeEvaluator<Entry>( store, node );
+            SubtreeScopeEvaluator evaluator = new SubtreeScopeEvaluator( store, node );
             cursor = new SubtreeScopeCursor( store, evaluator );
 
             // test before()
@@ -1014,7 +1014,7 @@ public class SubtreeScopeTest
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new Dn( SchemaConstants.OU_AT_OID
             + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), null, SearchScope.ONELEVEL );
-        SubtreeScopeEvaluator<Entry> evaluator = new SubtreeScopeEvaluator<Entry>( store, node );
+        SubtreeScopeEvaluator evaluator = new SubtreeScopeEvaluator( store, node );
         assertNull( evaluator );
     }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=1379692&r1=1379691&r2=1379692&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Sat Sep  1 05:16:20 2012
@@ -32,6 +32,7 @@ import java.io.FileReader;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Set;
 import java.util.Stack;
 
 import javax.naming.NamingException;
@@ -64,6 +65,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexEntry;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
+import org.apache.directory.shared.ldap.model.cursor.SetCursor;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.filter.ExprNode;
@@ -654,8 +656,11 @@ public class PartitionFrame extends JFra
             limitMax = Integer.parseInt( limit );
         }
 
-        Cursor<IndexEntry<String, String>> cursor = partition.getSearchEngine().cursor( new Dn( base ),
+        Set<IndexEntry<String, String>> result = partition.getSearchEngine().buildResultSet( new Dn( base ),
             AliasDerefMode.DEREF_ALWAYS, root, searchScope );
+
+        Cursor cursor = new SetCursor<IndexEntry<String, String>>( result );
+
         String[] cols = new String[2];
         cols[0] = "id";
         cols[1] = "dn";
@@ -664,7 +669,7 @@ public class PartitionFrame extends JFra
         int count = 0;
         while ( cursor.next() && count < limitMax )
         {
-            IndexEntry rec = cursor.get();
+            IndexEntry rec = ( IndexEntry ) cursor.get();
             row[0] = rec.getId();
             row[1] = partition.getEntryDn( ( String ) row[0] ).getNormName();
             tableModel.addRow( row );



Mime
View raw message