directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r937709 - in /directory/apacheds/trunk: avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/ core/src/main/java/org/apache/directory/server/c...
Date Sat, 24 Apr 2010 22:02:47 GMT
Author: seelmann
Date: Sat Apr 24 22:02:47 2010
New Revision: 937709

URL: http://svn.apache.org/viewvc?rev=937709&view=rev
Log:
Changed getEntryId(String) to getEntryId(DN) in Store and BTreePartition, to avoid DN parsing

Modified:
    directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
    directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlStoreTest.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java
    directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
    directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifStore.java
    directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/AbstractXdbmPartition.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
    directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java

Modified: directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java (original)
+++ directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java Sat Apr 24 22:02:47 2010
@@ -156,7 +156,7 @@ public class AvlStore<E> extends Abstrac
         {
             parentDn = ( DN ) normName.clone();
             parentDn.remove( parentDn.size() - 1 );
-            parentId = getEntryId( parentDn.getNormName() );
+            parentId = getEntryId( parentDn );
         }
 
         // don't keep going if we cannot find the parent Id
@@ -380,9 +380,9 @@ public class AvlStore<E> extends Abstrac
     /**
      * {@inheritDoc}
      */
-    public Long getEntryId( String dn ) throws Exception
+    public Long getEntryId( DN dn ) throws Exception
     {
-        return ndnIdx.forwardLookup( dn );
+        return ndnIdx.forwardLookup( dn.getNormName() );
     }
 
 
@@ -1132,7 +1132,7 @@ public class AvlStore<E> extends Abstrac
             throw new Exception( I18n.err( I18n.ERR_215 ) );
         }
 
-        Long id = getEntryId( dn.getNormName() );
+        Long id = getEntryId( dn );
         ServerEntry entry = ( ServerEntry ) master.get( id );
 
         for ( AttributeType attributeType : mods.getAttributeTypes() )
@@ -1165,7 +1165,7 @@ public class AvlStore<E> extends Abstrac
 
     public void modify( DN dn, List<Modification> mods ) throws Exception
     {
-        Long id = getEntryId( dn.getNormName() );
+        Long id = getEntryId( dn );
         modify( id, mods );
     }
 
@@ -1203,7 +1203,7 @@ public class AvlStore<E> extends Abstrac
 
     public void move( DN oldChildDn, DN newParentDn, RDN newRdn, boolean deleteOldRdn ) throws Exception
     {
-        Long childId = getEntryId( oldChildDn.getNormName() );
+        Long childId = getEntryId( oldChildDn );
         rename( oldChildDn, newRdn, deleteOldRdn );
         DN newUpdn = move( oldChildDn, childId, newParentDn );
 
@@ -1216,7 +1216,7 @@ public class AvlStore<E> extends Abstrac
 
     public void move( DN oldChildDn, DN newParentDn ) throws Exception
     {
-        Long childId = getEntryId( oldChildDn.getNormName() );
+        Long childId = getEntryId( oldChildDn );
         DN newUpdn = move( oldChildDn, childId, newParentDn );
 
         // Update the current entry
@@ -1243,7 +1243,7 @@ public class AvlStore<E> extends Abstrac
     private DN move( DN oldChildDn, Long childId, DN newParentDn ) throws Exception
     {
         // Get the child and the new parent to be entries and Ids
-        Long newParentId = getEntryId( newParentDn.getNormName() );
+        Long newParentId = getEntryId( newParentDn );
         Long oldParentId = getParentId( childId );
 
         /*
@@ -1301,7 +1301,7 @@ public class AvlStore<E> extends Abstrac
     @SuppressWarnings("unchecked")
     public void rename( DN dn, RDN newRdn, boolean deleteOldRdn ) throws Exception
     {
-        Long id = getEntryId( dn.getNormName() );
+        Long id = getEntryId( dn );
         ServerEntry entry = lookup( id );
         DN updn = entry.getDn();
 
@@ -1733,7 +1733,7 @@ public class AvlStore<E> extends Abstrac
          */
         ancestorDn = ( DN ) aliasDn.clone();
         ancestorDn.remove( aliasDn.size() - 1 );
-        ancestorId = getEntryId( ancestorDn.getNormName() );
+        ancestorId = getEntryId( ancestorDn );
 
         // check if alias parent and aliased entry are the same
         DN normalizedAliasTargetParentDn = ( DN ) normalizedAliasTargetDn.clone();
@@ -1761,7 +1761,7 @@ public class AvlStore<E> extends Abstrac
             }
 
             ancestorDn.remove( ancestorDn.size() - 1 );
-            ancestorId = getEntryId( ancestorDn.getNormName() );
+            ancestorId = getEntryId( ancestorDn );
         }
     }
 
@@ -1778,13 +1778,13 @@ public class AvlStore<E> extends Abstrac
     private void dropAliasIndices( Long aliasId ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
-        Long targetId = getEntryId( targetDn );
+        Long targetId = getEntryId( new DN( targetDn ).normalize( schemaManager.getNormalizerMapping() ) );
         String aliasDn = getEntryDn( aliasId );
         DN aliasDN = ( DN ) new DN( aliasDn );
 
         DN ancestorDn = ( DN ) aliasDN.clone();
         ancestorDn.remove( aliasDN.size() - 1 );
-        Long ancestorId = getEntryId( ancestorDn.getNormName() );
+        Long ancestorId = getEntryId( ancestorDn );
 
         /*
          * We cannot just drop all tuples in the one level and subtree userIndices
@@ -1803,7 +1803,7 @@ public class AvlStore<E> extends Abstrac
         while ( !ancestorDn.equals( suffixDn ) && ancestorDn.size() > suffixDn.size() )
         {
             ancestorDn = ( DN ) ancestorDn.getPrefix( ancestorDn.size() - 1 );
-            ancestorId = getEntryId( ancestorDn.getNormName() );
+            ancestorId = getEntryId( ancestorDn );
 
             subAliasIdx.drop( ancestorId, targetId );
         }
@@ -1895,7 +1895,7 @@ public class AvlStore<E> extends Abstrac
         //            }
         //        };
 
-        Long movedBaseId = getEntryId( movedBase.getNormName() );
+        Long movedBaseId = getEntryId( movedBase );
 
         if ( aliasIdx.reverseLookup( movedBaseId ) != null )
         {
@@ -1926,7 +1926,7 @@ public class AvlStore<E> extends Abstrac
     private void dropAliasIndices( Long aliasId, DN movedBase ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
-        Long targetId = getEntryId( targetDn );
+        Long targetId = getEntryId( new DN( targetDn ).normalize( schemaManager.getNormalizerMapping() ) );
         String aliasDn = getEntryDn( aliasId );
 
         /*
@@ -1934,7 +1934,7 @@ public class AvlStore<E> extends Abstrac
          * moved base.  This is the first ancestor effected by the move.
          */
         DN ancestorDn = ( DN ) movedBase.getPrefix( 1 );
-        Long ancestorId = getEntryId( ancestorDn.getNormName() );
+        Long ancestorId = getEntryId( ancestorDn );
 
         /*
          * We cannot just drop all tuples in the one level and subtree userIndices
@@ -1958,7 +1958,7 @@ public class AvlStore<E> extends Abstrac
         while ( !ancestorDn.equals( suffixDn ) )
         {
             ancestorDn = ( DN ) ancestorDn.getPrefix( 1 );
-            ancestorId = getEntryId( ancestorDn.getNormName() );
+            ancestorId = getEntryId( ancestorDn );
 
             subAliasIdx.drop( ancestorId, targetId );
         }

Modified: directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlStoreTest.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlStoreTest.java (original)
+++ directory/apacheds/trunk/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlStoreTest.java Sat Apr 24 22:02:47 2010
@@ -403,7 +403,7 @@ public class AvlStoreTest
     {
         DN dn = new DN( "o=Good Times Co." );
         dn.normalize( schemaManager.getNormalizerMapping() );
-        assertEquals( 1L, ( long ) store.getEntryId( dn.getNormName() ) );
+        assertEquals( 1L, ( long ) store.getEntryId( dn ) );
         assertEquals( 11, store.count() );
         assertEquals( "o=Good Times Co.", store.getEntryUpdn( dn.getNormName() ) );
         assertEquals( dn.getNormName(), store.getEntryDn( 1L ) );
@@ -658,7 +658,7 @@ public class AvlStoreTest
 
         DN dn2 = new DN( "sn=Ja\\+es,ou=Engineering,o=Good Times Co." );
         dn2.normalize( schemaManager.getNormalizerMapping() );
-        Long id = store.getEntryId( dn2.getNormName() );
+        Long id = store.getEntryId( dn2 );
         assertNotNull( id );
         ServerEntry entry2 = store.lookup( id );
         assertEquals( "Ja+es", entry2.get( "sn" ).getString() );
@@ -717,7 +717,7 @@ public class AvlStoreTest
         Modification add = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attrib );
         mods.add( add );
 
-        ServerEntry lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        ServerEntry lookedup = store.lookup( store.getEntryId( dn ) );
 
         store.modify( dn, mods );
         assertTrue( lookedup.get( "sn" ).contains( attribVal ) );
@@ -728,7 +728,7 @@ public class AvlStoreTest
         entry.add( "telephoneNumber", attribVal );
 
         store.modify( dn, ModificationOperation.ADD_ATTRIBUTE, entry );
-        lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        lookedup = store.lookup( store.getEntryId( dn ) );
         assertTrue( lookedup.get( "telephoneNumber" ).contains( attribVal ) );
     }
 
@@ -749,7 +749,7 @@ public class AvlStoreTest
         Modification add = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );
         mods.add( add );
 
-        ServerEntry lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        ServerEntry lookedup = store.lookup( store.getEntryId( dn ) );
 
         assertEquals( "WAlkeR", lookedup.get( "sn" ).get().getString() ); // before replacing
 
@@ -779,7 +779,7 @@ public class AvlStoreTest
         Modification add = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attrib );
         mods.add( add );
 
-        ServerEntry lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        ServerEntry lookedup = store.lookup( store.getEntryId( dn ) );
 
         assertNotNull( lookedup.get( "sn" ).get() );
 
@@ -822,7 +822,7 @@ public class AvlStoreTest
         Modification add = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );
         mods.add( add );
 
-        ServerEntry lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        ServerEntry lookedup = store.lookup( store.getEntryId( dn ) );
 
         assertNull( lookedup.get( "ou" ) ); // before replacing
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java Sat Apr 24 22:02:47 2010
@@ -55,7 +55,7 @@ public class ScopeEvaluator implements E
                 return dn.equals( snode.getBaseDn() );
             
             case ONELEVEL:
-                if ( dn.endsWith( snode.getBaseDn() ) )
+                if ( dn.endsWith( snode.getBaseDn().getNormName() ) )
                 {
                     DN candidateDn = new DN( dn );
                     DN scopeDn = new DN( snode.getBaseDn() );
@@ -63,7 +63,7 @@ public class ScopeEvaluator implements E
                 }
             
             case SUBTREE:
-                return dn.endsWith( snode.getBaseDn() );
+                return dn.endsWith( snode.getBaseDn().getNormName() );
             
             default:
                 throw new LdapInvalidSearchFilterException( I18n.err( I18n.ERR_247 ) );

Modified: directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java (original)
+++ directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java Sat Apr 24 22:02:47 2010
@@ -1040,7 +1040,7 @@ public class ConfigPartitionReader
 
     private ChangeLog getChangeLog( DN changelogDN ) throws Exception
     {
-        long id = configPartition.getEntryId( changelogDN.getNormName() );
+        long id = configPartition.getEntryId( changelogDN );
         Entry clEntry = configPartition.lookup( id );
 
         ChangeLog cl = new DefaultChangeLog();
@@ -1064,7 +1064,7 @@ public class ConfigPartitionReader
 
     private Journal getJournal( DN journalDN ) throws Exception
     {
-        long id = configPartition.getEntryId( journalDN.getNormName() );
+        long id = configPartition.getEntryId( journalDN );
         Entry jlEntry = configPartition.lookup( id );
 
         Journal journal = new DefaultJournal();

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Sat Apr 24 22:02:47 2010
@@ -813,19 +813,6 @@ public class JdbmStore<E> extends Abstra
     /**
      * @see #getEntryId(DN)
      */
-    public Long getEntryId( String dn ) throws Exception
-    {
-        return getEntryId( new DN( dn ) );
-    }
-
-
-    /**
-     * gets the entry id of the given DN using RDN index
-     *
-     * @param dn the DN of the entry
-     * @return id of the entry represented by the given DN
-     * @throws Exception
-     */
     public Long getEntryId( DN dn ) throws Exception
     {
         if( !dn.isNormalized() )
@@ -1011,7 +998,7 @@ public class JdbmStore<E> extends Abstra
     private void dropAliasIndices( Long aliasId ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
-        Long targetId = getEntryId( targetDn );
+        Long targetId = getEntryId( new DN( targetDn ).normalize( schemaManager.getNormalizerMapping() ) );
         String aliasDn = getEntryDn( aliasId );
         DN aliasDN = ( DN ) new DN( aliasDn );
 
@@ -1036,7 +1023,7 @@ public class JdbmStore<E> extends Abstra
         while ( !ancestorDn.equals( suffixDn ) && ancestorDn.size() > suffixDn.size() )
         {
             ancestorDn = ( DN ) ancestorDn.getPrefix( ancestorDn.size() - 1 );
-            ancestorId = getEntryId( ancestorDn.getNormName() );
+            ancestorId = getEntryId( ancestorDn );
 
             subAliasIdx.drop( ancestorId, targetId );
         }
@@ -1186,7 +1173,7 @@ public class JdbmStore<E> extends Abstra
             }
 
             ancestorDn.remove( ancestorDn.size() - 1 );
-            ancestorId = getEntryId( ancestorDn.getNormName() );
+            ancestorId = getEntryId( ancestorDn );
         }
     }
 
@@ -1690,7 +1677,7 @@ public class JdbmStore<E> extends Abstra
             throw new Exception( I18n.err( I18n.ERR_215 ) );
         }
 
-        Long id = getEntryId( dn.getNormName() );
+        Long id = getEntryId( dn );
         ServerEntry entry = ( ServerEntry ) master.get( id );
 
         for ( AttributeType attributeType : mods.getAttributeTypes() )
@@ -1728,7 +1715,7 @@ public class JdbmStore<E> extends Abstra
 
     public void modify( DN dn, List<Modification> mods ) throws Exception
     {
-        Long id = getEntryId( dn.getNormName() );
+        Long id = getEntryId( dn );
         ServerEntry entry = ( ServerEntry ) master.get( id );
 
         for ( Modification mod : mods )
@@ -2140,7 +2127,7 @@ public class JdbmStore<E> extends Abstra
         //            }
         //        };
 
-        Long movedBaseId = getEntryId( movedBase.getNormName() );
+        Long movedBaseId = getEntryId( movedBase );
 
         if ( aliasIdx.reverseLookup( movedBaseId ) != null )
         {
@@ -2171,7 +2158,7 @@ public class JdbmStore<E> extends Abstra
     private void dropAliasIndices( Long aliasId, DN movedBase ) throws Exception
     {
         String targetDn = aliasIdx.reverseLookup( aliasId );
-        Long targetId = getEntryId( targetDn );
+        Long targetId = getEntryId( new DN( targetDn ).normalize( schemaManager.getNormalizerMapping() ) );
         String aliasDn = getEntryDn( aliasId );
 
         /*
@@ -2179,7 +2166,7 @@ public class JdbmStore<E> extends Abstra
          * moved base.  This is the first ancestor effected by the move.
          */
         DN ancestorDn = ( DN ) movedBase.getPrefix( 1 );
-        Long ancestorId = getEntryId( ancestorDn.getNormName() );
+        Long ancestorId = getEntryId( ancestorDn );
 
         /*
          * We cannot just drop all tuples in the one level and subtree userIndices
@@ -2203,7 +2190,7 @@ public class JdbmStore<E> extends Abstra
         while ( !ancestorDn.equals( suffixDn ) )
         {
             ancestorDn = ( DN ) ancestorDn.getPrefix( 1 );
-            ancestorId = getEntryId( ancestorDn.getNormName() );
+            ancestorId = getEntryId( ancestorDn );
 
             subAliasIdx.drop( ancestorId, targetId );
         }

Modified: directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java Sat Apr 24 22:02:47 2010
@@ -457,7 +457,7 @@ public class JdbmStoreTest
     {
         DN dn = new DN( "o=Good Times Co." );
         dn.normalize( schemaManager.getNormalizerMapping() );
-        assertEquals( 1L, ( long ) store.getEntryId( dn.getNormName() ) );
+        assertEquals( 1L, ( long ) store.getEntryId( dn ) );
         assertEquals( 11, store.count() );
         assertEquals( "o=Good Times Co.", store.getEntryUpdn( dn.getName() ) );
         assertEquals( dn.getNormName(), store.getEntryDn( 1L ) );
@@ -712,7 +712,7 @@ public class JdbmStoreTest
 
         DN dn2 = new DN( "sn=Ja\\+es,ou=Engineering,o=Good Times Co." );
         dn2.normalize( schemaManager.getNormalizerMapping() );
-        Long id = store.getEntryId( dn2.getNormName() );
+        Long id = store.getEntryId( dn2 );
         assertNotNull( id );
         ServerEntry entry2 = store.lookup( id );
         assertEquals( "Ja+es", entry2.get( "sn" ).getString() );
@@ -771,7 +771,7 @@ public class JdbmStoreTest
         Modification add = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attrib );
         mods.add( add );
 
-        ServerEntry lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        ServerEntry lookedup = store.lookup( store.getEntryId( dn ) );
 
         store.modify( dn, mods );
         assertTrue( lookedup.get( "sn" ).contains( attribVal ) );
@@ -782,7 +782,7 @@ public class JdbmStoreTest
         entry.add( "telephoneNumber", attribVal );
 
         store.modify( dn, ModificationOperation.ADD_ATTRIBUTE, entry );
-        lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        lookedup = store.lookup( store.getEntryId( dn ) );
         assertTrue( lookedup.get( "telephoneNumber" ).contains( attribVal ) );
     }
 
@@ -803,7 +803,7 @@ public class JdbmStoreTest
         Modification add = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );
         mods.add( add );
 
-        ServerEntry lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        ServerEntry lookedup = store.lookup( store.getEntryId( dn ) );
 
         assertEquals( "WAlkeR", lookedup.get( "sn" ).get().getString() ); // before replacing
 
@@ -833,7 +833,7 @@ public class JdbmStoreTest
         Modification add = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, attrib );
         mods.add( add );
 
-        ServerEntry lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        ServerEntry lookedup = store.lookup( store.getEntryId( dn ) );
 
         assertNotNull( lookedup.get( "sn" ).get() );
 
@@ -876,7 +876,7 @@ public class JdbmStoreTest
         Modification add = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );
         mods.add( add );
 
-        ServerEntry lookedup = store.lookup( store.getEntryId( dn.getNormName() ) );
+        ServerEntry lookedup = store.lookup( store.getEntryId( dn ) );
 
         assertNull( lookedup.get( "ou" ) ); // before replacing
 

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java (original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java Sat Apr 24 22:02:47 2010
@@ -311,7 +311,7 @@ public class LdifPartition extends BTree
     @Override
     public void modify( ModifyOperationContext modifyContext ) throws Exception
     {
-        Long id = getEntryId( modifyContext.getDn().getNormName() );
+        Long id = getEntryId( modifyContext.getDn() );
 
         wrappedPartition.modify( id, modifyContext.getModItems() );
 
@@ -336,7 +336,7 @@ public class LdifPartition extends BTree
     public void move( MoveOperationContext moveContext ) throws Exception
     {
         DN oldDn = moveContext.getDn();
-        Long id = getEntryId( oldDn.getNormName() );
+        Long id = getEntryId( oldDn );
 
         wrappedPartition.move( moveContext );
 
@@ -354,7 +354,7 @@ public class LdifPartition extends BTree
     public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws Exception
     {
         DN oldDn = moveAndRenameContext.getDn();
-        Long id = getEntryId( oldDn.getNormName() );
+        Long id = getEntryId( oldDn );
 
         wrappedPartition.moveAndRename( moveAndRenameContext );
 
@@ -373,7 +373,7 @@ public class LdifPartition extends BTree
     public void rename( RenameOperationContext renameContext ) throws Exception
     {
         DN oldDn = renameContext.getDn();
-        Long id = getEntryId( oldDn.getNormName() );
+        Long id = getEntryId( oldDn );
 
         // Create the new entry 
         wrappedPartition.rename( renameContext );
@@ -807,7 +807,7 @@ public class LdifPartition extends BTree
 
 
     @Override
-    public Long getEntryId( String dn ) throws Exception
+    public Long getEntryId( DN dn ) throws Exception
     {
         return wrappedPartition.getEntryId( dn );
     }

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifStore.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifStore.java (original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifStore.java Sat Apr 24 22:02:47 2010
@@ -303,7 +303,7 @@ public class LdifStore<E> extends Abstra
     }
 
 
-    public Long getEntryId( String dn ) throws Exception
+    public Long getEntryId( DN dn ) throws Exception
     {
         return wrappedStore.getEntryId( dn );
     }

Modified: directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java (original)
+++ directory/apacheds/trunk/ldif-partition/src/test/java/org/apache/directory/server/core/partition/LdifPartitionTest.java Sat Apr 24 22:02:47 2010
@@ -430,8 +430,8 @@ public class LdifPartitionTest
     {
         CoreSession session = injectEntries();
 
-        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new DN( "dc=child1,ou=test,ou=system" ).normalize( schemaManager.getNormalizerMapping() ).getNormName() ) );
-        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new DN( "dc=child2,ou=test,ou=system" ).normalize( schemaManager.getNormalizerMapping() ).getNormName() ) );
+        ClonedServerEntry childEntry1 = partition.lookup( partition.getEntryId( new DN( "dc=child1,ou=test,ou=system" ).normalize( schemaManager.getNormalizerMapping() ) ) );
+        ClonedServerEntry childEntry2 = partition.lookup( partition.getEntryId( new DN( "dc=child2,ou=test,ou=system" ).normalize( schemaManager.getNormalizerMapping() ) ) );
         
         MoveOperationContext moveOpCtx = new MoveOperationContext( session, childEntry1.getDn(), childEntry2.getDn() );
         partition.move( moveOpCtx );

Modified: directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Sat Apr 24 22:02:47 2010
@@ -255,7 +255,7 @@ public abstract class BTreePartition<ID>
     {
         DN dn = opContext.getDn();
 
-        ID id = getEntryId( dn.getNormName() );
+        ID id = getEntryId( dn );
 
         // don't continue if id is null
         if ( id == null )
@@ -283,7 +283,7 @@ public abstract class BTreePartition<ID>
     public EntryFilteringCursor list( ListOperationContext opContext ) throws Exception
     {
         return new BaseEntryFilteringCursor( new ServerEntryCursorAdaptor<ID>( this, list( getEntryId( opContext
-            .getDn().getNormName() ) ) ), opContext );
+            .getDn() ) ) ), opContext );
     }
 
 
@@ -301,7 +301,7 @@ public abstract class BTreePartition<ID>
 
     public ClonedServerEntry lookup( LookupOperationContext opContext ) throws Exception
     {
-        ID id = getEntryId( opContext.getDn().getNormName() );
+        ID id = getEntryId( opContext.getDn() );
 
         if ( id == null )
         {
@@ -329,7 +329,7 @@ public abstract class BTreePartition<ID>
 
     public boolean hasEntry( EntryOperationContext opContext ) throws Exception
     {
-        return null != getEntryId( opContext.getDn().getNormName() );
+        return null != getEntryId( opContext.getDn() );
     }
 
 
@@ -539,7 +539,7 @@ public abstract class BTreePartition<ID>
     public abstract Index<? extends Object, ServerEntry, ID> getSystemIndex( String attribute ) throws Exception;
 
 
-    public abstract ID getEntryId( String dn ) throws Exception;
+    public abstract ID getEntryId( DN dn ) throws Exception;
 
 
     public abstract String getEntryDn( ID id ) throws Exception;

Modified: directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/AbstractXdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/AbstractXdbmPartition.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/AbstractXdbmPartition.java (original)
+++ directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/AbstractXdbmPartition.java Sat Apr 24 22:02:47 2010
@@ -274,7 +274,7 @@ public abstract class AbstractXdbmPartit
     }
 
 
-    public final ID getEntryId( String dn ) throws Exception
+    public final ID getEntryId( DN dn ) throws Exception
     {
         return store.getEntryId( dn );
     }

Modified: directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java (original)
+++ directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java Sat Apr 24 22:02:47 2010
@@ -451,7 +451,7 @@ public interface Store<E, ID>
     Index<?, E, ID> getSystemIndex( String id ) throws IndexNotFoundException;
 
 
-    ID getEntryId( String dn ) throws Exception;
+    ID getEntryId( DN dn ) throws Exception;
 
 
     String getEntryDn( ID id ) throws Exception;

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java Sat Apr 24 22:02:47 2010
@@ -74,7 +74,7 @@ public class DefaultOptimizer<E, ID> imp
         {
             try
             {
-                this.contextEntryId = db.getEntryId( db.getSuffixDn().getNormName() );
+                this.contextEntryId = db.getEntryId( db.getSuffixDn() );
             }
             catch ( Exception e )
             {

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java Sat Apr 24 22:02:47 2010
@@ -100,7 +100,7 @@ public class DefaultSearchEngine<ID> imp
         SearchControls searchCtls ) throws Exception
     {
         DN effectiveBase;
-        ID baseId = db.getEntryId( base.getNormName() );
+        ID baseId = db.getEntryId( base );
 
         // Check that we have an entry, otherwise we can immediately get out
         if ( baseId == null )
@@ -144,7 +144,7 @@ public class DefaultSearchEngine<ID> imp
             ID effectiveBaseId = baseId;
             if ( effectiveBase != base )
             {
-                effectiveBaseId = db.getEntryId( effectiveBase.getNormName() );
+                effectiveBaseId = db.getEntryId( effectiveBase );
             }
 
             IndexEntry<ID, ServerEntry, ID> indexEntry = new ForwardIndexEntry<ID, ServerEntry, ID>();
@@ -164,7 +164,7 @@ public class DefaultSearchEngine<ID> imp
 
         // Add the scope node using the effective base to the filter
         BranchNode root = new AndNode();
-        ExprNode node = new ScopeNode( aliasDerefMode, effectiveBase.getNormName(), SearchScope.getSearchScope( searchCtls
+        ExprNode node = new ScopeNode( aliasDerefMode, effectiveBase, SearchScope.getSearchScope( searchCtls
             .getSearchScope() ) );
         root.getChildren().add( node );
         root.getChildren().add( filter );

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java Sat Apr 24 22:02:47 2010
@@ -100,7 +100,7 @@ public class SubtreeScopeCursor<ID> exte
         {
             try
             {
-                this.contextEntryId = db.getEntryId( db.getSuffixDn().getNormName() );
+                this.contextEntryId = db.getEntryId( db.getSuffixDn() );
             }
             catch ( Exception e )
             {

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java Sat Apr 24 22:02:47 2010
@@ -93,7 +93,7 @@ public class SubtreeScopeEvaluator<E, ID
         {
             try
             {
-                this.contextEntryId = db.getEntryId( db.getSuffixDn().getNormName() );
+                this.contextEntryId = db.getEntryId( db.getSuffixDn() );
             }
             catch ( Exception e )
             {

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java Sat Apr 24 22:02:47 2010
@@ -127,8 +127,8 @@ public class OneLevelScopeTest
         store.setPartitionDir( wkdir );
         store.setSyncOnWrite( true );
 
-        store.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID ) );
-        store.addIndex( new JdbmIndex( SchemaConstants.CN_AT_OID ) );
+        store.addIndex( new JdbmIndex<String, ServerEntry>( SchemaConstants.OU_AT_OID ) );
+        store.addIndex( new JdbmIndex<String, ServerEntry>( SchemaConstants.CN_AT_OID ) );
         StoreUtils.loadExampleData( store, schemaManager );
         LOG.debug( "Created new store" );
     }
@@ -155,8 +155,8 @@ public class OneLevelScopeTest
     @Test
     public void testCursorNoDeref() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
         OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
@@ -187,7 +187,7 @@ public class OneLevelScopeTest
 
         // --------- Test first() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.first();
 
@@ -209,7 +209,7 @@ public class OneLevelScopeTest
 
         // --------- Test afterLast() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -232,7 +232,7 @@ public class OneLevelScopeTest
 
         // --------- Test last() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.last();
 
@@ -254,7 +254,7 @@ public class OneLevelScopeTest
 
         // --------- Test previous() before positioning ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.previous();
 
@@ -276,7 +276,7 @@ public class OneLevelScopeTest
 
         // --------- Test next() before positioning ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.next();
 
@@ -301,8 +301,8 @@ public class OneLevelScopeTest
     @Test
     public void testCursorNoDerefReturnAliases() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=engineering,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=engineering," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
         OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
@@ -333,7 +333,7 @@ public class OneLevelScopeTest
 
         // --------- Test first() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.first();
 
@@ -355,7 +355,7 @@ public class OneLevelScopeTest
 
         // --------- Test afterLast() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -378,7 +378,7 @@ public class OneLevelScopeTest
 
         // --------- Test last() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.last();
 
@@ -400,7 +400,7 @@ public class OneLevelScopeTest
 
         // --------- Test previous() before positioning ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.previous();
 
@@ -422,7 +422,7 @@ public class OneLevelScopeTest
 
         // --------- Test next() before positioning ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.next();
 
@@ -447,8 +447,8 @@ public class OneLevelScopeTest
     @Test
     public void testCursorWithDereferencing() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID
-            + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, new DN( SchemaConstants.OU_AT_OID
+            + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
         OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
@@ -479,7 +479,7 @@ public class OneLevelScopeTest
 
         // --------- Test first() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.first();
 
@@ -501,7 +501,7 @@ public class OneLevelScopeTest
 
         // --------- Test afterLast() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -524,7 +524,7 @@ public class OneLevelScopeTest
 
         // --------- Test last() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.last();
 
@@ -546,7 +546,7 @@ public class OneLevelScopeTest
 
         // --------- Test previous() before positioning ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.previous();
 
@@ -571,9 +571,9 @@ public class OneLevelScopeTest
     @Test
     public void testCursorWithDereferencing2() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID + "=apache,"
-            + SchemaConstants.OU_AT_OID + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.",
-            SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, new DN( SchemaConstants.OU_AT_OID
+            + "=apache," + SchemaConstants.OU_AT_OID + "=board of directors," + SchemaConstants.O_AT_OID
+            + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
         OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
@@ -597,7 +597,7 @@ public class OneLevelScopeTest
 
         // --------- Test first() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.first();
 
@@ -612,7 +612,7 @@ public class OneLevelScopeTest
 
         // --------- Test afterLast() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -628,7 +628,7 @@ public class OneLevelScopeTest
 
         // --------- Test last() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.last();
 
@@ -643,7 +643,7 @@ public class OneLevelScopeTest
 
         // --------- Test previous() before positioning ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.previous();
 
@@ -685,8 +685,8 @@ public class OneLevelScopeTest
         attrs.add( "entryUUID", UUID.randomUUID().toString() );
         store.add( attrs );
 
-        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID
-            + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, new DN( SchemaConstants.OU_AT_OID
+            + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
         OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
@@ -731,7 +731,7 @@ public class OneLevelScopeTest
 
         // --------- Test first() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.first();
 
@@ -767,7 +767,7 @@ public class OneLevelScopeTest
 
         // --------- Test afterLast() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -804,7 +804,7 @@ public class OneLevelScopeTest
 
         // --------- Test last() ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.last();
 
@@ -840,7 +840,7 @@ public class OneLevelScopeTest
 
         // --------- Test previous() before positioning ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.previous();
 
@@ -876,7 +876,7 @@ public class OneLevelScopeTest
 
         // --------- Test next() before positioning ---------
 
-        cursor = new OneLevelScopeCursor( store, evaluator );
+        cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.next();
 
@@ -915,8 +915,8 @@ public class OneLevelScopeTest
     @Test
     public void testEvaluatorNoDereferencing() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
 
@@ -929,8 +929,8 @@ public class OneLevelScopeTest
     @Test
     public void testEvaluatorWithDereferencing() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_ALWAYS, SchemaConstants.OU_AT_OID + "=engineering,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_ALWAYS, new DN( SchemaConstants.OU_AT_OID
+            + "=engineering," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
         assertEquals( node, evaluator.getExpression() );
@@ -961,11 +961,11 @@ public class OneLevelScopeTest
     @Test(expected = InvalidCursorPositionException.class)
     public void testInvalidCursorPositionException() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
-        OneLevelScopeCursor cursor = new OneLevelScopeCursor( store, evaluator );
+        OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
         cursor.get();
     }
 
@@ -973,11 +973,11 @@ public class OneLevelScopeTest
     @Test(expected = UnsupportedOperationException.class)
     public void testUnsupportBeforeWithoutIndex() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
-        OneLevelScopeCursor cursor = new OneLevelScopeCursor( store, evaluator );
+        OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
 
         // test before()
         ForwardIndexEntry<Long, ServerEntry, Long> entry = new ForwardIndexEntry<Long, ServerEntry, Long>();
@@ -989,11 +989,11 @@ public class OneLevelScopeTest
     @Test(expected = UnsupportedOperationException.class)
     public void testUnsupportAfterWithoutIndex() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
             node );
-        OneLevelScopeCursor cursor = new OneLevelScopeCursor( store, evaluator );
+        OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
 
         // test after()
         ForwardIndexEntry<Long, ServerEntry, Long> entry = new ForwardIndexEntry<Long, ServerEntry, Long>();
@@ -1005,8 +1005,8 @@ public class OneLevelScopeTest
     @Test(expected = IllegalStateException.class)
     public void testIllegalStateBadScope() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
         new OneLevelScopeEvaluator<ServerEntry, Long>( store, node );
     }
 }
\ No newline at end of file

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java Sat Apr 24 22:02:47 2010
@@ -127,8 +127,8 @@ public class SubtreeScopeTest
         store.setPartitionDir( wkdir );
         store.setSyncOnWrite( true );
 
-        store.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID ) );
-        store.addIndex( new JdbmIndex( SchemaConstants.CN_AT_OID ) );
+        store.addIndex( new JdbmIndex<String, ServerEntry>( SchemaConstants.OU_AT_OID ) );
+        store.addIndex( new JdbmIndex<String, ServerEntry>( SchemaConstants.CN_AT_OID ) );
         StoreUtils.loadExampleData( store, schemaManager );
         LOG.debug( "Created new store" );
     }
@@ -155,8 +155,8 @@ public class SubtreeScopeTest
     @Test
     public void testCursorNoDeref() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
@@ -313,8 +313,8 @@ public class SubtreeScopeTest
     @Test
     public void testCursorWithDereferencing() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID
-            + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, new DN( SchemaConstants.OU_AT_OID
+            + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
@@ -500,9 +500,9 @@ public class SubtreeScopeTest
     @Test
     public void testCursorWithDereferencing2() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID + "=apache,"
-            + SchemaConstants.OU_AT_OID + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.",
-            SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, new DN( SchemaConstants.OU_AT_OID
+            + "=apache," + SchemaConstants.OU_AT_OID + "=board of directors," + SchemaConstants.O_AT_OID
+            + "=good times co." ), SearchScope.SUBTREE );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
@@ -648,8 +648,8 @@ public class SubtreeScopeTest
         attrs.add( "entryUUID", UUID.randomUUID().toString() );
         store.add( attrs );
 
-        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID
-            + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, new DN( SchemaConstants.OU_AT_OID
+            + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
@@ -913,8 +913,8 @@ public class SubtreeScopeTest
     @Test
     public void testEvaluatorNoDereferencing() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
 
         ForwardIndexEntry<Long, ServerEntry, Long> indexEntry = new ForwardIndexEntry<Long, ServerEntry, Long>();
@@ -926,8 +926,8 @@ public class SubtreeScopeTest
     @Test
     public void testEvaluatorWithDereferencing() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_ALWAYS, SchemaConstants.OU_AT_OID + "=engineering,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_ALWAYS, new DN( SchemaConstants.OU_AT_OID
+            + "=engineering," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         assertEquals( node, evaluator.getExpression() );
 
@@ -952,8 +952,8 @@ public class SubtreeScopeTest
     @Test(expected = InvalidCursorPositionException.class)
     public void testInvalidCursorPositionException() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         cursor.get();
@@ -963,8 +963,8 @@ public class SubtreeScopeTest
     @Test(expected = UnsupportedOperationException.class)
     public void testUnsupportBeforeWithoutIndex() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
@@ -978,8 +978,8 @@ public class SubtreeScopeTest
     @Test(expected = UnsupportedOperationException.class)
     public void testUnsupportAfterWithoutIndex() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.SUBTREE );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
@@ -993,8 +993,8 @@ public class SubtreeScopeTest
     @Test(expected = IllegalStateException.class)
     public void testIllegalStateBadScope() throws Exception
     {
-        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
-            + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
+        ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, new DN( SchemaConstants.OU_AT_OID
+            + "=sales," + SchemaConstants.O_AT_OID + "=good times co." ), SearchScope.ONELEVEL );
         SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         assertNull( evaluator );
     }

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=937709&r1=937708&r2=937709&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Sat Apr 24 22:02:47 2010
@@ -470,7 +470,7 @@ public class PartitionFrame extends JFra
 
                 ServerEntry attrs = new DefaultServerEntry( schemaManager, entry.getEntry() );
 
-                if ( null == partition.getEntryId( ndn.getNormName() ) )
+                if ( null == partition.getEntryId( ndn ) )
                 {
                     partition.add( new AddOperationContext( null, attrs ) );
                     load();
@@ -885,8 +885,8 @@ public class PartitionFrame extends JFra
         // boolean doFiltered = false;
         nodes = new HashMap<Long, EntryNode>();
 
-        ServerEntry suffix = partition.lookup( partition.getEntryId( partition.getSuffixDn().getNormName() ) );
-        Long id = partition.getEntryId( partition.getSuffixDn().getName() );
+        ServerEntry suffix = partition.lookup( partition.getEntryId( partition.getSuffixDn() ) );
+        Long id = partition.getEntryId( partition.getSuffixDn() );
         root = new EntryNode( id, null, partition, suffix, nodes );
 
         /*



Mime
View raw message