directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1161279 [3/4] - in /directory/apacheds/branches/one-sub-level-index-removal: ./ all/ core-annotations/ core-api/ core-api/src/main/java/org/apache/directory/server/core/filtering/ core-avl/ core-avl/src/test/java/org/apache/directory/serve...
Date Wed, 24 Aug 2011 21:19:37 GMT
Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java Wed Aug 24 21:19:34 2011
@@ -41,7 +41,6 @@ public class NotCursor<V, ID extends Com
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_718 );
     private final IndexCursor<V, Entry, ID> uuidCursor;
     private final Evaluator<? extends ExprNode, Entry, ID> childEvaluator;
-    private boolean available = false;
 
 
     @SuppressWarnings("unchecked")
@@ -53,41 +52,20 @@ public class NotCursor<V, ID extends Com
     }
 
 
-    public boolean available()
+    /**
+     * {@inheritDoc}
+     */
+    protected String getUnsupportedMessage()
     {
-        return available;
+        return UNSUPPORTED_MSG;
     }
 
-
-    public void beforeValue( ID id, V value ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void before( IndexEntry<V, Entry, ID> element ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void after( IndexEntry<V, Entry, ID> element ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void afterValue( ID id, V value ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
+    
     public void beforeFirst() throws Exception
     {
         checkNotClosed( "beforeFirst()" );
         uuidCursor.beforeFirst();
-        available = false;
+        setAvailable( false );
     }
 
 
@@ -95,13 +73,14 @@ public class NotCursor<V, ID extends Com
     {
         checkNotClosed( "afterLast()" );
         uuidCursor.afterLast();
-        available = false;
+        setAvailable( false );
     }
 
 
     public boolean first() throws Exception
     {
         beforeFirst();
+        
         return next();
     }
 
@@ -109,6 +88,7 @@ public class NotCursor<V, ID extends Com
     public boolean last() throws Exception
     {
         afterLast();
+        
         return previous();
     }
 
@@ -118,14 +98,15 @@ public class NotCursor<V, ID extends Com
         while ( uuidCursor.previous() )
         {
             checkNotClosed( "previous()" );
-            IndexEntry<?, Entry, ID> candidate = uuidCursor.get();
+            IndexEntry<?, ID> candidate = uuidCursor.get();
+            
             if ( !childEvaluator.evaluate( candidate ) )
             {
-                return available = true;
+                return setAvailable( true );
             }
         }
 
-        return available = false;
+        return setAvailable( false );
     }
 
 
@@ -134,21 +115,23 @@ public class NotCursor<V, ID extends Com
         while ( uuidCursor.next() )
         {
             checkNotClosed( "next()" );
-            IndexEntry<?, Entry, ID> candidate = uuidCursor.get();
+            IndexEntry<?, ID> candidate = uuidCursor.get();
+            
             if ( !childEvaluator.evaluate( candidate ) )
             {
-                return available = true;
+                return setAvailable( true );
             }
         }
 
-        return available = false;
+        return setAvailable( false );
     }
 
 
-    public IndexEntry<V, Entry, ID> get() throws Exception
+    public IndexEntry<V, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
-        if ( available )
+        
+        if ( available() )
         {
             return uuidCursor.get();
         }

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java Wed Aug 24 21:19:34 2011
@@ -54,7 +54,7 @@ public class NotEvaluator<ID> implements
     }
 
 
-    public boolean evaluate( IndexEntry<?, Entry, ID> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, ID> indexEntry ) throws Exception
     {
         return !childEvaluator.evaluate( indexEntry );
     }

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java Wed Aug 24 21:19:34 2011
@@ -52,13 +52,10 @@ public class OneLevelScopeCursor<ID exte
     private final IndexCursor<ID, Entry, ID> scopeCursor;
 
     /** A Cursor over entries brought into scope by alias dereferencing */
-    private final Cursor<IndexEntry<ID, Entry, ID>> dereferencedCursor;
+    private final Cursor<IndexEntry<ID, ID>> dereferencedCursor;
 
     /** Currently active Cursor: we switch between two cursors */
-    private Cursor<IndexEntry<ID, Entry, ID>> cursor;
-
-    /** Whether or not this Cursor is positioned so an entry is available */
-    private boolean available = false;
+    private Cursor<IndexEntry<ID, ID>> cursor;
 
 
     /**
@@ -87,42 +84,21 @@ public class OneLevelScopeCursor<ID exte
     }
 
 
-    public boolean available()
-    {
-        return available;
-    }
-
-
-    public void beforeValue( ID id, ID value ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void afterValue( ID id, ID value ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void before( IndexEntry<ID, Entry, ID> element ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void after( IndexEntry<ID, Entry, ID> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    protected String getUnsupportedMessage()
     {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
+        return UNSUPPORTED_MSG;
     }
 
-
+    
     public void beforeFirst() throws Exception
     {
         checkNotClosed( "beforeFirst()" );
         cursor = scopeCursor;
         cursor.beforeFirst();
-        available = false;
+        setAvailable( false );
     }
 
 
@@ -139,7 +115,7 @@ public class OneLevelScopeCursor<ID exte
         }
 
         cursor.afterLast();
-        available = false;
+        setAvailable( false );
     }
 
 
@@ -179,21 +155,21 @@ public class OneLevelScopeCursor<ID exte
                 do
                 {
                     checkNotClosed( "previous()" );
-                    available = cursor.previous();
+                    setAvailable( cursor.previous() );
 
-                    if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
+                    if ( available() && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
                     {
                         break;
                     }
                 }
-                while ( available );
+                while ( available() );
             }
             else
             {
-                available = cursor.previous();
+                setAvailable( cursor.previous() );
             }
 
-            return available;
+            return available();
         }
 
         /*
@@ -202,8 +178,9 @@ public class OneLevelScopeCursor<ID exte
          * scopeCursor and try a previous call after positioning past it's 
          * last element.
          */
-        available = cursor.previous();
-        if ( !available )
+        setAvailable( cursor.previous() );
+        
+        if ( !available() )
         {
             cursor = scopeCursor;
             cursor.afterLast();
@@ -212,16 +189,16 @@ public class OneLevelScopeCursor<ID exte
             do
             {
                 checkNotClosed( "previous()" );
-                available = cursor.previous();
+                setAvailable( cursor.previous() );
 
-                if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
+                if ( available() && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
                 {
                     break;
                 }
             }
-            while ( available );
+            while ( available() );
 
-            return available;
+            return available();
         }
 
         return true;
@@ -247,24 +224,24 @@ public class OneLevelScopeCursor<ID exte
             do
             {
                 checkNotClosed( "next()" );
-                available = cursor.next();
+                setAvailable( cursor.next() );
 
-                if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
+                if ( available() && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
                 {
                     break;
                 }
             }
-            while ( available );
+            while ( available() );
         }
         else
         {
-            available = cursor.next();
+            setAvailable( cursor.next() );
         }
 
         // if we're using dereferencedCursor (2nd) then we return the result
         if ( cursor == dereferencedCursor )
         {
-            return available;
+            return available();
         }
 
         /*
@@ -273,13 +250,13 @@ public class OneLevelScopeCursor<ID exte
          * dereferencedCursor and try a previous call after positioning past
          * it's last element.
          */
-        if ( !available )
+        if ( !available() )
         {
             if ( dereferencedCursor != null )
             {
                 cursor = dereferencedCursor;
                 cursor.beforeFirst();
-                return available = cursor.next();
+                return setAvailable( cursor.next() );
             }
 
             return false;
@@ -289,10 +266,11 @@ public class OneLevelScopeCursor<ID exte
     }
 
 
-    public IndexEntry<ID, Entry, ID> get() throws Exception
+    public IndexEntry<ID, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
-        if ( available )
+        
+        if ( available() )
         {
             return cursor.get();
         }

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeEvaluator.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeEvaluator.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeEvaluator.java Wed Aug 24 21:19:34 2011
@@ -20,12 +20,12 @@
 package org.apache.directory.server.xdbm.search.impl;
 
 
-import org.apache.directory.shared.ldap.model.filter.ScopeNode;
-import org.apache.directory.shared.ldap.model.message.SearchScope;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.xdbm.IndexEntry;
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.server.xdbm.search.Evaluator;
+import org.apache.directory.shared.ldap.model.filter.ScopeNode;
+import org.apache.directory.shared.ldap.model.message.SearchScope;
 
 
 /**
@@ -150,7 +150,7 @@ public class OneLevelScopeEvaluator<E, I
      * @throws Exception if db lookups fail
      * @see org.apache.directory.server.xdbm.search.Evaluator#evaluate(IndexEntry)
      */
-    public boolean evaluate( IndexEntry<?, E, ID> candidate ) throws Exception
+    public boolean evaluate( IndexEntry<?, ID> candidate ) throws Exception
     {
         boolean isChild = db.getRdnIndexHelper().isDirectDescendantOf( baseId, candidate.getId() );
 

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java Wed Aug 24 21:19:34 2011
@@ -48,7 +48,6 @@ public class OrCursor<V, ID> extends Abs
     private final List<Evaluator<? extends ExprNode, Entry, ID>> evaluators;
     private final List<Set<ID>> blacklists;
     private int cursorIndex = -1;
-    private boolean available = false;
 
 
     // TODO - do same evaluator fail fast optimization that we do in AndCursor
@@ -72,42 +71,21 @@ public class OrCursor<V, ID> extends Abs
     }
 
 
-    public boolean available()
-    {
-        return available;
-    }
-
-
-    public void before( IndexEntry<V, Entry, ID> element ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void after( IndexEntry<V, Entry, ID> element ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void beforeValue( ID id, V value ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void afterValue( ID id, V value ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    protected String getUnsupportedMessage()
     {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
+        return UNSUPPORTED_MSG;
     }
 
-
+    
     public void beforeFirst() throws Exception
     {
         checkNotClosed( "beforeFirst()" );
         cursorIndex = 0;
         cursors.get( cursorIndex ).beforeFirst();
-        available = false;
+        setAvailable( false );
     }
 
 
@@ -116,21 +94,23 @@ public class OrCursor<V, ID> extends Abs
         checkNotClosed( "afterLast()" );
         cursorIndex = cursors.size() - 1;
         cursors.get( cursorIndex ).afterLast();
-        available = false;
+        setAvailable( false );
     }
 
 
     public boolean first() throws Exception
     {
         beforeFirst();
-        return available = next();
+        
+        return setAvailable( next() );
     }
 
 
     public boolean last() throws Exception
     {
         afterLast();
-        return available = previous();
+        
+        return setAvailable( previous() );
     }
 
 
@@ -147,7 +127,7 @@ public class OrCursor<V, ID> extends Abs
      * @param indexEntry the index entry to blacklist
      * @throws Exception if there are problems accessing underlying db
      */
-    private void blackListIfDuplicate( IndexEntry<?, Entry, ID> indexEntry ) throws Exception
+    private void blackListIfDuplicate( IndexEntry<?, ID> indexEntry ) throws Exception
     {
         for ( int ii = 0; ii < evaluators.size(); ii++ )
         {
@@ -169,11 +149,13 @@ public class OrCursor<V, ID> extends Abs
         while ( cursors.get( cursorIndex ).previous() )
         {
             checkNotClosed( "previous()" );
-            IndexEntry<?, Entry, ID> candidate = cursors.get( cursorIndex ).get();
+            IndexEntry<?, ID> candidate = cursors.get( cursorIndex ).get();
+            
             if ( !isBlackListed( candidate.getId() ) )
             {
                 blackListIfDuplicate( candidate );
-                return available = true;
+                
+                return setAvailable( true );
             }
         }
 
@@ -186,16 +168,18 @@ public class OrCursor<V, ID> extends Abs
             while ( cursors.get( cursorIndex ).previous() )
             {
                 checkNotClosed( "previous()" );
-                IndexEntry<?, Entry, ID> candidate = cursors.get( cursorIndex ).get();
+                IndexEntry<?, ID> candidate = cursors.get( cursorIndex ).get();
+                
                 if ( !isBlackListed( candidate.getId() ) )
                 {
                     blackListIfDuplicate( candidate );
-                    return available = true;
+                    
+                    return setAvailable( true );
                 }
             }
         }
 
-        return available = false;
+        return setAvailable( false );
     }
 
 
@@ -204,11 +188,12 @@ public class OrCursor<V, ID> extends Abs
         while ( cursors.get( cursorIndex ).next() )
         {
             checkNotClosed( "next()" );
-            IndexEntry<?, Entry, ID> candidate = cursors.get( cursorIndex ).get();
+            IndexEntry<?, ID> candidate = cursors.get( cursorIndex ).get();
             if ( !isBlackListed( candidate.getId() ) )
             {
                 blackListIfDuplicate( candidate );
-                return available = true;
+                
+                return setAvailable( true );
             }
         }
 
@@ -221,23 +206,25 @@ public class OrCursor<V, ID> extends Abs
             while ( cursors.get( cursorIndex ).next() )
             {
                 checkNotClosed( "previous()" );
-                IndexEntry<?, Entry, ID> candidate = cursors.get( cursorIndex ).get();
+                IndexEntry<?, ID> candidate = cursors.get( cursorIndex ).get();
                 if ( !isBlackListed( candidate.getId() ) )
                 {
                     blackListIfDuplicate( candidate );
-                    return available = true;
+                    
+                    return setAvailable( true );
                 }
             }
         }
 
-        return available = false;
+        return setAvailable( false );
     }
 
 
-    public IndexEntry<V, Entry, ID> get() throws Exception
+    public IndexEntry<V, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
-        if ( available )
+        
+        if ( available() )
         {
             return cursors.get( cursorIndex ).get();
         }

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java Wed Aug 24 21:19:34 2011
@@ -102,7 +102,7 @@ public class OrEvaluator<ID> implements 
     }
 
 
-    public boolean evaluate( IndexEntry<?, Entry, ID> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, ID> indexEntry ) throws Exception
     {
         for ( Evaluator<?, Entry, ID> evaluator : evaluators )
         {

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java Wed Aug 24 21:19:34 2011
@@ -41,7 +41,6 @@ public class PresenceCursor<ID extends C
     private final IndexCursor<String, Entry, ID> uuidCursor;
     private final IndexCursor<String, Entry, ID> presenceCursor;
     private final PresenceEvaluator<ID> presenceEvaluator;
-    private boolean available = false;
 
 
     public PresenceCursor( Store<Entry, ID> store, PresenceEvaluator<ID> presenceEvaluator ) throws Exception
@@ -65,6 +64,15 @@ public class PresenceCursor<ID extends C
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    protected String getUnsupportedMessage()
+    {
+        return UNSUPPORTED_MSG;
+    }
+
+    
     public boolean available()
     {
         if ( presenceCursor != null )
@@ -72,10 +80,13 @@ public class PresenceCursor<ID extends C
             return presenceCursor.available();
         }
 
-        return available;
+        return super.available();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void beforeValue( ID id, String value ) throws Exception
     {
         checkNotClosed( "beforeValue()" );
@@ -83,69 +94,88 @@ public class PresenceCursor<ID extends C
         if ( presenceCursor != null )
         {
             presenceCursor.beforeValue( id, value );
+            
             return;
         }
 
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
+        super.beforeValue( id, value );
     }
 
 
-    public void before( IndexEntry<String, Entry, ID> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void before( IndexEntry<String, ID> element ) throws Exception
     {
         checkNotClosed( "before()" );
+        
         if ( presenceCursor != null )
         {
             presenceCursor.before( element );
+            
             return;
         }
 
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
+        super.before( element );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void afterValue( ID id, String value ) throws Exception
     {
         checkNotClosed( "afterValue()" );
+        
         if ( presenceCursor != null )
         {
             presenceCursor.afterValue( id, value );
+            
             return;
         }
 
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
+        super.afterValue( id, value );
     }
 
 
-    public void after( IndexEntry<String, Entry, ID> element ) throws Exception
+    /**
+     * {@inheritDoc}
+     */
+    public void after( IndexEntry<String, ID> element ) throws Exception
     {
         checkNotClosed( "after()" );
+        
         if ( presenceCursor != null )
         {
             presenceCursor.after( element );
+            
             return;
         }
 
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
+        super.after( element );
     }
 
 
     public void beforeFirst() throws Exception
     {
         checkNotClosed( "beforeFirst()" );
+        
         if ( presenceCursor != null )
         {
             presenceCursor.beforeFirst();
+            
             return;
         }
 
         uuidCursor.beforeFirst();
-        available = false;
+        setAvailable( false );
     }
 
 
     public void afterLast() throws Exception
     {
         checkNotClosed( "afterLast()" );
+        
         if ( presenceCursor != null )
         {
             presenceCursor.afterLast();
@@ -153,7 +183,7 @@ public class PresenceCursor<ID extends C
         }
 
         uuidCursor.afterLast();
-        available = false;
+        setAvailable( false );
     }
 
 
@@ -173,12 +203,14 @@ public class PresenceCursor<ID extends C
     public boolean last() throws Exception
     {
         checkNotClosed( "last()" );
+        
         if ( presenceCursor != null )
         {
             return presenceCursor.last();
         }
 
         afterLast();
+        
         return previous();
     }
 
@@ -186,6 +218,7 @@ public class PresenceCursor<ID extends C
     public boolean previous() throws Exception
     {
         checkNotClosed( "previous()" );
+        
         if ( presenceCursor != null )
         {
             return presenceCursor.previous();
@@ -194,14 +227,15 @@ public class PresenceCursor<ID extends C
         while ( uuidCursor.previous() )
         {
             checkNotClosed( "previous()" );
-            IndexEntry<?, Entry, ID> candidate = uuidCursor.get();
+            IndexEntry<?, ID> candidate = uuidCursor.get();
+            
             if ( presenceEvaluator.evaluate( candidate ) )
             {
-                return available = true;
+                return setAvailable( true );
             }
         }
 
-        return available = false;
+        return setAvailable( false );
     }
 
 
@@ -216,20 +250,22 @@ public class PresenceCursor<ID extends C
         while ( uuidCursor.next() )
         {
             checkNotClosed( "next()" );
-            IndexEntry<?, Entry, ID> candidate = uuidCursor.get();
+            IndexEntry<?, ID> candidate = uuidCursor.get();
+            
             if ( presenceEvaluator.evaluate( candidate ) )
             {
-                return available = true;
+                return setAvailable( true );
             }
         }
 
-        return available = false;
+        return setAvailable( false );
     }
 
 
-    public IndexEntry<String, Entry, ID> get() throws Exception
+    public IndexEntry<String, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
+        
         if ( presenceCursor != null )
         {
             if ( presenceCursor.available() )
@@ -240,15 +276,16 @@ public class PresenceCursor<ID extends C
             throw new InvalidCursorPositionException( I18n.err( I18n.ERR_708 ) );
         }
 
-        if ( available )
+        if ( available() )
         {
             /*
              * The value of NDN indices is the normalized dn and we want the
              * value to be the value of the attribute in question.  So we will
              * set that accordingly here.
              */
-            IndexEntry<String, Entry, ID> indexEntry = uuidCursor.get();
+            IndexEntry<String, ID> indexEntry = uuidCursor.get();
             indexEntry.setValue( presenceEvaluator.getAttributeType().getOid() );
+            
             return indexEntry;
         }
 

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java Wed Aug 24 21:19:34 2011
@@ -90,20 +90,20 @@ public class PresenceEvaluator<ID extend
 
     // TODO - determine if comaparator and index entry should have the Value
     // wrapper or the raw normalized value
-    public boolean evaluate( IndexEntry<?, Entry, ID> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, ID> indexEntry ) throws Exception
     {
         if ( idx != null )
         {
             return idx.forward( attributeType.getOid(), indexEntry.getId() );
         }
 
-        Entry entry = indexEntry.getObject();
+        Entry entry = indexEntry.getEntry();
 
         // resuscitate the entry if it has not been and set entry in IndexEntry
         if ( null == entry )
         {
             entry = db.lookup( indexEntry.getId() );
-            indexEntry.setObject( entry );
+            indexEntry.setEntry( entry );
         }
 
         return evaluateEntry( entry );

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/RdnIndexTreeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/RdnIndexTreeCursor.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/RdnIndexTreeCursor.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/RdnIndexTreeCursor.java Wed Aug 24 21:19:34 2011
@@ -97,7 +97,7 @@ public class RdnIndexTreeCursor<E, ID ex
     }
 
 
-    public void before( IndexEntry<ID, E, ID> element ) throws Exception
+    public void before( IndexEntry<ID, ID> element ) throws Exception
     {
         throw new UnsupportedOperationException();
     }
@@ -115,7 +115,7 @@ public class RdnIndexTreeCursor<E, ID ex
     }
 
 
-    public void after( IndexEntry<ID, E, ID> element ) throws Exception
+    public void after( IndexEntry<ID, ID> element ) throws Exception
     {
         throw new UnsupportedOperationException();
     }
@@ -225,7 +225,7 @@ public class RdnIndexTreeCursor<E, ID ex
         if ( cursors.getCurrentCursor().previous() )
         {
             // Compare the previous index entry's parent with the start element
-            IndexEntry<ParentIdAndRdn<ID>, E, ID> indexEntry = cursors.getCurrentCursor().get();
+            IndexEntry<ParentIdAndRdn<ID>, ID> indexEntry = cursors.getCurrentCursor().get();
             ParentIdAndRdn<ID> currentParentIdAndRdn = indexEntry.getValue();
             ParentIdAndRdn<ID> startParentIdAndRdn = cursors.getCurrentCursorStartElement().getValue();
             if ( currentParentIdAndRdn.getParentId().equals( startParentIdAndRdn.getParentId() )
@@ -313,7 +313,7 @@ public class RdnIndexTreeCursor<E, ID ex
         if ( cursors.getCurrentCursor().next() )
         {
             // Compare the next index entry's parent with the stop element
-            IndexEntry<ParentIdAndRdn<ID>, E, ID> indexEntry = cursors.getCurrentCursor().get();
+            IndexEntry<ParentIdAndRdn<ID>, ID> indexEntry = cursors.getCurrentCursor().get();
             ParentIdAndRdn<ID> currentParentIdAndRdn = indexEntry.getValue();
             ParentIdAndRdn<ID> stopParentIdAndRdn = cursors.getCurrentCursorStopElement().getValue();
             if ( currentParentIdAndRdn.getParentId().equals( stopParentIdAndRdn.getParentId() )
@@ -338,16 +338,22 @@ public class RdnIndexTreeCursor<E, ID ex
 
 
     @Override
-    public IndexEntry<ID, E, ID> get() throws Exception
+    public IndexEntry<ID, ID> get() throws Exception
     {
-        IndexEntry<ParentIdAndRdn<ID>, E, ID> wrappedEntry = cursors.getCurrentCursor().get();
-        IndexEntry<ID, E, ID> entry = new ForwardIndexEntry<ID, E, ID>();
+        IndexEntry<ParentIdAndRdn<ID>, ID> wrappedEntry = cursors.getCurrentCursor().get();
+        IndexEntry<ID, ID> entry = new ForwardIndexEntry<ID, ID>();
         entry.setValue( startId );
         //entry.setValue( wrappedEntry.getValue().getParentId() );
         entry.setId( wrappedEntry.getId() );
         return entry;
     }
 
+    @Override
+    protected String getUnsupportedMessage()
+    {
+        return "Unsupported operation";
+    }
+
     private class CursorStack
     {
         private final Deque<CursorStackEntry> cursorStack;
@@ -386,9 +392,9 @@ public class RdnIndexTreeCursor<E, ID ex
         /**
          * @return the current cursor's start element from the cursor stack
          */
-        public IndexEntry<ParentIdAndRdn<ID>, E, ID> getCurrentCursorStartElement()
+        public IndexEntry<ParentIdAndRdn<ID>, ID> getCurrentCursorStartElement()
         {
-            IndexEntry<ParentIdAndRdn<ID>, E, ID> startElement = cursorStack.getFirst().startElement;
+            IndexEntry<ParentIdAndRdn<ID>, ID> startElement = cursorStack.getFirst().startElement;
             return startElement;
         }
 
@@ -396,9 +402,9 @@ public class RdnIndexTreeCursor<E, ID ex
         /**
          * @return the current cursor's stop element from the cursor stack
          */
-        public IndexEntry<ParentIdAndRdn<ID>, E, ID> getCurrentCursorStopElement()
+        public IndexEntry<ParentIdAndRdn<ID>, ID> getCurrentCursorStopElement()
         {
-            IndexEntry<ParentIdAndRdn<ID>, E, ID> startElement = cursorStack.getFirst().stopElement;
+            IndexEntry<ParentIdAndRdn<ID>, ID> startElement = cursorStack.getFirst().stopElement;
             return startElement;
         }
 
@@ -424,8 +430,8 @@ public class RdnIndexTreeCursor<E, ID ex
         private class CursorStackEntry
         {
             private final IndexCursor<ParentIdAndRdn<ID>, E, ID> cursor;
-            private final IndexEntry<ParentIdAndRdn<ID>, E, ID> startElement;
-            private final IndexEntry<ParentIdAndRdn<ID>, E, ID> stopElement;
+            private final IndexEntry<ParentIdAndRdn<ID>, ID> startElement;
+            private final IndexEntry<ParentIdAndRdn<ID>, ID> stopElement;
 
 
             public CursorStackEntry( ID startId ) throws Exception
@@ -444,9 +450,9 @@ public class RdnIndexTreeCursor<E, ID ex
             }
 
 
-            private IndexEntry<ParentIdAndRdn<ID>, E, ID> createElement( ParentIdAndRdn<ID> parentIdAndRdn )
+            private IndexEntry<ParentIdAndRdn<ID>, ID> createElement( ParentIdAndRdn<ID> parentIdAndRdn )
             {
-                IndexEntry<ParentIdAndRdn<ID>, E, ID> startElement = new ForwardIndexEntry<ParentIdAndRdn<ID>, E, ID>();
+                IndexEntry<ParentIdAndRdn<ID>, ID> startElement = new ForwardIndexEntry<ParentIdAndRdn<ID>, ID>();
                 startElement.setValue( parentIdAndRdn );
                 return startElement;
             }

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java Wed Aug 24 21:19:34 2011
@@ -42,8 +42,7 @@ public class SubstringCursor<ID extends 
     private final boolean hasIndex;
     private final IndexCursor<String, Entry, ID> wrapped;
     private final SubstringEvaluator<ID> evaluator;
-    private final ForwardIndexEntry<String, Entry, ID> indexEntry = new ForwardIndexEntry<String, Entry, ID>();
-    private boolean available = false;
+    private final ForwardIndexEntry<String, ID> indexEntry = new ForwardIndexEntry<String, ID>();
 
 
     @SuppressWarnings("unchecked")
@@ -76,42 +75,21 @@ public class SubstringCursor<ID extends 
     }
 
 
-    public boolean available()
+    /**
+     * {@inheritDoc}
+     */
+    protected String getUnsupportedMessage()
     {
-        return available;
+        return UNSUPPORTED_MSG;
     }
 
-
-    public void beforeValue( ID id, String value ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void afterValue( ID id, String value ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void before( IndexEntry<String, Entry, ID> element ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void after( IndexEntry<String, Entry, ID> element ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
+    
     public void beforeFirst() throws Exception
     {
         checkNotClosed( "beforeFirst()" );
         if ( evaluator.getExpression().getInitial() != null && hasIndex )
         {
-            ForwardIndexEntry<String, Entry, ID> indexEntry = new ForwardIndexEntry<String, Entry, ID>();
+            ForwardIndexEntry<String, ID> indexEntry = new ForwardIndexEntry<String, ID>();
             indexEntry.setValue( evaluator.getExpression().getInitial() );
             wrapped.before( indexEntry );
         }
@@ -126,8 +104,8 @@ public class SubstringCursor<ID extends 
 
     private void clear()
     {
-        available = false;
-        indexEntry.setObject( null );
+        setAvailable( false );
+        indexEntry.setEntry( null );
         indexEntry.setId( null );
         indexEntry.setValue( null );
     }
@@ -152,7 +130,7 @@ public class SubstringCursor<ID extends 
     }
 
 
-    private boolean evaluateCandidate( IndexEntry<String, Entry, ID> indexEntry ) throws Exception
+    private boolean evaluateCandidate( IndexEntry<String, ID> indexEntry ) throws Exception
     {
         if ( hasIndex )
         {
@@ -177,13 +155,14 @@ public class SubstringCursor<ID extends 
         while ( wrapped.previous() )
         {
             checkNotClosed( "previous()" );
-            IndexEntry<String, Entry, ID> entry = wrapped.get();
+            IndexEntry<String, ID> entry = wrapped.get();
+            
             if ( evaluateCandidate( entry ) )
             {
-                available = true;
+                setAvailable( true );
                 this.indexEntry.setId( entry.getId() );
                 this.indexEntry.setValue( entry.getValue() );
-                this.indexEntry.setObject( entry.getObject() );
+                this.indexEntry.setEntry( entry.getEntry() );
                 return true;
             }
         }
@@ -198,13 +177,14 @@ public class SubstringCursor<ID extends 
         while ( wrapped.next() )
         {
             checkNotClosed( "next()" );
-            IndexEntry<String, Entry, ID> entry = wrapped.get();
+            IndexEntry<String, ID> entry = wrapped.get();
+            
             if ( evaluateCandidate( entry ) )
             {
-                available = true;
+                setAvailable( true );
                 this.indexEntry.setId( entry.getId() );
                 this.indexEntry.setValue( entry.getValue() );
-                this.indexEntry.setObject( entry.getObject() );
+                this.indexEntry.setEntry( entry.getEntry() );
                 return true;
             }
         }
@@ -214,10 +194,11 @@ public class SubstringCursor<ID extends 
     }
 
 
-    public IndexEntry<String, Entry, ID> get() throws Exception
+    public IndexEntry<String, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
-        if ( available )
+        
+        if ( available() )
         {
             return indexEntry;
         }

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java Wed Aug 24 21:19:34 2011
@@ -125,12 +125,12 @@ public class SubstringEvaluator<ID exten
 
 
     @SuppressWarnings("unchecked")
-    public boolean evaluate( IndexEntry<?, Entry, ID> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, ID> indexEntry ) throws Exception
     {
 
         if ( idx == null )
         {
-            return evaluateWithoutIndex( ( IndexEntry<String, Entry, ID> ) indexEntry );
+            return evaluateWithoutIndex( ( IndexEntry<String, ID> ) indexEntry );
         }
         else
         {
@@ -180,7 +180,7 @@ public class SubstringEvaluator<ID exten
     }
 
 
-    private boolean evaluateWithIndex( IndexEntry<?, Entry, ID> indexEntry ) throws Exception
+    private boolean evaluateWithIndex( IndexEntry<?, ID> indexEntry ) throws Exception
     {
         /*
          * Note that this is using the reverse half of the index giving a
@@ -188,12 +188,12 @@ public class SubstringEvaluator<ID exten
          * Otherwise we would have to scan the entire index if there were
          * no reverse lookups.
          */
-        Cursor<IndexEntry<String, Entry, ID>> entries = idx.reverseCursor( indexEntry.getId() );
+        Cursor<IndexEntry<String, ID>> entries = idx.reverseCursor( indexEntry.getId() );
 
         // cycle through the attribute values testing for a match
         while ( entries.next() )
         {
-            IndexEntry<String, Entry, ID> rec = entries.get();
+            IndexEntry<String, ID> rec = entries.get();
 
             // once match is found cleanup and return true
             if ( regex.matcher( ( String ) rec.getValue() ).matches() )
@@ -222,12 +222,12 @@ public class SubstringEvaluator<ID exten
          * Otherwise we would have to scan the entire index if there were
          * no reverse lookups.
          */
-        Cursor<IndexEntry<String, Entry, ID>> entries = idx.reverseCursor( id );
+        Cursor<IndexEntry<String, ID>> entries = idx.reverseCursor( id );
 
         // cycle through the attribute values testing for a match
         while ( entries.next() )
         {
-            IndexEntry<String, Entry, ID> rec = entries.get();
+            IndexEntry<String, ID> rec = entries.get();
 
             // once match is found cleanup and return true
             if ( regex.matcher( ( String ) rec.getValue() ).matches() )
@@ -326,15 +326,15 @@ public class SubstringEvaluator<ID exten
 
     // TODO - determine if comaparator and index entry should have the Value
     // wrapper or the raw normalized value
-    private boolean evaluateWithoutIndex( IndexEntry<String, Entry, ID> indexEntry ) throws Exception
+    private boolean evaluateWithoutIndex( IndexEntry<String, ID> indexEntry ) throws Exception
     {
-        Entry entry = indexEntry.getObject();
+        Entry entry = indexEntry.getEntry();
 
         // resuscitate the entry if it has not been and set entry in IndexEntry
         if ( null == entry )
         {
             entry = db.lookup( indexEntry.getId() );
-            indexEntry.setObject( entry );
+            indexEntry.setEntry( entry );
         }
 
         /*

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java Wed Aug 24 21:19:34 2011
@@ -55,9 +55,6 @@ public class SubtreeScopeCursor<ID exten
     /** Currently active Cursor: we switch between two cursors */
     private IndexCursor<ID, Entry, ID> cursor;
 
-    /** Whether or not this Cursor is positioned so an entry is available */
-    private boolean available = false;
-
     private ID contextEntryId;
 
 
@@ -94,8 +91,16 @@ public class SubtreeScopeCursor<ID exten
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    protected String getUnsupportedMessage()
+    {
+        return UNSUPPORTED_MSG;
+    }
+
+    
     // This will suppress PMD.EmptyCatchBlock warnings in this method
-    @SuppressWarnings("PMD.EmptyCatchBlock")
     private ID getContextEntryId() throws Exception
     {
         if ( contextEntryId == null )
@@ -120,42 +125,12 @@ public class SubtreeScopeCursor<ID exten
     }
 
 
-    public boolean available()
-    {
-        return available;
-    }
-
-
-    public void beforeValue( ID id, ID value ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void before( IndexEntry<ID, Entry, ID> element ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void afterValue( ID id, ID value ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
-    public void after( IndexEntry<ID, Entry, ID> element ) throws Exception
-    {
-        throw new UnsupportedOperationException( UNSUPPORTED_MSG );
-    }
-
-
     public void beforeFirst() throws Exception
     {
         checkNotClosed( "beforeFirst()" );
         cursor = scopeCursor;
         cursor.beforeFirst();
-        available = false;
+        setAvailable( false );
     }
 
 
@@ -172,7 +147,7 @@ public class SubtreeScopeCursor<ID exten
         }
 
         cursor.afterLast();
-        available = false;
+        setAvailable( false );
     }
 
 
@@ -212,20 +187,21 @@ public class SubtreeScopeCursor<ID exten
                 do
                 {
                     checkNotClosed( "previous()" );
-                    available = cursor.previous();
-                    if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
+                    setAvailable( cursor.previous() );
+                    
+                    if ( available() && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
                     {
                         break;
                     }
                 }
-                while ( available );
+                while ( available() );
             }
             else
             {
-                available = cursor.previous();
+                setAvailable( cursor.previous() );
             }
 
-            return available;
+            return available();
         }
 
         /*
@@ -234,8 +210,9 @@ public class SubtreeScopeCursor<ID exten
          * scopeCursor and try a previous call after positioning past it's
          * last element.
          */
-        available = cursor.previous();
-        if ( !available )
+        setAvailable( cursor.previous() );
+        
+        if ( !available() )
         {
             cursor = scopeCursor;
             cursor.afterLast();
@@ -244,16 +221,16 @@ public class SubtreeScopeCursor<ID exten
             do
             {
                 checkNotClosed( "previous()" );
-                available = cursor.previous();
+                setAvailable( cursor.previous() );
 
-                if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
+                if ( available() && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
                 {
                     break;
                 }
             }
-            while ( available );
+            while ( available() );
 
-            return available;
+            return available();
         }
 
         return true;
@@ -279,24 +256,24 @@ public class SubtreeScopeCursor<ID exten
             do
             {
                 checkNotClosed( "next()" );
-                available = cursor.next();
+                setAvailable( cursor.next() );
 
-                if ( available && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
+                if ( available() && db.getAliasIndex().reverseLookup( cursor.get().getId() ) == null )
                 {
                     break;
                 }
             }
-            while ( available );
+            while ( available() );
         }
         else
         {
-            available = cursor.next();
+            setAvailable( cursor.next() );
         }
 
         // if we're using dereferencedCursor (2nd) then we return the result
         if ( cursor == dereferencedCursor )
         {
-            return available;
+            return available();
         }
 
         /*
@@ -305,13 +282,14 @@ public class SubtreeScopeCursor<ID exten
          * dereferencedCursor and try a previous call after positioning past
          * it's last element.
          */
-        if ( !available )
+        if ( !available() )
         {
             if ( dereferencedCursor != null )
             {
                 cursor = dereferencedCursor;
                 cursor.beforeFirst();
-                return available = cursor.next();
+                
+                return setAvailable( cursor.next() );
             }
 
             return false;
@@ -321,10 +299,11 @@ public class SubtreeScopeCursor<ID exten
     }
 
 
-    public IndexEntry<ID, Entry, ID> get() throws Exception
+    public IndexEntry<ID, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
-        if ( available )
+        
+        if ( available() )
         {
             return cursor.get();
         }

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java Wed Aug 24 21:19:34 2011
@@ -123,7 +123,7 @@ public class SubtreeScopeEvaluator<E, ID
      * @throws Exception if the index lookups fail.
      * @see Evaluator#evaluate(org.apache.directory.server.xdbm.IndexEntry)
      */
-    public boolean evaluate( IndexEntry<?, E, ID> candidate ) throws Exception
+    public boolean evaluate( IndexEntry<?, ID> candidate ) throws Exception
     {
         ID id = candidate.getId();
         

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractIndexCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractIndexCursorTest.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractIndexCursorTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/AbstractIndexCursorTest.java Wed Aug 24 21:19:34 2011
@@ -114,7 +114,7 @@ public class AbstractIndexCursorTest
     @Test
     public void testIterator()
     {
-        Iterator<IndexEntry<String, Entry, Long>> iterator = indexCursor.iterator();
+        Iterator<IndexEntry<String, Long>> iterator = indexCursor.iterator();
         assertNotNull( iterator );
     }
 

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/ForwardIndexEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/ForwardIndexEntryTest.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/ForwardIndexEntryTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/ForwardIndexEntryTest.java Wed Aug 24 21:19:34 2011
@@ -27,7 +27,6 @@ import static junit.framework.Assert.ass
 
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -40,13 +39,13 @@ import org.junit.Test;
 public class ForwardIndexEntryTest
 {
 
-    private ForwardIndexEntry<String, Entry, Long> indexEntry;
+    private ForwardIndexEntry<String, Long> indexEntry;
 
 
     @Before
     public void setUp()
     {
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
     }
 
 
@@ -73,10 +72,10 @@ public class ForwardIndexEntryTest
     @Test
     public void testSetGetObject()
     {
-        assertNull( indexEntry.getObject() );
+        assertNull( indexEntry.getEntry() );
 
-        indexEntry.setObject( new DefaultEntry() );
-        assertEquals( new DefaultEntry(), indexEntry.getObject() );
+        indexEntry.setEntry( new DefaultEntry() );
+        assertEquals( new DefaultEntry(), indexEntry.getEntry() );
     }
 
 
@@ -89,7 +88,7 @@ public class ForwardIndexEntryTest
 
         indexEntry.setTuple( new Tuple<String, Long>( "a", 1L ), new DefaultEntry() );
         assertEquals( new Tuple<String, Long>( "a", 1L ), indexEntry.getTuple() );
-        assertEquals( new DefaultEntry(), indexEntry.getObject() );
+        assertEquals( new DefaultEntry(), indexEntry.getEntry() );
     }
 
 
@@ -101,7 +100,7 @@ public class ForwardIndexEntryTest
 
         assertNull( indexEntry.getId() );
         assertNull( indexEntry.getValue() );
-        assertNull( indexEntry.getObject() );
+        assertNull( indexEntry.getEntry() );
         assertNotNull( indexEntry.getTuple() );
         assertNull( indexEntry.getTuple().getKey() );
         assertNull( indexEntry.getTuple().getValue() );
@@ -115,10 +114,10 @@ public class ForwardIndexEntryTest
         indexEntry.setTuple( new Tuple<String, Long>( "a", 1L ), new DefaultEntry() );
 
         // create empty index entry and assert empty values
-        ForwardIndexEntry<String, Entry, Long> indexEntry2 = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry2 = new ForwardIndexEntry<String, Long>();
         assertNull( indexEntry2.getId() );
         assertNull( indexEntry2.getValue() );
-        assertNull( indexEntry2.getObject() );
+        assertNull( indexEntry2.getEntry() );
         assertNotNull( indexEntry2.getTuple() );
         assertNull( indexEntry2.getTuple().getKey() );
         assertNull( indexEntry2.getTuple().getValue() );
@@ -127,7 +126,7 @@ public class ForwardIndexEntryTest
         indexEntry2.copy( indexEntry );
         assertEquals( Long.valueOf( 1L ), indexEntry2.getId() );
         assertEquals( "a", indexEntry2.getValue() );
-        assertEquals( new DefaultEntry(), indexEntry2.getObject() );
+        assertEquals( new DefaultEntry(), indexEntry2.getEntry() );
         assertEquals( new Tuple<String, Long>( "a", 1L ), indexEntry2.getTuple() );
     }
 

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/ReverseIndexEntryTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/ReverseIndexEntryTest.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/ReverseIndexEntryTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/ReverseIndexEntryTest.java Wed Aug 24 21:19:34 2011
@@ -27,7 +27,6 @@ import static junit.framework.Assert.ass
 
 import org.apache.directory.shared.ldap.model.cursor.Tuple;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -40,13 +39,13 @@ import org.junit.Test;
 public class ReverseIndexEntryTest
 {
 
-    private ReverseIndexEntry<String, Entry, Long> indexEntry;
+    private ReverseIndexEntry<String, Long> indexEntry;
 
 
     @Before
     public void setUp()
     {
-        indexEntry = new ReverseIndexEntry<String, Entry, Long>();
+        indexEntry = new ReverseIndexEntry<String, Long>();
     }
 
 
@@ -73,10 +72,10 @@ public class ReverseIndexEntryTest
     @Test
     public void testSetGetObject()
     {
-        assertNull( indexEntry.getObject() );
+        assertNull( indexEntry.getEntry() );
 
-        indexEntry.setObject( new DefaultEntry() );
-        assertEquals( new DefaultEntry(), indexEntry.getObject() );
+        indexEntry.setEntry( new DefaultEntry() );
+        assertEquals( new DefaultEntry(), indexEntry.getEntry() );
     }
 
 
@@ -89,7 +88,7 @@ public class ReverseIndexEntryTest
 
         indexEntry.setTuple( new Tuple<Long, String>( 1L, "a" ), new DefaultEntry() );
         assertEquals( new Tuple<Long, String>( 1L, "a" ), indexEntry.getTuple() );
-        assertEquals( new DefaultEntry(), indexEntry.getObject() );
+        assertEquals( new DefaultEntry(), indexEntry.getEntry() );
     }
 
 
@@ -101,7 +100,7 @@ public class ReverseIndexEntryTest
 
         assertNull( indexEntry.getId() );
         assertNull( indexEntry.getValue() );
-        assertNull( indexEntry.getObject() );
+        assertNull( indexEntry.getEntry() );
         assertNotNull( indexEntry.getTuple() );
         assertNull( indexEntry.getTuple().getKey() );
         assertNull( indexEntry.getTuple().getValue() );
@@ -115,10 +114,10 @@ public class ReverseIndexEntryTest
         indexEntry.setTuple( new Tuple<Long, String>( 1L, "a" ), new DefaultEntry() );
 
         // create empty index entry and assert empty values
-        ReverseIndexEntry<String, Entry, Long> indexEntry2 = new ReverseIndexEntry<String, Entry, Long>();
+        ReverseIndexEntry<String, Long> indexEntry2 = new ReverseIndexEntry<String, Long>();
         assertNull( indexEntry2.getId() );
         assertNull( indexEntry2.getValue() );
-        assertNull( indexEntry2.getObject() );
+        assertNull( indexEntry2.getEntry() );
         assertNotNull( indexEntry2.getTuple() );
         assertNull( indexEntry2.getTuple().getKey() );
         assertNull( indexEntry2.getTuple().getValue() );
@@ -127,7 +126,7 @@ public class ReverseIndexEntryTest
         indexEntry2.copy( indexEntry );
         assertEquals( Long.valueOf( 1L ), indexEntry2.getId() );
         assertEquals( "a", indexEntry2.getValue() );
-        assertEquals( new DefaultEntry(), indexEntry2.getObject() );
+        assertEquals( new DefaultEntry(), indexEntry2.getEntry() );
         assertEquals( new Tuple<Long, String>( 1L, "a" ), indexEntry2.getTuple() );
     }
 

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/SingletonIndexCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/SingletonIndexCursorTest.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/SingletonIndexCursorTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/SingletonIndexCursorTest.java Wed Aug 24 21:19:34 2011
@@ -26,7 +26,6 @@ import static junit.framework.Assert.ass
 
 import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
 import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -39,25 +38,25 @@ import org.junit.Test;
 public class SingletonIndexCursorTest
 {
 
-    private ForwardIndexEntry<String, Entry, Long> indexEntry;
-    private SingletonIndexCursor<String, Entry, Long> indexCursor;
+    private ForwardIndexEntry<String, Long> indexEntry;
+    private SingletonIndexCursor<String, Long> indexCursor;
 
 
     @Before
     public void setUp()
     {
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 1L );
-        indexEntry.setObject( new DefaultEntry() );
+        indexEntry.setEntry( new DefaultEntry() );
         indexEntry.setValue( "test" );
-        indexCursor = new SingletonIndexCursor<String, Entry, Long>( indexEntry );
+        indexCursor = new SingletonIndexCursor<String, Long>( indexEntry );
     }
 
 
     @Test
     public void testConstructor()
     {
-        new SingletonIndexCursor<String, Entry, Long>( indexEntry );
+        new SingletonIndexCursor<String, Long>( indexEntry );
     }
 
 

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlPartitionTest.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlPartitionTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlPartitionTest.java Wed Aug 24 21:19:34 2011
@@ -385,7 +385,7 @@ public class AvlPartitionTest
     {
         assertEquals( 3, partition.getChildCount( 1L ) );
 
-        Cursor<IndexEntry<Long, Entry, Long>> cursor = partition.list( 1L );
+        Cursor<IndexEntry<Long, Long>> cursor = partition.list( 1L );
         assertNotNull( cursor );
         cursor.beforeFirst();
         assertTrue( cursor.next() );

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlRdnIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlRdnIndexTest.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlRdnIndexTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlRdnIndexTest.java Wed Aug 24 21:19:34 2011
@@ -285,23 +285,23 @@ public class AvlRdnIndexTest
         assertEquals( 5, idx.count() );
 
         // use forward index's cursor
-        Cursor<IndexEntry<ParentIdAndRdn<Long>, Long, Long>> cursor = idx.forwardCursor();
+        Cursor<IndexEntry<ParentIdAndRdn<Long>, Long>> cursor = idx.forwardCursor();
         cursor.beforeFirst();
 
         cursor.next();
-        IndexEntry<ParentIdAndRdn<Long>, Long, Long> e1 = cursor.get();
+        IndexEntry<ParentIdAndRdn<Long>, Long> e1 = cursor.get();
         assertEquals( 0, ( long ) e1.getId() );
         assertEquals( "cn=key", e1.getValue().getRdns()[0].getName() );
         assertEquals( 0, e1.getValue().getParentId().longValue() );
 
         cursor.next();
-        IndexEntry<ParentIdAndRdn<Long>, Long, Long> e2 = cursor.get();
+        IndexEntry<ParentIdAndRdn<Long>, Long> e2 = cursor.get();
         assertEquals( 1, ( long ) e2.getId() );
         assertEquals( "cn=key1", e2.getValue().getRdns()[0].getName() );
         assertEquals( 1, e2.getValue().getParentId().longValue() );
 
         cursor.next();
-        IndexEntry<ParentIdAndRdn<Long>, Long, Long> e3 = cursor.get();
+        IndexEntry<ParentIdAndRdn<Long>, Long> e3 = cursor.get();
         assertEquals( 2, ( long ) e3.getId() );
         assertEquals( "cn=key2", e3.getValue().getRdns()[0].getName() );
         assertEquals( 2, e3.getValue().getParentId().longValue() );

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java Wed Aug 24 21:19:34 2011
@@ -207,7 +207,7 @@ public class GreaterEqTest extends TestB
         // ---------- test before() ----------
 
         cursor = new GreaterEqCursor( store, evaluator );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "5" );
 
         assertFalse( cursor.available() );
@@ -230,7 +230,7 @@ public class GreaterEqTest extends TestB
         assertTrue( cursor.isClosed() );
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "7" );
         cursor.before( indexEntry );
         assertFalse( cursor.available() );
@@ -240,7 +240,7 @@ public class GreaterEqTest extends TestB
         cursor.close();
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "3" );
         cursor.before( indexEntry );
         assertFalse( cursor.available() );
@@ -252,7 +252,7 @@ public class GreaterEqTest extends TestB
         // ---------- test after() ----------
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "4" );
 
         assertFalse( cursor.available() );
@@ -275,7 +275,7 @@ public class GreaterEqTest extends TestB
         assertTrue( cursor.isClosed() );
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "7" );
         cursor.after( indexEntry );
         assertFalse( cursor.available() );
@@ -285,7 +285,7 @@ public class GreaterEqTest extends TestB
         cursor.close();
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "3" );
         cursor.after( indexEntry );
         assertFalse( cursor.available() );
@@ -414,7 +414,7 @@ public class GreaterEqTest extends TestB
         // ---------- test before() ----------
 
         cursor = new GreaterEqCursor( store, evaluator );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "2" );
         try
         {
@@ -428,7 +428,7 @@ public class GreaterEqTest extends TestB
         // ---------- test after() ----------
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "2" );
         try
         {
@@ -451,7 +451,7 @@ public class GreaterEqTest extends TestB
         AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
         GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "3" ) );
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -460,31 +460,31 @@ public class GreaterEqTest extends TestB
         indexEntry.setId( 1L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 4L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 6L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 7L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 8L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 9L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 10L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }
@@ -496,7 +496,7 @@ public class GreaterEqTest extends TestB
         AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.STREET_AT_OID );
         GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "2" ) );
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.STREET_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -526,7 +526,7 @@ public class GreaterEqTest extends TestB
         GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "2" ) );
 
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.C_POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -544,7 +544,7 @@ public class GreaterEqTest extends TestB
         GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "3" ) );
 
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.POSTOFFICEBOX_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -553,31 +553,31 @@ public class GreaterEqTest extends TestB
         indexEntry.setId( 1L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 4L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 6L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 7L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 8L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 9L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 10L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java Wed Aug 24 21:19:34 2011
@@ -227,7 +227,7 @@ public class LessEqTest extends TestBase
         // ---------- test before() ----------
 
         cursor = new LessEqCursor( store, evaluator );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "2" );
 
         assertFalse( cursor.available() );
@@ -250,7 +250,7 @@ public class LessEqTest extends TestBase
         assertTrue( cursor.isClosed() );
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "7" );
         cursor.before( indexEntry );
         assertFalse( cursor.available() );
@@ -260,7 +260,7 @@ public class LessEqTest extends TestBase
         cursor.close();
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "3" );
         cursor.before( indexEntry );
         assertFalse( cursor.available() );
@@ -272,7 +272,7 @@ public class LessEqTest extends TestBase
         // ---------- test after() ----------
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "1" );
 
         assertFalse( cursor.available() );
@@ -295,7 +295,7 @@ public class LessEqTest extends TestBase
         assertTrue( cursor.isClosed() );
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "7" );
         cursor.after( indexEntry );
         assertFalse( cursor.available() );
@@ -305,7 +305,7 @@ public class LessEqTest extends TestBase
         cursor.close();
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "3" );
         cursor.after( indexEntry );
         assertFalse( cursor.available() );
@@ -438,7 +438,7 @@ public class LessEqTest extends TestBase
         // ---------- test before() ----------
 
         cursor = new LessEqCursor( store, evaluator );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "2" );
         try
         {
@@ -452,7 +452,7 @@ public class LessEqTest extends TestBase
         // ---------- test after() ----------
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setValue( "2" );
         try
         {
@@ -476,7 +476,7 @@ public class LessEqTest extends TestBase
         LessEqNode node = new LessEqNode( at, new StringValue( at, "3" ) );
 
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -485,31 +485,31 @@ public class LessEqTest extends TestBase
         indexEntry.setId( 1L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 4L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 6L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 7L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 8L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 9L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 10L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }
@@ -522,7 +522,7 @@ public class LessEqTest extends TestBase
         LessEqNode node = new LessEqNode( at, new StringValue( at, "2" ) );
 
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.STREET_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -552,7 +552,7 @@ public class LessEqTest extends TestBase
         LessEqNode node = new LessEqNode( at, new StringValue( at, "2" ) );
 
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.C_POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -570,7 +570,7 @@ public class LessEqTest extends TestBase
         LessEqNode node = new LessEqNode( at, new StringValue( at, "3" ) );
 
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        ForwardIndexEntry<String, Long> indexEntry = new ForwardIndexEntry<String, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.POSTOFFICEBOX_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -579,31 +579,31 @@ public class LessEqTest extends TestBase
         indexEntry.setId( 1L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 4L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 6L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 7L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 8L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 9L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, Entry, Long>();
+        indexEntry = new ForwardIndexEntry<String, Long>();
         indexEntry.setId( 10L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }

Modified: directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java?rev=1161279&r1=1161278&r2=1161279&view=diff
==============================================================================
--- directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java (original)
+++ directory/apacheds/branches/one-sub-level-index-removal/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java Wed Aug 24 21:19:34 2011
@@ -159,7 +159,7 @@ public class NotCursorTest extends TestB
 
         try
         {
-            cursor.after( new ForwardIndexEntry<String, Entry, Long>() );
+            cursor.after( new ForwardIndexEntry<String, Long>() );
             fail( "should fail with UnsupportedOperationException " );
         }
         catch ( UnsupportedOperationException uoe )
@@ -168,7 +168,7 @@ public class NotCursorTest extends TestB
 
         try
         {
-            cursor.before( new ForwardIndexEntry<String, Entry, Long>() );
+            cursor.before( new ForwardIndexEntry<String, Long>() );
             fail( "should fail with UnsupportedOperationException " );
         }
         catch ( UnsupportedOperationException uoe )



Mime
View raw message