directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1379691 - in /directory: apacheds/branches/apacheds-mvbt/core-avl/src/main/java/org/apache/directory/server/core/avltree/ apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jd...
Date Sat, 01 Sep 2012 05:14:29 GMT
Author: elecharny
Date: Sat Sep  1 05:14:27 2012
New Revision: 1379691

URL: http://svn.apache.org/viewvc?rev=1379691&view=rev
Log:
Added some decent toString() method with pretty-print of the hierarchies for debug purposes

Modified:
    directory/apacheds/branches/apacheds-mvbt/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java
    directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleArrayCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/GreaterEqCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/LessEqCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/NotCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OneLevelScopeCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubtreeScopeCursor.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LeafEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java
    directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java
    directory/shared/branches/shared-mvbt/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/AbstractExprNode.java

Modified: directory/apacheds/branches/apacheds-mvbt/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/core-avl/src/main/java/org/apache/directory/server/core/avltree/ArrayTreeCursor.java Sat Sep  1 05:14:27 2012
@@ -318,4 +318,37 @@ public class ArrayTreeCursor<E> extends 
         LOG_CURSOR.debug( "Closing ArrayTreeCursor {}", this );
         super.close( reason );
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "ArrayTreeCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( "#<" ).append( current ).append( ":" ).append( array.get( current ) ).append( ">" );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleArrayCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleArrayCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleArrayCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/KeyTupleArrayCursor.java Sat Sep  1 05:14:27 2012
@@ -220,12 +220,12 @@ public class KeyTupleArrayCursor<K, V> e
     public void close() throws Exception
     {
         LOG_CURSOR.debug( "Closing KeyTupleArrayCursor {}", this );
-        
+
         if ( wrapped != null )
         {
             wrapped.close();
         }
-        
+
         super.close();
     }
 
@@ -236,12 +236,49 @@ public class KeyTupleArrayCursor<K, V> e
     public void close( Exception reason ) throws Exception
     {
         LOG_CURSOR.debug( "Closing KeyTupleArrayCursor {}", this );
-        
+
         if ( wrapped != null )
         {
             wrapped.close( reason );
         }
-        
+
         super.close( reason );
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "KeyTupleArrayCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( "#" ).append( key );
+
+        sb.append( " :\n" );
+
+        sb.append( wrapped.toString( tabs + "    " ) );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java Sat Sep  1 05:14:27 2012
@@ -61,6 +61,7 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.cursor.ChildrenCursor;
 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.Modification;
@@ -97,13 +98,13 @@ import org.slf4j.LoggerFactory;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 public abstract class AbstractBTreePartition extends AbstractPartition implements
-    Store<Entry>
+    Store
 {
     /** static logger */
     private static final Logger LOG = LoggerFactory.getLogger( AbstractBTreePartition.class );
 
     /** the search engine used to search the database */
-    protected SearchEngine<Entry> searchEngine;
+    protected SearchEngine searchEngine;
 
     /** The optimizer to use during search operation */
     protected Optimizer optimizer;
@@ -398,7 +399,7 @@ public abstract class AbstractBTreeParti
      *
      * @return the search engine
      */
-    public SearchEngine<Entry> getSearchEngine()
+    public SearchEngine getSearchEngine()
     {
         return searchEngine;
     }
@@ -959,12 +960,13 @@ public abstract class AbstractBTreeParti
         try
         {
             SearchScope scope = searchContext.getScope();
-            Cursor<IndexEntry<String, String>> underlying;
             Dn dn = searchContext.getDn();
             AliasDerefMode derefMode = searchContext.getAliasDerefMode();
             ExprNode filter = searchContext.getFilter();
 
-            underlying = searchEngine.cursor( dn, derefMode, filter, scope );
+            Set<IndexEntry<String, String>> result = searchEngine.buildResultSet( dn, derefMode, filter, scope );
+
+            Cursor underlying = new SetCursor<IndexEntry<String, String>>( result );
 
             return new BaseEntryFilteringCursor( new EntryCursorAdaptor( this, underlying ), searchContext );
         }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java Sat Sep  1 05:14:27 2012
@@ -73,7 +73,6 @@ public class IndexCursorAdaptor<K> exten
         }
         else
         {
-            System.out.println( "~~~~~~~~~~~~~~~~> Using the reverse index !!!" );
             forwardEntry = null;
             reverseEntry = new ReverseIndexEntry<K, String>();
         }
@@ -231,4 +230,39 @@ public class IndexCursorAdaptor<K> exten
     {
         return UNSUPPORTED_MSG;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "IndexCursorAdaptor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( " :\n" );
+
+        sb.append( wrappedCursor.toString( tabs + "    " ) );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AllEntriesCursor.java Sat Sep  1 05:14:27 2012
@@ -62,7 +62,7 @@ public class AllEntriesCursor extends Ab
      * @param db
      * @throws Exception
      */
-    public AllEntriesCursor( Store<Entry> db ) throws Exception
+    public AllEntriesCursor( Store db ) throws Exception
     {
         LOG_CURSOR.debug( "Creating AllEntriesCursor {}", this );
         // Uses the MasterTable 
@@ -200,4 +200,39 @@ public class AllEntriesCursor extends Ab
         LOG_CURSOR.debug( "Closing AllEntriesCursor {}", this );
         wrapped.close( cause );
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "AllEntriesCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( " :\n" );
+
+        sb.append( wrapped.toString( tabs + "    " ) );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/AndCursor.java Sat Sep  1 05:14:27 2012
@@ -254,9 +254,7 @@ public class AndCursor<V> extends Abstra
 
         for ( Evaluator<? extends ExprNode> evaluator : evaluators )
         {
-            sb.append( tabs + "  [" );
-            sb.append( evaluator );
-            sb.append( "]\n" );
+            sb.append( evaluator.toString( tabs + "  >>" ) );
         }
 
         return sb.toString();

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ApproximateCursor.java Sat Sep  1 05:14:27 2012
@@ -71,7 +71,7 @@ public class ApproximateCursor<V> extend
      * @throws Exception If the creation failed
      */
     @SuppressWarnings("unchecked")
-    public ApproximateCursor( Store<Entry> db, ApproximateEvaluator<V> approximateEvaluator ) throws Exception
+    public ApproximateCursor( Store db, ApproximateEvaluator<V> approximateEvaluator ) throws Exception
     {
         LOG_CURSOR.debug( "Creating ApproximateCursor {}", this );
         this.approximateEvaluator = approximateEvaluator;
@@ -321,4 +321,50 @@ public class ApproximateCursor<V> extend
         }
     }
 
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "ApproximateCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( " :\n" );
+
+        sb.append( tabs + "  >>" ).append( approximateEvaluator ).append( '\n' );
+
+        if ( userIdxCursor != null )
+        {
+            sb.append( tabs + "  <user>\n" );
+            sb.append( userIdxCursor.toString( tabs + "    " ) );
+        }
+
+        if ( uuidIdxCursor != null )
+        {
+            sb.append( tabs + "  <uuid>\n" );
+            sb.append( uuidIdxCursor.toString( tabs + "  " ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/ChildrenCursor.java Sat Sep  1 05:14:27 2012
@@ -27,7 +27,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.ParentIdAndRdn;
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -63,7 +62,7 @@ public class ChildrenCursor extends Abst
      * @param evaluator an IndexEntry (candidate) evaluator
      * @throws Exception on db access failures
      */
-    public ChildrenCursor( Store<Entry> db, String parentId, Cursor<IndexEntry<ParentIdAndRdn, String>> cursor )
+    public ChildrenCursor( Store db, String parentId, Cursor<IndexEntry<ParentIdAndRdn, String>> cursor )
         throws Exception
     {
         LOG_CURSOR.debug( "Creating ChildrenCursor {}", this );
@@ -182,4 +181,39 @@ public class ChildrenCursor extends Abst
 
         super.close( cause );
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "ChildrenCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( "#parent<" ).append( parentId ).append( "> :\n" );
+
+        sb.append( cursor.toString( tabs + "  " ) );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/DescendantCursor.java Sat Sep  1 05:14:27 2012
@@ -28,7 +28,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.ParentIdAndRdn;
 import org.apache.directory.server.xdbm.Store;
 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.name.Rdn;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,7 +49,7 @@ public class DescendantCursor extends Ab
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_719 );
 
     /** The entry database/store */
-    private final Store<Entry> db;
+    private final Store db;
 
     /** The prefetched element */
     private IndexEntry prefetched;
@@ -84,7 +83,7 @@ public class DescendantCursor extends Ab
      * @param evaluator an IndexEntry (candidate) evaluator
      * @throws Exception on db access failures
      */
-    public DescendantCursor( Store<Entry> db, String baseId, String parentId,
+    public DescendantCursor( Store db, String baseId, String parentId,
         Cursor<IndexEntry<ParentIdAndRdn, String>> cursor )
         throws Exception
     {
@@ -99,7 +98,7 @@ public class DescendantCursor extends Ab
      * @param evaluator an IndexEntry (candidate) evaluator
      * @throws Exception on db access failures
      */
-    public DescendantCursor( Store<Entry> db, String baseId, String parentId,
+    public DescendantCursor( Store db, String baseId, String parentId,
         Cursor<IndexEntry<ParentIdAndRdn, String>> cursor,
         boolean topLevel )
         throws Exception
@@ -305,4 +304,63 @@ public class DescendantCursor extends Ab
 
         super.close( cause );
     }
+
+
+    /**
+     * Dumps the cursors
+     */
+    private String dumpCursors( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        for ( Object cursor : cursorStack )
+        {
+            sb.append( ( ( Cursor<IndexEntry<ParentIdAndRdn, String>> ) cursor ).toString( tabs + "  " ) );
+            sb.append( "\n" );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "DescendantCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( "#baseId<" ).append( baseId );
+        sb.append( ", " ).append( db ).append( "> :\n" );
+
+        sb.append( dumpCursors( tabs + "  " ) );
+
+        if ( currentCursor != null )
+        {
+            sb.append( tabs + "  <current>\n" );
+            sb.append( currentCursor.toString( tabs + "    " ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/EqualityCursor.java Sat Sep  1 05:14:27 2012
@@ -69,7 +69,7 @@ public class EqualityCursor<V> extends A
      * @throws Exception If the creation failed
      */
     @SuppressWarnings("unchecked")
-    public EqualityCursor( Store<Entry> db, EqualityEvaluator<V> equalityEvaluator ) throws Exception
+    public EqualityCursor( Store db, EqualityEvaluator<V> equalityEvaluator ) throws Exception
     {
         LOG_CURSOR.debug( "Creating EqualityCursor {}", this );
         this.equalityEvaluator = equalityEvaluator;
@@ -342,7 +342,7 @@ public class EqualityCursor<V> extends A
 
         sb.append( " :\n" );
 
-        sb.append( tabs + "  " ).append( equalityEvaluator ).append( '\n' );
+        sb.append( tabs + "  >>" ).append( equalityEvaluator );
 
         if ( userIdxCursor != null )
         {
@@ -353,7 +353,7 @@ public class EqualityCursor<V> extends A
         if ( uuidIdxCursor != null )
         {
             sb.append( tabs + "  <uuid>\n" );
-            sb.append( userIdxCursor.toString( tabs + "  " ) );
+            sb.append( uuidIdxCursor.toString( tabs + "  " ) );
         }
 
         return sb.toString();

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/GreaterEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/GreaterEqCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/GreaterEqCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/GreaterEqCursor.java Sat Sep  1 05:14:27 2012
@@ -75,7 +75,7 @@ public class GreaterEqCursor<V> extends 
      * @throws Exception If the creation failed
      */
     @SuppressWarnings("unchecked")
-    public GreaterEqCursor( Store<Entry> db, GreaterEqEvaluator<V> greaterEqEvaluator ) throws Exception
+    public GreaterEqCursor( Store db, GreaterEqEvaluator<V> greaterEqEvaluator ) throws Exception
     {
         LOG_CURSOR.debug( "Creating GreaterEqCursor {}", this );
         this.greaterEqEvaluator = greaterEqEvaluator;
@@ -390,4 +390,51 @@ public class GreaterEqCursor<V> extends 
             uuidCandidate = null;
         }
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "GreaterEqCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( "#candidate<" ).append( uuidCandidate ).append( ">:\n" );
+
+        sb.append( tabs + "  >>" ).append( greaterEqEvaluator ).append( '\n' );
+
+        if ( userIdxCursor != null )
+        {
+            sb.append( tabs + "  <user>\n" );
+            sb.append( userIdxCursor.toString( tabs + "    " ) );
+        }
+
+        if ( uuidIdxCursor != null )
+        {
+            sb.append( tabs + "  <uuid>\n" );
+            sb.append( uuidIdxCursor.toString( tabs + "  " ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/LessEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/LessEqCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/LessEqCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/LessEqCursor.java Sat Sep  1 05:14:27 2012
@@ -69,7 +69,7 @@ public class LessEqCursor<V> extends Abs
 
 
     @SuppressWarnings("unchecked")
-    public LessEqCursor( Store<Entry> db, LessEqEvaluator<V> lessEqEvaluator ) throws Exception
+    public LessEqCursor( Store db, LessEqEvaluator<V> lessEqEvaluator ) throws Exception
     {
         LOG_CURSOR.debug( "Creating LessEqCursor {}", this );
         this.lessEqEvaluator = lessEqEvaluator;
@@ -373,4 +373,51 @@ public class LessEqCursor<V> extends Abs
             uuidCandidate = null;
         }
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "LessEqCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( "#candidate<" ).append( uuidCandidate ).append( ">:\n" );
+
+        sb.append( tabs + "  >>" ).append( lessEqEvaluator ).append( '\n' );
+
+        if ( userIdxCursor != null )
+        {
+            sb.append( tabs + "  <user>\n" );
+            sb.append( userIdxCursor.toString( tabs + "    " ) );
+        }
+
+        if ( uuidIdxCursor != null )
+        {
+            sb.append( tabs + "  <uuid>\n" );
+            sb.append( uuidIdxCursor.toString( tabs + "  " ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/NotCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/NotCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/NotCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/NotCursor.java Sat Sep  1 05:14:27 2012
@@ -27,7 +27,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.Evaluator;
 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.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -49,7 +48,7 @@ public class NotCursor<V> extends Abstra
 
 
     @SuppressWarnings("unchecked")
-    public NotCursor( Store<Entry> store, Evaluator<? extends ExprNode> childEvaluator )
+    public NotCursor( Store store, Evaluator<? extends ExprNode> childEvaluator )
         throws Exception
     {
         LOG_CURSOR.debug( "Creating NotCursor {}", this );
@@ -160,4 +159,39 @@ public class NotCursor<V> extends Abstra
         super.close( cause );
         uuidCursor.close( cause );
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "NotCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( tabs + "  >>" ).append( childEvaluator ).append( '\n' );
+
+        sb.append( uuidCursor.toString( tabs + "    " ) );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OneLevelScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OneLevelScopeCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OneLevelScopeCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OneLevelScopeCursor.java Sat Sep  1 05:14:27 2012
@@ -50,7 +50,7 @@ public class OneLevelScopeCursor extends
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_719 );
 
     /** The entry database/store */
-    private final Store<Entry> db;
+    private final Store db;
 
     /** A onelevel ScopeNode Evaluator */
     @SuppressWarnings("unchecked")
@@ -74,7 +74,7 @@ public class OneLevelScopeCursor extends
      * @throws Exception on db access failures
      */
     //@SuppressWarnings("unchecked")
-    public OneLevelScopeCursor( Store<Entry> db, OneLevelScopeEvaluator<Entry> evaluator )
+    public OneLevelScopeCursor( Store db, OneLevelScopeEvaluator<Entry> evaluator )
         throws Exception
     {
         LOG_CURSOR.debug( "Creating OneLevelScopeCursor {}", this );
@@ -338,4 +338,52 @@ public class OneLevelScopeCursor extends
         super.close( cause );
     }
 
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "OneLevelCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( "#" ).append( db );
+
+        sb.append( " :\n" );
+
+        sb.append( tabs + "  >>" ).append( evaluator ).append( '\n' );
+
+        if ( scopeCursor != null )
+        {
+            sb.append( tabs + "  <scope>\n" );
+            sb.append( scopeCursor.toString( tabs + "    " ) );
+        }
+
+        if ( dereferencedCursor != null )
+        {
+            sb.append( tabs + "  <uuid>\n" );
+            sb.append( dereferencedCursor.toString( tabs + "  " ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/OrCursor.java Sat Sep  1 05:14:27 2012
@@ -289,9 +289,7 @@ public class OrCursor<V> extends Abstrac
 
         for ( Evaluator<? extends ExprNode> evaluator : evaluators )
         {
-            sb.append( tabs + "  [" );
-            sb.append( evaluator );
-            sb.append( "]\n" );
+            sb.append( evaluator.toString( tabs + "  >>" ) );
         }
 
         return sb.toString();
@@ -337,7 +335,7 @@ public class OrCursor<V> extends Abstrac
 
         if ( ( evaluators != null ) && ( evaluators.size() > 0 ) )
         {
-            sb.append( dumpEvaluators( tabs ) ).append( '\n' );
+            sb.append( dumpEvaluators( tabs ) );
         }
 
         if ( ( cursors != null ) && ( cursors.size() > 0 ) )

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/PresenceCursor.java Sat Sep  1 05:14:27 2012
@@ -27,7 +27,6 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.server.xdbm.search.evaluator.PresenceEvaluator;
 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.schema.AttributeType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -52,7 +51,7 @@ public class PresenceCursor extends Abst
     private IndexEntry<String, String> prefetched;
 
 
-    public PresenceCursor( Store<Entry> store, PresenceEvaluator presenceEvaluator ) throws Exception
+    public PresenceCursor( Store store, PresenceEvaluator presenceEvaluator ) throws Exception
     {
         LOG_CURSOR.debug( "Creating PresenceCursor {}", this );
         this.presenceEvaluator = presenceEvaluator;
@@ -304,4 +303,51 @@ public class PresenceCursor extends Abst
             uuidCursor.close( cause );
         }
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "PresenceCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( " :\n" );
+
+        sb.append( tabs + "  >>" ).append( presenceEvaluator ).append( '\n' );
+
+        if ( presenceCursor != null )
+        {
+            sb.append( tabs + "  <presence>\n" );
+            sb.append( presenceCursor.toString( tabs + "    " ) );
+        }
+
+        if ( uuidCursor != null )
+        {
+            sb.append( tabs + "  <uuid>\n" );
+            sb.append( uuidCursor.toString( tabs + "  " ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubstringCursor.java Sat Sep  1 05:14:27 2012
@@ -52,7 +52,7 @@ public class SubstringCursor extends Abs
 
 
     @SuppressWarnings("unchecked")
-    public SubstringCursor( Store<Entry> store, final SubstringEvaluator substringEvaluator )
+    public SubstringCursor( Store store, final SubstringEvaluator substringEvaluator )
         throws Exception
     {
         LOG_CURSOR.debug( "Creating SubstringCursor {}", this );
@@ -238,4 +238,41 @@ public class SubstringCursor extends Abs
         wrapped.close( cause );
         clear();
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "SubstringCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( "#index<" ).append( hasIndex ).append( "> :\n" );
+
+        sb.append( tabs + "  >>" ).append( evaluator ).append( '\n' );
+
+        sb.append( wrapped.toString( tabs + "    " ) );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubtreeScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubtreeScopeCursor.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubtreeScopeCursor.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/cursor/SubtreeScopeCursor.java Sat Sep  1 05:14:27 2012
@@ -31,7 +31,6 @@ import org.apache.directory.server.xdbm.
 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.cursor.InvalidCursorPositionException;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -50,10 +49,10 @@ public class SubtreeScopeCursor extends 
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_719 );
 
     /** The Entry database/store */
-    private final Store<Entry> db;
+    private final Store db;
 
     /** A ScopeNode Evaluator */
-    private final SubtreeScopeEvaluator<Entry> evaluator;
+    private final SubtreeScopeEvaluator evaluator;
 
     /** A Cursor over the entries in the scope of the search base */
     private final Cursor<IndexEntry<String, String>> scopeCursor;
@@ -74,7 +73,7 @@ public class SubtreeScopeCursor extends 
      * @param evaluator an IndexEntry (candidate) evaluator
      * @throws Exception on db access failures
      */
-    public SubtreeScopeCursor( Store<Entry> db, SubtreeScopeEvaluator<Entry> evaluator )
+    public SubtreeScopeCursor( Store db, SubtreeScopeEvaluator evaluator )
         throws Exception
     {
         LOG_CURSOR.debug( "Creating SubtreeScopeCursor {}", this );
@@ -385,4 +384,58 @@ public class SubtreeScopeCursor extends 
 
         super.close( cause );
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "SubtreeScopeCursor (" );
+
+        if ( available() )
+        {
+            sb.append( "available)" );
+        }
+        else
+        {
+            sb.append( "absent)" );
+        }
+
+        sb.append( "#ctxId<" ).append( contextEntryId );
+        sb.append( ", " ).append( db ).append( "> :\n" );
+
+        sb.append( tabs + "  >>" ).append( evaluator ).append( '\n' );
+
+        if ( scopeCursor != null )
+        {
+            sb.append( tabs + "  <scope>\n" );
+            sb.append( scopeCursor.toString( tabs + "    " ) );
+        }
+
+        if ( dereferencedCursor != null )
+        {
+            sb.append( tabs + "  <dereferenced>\n" );
+            sb.append( dereferencedCursor.toString( tabs + "  " ) );
+        }
+
+        if ( dereferencedCursor != null )
+        {
+            sb.append( tabs + "  <current>\n" );
+            sb.append( cursor.toString( tabs + "  " ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/AndEvaluator.java Sat Sep  1 05:14:27 2012
@@ -123,4 +123,47 @@ public class AndEvaluator implements Eva
     {
         return node;
     }
+
+
+    /**
+     * Dumps the evaluators
+     */
+    private String dumpEvaluators( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        for ( Evaluator<? extends ExprNode> evaluator : evaluators )
+        {
+            sb.append( evaluator.toString( tabs + "  " ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "AndEvaluator : " ).append( node ).append( "\n" );
+
+        if ( ( evaluators != null ) && ( evaluators.size() > 0 ) )
+        {
+            sb.append( dumpEvaluators( tabs + "  " ) ).append( "\n" );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/ApproximateEvaluator.java Sat Sep  1 05:14:27 2012
@@ -50,7 +50,7 @@ public class ApproximateEvaluator<T> ext
      * @param schemaManager The SchemaManager
      * @throws Exception If the creation failed
      */
-    public ApproximateEvaluator( ApproximateNode<T> node, Store<Entry> db, SchemaManager schemaManager )
+    public ApproximateEvaluator( ApproximateNode<T> node, Store db, SchemaManager schemaManager )
         throws Exception
     {
         super( node, db, schemaManager );
@@ -168,4 +168,26 @@ public class ApproximateEvaluator<T> ext
 
         return false;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "ApproximateEvaluator : " ).append( super.toString() ).append( "\n" );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/EqualityEvaluator.java Sat Sep  1 05:14:27 2012
@@ -55,7 +55,7 @@ public class EqualityEvaluator<T> extend
 
 
     @SuppressWarnings("unchecked")
-    public EqualityEvaluator( EqualityNode<T> node, Store<Entry> db, SchemaManager schemaManager )
+    public EqualityEvaluator( EqualityNode<T> node, Store db, SchemaManager schemaManager )
         throws Exception
     {
         super( node, db, schemaManager );
@@ -208,4 +208,26 @@ public class EqualityEvaluator<T> extend
 
         return false;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "EqualityEvaluator : " ).append( super.toString() ).append( '\n' );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/GreaterEqEvaluator.java Sat Sep  1 05:14:27 2012
@@ -44,7 +44,7 @@ import org.apache.directory.shared.ldap.
 public class GreaterEqEvaluator<T> extends LeafEvaluator<T>
 {
     @SuppressWarnings("unchecked")
-    public GreaterEqEvaluator( GreaterEqNode<T> node, Store<Entry> db, SchemaManager schemaManager )
+    public GreaterEqEvaluator( GreaterEqNode<T> node, Store db, SchemaManager schemaManager )
         throws Exception
     {
         super( node, db, schemaManager );
@@ -216,4 +216,26 @@ public class GreaterEqEvaluator<T> exten
 
         return false;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "GreaterEqEvaluator : " ).append( super.toString() ).append( "\n" );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LeafEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LeafEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LeafEvaluator.java Sat Sep  1 05:14:27 2012
@@ -44,7 +44,7 @@ public abstract class LeafEvaluator<T> i
     protected final SimpleNode<T> node;
 
     /** The backend */
-    protected final Store<Entry> db;
+    protected final Store db;
 
     /** The SchemaManager instance */
     protected final SchemaManager schemaManager;
@@ -63,7 +63,7 @@ public abstract class LeafEvaluator<T> i
 
 
     @SuppressWarnings("unchecked")
-    public LeafEvaluator( SimpleNode<T> node, Store<Entry> db, SchemaManager schemaManager )
+    public LeafEvaluator( SimpleNode<T> node, Store db, SchemaManager schemaManager )
         throws Exception
     {
         this.db = db;
@@ -98,4 +98,17 @@ public abstract class LeafEvaluator<T> i
     {
         return ldapComparator;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( node );
+
+        return sb.toString();
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/LessEqEvaluator.java Sat Sep  1 05:14:27 2012
@@ -44,7 +44,7 @@ import org.apache.directory.shared.ldap.
 public class LessEqEvaluator<T> extends LeafEvaluator<T>
 {
     @SuppressWarnings("unchecked")
-    public LessEqEvaluator( LessEqNode<T> node, Store<Entry> db, SchemaManager schemaManager )
+    public LessEqEvaluator( LessEqNode<T> node, Store db, SchemaManager schemaManager )
         throws Exception
     {
         super( node, db, schemaManager );
@@ -207,4 +207,26 @@ public class LessEqEvaluator<T> extends 
 
         return false;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "LessEqEvaluator : " ).append( super.toString() ).append( "\n" );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/NotEvaluator.java Sat Sep  1 05:14:27 2012
@@ -64,4 +64,28 @@ public class NotEvaluator implements Eva
     {
         return node;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "NotEvaluator : " ).append( node ).append( '\n' );
+
+        sb.append( childEvaluator.toString( tabs + "  " ) );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OneLevelScopeEvaluator.java Sat Sep  1 05:14:27 2012
@@ -47,7 +47,7 @@ public class OneLevelScopeEvaluator<E> i
     private final boolean dereferencing;
 
     /** the entry db storing entries */
-    private final Store<E> db;
+    private final Store db;
 
 
     /**
@@ -57,7 +57,7 @@ public class OneLevelScopeEvaluator<E> i
      * @param db the database used to evaluate scope node
      * @throws Exception on db access failure
      */
-    public OneLevelScopeEvaluator( Store<E> db, ScopeNode<String> node ) throws Exception
+    public OneLevelScopeEvaluator( Store db, ScopeNode<String> node ) throws Exception
     {
         this.node = node;
 
@@ -170,4 +170,26 @@ public class OneLevelScopeEvaluator<E> i
     {
         return dereferencing;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "OneLevelScopEvaluator : " ).append( node ).append( "\n" );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/OrEvaluator.java Sat Sep  1 05:14:27 2012
@@ -134,4 +134,47 @@ public class OrEvaluator implements Eval
     {
         return node;
     }
+
+
+    /**
+     * Dumps the evaluators
+     */
+    private String dumpEvaluators( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        for ( Evaluator<? extends ExprNode> evaluator : evaluators )
+        {
+            sb.append( evaluator.toString( tabs + "  " ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "OrEvaluator : " ).append( node ).append( "\n" );
+
+        if ( ( evaluators != null ) && ( evaluators.size() > 0 ) )
+        {
+            sb.append( dumpEvaluators( tabs ) );
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/PresenceEvaluator.java Sat Sep  1 05:14:27 2012
@@ -45,7 +45,7 @@ public class PresenceEvaluator implement
     private final PresenceNode node;
 
     /** The backend */
-    private final Store<Entry> db;
+    private final Store db;
 
     /** The AttributeType we will use for the evaluation */
     private final AttributeType attributeType;
@@ -57,7 +57,7 @@ public class PresenceEvaluator implement
     private final Index<String, Entry, String> idx;
 
 
-    public PresenceEvaluator( PresenceNode node, Store<Entry> db, SchemaManager schemaManager )
+    public PresenceEvaluator( PresenceNode node, Store db, SchemaManager schemaManager )
         throws Exception
     {
         this.db = db;
@@ -152,4 +152,26 @@ public class PresenceEvaluator implement
         // we fell through so a match was not found - assertion was false.
         return false;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "PresenceEvaluator : " ).append( node ).append( "\n" );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubstringEvaluator.java Sat Sep  1 05:14:27 2012
@@ -47,7 +47,7 @@ import org.apache.directory.shared.ldap.
 public class SubstringEvaluator implements Evaluator<SubstringNode>
 {
     /** Database used while evaluating candidates */
-    private final Store<Entry> db;
+    private final Store db;
 
     /** Reference to the SchemaManager */
     private final SchemaManager schemaManager;
@@ -77,7 +77,7 @@ public class SubstringEvaluator implemen
      * @throws Exception if there are failures accessing resources and the db
      */
     @SuppressWarnings("unchecked")
-    public SubstringEvaluator( SubstringNode node, Store<Entry> db, SchemaManager schemaManager )
+    public SubstringEvaluator( SubstringNode node, Store db, SchemaManager schemaManager )
         throws Exception
     {
         this.db = db;
@@ -373,4 +373,26 @@ public class SubstringEvaluator implemen
         // we fell through so a match was not found - assertion was false.
         return false;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "SubsctringEvaluator : " ).append( node ).append( "\n" );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }
\ No newline at end of file

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java (original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/evaluator/SubtreeScopeEvaluator.java Sat Sep  1 05:14:27 2012
@@ -37,7 +37,7 @@ import org.apache.directory.shared.ldap.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class SubtreeScopeEvaluator<E> implements Evaluator<ScopeNode<String>>
+public class SubtreeScopeEvaluator implements Evaluator<ScopeNode<String>>
 {
     /** The ScopeNode containing initial search scope constraints */
     private final ScopeNode<String> node;
@@ -61,7 +61,7 @@ public class SubtreeScopeEvaluator<E> im
     private final boolean dereferencing;
 
     /** The entry database/store */
-    private final Store<E> db;
+    private final Store db;
 
 
     /**
@@ -71,7 +71,7 @@ public class SubtreeScopeEvaluator<E> im
      * @param db the database used to evaluate scope node
      * @throws Exception on db access failure
      */
-    public SubtreeScopeEvaluator( Store<E> db, ScopeNode<String> node ) throws Exception
+    public SubtreeScopeEvaluator( Store db, ScopeNode<String> node ) throws Exception
     {
         this.db = db;
         this.node = node;
@@ -248,4 +248,26 @@ public class SubtreeScopeEvaluator<E> im
     {
         return dereferencing;
     }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString( String tabs )
+    {
+        StringBuilder sb = new StringBuilder();
+
+        sb.append( tabs ).append( "SubstreeScopeEvaluator : " ).append( node ).append( '\n' );
+
+        return sb.toString();
+    }
+
+
+    /**
+     * @see Object#toString()
+     */
+    public String toString()
+    {
+        return toString( "" );
+    }
 }

Modified: directory/shared/branches/shared-mvbt/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/AbstractExprNode.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-mvbt/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/AbstractExprNode.java?rev=1379691&r1=1379690&r2=1379691&view=diff
==============================================================================
--- directory/shared/branches/shared-mvbt/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/AbstractExprNode.java (original)
+++ directory/shared/branches/shared-mvbt/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/filter/AbstractExprNode.java Sat Sep  1 05:14:27 2012
@@ -190,7 +190,7 @@ public abstract class AbstractExprNode i
                 else
                 {
                     sb.append( '\\' );
-                    String digit = Integer.toHexString( ( ( byte ) b ) & 0x00FF );
+                    String digit = Integer.toHexString( b & 0x00FF );
 
                     if ( digit.length() == 1 )
                     {
@@ -379,7 +379,14 @@ public abstract class AbstractExprNode i
     {
         if ( ( null != annotations ) && annotations.containsKey( "count" ) )
         {
-            return ":[" + annotations.get( "count" ) + "]";
+            Long count = ( Long ) annotations.get( "count" );
+
+            if ( count == Long.MAX_VALUE )
+            {
+                return ":[\u221E]";
+            }
+
+            return ":[" + count + "]";
         }
         else
         {



Mime
View raw message