directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1143944 - in /directory/apacheds/trunk: jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ xdbm-partition/src/main/java/org/apache/directory/server/xdbm/ xdbm-partition/src/main/java/org/apache/directo...
Date Thu, 07 Jul 2011 18:06:33 GMT
Author: elecharny
Date: Thu Jul  7 18:06:32 2011
New Revision: 1143944

URL: http://svn.apache.org/viewvc?rev=1143944&view=rev
Log:
o Removed the Store.getNdnIndex (we use the entryUuid index instead)
o removed the unused Store.getIndex( String id ) method
o Fixed the code and tests accordingly

Modified:
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
    directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Thu Jul  7 18:06:32 2011
@@ -363,7 +363,7 @@ public class JdbmStoreTest
         {
         }
 
-        assertNotNull( store.getNdnIndex() );
+        assertNotNull( store.getEntryUuidIndex() );
 
         assertNotNull( store.getRdnIndex() );
         try

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
Thu Jul  7 18:06:32 2011
@@ -497,24 +497,6 @@ public abstract class AbstractStore<E, I
     /**
      * {@inheritDoc}
      */
-    public Index<?, E, ID> getIndex( String id ) throws IndexNotFoundException
-    {
-        try
-        {
-            return getIndex( schemaManager.lookupAttributeTypeRegistry( id) );
-        }
-        catch ( LdapException e )
-        {
-            String msg = I18n.err( I18n.ERR_128, id );
-            LOG.error( msg, e );
-            throw new IndexNotFoundException( msg, id, e );
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     public Index<?, E, ID> getIndex( AttributeType attributeType ) throws IndexNotFoundException
     {
         String id = attributeType.getOid();
@@ -642,15 +624,6 @@ public abstract class AbstractStore<E, I
     /**
      * {@inheritDoc}
      */
-    public Index<String, E, ID> getNdnIndex()
-    {
-        return getEntryUuidIndex();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
     @SuppressWarnings("unchecked")
     public Index<String, E, ID> getPresenceIndex()
     {

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/Store.java
Thu Jul  7 18:06:32 2011
@@ -288,12 +288,6 @@ public interface Store<E, ID extends Com
 
 
     /**
-     * @return The Ndn system index
-     */
-    Index<String, E, ID> getNdnIndex();
-
-
-    /**
      * @return The ObjectClass system index
      */
     Index<String, E, ID> getObjectClassIndex();
@@ -384,16 +378,8 @@ public interface Store<E, ID extends Com
 
 
     /**
-     * Get the user <strong>or</strong> system index associated with the given
name
-     * @param id The index name we are looking for
-     * @return The associated user <strong>or</strong> system index
-     * @throws IndexNotFoundException If the index does not exist
-     */
-    Index<?, E, ID> getIndex( String id ) throws IndexNotFoundException;
-
-
-    /**
      * Get the user <strong>or</strong> system index associated with the given
attributeType
+     * 
      * @param attributeType The index attributeType we are looking for
      * @return The associated user <strong>or</strong> system index
      * @throws IndexNotFoundException If the index does not exist

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
Thu Jul  7 18:06:32 2011
@@ -42,7 +42,7 @@ public class AllEntriesCursor<ID extends
     public AllEntriesCursor( Store<Entry, ID> db ) throws Exception
     {
         // Get a reverse cursor because we want to sort by ID
-        wrapped = db.getNdnIndex().reverseCursor();
+        wrapped = db.getEntryUuidIndex().reverseCursor();
     }
 
 

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java
Thu Jul  7 18:06:32 2011
@@ -54,7 +54,7 @@ public class ApproximateCursor<V, ID ext
     private final IndexCursor<V, Entry, ID> userIdxCursor;
 
     /** NDN Cursor on all entries in  (set when no index on user attribute) */
-    private final IndexCursor<String, Entry, ID> ndnIdxCursor;
+    private final IndexCursor<String, Entry, ID> uuidIdxCursor;
 
     /** used only when ndnIdxCursor is used (no index on attribute) */
     private boolean available = false;
@@ -72,11 +72,11 @@ public class ApproximateCursor<V, ID ext
         {
             Index<V, Entry, ID> index = ( Index<V, Entry, ID> ) db.getIndex(
attributeType );
             userIdxCursor = index.forwardCursor( value.getValue() );
-            ndnIdxCursor = null;
+            uuidIdxCursor = null;
         }
         else
         {
-            ndnIdxCursor = db.getNdnIndex().forwardCursor();
+            uuidIdxCursor = db.getEntryUuidIndex().forwardCursor();
             userIdxCursor = null;
         }
     }
@@ -159,7 +159,7 @@ public class ApproximateCursor<V, ID ext
         }
         else
         {
-            ndnIdxCursor.beforeFirst();
+            uuidIdxCursor.beforeFirst();
             available = false;
         }
     }
@@ -174,7 +174,7 @@ public class ApproximateCursor<V, ID ext
         }
         else
         {
-            ndnIdxCursor.afterLast();
+            uuidIdxCursor.afterLast();
             available = false;
         }
     }
@@ -201,10 +201,10 @@ public class ApproximateCursor<V, ID ext
             return userIdxCursor.previous();
         }
 
-        while ( ndnIdxCursor.previous() )
+        while ( uuidIdxCursor.previous() )
         {
             checkNotClosed( "previous()" );
-            IndexEntry<?, Entry, ID> candidate = ndnIdxCursor.get();
+            IndexEntry<?, Entry, ID> candidate = uuidIdxCursor.get();
             if ( approximateEvaluator.evaluate( candidate ) )
             {
                 return available = true;
@@ -222,10 +222,10 @@ public class ApproximateCursor<V, ID ext
             return userIdxCursor.next();
         }
 
-        while ( ndnIdxCursor.next() )
+        while ( uuidIdxCursor.next() )
         {
             checkNotClosed( "next()" );
-            IndexEntry<?, Entry, ID> candidate = ndnIdxCursor.get();
+            IndexEntry<?, Entry, ID> candidate = uuidIdxCursor.get();
             if ( approximateEvaluator.evaluate( candidate ) )
             {
                 return available = true;
@@ -247,7 +247,7 @@ public class ApproximateCursor<V, ID ext
 
         if ( available )
         {
-            return ( IndexEntry<V, Entry, ID> ) ndnIdxCursor.get();
+            return ( IndexEntry<V, Entry, ID> ) uuidIdxCursor.get();
         }
 
         throw new InvalidCursorPositionException( I18n.err( I18n.ERR_708 ) );
@@ -264,7 +264,7 @@ public class ApproximateCursor<V, ID ext
         }
         else
         {
-            ndnIdxCursor.close();
+            uuidIdxCursor.close();
         }
     }
 }
\ No newline at end of file

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java
Thu Jul  7 18:06:32 2011
@@ -52,7 +52,7 @@ public class EqualityCursor<V, ID extend
     private final IndexCursor<V, Entry, ID> userIdxCursor;
 
     /** NDN Cursor on all entries in  (set when no index on user attribute) */
-    private final IndexCursor<String, Entry, ID> ndnIdxCursor;
+    private final IndexCursor<String, Entry, ID> uuidIdxCursor;
 
     /** used only when ndnIdxCursor is used (no index on attribute) */
     private boolean available = false;
@@ -70,11 +70,11 @@ public class EqualityCursor<V, ID extend
         {
             Index<V, Entry, ID> userIndex = ( Index<V, Entry, ID> ) db.getIndex(
attributeType );
             userIdxCursor = userIndex.forwardCursor( value.getValue() );
-            ndnIdxCursor = null;
+            uuidIdxCursor = null;
         }
         else
         {
-            ndnIdxCursor = db.getNdnIndex().forwardCursor();
+            uuidIdxCursor = db.getEntryUuidIndex().forwardCursor();
             userIdxCursor = null;
         }
     }
@@ -179,7 +179,7 @@ public class EqualityCursor<V, ID extend
         }
         else
         {
-            ndnIdxCursor.beforeFirst();
+            uuidIdxCursor.beforeFirst();
         }
 
         available = false;
@@ -199,7 +199,7 @@ public class EqualityCursor<V, ID extend
         }
         else
         {
-            ndnIdxCursor.afterLast();
+            uuidIdxCursor.afterLast();
         }
 
         available = false;
@@ -239,10 +239,10 @@ public class EqualityCursor<V, ID extend
             return userIdxCursor.previous();
         }
 
-        while ( ndnIdxCursor.previous() )
+        while ( uuidIdxCursor.previous() )
         {
             checkNotClosed( "previous()" );
-            IndexEntry<?, Entry, ID> candidate = ndnIdxCursor.get();
+            IndexEntry<?, Entry, ID> candidate = uuidIdxCursor.get();
             if ( equalityEvaluator.evaluate( candidate ) )
             {
                 return available = true;
@@ -264,10 +264,10 @@ public class EqualityCursor<V, ID extend
             return userIdxCursor.next();
         }
 
-        while ( ndnIdxCursor.next() )
+        while ( uuidIdxCursor.next() )
         {
             checkNotClosed( "next()" );
-            IndexEntry<?, Entry, ID> candidate = ndnIdxCursor.get();
+            IndexEntry<?, Entry, ID> candidate = uuidIdxCursor.get();
             
             if ( equalityEvaluator.evaluate( candidate ) )
             {
@@ -294,7 +294,7 @@ public class EqualityCursor<V, ID extend
 
         if ( available )
         {
-            return ( IndexEntry<V, Entry, ID> ) ndnIdxCursor.get();
+            return ( IndexEntry<V, Entry, ID> ) uuidIdxCursor.get();
         }
 
         throw new InvalidCursorPositionException( I18n.err( I18n.ERR_708 ) );
@@ -314,7 +314,7 @@ public class EqualityCursor<V, ID extend
         }
         else
         {
-            ndnIdxCursor.close();
+            uuidIdxCursor.close();
         }
     }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
Thu Jul  7 18:06:32 2011
@@ -79,7 +79,7 @@ public class GreaterEqCursor<V, ID exten
         }
         else
         {
-            ndnIdxCursor = db.getNdnIndex().forwardCursor();
+            ndnIdxCursor = db.getEntryUuidIndex().forwardCursor();
             userIdxCursor = null;
         }
     }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
Thu Jul  7 18:06:32 2011
@@ -52,7 +52,7 @@ public class LessEqCursor<V, ID extends 
     private final IndexCursor<V, Entry, ID> userIdxCursor;
 
     /** NDN Cursor on all entries in  (set when no index on user attribute) */
-    private final IndexCursor<V, Entry, ID> ndnIdxCursor;
+    private final IndexCursor<V, Entry, ID> uuidIdxCursor;
 
     /**
      * Used to store indexEntry from ndnCandidate so it can be saved after
@@ -75,11 +75,11 @@ public class LessEqCursor<V, ID extends 
         if ( db.hasIndexOn( attributeType ) )
         {
             userIdxCursor = ( ( Index<V, Entry, ID> ) db.getIndex( attributeType )
).forwardCursor();
-            ndnIdxCursor = null;
+            uuidIdxCursor = null;
         }
         else
         {
-            ndnIdxCursor = ( IndexCursor<V, Entry, ID> ) db.getNdnIndex().forwardCursor();
+            uuidIdxCursor = ( IndexCursor<V, Entry, ID> ) db.getEntryUuidIndex().forwardCursor();
             userIdxCursor = null;
         }
     }
@@ -262,7 +262,7 @@ public class LessEqCursor<V, ID extends 
         }
         else
         {
-            ndnIdxCursor.beforeFirst();
+            uuidIdxCursor.beforeFirst();
             ndnCandidate = null;
         }
 
@@ -282,7 +282,7 @@ public class LessEqCursor<V, ID extends 
         }
         else
         {
-            ndnIdxCursor.afterLast();
+            uuidIdxCursor.afterLast();
             ndnCandidate = null;
         }
 
@@ -318,10 +318,10 @@ public class LessEqCursor<V, ID extends 
             return available = userIdxCursor.previous();
         }
 
-        while ( ndnIdxCursor.previous() )
+        while ( uuidIdxCursor.previous() )
         {
             checkNotClosed( "previous()" );
-            ndnCandidate = ndnIdxCursor.get();
+            ndnCandidate = uuidIdxCursor.get();
             if ( lessEqEvaluator.evaluate( ndnCandidate ) )
             {
                 return available = true;
@@ -361,10 +361,10 @@ public class LessEqCursor<V, ID extends 
             return available = false;
         }
 
-        while ( ndnIdxCursor.next() )
+        while ( uuidIdxCursor.next() )
         {
             checkNotClosed( "next()" );
-            ndnCandidate = ndnIdxCursor.get();
+            ndnCandidate = uuidIdxCursor.get();
             if ( lessEqEvaluator.evaluate( ndnCandidate ) )
             {
                 return available = true;
@@ -411,7 +411,7 @@ public class LessEqCursor<V, ID extends 
         }
         else
         {
-            ndnIdxCursor.close();
+            uuidIdxCursor.close();
             ndnCandidate = null;
         }
     }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java
Thu Jul  7 18:06:32 2011
@@ -39,17 +39,17 @@ import org.apache.directory.shared.ldap.
 public class NotCursor<V, ID extends Comparable<ID>> extends AbstractIndexCursor<V,
Entry, ID>
 {
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_718 );
-    private final IndexCursor<V, Entry, ID> ndnCursor;
+    private final IndexCursor<V, Entry, ID> uuidCursor;
     private final Evaluator<? extends ExprNode, Entry, ID> childEvaluator;
     private boolean available = false;
 
 
     @SuppressWarnings("unchecked")
-    public NotCursor( Store<Entry, ID> db, Evaluator<? extends ExprNode, Entry,
ID> childEvaluator )
+    public NotCursor( Store<Entry, ID> store, Evaluator<? extends ExprNode, Entry,
ID> childEvaluator )
         throws Exception
     {
         this.childEvaluator = childEvaluator;
-        this.ndnCursor = ( IndexCursor<V, Entry, ID> ) db.getNdnIndex().forwardCursor();
+        this.uuidCursor = ( IndexCursor<V, Entry, ID> ) store.getEntryUuidIndex().forwardCursor();
     }
 
 
@@ -86,7 +86,7 @@ public class NotCursor<V, ID extends Com
     public void beforeFirst() throws Exception
     {
         checkNotClosed( "beforeFirst()" );
-        ndnCursor.beforeFirst();
+        uuidCursor.beforeFirst();
         available = false;
     }
 
@@ -94,7 +94,7 @@ public class NotCursor<V, ID extends Com
     public void afterLast() throws Exception
     {
         checkNotClosed( "afterLast()" );
-        ndnCursor.afterLast();
+        uuidCursor.afterLast();
         available = false;
     }
 
@@ -115,10 +115,10 @@ public class NotCursor<V, ID extends Com
 
     public boolean previous() throws Exception
     {
-        while ( ndnCursor.previous() )
+        while ( uuidCursor.previous() )
         {
             checkNotClosed( "previous()" );
-            IndexEntry<?, Entry, ID> candidate = ndnCursor.get();
+            IndexEntry<?, Entry, ID> candidate = uuidCursor.get();
             if ( !childEvaluator.evaluate( candidate ) )
             {
                 return available = true;
@@ -131,10 +131,10 @@ public class NotCursor<V, ID extends Com
 
     public boolean next() throws Exception
     {
-        while ( ndnCursor.next() )
+        while ( uuidCursor.next() )
         {
             checkNotClosed( "next()" );
-            IndexEntry<?, Entry, ID> candidate = ndnCursor.get();
+            IndexEntry<?, Entry, ID> candidate = uuidCursor.get();
             if ( !childEvaluator.evaluate( candidate ) )
             {
                 return available = true;
@@ -150,7 +150,7 @@ public class NotCursor<V, ID extends Com
         checkNotClosed( "get()" );
         if ( available )
         {
-            return ndnCursor.get();
+            return uuidCursor.get();
         }
 
         throw new InvalidCursorPositionException( I18n.err( I18n.ERR_708 ) );
@@ -160,6 +160,6 @@ public class NotCursor<V, ID extends Com
     public void close() throws Exception
     {
         super.close();
-        ndnCursor.close();
+        uuidCursor.close();
     }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
Thu Jul  7 18:06:32 2011
@@ -38,13 +38,13 @@ import org.apache.directory.shared.ldap.
 public class PresenceCursor<ID extends Comparable<ID>> extends AbstractIndexCursor<String,
Entry, ID>
 {
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_724 );
-    private final IndexCursor<String, Entry, ID> ndnCursor;
+    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> db, PresenceEvaluator<ID> presenceEvaluator
) throws Exception
+    public PresenceCursor( Store<Entry, ID> store, PresenceEvaluator<ID> presenceEvaluator
) throws Exception
     {
         this.presenceEvaluator = presenceEvaluator;
         AttributeType type = presenceEvaluator.getAttributeType();
@@ -52,15 +52,15 @@ public class PresenceCursor<ID extends C
         // we don't maintain a presence index for objectClass, entryUUID, and entryCSN
         // as it doesn't make sense because every entry has such an attribute
         // instead for those attributes and all un-indexed attributes we use the ndn index
-        if ( db.hasUserIndexOn( type ) )
+        if ( store.hasUserIndexOn( type ) )
         {
-            presenceCursor = db.getPresenceIndex().forwardCursor( type.getOid() );
-            ndnCursor = null;
+            presenceCursor = store.getPresenceIndex().forwardCursor( type.getOid() );
+            uuidCursor = null;
         }
         else
         {
             presenceCursor = null;
-            ndnCursor = db.getNdnIndex().forwardCursor();
+            uuidCursor = store.getEntryUuidIndex().forwardCursor();
         }
     }
 
@@ -138,7 +138,7 @@ public class PresenceCursor<ID extends C
             return;
         }
 
-        ndnCursor.beforeFirst();
+        uuidCursor.beforeFirst();
         available = false;
     }
 
@@ -152,7 +152,7 @@ public class PresenceCursor<ID extends C
             return;
         }
 
-        ndnCursor.afterLast();
+        uuidCursor.afterLast();
         available = false;
     }
 
@@ -191,10 +191,10 @@ public class PresenceCursor<ID extends C
             return presenceCursor.previous();
         }
 
-        while ( ndnCursor.previous() )
+        while ( uuidCursor.previous() )
         {
             checkNotClosed( "previous()" );
-            IndexEntry<?, Entry, ID> candidate = ndnCursor.get();
+            IndexEntry<?, Entry, ID> candidate = uuidCursor.get();
             if ( presenceEvaluator.evaluate( candidate ) )
             {
                 return available = true;
@@ -213,10 +213,10 @@ public class PresenceCursor<ID extends C
             return presenceCursor.next();
         }
 
-        while ( ndnCursor.next() )
+        while ( uuidCursor.next() )
         {
             checkNotClosed( "next()" );
-            IndexEntry<?, Entry, ID> candidate = ndnCursor.get();
+            IndexEntry<?, Entry, ID> candidate = uuidCursor.get();
             if ( presenceEvaluator.evaluate( candidate ) )
             {
                 return available = true;
@@ -247,7 +247,7 @@ public class PresenceCursor<ID extends C
              * value to be the value of the attribute in question.  So we will
              * set that accordingly here.
              */
-            IndexEntry<String, Entry, ID> indexEntry = ndnCursor.get();
+            IndexEntry<String, Entry, ID> indexEntry = uuidCursor.get();
             indexEntry.setValue( presenceEvaluator.getAttributeType().getOid() );
             return indexEntry;
         }
@@ -266,7 +266,7 @@ public class PresenceCursor<ID extends C
         }
         else
         {
-            ndnCursor.close();
+            uuidCursor.close();
         }
     }
 }

Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java
Thu Jul  7 18:06:32 2011
@@ -47,15 +47,15 @@ public class SubstringCursor<ID extends 
 
 
     @SuppressWarnings("unchecked")
-    public SubstringCursor( Store<Entry, ID> db, final SubstringEvaluator<ID>
substringEvaluator )
+    public SubstringCursor( Store<Entry, ID> store, final SubstringEvaluator<ID>
substringEvaluator )
         throws Exception
     {
         evaluator = substringEvaluator;
-        hasIndex = db.hasIndexOn( evaluator.getExpression().getAttributeType() );
+        hasIndex = store.hasIndexOn( evaluator.getExpression().getAttributeType() );
 
         if ( hasIndex )
         {
-            wrapped = ( ( Index<String, Entry, ID> ) db.getIndex( evaluator.getExpression().getAttributeType()
) )
+            wrapped = ( ( Index<String, Entry, ID> ) store.getIndex( evaluator.getExpression().getAttributeType()
) )
                 .forwardCursor();
         }
         else
@@ -71,7 +71,7 @@ public class SubstringCursor<ID extends 
              * knows to use it, when it itself detects the lack of an index on
              * the node's attribute.
              */
-            wrapped = db.getNdnIndex().forwardCursor();
+            wrapped = store.getEntryUuidIndex().forwardCursor();
         }
     }
 

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java?rev=1143944&r1=1143943&r2=1143944&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlStoreTest.java
Thu Jul  7 18:06:32 2011
@@ -278,7 +278,7 @@ public class AvlStoreTest
         {
         }
 
-        assertNotNull( store.getNdnIndex() );
+        assertNotNull( store.getEntryUuidIndex() );
         assertNotNull( store.getRdnIndex() );
         
         try



Mime
View raw message