directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r810360 - in /directory/apacheds/branches/apacheds-schema/avl-partition: ./ src/main/java/org/apache/directory/server/core/partition/avl/ src/test/java/org/apache/directory/server/core/partition/avl/
Date Wed, 02 Sep 2009 04:59:14 GMT
Author: kayyagari
Date: Wed Sep  2 04:59:13 2009
New Revision: 810360

URL: http://svn.apache.org/viewvc?rev=810360&view=rev
Log:
initial commit after applying changes according to the refactoring of schema subsystem

Modified:
    directory/apacheds/branches/apacheds-schema/avl-partition/pom.xml
    directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java
    directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
    directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
    directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTable.java
    directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTableDupsCursor.java
    directory/apacheds/branches/apacheds-schema/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/pom.xml?rev=810360&r1=810359&r2=810360&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/pom.xml (original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/pom.xml Wed Sep  2 04:59:13 2009
@@ -24,7 +24,7 @@
   <parent>
     <groupId>org.apache.directory.server</groupId>
     <artifactId>apacheds-parent</artifactId>
-    <version>1.5.5-SNAPSHOT</version>
+    <version>1.5.6-SNAPSHOT</version>
   </parent>
   <artifactId>apacheds-avl-partition</artifactId>
   <name>ApacheDS Avl Partition</name>
@@ -37,43 +37,37 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-schema-bootstrap</artifactId>
-      <version>${pom.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-core-entry</artifactId>
       <version>${pom.version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-core-api</artifactId>
+      <artifactId>apacheds-core-avl</artifactId>
       <version>${pom.version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-core-avl</artifactId>
+      <artifactId>apacheds-schema-registries</artifactId>
       <version>${pom.version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-schema-registries</artifactId>
+      <artifactId>apacheds-core-shared</artifactId>
       <version>${pom.version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-core-shared</artifactId>
+      <artifactId>apacheds-core-constants</artifactId>
       <version>${pom.version}</version>
     </dependency>
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
-      <artifactId>apacheds-core-constants</artifactId>
+      <artifactId>apacheds-core</artifactId>
       <version>${pom.version}</version>
     </dependency>
 
@@ -88,6 +82,17 @@
       <artifactId>apacheds-xdbm-search</artifactId>
       <version>${pom.version}</version>
     </dependency>
+    
+    <dependency>
+      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldap</artifactId>
+      <version>${org.apache.directory.shared.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.shared</groupId>
+      <artifactId>shared-ldap-constants</artifactId>
+      <version>${org.apache.directory.shared.version}</version>
+    </dependency>    
   </dependencies>
 
   <build>

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java?rev=810360&r1=810359&r2=810360&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java (original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java Wed Sep  2 04:59:13 2009
@@ -20,15 +20,20 @@
 package org.apache.directory.server.core.partition.avl;
 
 
-import org.apache.directory.server.core.cursor.Cursor;
+import java.io.File;
+
+import org.apache.directory.server.core.partition.impl.btree.IndexCursorAdaptor;
+import org.apache.directory.server.core.partition.impl.btree.LongComparator;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexCursor;
-import org.apache.directory.server.xdbm.IndexCursorAdaptor;
-import org.apache.directory.server.xdbm.NoNormalizerOnIndexException;
 import org.apache.directory.server.xdbm.Tuple;
+import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.Normalizer;
+import org.apache.directory.shared.ldap.schema.comparators.SerializableComparator;
 
 
 /**
@@ -46,10 +51,16 @@
     private String attributeId;
     
     
-    public AvlIndex() throws Exception
+    public AvlIndex()
     {
     }
+
     
+    public AvlIndex( String attributeId )
+    {
+        setAttributeId( attributeId );
+    }
+
     
     void initialize( AttributeType attributeType ) throws Exception
     {
@@ -64,14 +75,47 @@
         
         if ( mr == null )
         {
-            mr = attributeType.getSubstr();
+            mr = attributeType.getSubstring();
         }
 
         normalizer = mr.getNormalizer();
         
         if ( normalizer == null )
         {
-            throw new NoNormalizerOnIndexException();
+            throw new Exception( "No Normalizer present for attribute type " + attributeType );
+        }
+
+        LdapComparator comp = mr.getLdapComparator();
+
+        /*
+         * The forward key/value map stores attribute values to master table 
+         * primary keys.  A value for an attribute can occur several times in
+         * different entries so the forward map can have more than one value.
+         */
+        forward = new AvlTable<K, Long>(
+            attributeType.getName(), 
+            comp, LongComparator.INSTANCE, true);
+
+        /*
+         * Now the reverse map stores the primary key into the master table as
+         * the key and the values of attributes as the value.  If an attribute
+         * is single valued according to its specification based on a schema 
+         * then duplicate keys should not be allowed within the reverse table.
+         */
+        if ( attributeType.isSingleValued() )
+        {
+            reverse = new AvlTable<Long,K>(
+                attributeType.getName(),
+                LongComparator.INSTANCE,
+                comp,
+                false );
+        }
+        else
+        {
+            reverse = new AvlTable<Long,K>(
+                attributeType.getName(),
+                LongComparator.INSTANCE, comp,
+                true);
         }
     }
 
@@ -253,7 +297,19 @@
     @SuppressWarnings("unchecked")
     public K getNormalized( K attrVal ) throws Exception
     {
-        return ( K ) normalizer.normalize( attrVal );
+        if( attrVal instanceof Long )
+        {
+            return attrVal;
+        }
+
+        if( attrVal instanceof String )
+        {
+            return ( K ) normalizer.normalize( ( String ) attrVal );
+        }
+        else
+        {
+            return ( K ) normalizer.normalize( new ClientBinaryValue( ( byte[] ) attrVal ) );
+        }
     }
 
 
@@ -384,6 +440,39 @@
         this.attributeId = attributeId;
     }
 
+    
+    /**
+     * throws UnsupportedOperationException cause it is a in-memory index
+     */
+    public void setWkDirPath( File wkDirPath )
+    {
+        throw new UnsupportedOperationException( "in memory index cannot store the data on disk" );
+    }
+
+    
+    /**
+     * this method always returns null for AvlIndex cause this is a in-memory index.
+     */
+    public File getWkDirPath()
+    {
+        return null;
+    }
+
+    
+    /**
+     * throws UnsupportedOperationException cause it is a in-memory index
+     */
+    public void setCacheSize( int cacheSize )
+    {
+        throw new UnsupportedOperationException( "in memory index doesn't support explicit caching" );
+    }
+
+    
+    public int getCacheSize()
+    {
+        return 0;
+    }
+
 
     /**
      * {@inheritDoc}

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java?rev=810360&r1=810359&r2=810360&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java (original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java Wed Sep  2 04:59:13 2009
@@ -21,19 +21,32 @@
 
 
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.Set;
 
 import org.apache.directory.server.constants.ApacheSchemaConstants;
+import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
-import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.server.core.interceptor.context.AddOperationContext;
+import org.apache.directory.server.core.interceptor.context.BindOperationContext;
+import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
+import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
+import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
 import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.server.xdbm.XdbmPartition;
+import org.apache.directory.server.xdbm.IndexCursor;
+import org.apache.directory.server.xdbm.IndexNotFoundException;
 import org.apache.directory.server.xdbm.search.impl.CursorBuilder;
 import org.apache.directory.server.xdbm.search.impl.DefaultOptimizer;
 import org.apache.directory.server.xdbm.search.impl.DefaultSearchEngine;
 import org.apache.directory.server.xdbm.search.impl.EvaluatorBuilder;
 import org.apache.directory.server.xdbm.search.impl.NoOpOptimizer;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.schema.registries.Registries;
 
 
 /**
@@ -42,26 +55,32 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AvlPartition extends XdbmPartition
+public class AvlPartition extends BTreePartition
 {
     private boolean optimizerEnabled = true;
-    private Set<AvlIndex<?,ServerEntry>> indexedAttributes;
+    private Set<AvlIndex<?, ServerEntry>> indexedAttributes;
     private String suffix;
-    
-    
+
+    private AvlStore<ServerEntry> store;
+
+
     // ------------------------------------------------------------------------
     // C O N S T R U C T O R S
     // ------------------------------------------------------------------------
 
-
     /**
      * Creates a store based on AVL Trees.
      */
     public AvlPartition()
     {
-        super();
-        super.setStore( new AvlStore<ServerEntry>() );
-        indexedAttributes = new HashSet<AvlIndex<?,ServerEntry>>();
+        store = new AvlStore<ServerEntry>();
+        indexedAttributes = new HashSet<AvlIndex<?, ServerEntry>>();
+    }
+
+
+    public void init( DirectoryService dirService ) throws Exception
+    {
+        initRegistries( dirService.getRegistries() );
     }
 
 
@@ -69,80 +88,80 @@
      * @{inhertDoc}
      */
     @SuppressWarnings("unchecked")
-    public void initialize( Registries registries ) throws Exception
+    public void initRegistries( Registries registries ) throws Exception
     {
         setRegistries( registries );
-        
-        EvaluatorBuilder evaluatorBuilder = new EvaluatorBuilder( getStore(), getRegistries() );
-        CursorBuilder cursorBuilder = new CursorBuilder( getStore(), evaluatorBuilder );
+
+        EvaluatorBuilder evaluatorBuilder = new EvaluatorBuilder( store, registries );
+        CursorBuilder cursorBuilder = new CursorBuilder( store, evaluatorBuilder );
 
         // setup optimizer and registries for parent
-        if ( ! optimizerEnabled )
+        if ( !optimizerEnabled )
         {
             optimizer = new NoOpOptimizer();
         }
         else
         {
-            optimizer = new DefaultOptimizer<ServerEntry>( getStore() );
+            optimizer = new DefaultOptimizer<ServerEntry>( store );
         }
 
-        searchEngine = new DefaultSearchEngine( getStore(), cursorBuilder, evaluatorBuilder, optimizer );
-        
+        searchEngine = new DefaultSearchEngine( store, cursorBuilder, evaluatorBuilder, optimizer );
+
         // initialize the store
-        getStore().setName( getId() );
-        getStore().setUpSuffixString( suffix );
+        store.setName( getId() );
+        store.setSuffixDn( suffix );
 
-        Set<AvlIndex<?,ServerEntry>> userIndices = new HashSet<AvlIndex<?,ServerEntry>>();
-        
-        for ( AvlIndex<?,ServerEntry> obj : indexedAttributes )
+        Set<Index<?, ServerEntry>> userIndices = new HashSet<Index<?, ServerEntry>>();
+
+        for ( AvlIndex<?, ServerEntry> obj : indexedAttributes )
         {
-            AvlIndex<?,ServerEntry> index;
+            AvlIndex<?, ServerEntry> index;
 
             if ( obj instanceof AvlIndex )
             {
-                index = ( AvlIndex<?,ServerEntry> ) obj;
+                index = ( AvlIndex<?, ServerEntry> ) obj;
             }
             else
             {
-                index = new AvlIndex<Object,ServerEntry>();
+                index = new AvlIndex<Object, ServerEntry>();
                 index.setAttributeId( obj.getAttributeId() );
             }
 
-            String oid = getRegistries().getOidRegistry().getOid( index.getAttributeId() );
-            
-            if ( SYS_INDEX_OIDS.contains( getRegistries().getOidRegistry().getOid( index.getAttributeId() ) ) )
+            String oid = registries.getAttributeTypeRegistry().getOidByName( index.getAttributeId() );
+
+            if ( SYS_INDEX_OIDS.contains( registries.getAttributeTypeRegistry().getOidByName( index.getAttributeId() ) ) )
             {
-                if ( oid.equals( ApacheSchemaConstants.APACHE_ALIAS_OID ) )
+                if ( oid.equals( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) )
                 {
-                    getStore().setAliasIndex( ( Index<String,ServerEntry> ) index );
+                    store.setAliasIndex( ( Index<String, ServerEntry> ) index );
                 }
-                else if ( oid.equals( ApacheSchemaConstants.APACHE_EXISTANCE_OID ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID ) )
                 {
-                    getStore().setPresenceIndex( ( Index<String,ServerEntry> ) index );
+                    store.setPresenceIndex( ( Index<String, ServerEntry> ) index );
                 }
-                else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_LEVEL_OID ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID ) )
                 {
-                    getStore().setOneLevelIndex( ( Index<Long,ServerEntry> ) index );
+                    store.setOneLevelIndex( ( Index<Long, ServerEntry> ) index );
                 }
-                else if ( oid.equals( ApacheSchemaConstants.APACHE_N_DN_OID ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_N_DN_AT_OID ) )
                 {
-                    getStore().setNdnIndex( ( Index<String,ServerEntry> ) index );
+                    store.setNdnIndex( ( Index<String, ServerEntry> ) index );
                 }
-                else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID ) )
                 {
-                    getStore().setOneAliasIndex( ( Index<Long,ServerEntry> ) index );
+                    store.setOneAliasIndex( ( Index<Long, ServerEntry> ) index );
                 }
-                else if ( oid.equals( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID ) )
                 {
-                    getStore().setSubAliasIndex( ( Index<Long,ServerEntry> ) index );
+                    store.setSubAliasIndex( ( Index<Long, ServerEntry> ) index );
                 }
-                else if ( oid.equals( ApacheSchemaConstants.APACHE_UP_DN_OID ) )
+                else if ( oid.equals( ApacheSchemaConstants.APACHE_UP_DN_AT_OID ) )
                 {
-                    getStore().setUpdnIndex( ( Index<String,ServerEntry> ) index );
+                    store.setUpdnIndex( ( Index<String, ServerEntry> ) index );
                 }
                 else if ( oid.equals( SchemaConstants.OBJECT_CLASS_AT_OID ) )
                 {
-                    getStore().addIndex( ( Index<String,ServerEntry> ) index );
+                    store.addIndex( ( Index<String, ServerEntry> ) index );
                 }
                 else
                 {
@@ -153,10 +172,346 @@
             {
                 userIndices.add( index );
             }
-            
-            getStore().setUserIndices( userIndices );
+
+            store.setUserIndices( userIndices );
         }
 
-        getStore().initialize( getRegistries() );
+        store.init( registries );
+    }
+
+
+    public final void destroy() throws Exception
+    {
+        store.destroy();
+    }
+
+
+    public final boolean isInitialized()
+    {
+        return store.isInitialized();
+    }
+
+
+    public final void sync() throws Exception
+    {
+        store.sync();
+    }
+
+
+    // ------------------------------------------------------------------------
+    // I N D E X   M E T H O D S
+    // ------------------------------------------------------------------------
+
+    public final void addIndexOn( Index<Long, ServerEntry> index ) throws Exception
+    {
+        store.addIndex( index );
+    }
+
+
+    public Index<String, ServerEntry> getPresenceIndex()
+    {
+        return store.getPresenceIndex();
+    }
+
+
+    public Index<Long, ServerEntry> getSubLevelIndex()
+    {
+        return store.getSubLevelIndex();
+    }
+
+
+    public final Index<String, ServerEntry> getExistenceIndex()
+    {
+        return store.getPresenceIndex();
+    }
+
+
+    /**
+     * @org.apache.xbean.Property hidden="true"
+     */
+    public final void setPresenceIndexOn( Index<String, ServerEntry> index ) throws Exception
+    {
+        store.setPresenceIndex( index );
+    }
+
+
+    public final Index<Long, ServerEntry> getOneLevelIndex()
+    {
+        return store.getOneLevelIndex();
+    }
+
+
+    /**
+     * @org.apache.xbean.Property hidden="true"
+     */
+    public final void setOneLevelIndexOn( Index<Long, ServerEntry> index ) throws Exception
+    {
+        store.setOneLevelIndex( index );
     }
+
+
+    public final Index<String, ServerEntry> getAliasIndex()
+    {
+        return store.getAliasIndex();
+    }
+
+
+    /**
+     * @org.apache.xbean.Property hidden="true"
+     */
+    public final void setAliasIndexOn( Index<String, ServerEntry> index ) throws Exception
+    {
+        store.setAliasIndex( index );
+    }
+
+
+    public final Index<Long, ServerEntry> getOneAliasIndex()
+    {
+        return store.getOneAliasIndex();
+    }
+
+
+    /**
+     * @org.apache.xbean.Property hidden="true"
+     */
+    public final void setOneAliasIndexOn( Index<Long, ServerEntry> index ) throws Exception
+    {
+        store.setOneAliasIndex( ( Index<Long, ServerEntry> ) index );
+    }
+
+
+    public final Index<Long, ServerEntry> getSubAliasIndex()
+    {
+        return store.getSubAliasIndex();
+    }
+
+
+    /**
+     * @org.apache.xbean.Property hidden="true"
+     */
+    public final void setSubAliasIndexOn( Index<Long, ServerEntry> index ) throws Exception
+    {
+        store.setSubAliasIndex( ( Index<Long, ServerEntry> ) index );
+    }
+
+
+    public final Index<String, ServerEntry> getUpdnIndex()
+    {
+        return store.getUpdnIndex();
+    }
+
+
+    /**
+     * @org.apache.xbean.Property hidden="true"
+     */
+    public final void setUpdnIndexOn( Index<String, ServerEntry> index ) throws Exception
+    {
+        store.setUpdnIndex( ( Index<String, ServerEntry> ) index );
+    }
+
+
+    public final Index<String, ServerEntry> getNdnIndex()
+    {
+        return store.getNdnIndex();
+    }
+
+
+    /**
+     * @org.apache.xbean.Property hidden="true"
+     */
+    public final void setNdnIndexOn( Index<String, ServerEntry> index ) throws Exception
+    {
+        store.setNdnIndex( ( Index<String, ServerEntry> ) index );
+    }
+
+
+    public final Iterator<String> getUserIndices()
+    {
+        return store.userIndices();
+    }
+
+
+    public final Iterator<String> getSystemIndices()
+    {
+        return store.systemIndices();
+    }
+
+
+    public final boolean hasUserIndexOn( String id ) throws Exception
+    {
+        return store.hasUserIndexOn( id );
+    }
+
+
+    public final boolean hasSystemIndexOn( String id ) throws Exception
+    {
+        return store.hasSystemIndexOn( id );
+    }
+
+
+    /**
+     * @see org.apache.directory.server.core.partition.impl.btree.BTreePartition#getUserIndex(String)
+     */
+    public final Index<?, ServerEntry> getUserIndex( String id ) throws IndexNotFoundException
+    {
+        return store.getUserIndex( id );
+    }
+
+
+    /**
+     * @see BTreePartition#getEntryId(String)
+     */
+    public final Index<?, ServerEntry> getSystemIndex( String id ) throws IndexNotFoundException
+    {
+        return store.getSystemIndex( id );
+    }
+
+
+    public final Long getEntryId( String dn ) throws Exception
+    {
+        return store.getEntryId( dn );
+    }
+
+
+    public final String getEntryDn( Long id ) throws Exception
+    {
+        return store.getEntryDn( id );
+    }
+
+
+    public final Long getParentId( String dn ) throws Exception
+    {
+        return store.getParentId( dn );
+    }
+
+
+    public final Long getParentId( Long childId ) throws Exception
+    {
+        return store.getParentId( childId );
+    }
+
+
+    public final String getEntryUpdn( Long id ) throws Exception
+    {
+        return store.getEntryUpdn( id );
+    }
+
+
+    public final String getEntryUpdn( String dn ) throws Exception
+    {
+        return store.getEntryUpdn( dn );
+    }
+
+
+    public final int count() throws Exception
+    {
+        return store.count();
+    }
+
+
+    public final void add( AddOperationContext addContext ) throws Exception
+    {
+        store.add( ( ServerEntry ) ( ( ClonedServerEntry ) addContext.getEntry() ).getClonedEntry() );
+    }
+
+
+    public final ClonedServerEntry lookup( Long id ) throws Exception
+    {
+        return new ClonedServerEntry( store.lookup( id ) );
+    }
+
+
+    public final void delete( Long id ) throws Exception
+    {
+        store.delete( id );
+    }
+
+
+    public final IndexCursor<Long, ServerEntry> list( Long id ) throws Exception
+    {
+        return store.list( id );
+    }
+
+
+    public final int getChildCount( Long id ) throws Exception
+    {
+        return store.getChildCount( id );
+    }
+
+
+    public final void setProperty( String propertyName, String propertyValue ) throws Exception
+    {
+        store.setProperty( propertyName, propertyValue );
+    }
+
+
+    public final String getProperty( String propertyName ) throws Exception
+    {
+        return store.getProperty( propertyName );
+    }
+
+
+    public final void modify( ModifyOperationContext modifyContext ) throws Exception
+    {
+        store.modify( modifyContext.getDn(), modifyContext.getModItems() );
+    }
+
+
+    public final void rename( RenameOperationContext renameContext ) throws Exception
+    {
+        store.rename( renameContext.getDn(), renameContext.getNewRdn(), renameContext.getDelOldDn() );
+    }
+
+
+    public final void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) throws Exception
+    {
+        store.move( moveAndRenameContext.getDn(), moveAndRenameContext.getParent(), moveAndRenameContext.getNewRdn(),
+            moveAndRenameContext.getDelOldDn() );
+    }
+
+
+    public final void move( MoveOperationContext moveContext ) throws Exception
+    {
+        store.move( moveContext.getDn(), moveContext.getParent() );
+    }
+
+
+    public String getSuffix()
+    {
+        return super.suffix;
+    }
+
+
+    public LdapDN getSuffixDn() throws Exception
+    {
+        return store.getSuffix();
+    }
+
+
+    public LdapDN getUpSuffixDn() throws Exception
+    {
+        return store.getUpSuffix();
+    }
+
+
+    public void bind( BindOperationContext opContext ) throws Exception
+    {
+        throw new UnsupportedOperationException( "bind is not supported at the partition level" );
+    }
+
+
+    public void unbind( UnbindOperationContext opContext ) throws Exception
+    {
+        throw new UnsupportedOperationException( "unbind is not supported at the partition level" );
+    }
+
+
+    /**
+     * @org.apache.xbean.Property hidden="true"
+     */
+    public void setRegistries( Registries registries ) throws Exception
+    {
+        initRegistries( registries );
+    }
+
 }

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java?rev=810360&r1=810359&r2=810360&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java (original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java Wed Sep  2 04:59:13 2009
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core.partition.avl;
 
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -28,23 +29,23 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.naming.InvalidNameException;
+import javax.naming.NamingException;
+
 import org.apache.directory.server.constants.ApacheSchemaConstants;
-import org.apache.directory.server.core.cursor.Cursor;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerBinaryValue;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerStringValue;
-import org.apache.directory.server.schema.registries.AttributeTypeRegistry;
-import org.apache.directory.server.schema.registries.OidRegistry;
-import org.apache.directory.server.schema.registries.Registries;
+import org.apache.directory.server.core.partition.impl.btree.LongComparator;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexCursor;
 import org.apache.directory.server.xdbm.IndexEntry;
 import org.apache.directory.server.xdbm.IndexNotFoundException;
-import org.apache.directory.server.xdbm.LongComparator;
 import org.apache.directory.server.xdbm.Store;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -57,6 +58,9 @@
 import org.apache.directory.shared.ldap.name.Rdn;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
+import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
+import org.apache.directory.shared.ldap.schema.registries.Registries;
 import org.apache.directory.shared.ldap.util.NamespaceTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -79,7 +83,7 @@
 
     private OidRegistry oidRegistry;
     private AttributeTypeRegistry attributeTypeRegistry;
-    
+
     /** Two static declaration to avoid lookup all over the code */
     private static AttributeType OBJECT_CLASS_AT;
     private static AttributeType ALIASED_OBJECT_NAME_AT;
@@ -88,33 +92,40 @@
     private AvlMasterTable<ServerEntry> master;
 
     /** the normalized distinguished name index */
-    private AvlIndex<String,E> ndnIdx;
+    private AvlIndex<String, E> ndnIdx;
     /** the user provided distinguished name index */
-    private AvlIndex<String,E> updnIdx;
+    private AvlIndex<String, E> updnIdx;
     /** the attribute existence index */
-    private AvlIndex<String,E> existenceIdx;
+    private AvlIndex<String, E> existenceIdx;
     /** a system index on aliasedObjectName attribute */
-    private AvlIndex<String,E> aliasIdx;
+    private AvlIndex<String, E> aliasIdx;
     /** a system index on the entries of descendants of root DN*/
-    private AvlIndex<Long,E> subLevelIdx;
+    private AvlIndex<Long, E> subLevelIdx;
     /** the parent child relationship index */
-    private AvlIndex<Long,E> oneLevelIdx;
+    private AvlIndex<Long, E> oneLevelIdx;
     /** the one level scope alias index */
-    private AvlIndex<Long,E> oneAliasIdx;
+    private AvlIndex<Long, E> oneAliasIdx;
     /** the subtree scope alias index */
-    private AvlIndex<Long,E> subAliasIdx;
-    
+    private AvlIndex<Long, E> subAliasIdx;
+
+    /** a system index on objectClass attribute*/
+    private AvlIndex<String, E> objectClassIdx;
+
+    /** a system index on entryCSN attribute */
+    private AvlIndex<String, E> entryCsnIdx;
+
+    /** a system index on entryUUID attribute */
+    private AvlIndex<byte[], E> entryUuidIdx;
+
     /** a map of attributeType numeric ID to user userIndices */
-    private Map<String, AvlIndex<?,E>> userIndices 
-        = new HashMap<String, AvlIndex<?,E>>();
-    
+    private Map<String, AvlIndex<?, E>> userIndices = new HashMap<String, AvlIndex<?, E>>();
+
     /** a map of attributeType numeric ID to system userIndices */
-    private Map<String, AvlIndex<?,E>> systemIndices 
-        = new HashMap<String, AvlIndex<?,E>>();
-    
+    private Map<String, AvlIndex<?, E>> systemIndices = new HashMap<String, AvlIndex<?, E>>();
+
     /** true if initialized */
     private boolean initialized;
-    
+
     /** 
      * TODO we need to check out why we have so many suffix 
      * dn and string accessor/mutators on both Store and Partition
@@ -131,16 +142,18 @@
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public void add( LdapDN normName, ServerEntry entry ) throws Exception
+    public void add( ServerEntry entry ) throws Exception
     {
         if ( entry instanceof ClonedServerEntry )
         {
             throw new Exception( "Cannot store a ClonedServerEntry" );
         }
-        
+
+        LdapDN normName = entry.getDn();
+
         Long id;
         Long parentId;
-        
+
         id = master.getNextId();
 
         //
@@ -193,17 +206,17 @@
         ndnIdx.add( normName.toNormName(), id );
         updnIdx.add( normName.getUpName(), id );
         oneLevelIdx.add( parentId, id );
-        
+
         Long tempId = parentId;
-        while( tempId != null && tempId != 0 && tempId != 1 )
+        while ( tempId != null && tempId != 0 && tempId != 1 )
         {
             subLevelIdx.add( tempId, id );
             tempId = getParentId( tempId );
         }
-        
+
         // making entry an ancestor/descendent of itself in sublevel index
         subLevelIdx.add( id, id );
-        
+
         // Now work on the user defined userIndices
         for ( EntryAttribute attribute : entry )
         {
@@ -211,7 +224,7 @@
 
             if ( hasUserIndexOn( attributeOid ) )
             {
-                Index<Object,E> idx = ( Index<Object,E> ) getUserIndex( attributeOid );
+                Index<Object, E> idx = ( Index<Object, E> ) getUserIndex( attributeOid );
 
                 // here lookup by attributeId is OK since we got attributeId from 
                 // the entry via the enumeration - it's in there as is for sure
@@ -229,7 +242,7 @@
         master.put( id, entry );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -237,15 +250,15 @@
     {
         if ( index instanceof AvlIndex )
         {
-            userIndices.put( index.getAttributeId(), ( AvlIndex<?,E> ) index );
+            userIndices.put( index.getAttributeId(), ( AvlIndex<?, E> ) index );
         }
         else
         {
-            userIndices.put( index.getAttributeId(), ( AvlIndex<?,E> ) convert( index ) );
+            userIndices.put( index.getAttributeId(), ( AvlIndex<?, E> ) convert( index ) );
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -275,11 +288,11 @@
         updnIdx.drop( id );
         oneLevelIdx.drop( id );
 
-        if( id != 1 )
+        if ( id != 1 )
         {
             subLevelIdx.drop( id );
         }
-        
+
         // Remove parent's reference to entry only if entry is not the upSuffix
         if ( !parentId.equals( 0L ) )
         {
@@ -292,7 +305,7 @@
 
             if ( hasUserIndexOn( attributeOid ) )
             {
-                Index<?,E> index = getUserIndex( attributeOid );
+                Index<?, E> index = getUserIndex( attributeOid );
 
                 // here lookup by attributeId is ok since we got attributeId from 
                 // the entry via the enumeration - it's in there as is for sure
@@ -316,7 +329,7 @@
     {
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -325,7 +338,7 @@
         return aliasIdx;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -334,7 +347,7 @@
         return oneLevelIdx.count( id );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -352,7 +365,7 @@
         return ndnIdx.forwardLookup( dn );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -389,7 +402,7 @@
         return ndnIdx;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -407,7 +420,7 @@
         return oneLevelIdx;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -417,7 +430,7 @@
         return oneLevelIdx.reverseLookup( childId );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -426,7 +439,7 @@
         return oneLevelIdx.reverseLookup( childId );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -435,7 +448,7 @@
         return existenceIdx;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -462,41 +475,57 @@
         return subLevelIdx;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
-    public LdapDN getNormSuffixDn()
+    public LdapDN getSuffix()
     {
-        return suffixDn;
+        try
+        {
+            return new LdapDN( suffixDn.getNormName() );
+        }
+        catch ( InvalidNameException e )
+        {
+            // shouldn't happen
+            LOG.error( "", e );
+        }
+
+        return null;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public String getUpSuffixString()
+    public LdapDN getUpSuffix()
     {
-        return suffixDn.getUpName();
+        try
+        {
+            return new LdapDN( suffixDn.getUpName() );
+        }
+        catch ( InvalidNameException e )
+        {
+            // shouldn't happen
+            LOG.error( "", e );
+        }
+
+        return null;
     }
 
 
-    /**
-     * {@inheritDoc}
-     */
-    public Index<?, E> getSystemIndex( String id ) throws IndexNotFoundException
+    public String getSuffixDn()
     {
-        return systemIndices.get( id );
+        return suffixDn.getUpName();
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public LdapDN getUpSuffixDn() throws Exception
+    public Index<?, E> getSystemIndex( String id ) throws IndexNotFoundException
     {
-        // TODO fix this
-        return new LdapDN( suffixDn.getUpName() );
+        return systemIndices.get( id );
     }
 
 
@@ -521,9 +550,9 @@
     /**
      * {@inheritDoc}
      */
-    public Set<? extends Index<?, E>> getUserIndices()
+    public Set<Index<?, E>> getUserIndices()
     {
-        return new HashSet<Index<?,E>>( userIndices.values() );
+        return new HashSet<Index<?, E>>( userIndices.values() );
     }
 
 
@@ -544,109 +573,131 @@
         return userIndices.containsKey( id );
     }
 
-    
+
     /**
      * {@inheritDoc}
      * TODO why this and initRegistries on Store interface ???
      */
-    public void initialize( Registries registries ) throws Exception
+    public void init( Registries registries ) throws Exception
     {
         initRegistries( registries );
-        
+
         OBJECT_CLASS_AT = attributeTypeRegistry.lookup( SchemaConstants.OBJECT_CLASS_AT );
         ALIASED_OBJECT_NAME_AT = attributeTypeRegistry.lookup( SchemaConstants.ALIASED_OBJECT_NAME_AT );
 
-
         // Create the master table (the table containing all the entries)
         master = new AvlMasterTable<ServerEntry>( name, new LongComparator(), null, false );
 
+        suffixDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping() );
         // -------------------------------------------------------------------
         // Initializes the user and system indices
         // -------------------------------------------------------------------
 
         setupSystemIndices();
         setupUserIndices();
-        
+
         // We are done !
         initialized = true;
-    }    
+    }
 
 
     private void setupSystemIndices() throws Exception
     {
         // let's check and make sure the supplied indices are OK
-        
+
         if ( ndnIdx == null )
         {
-            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_N_DN_OID );
-            ndnIdx = new AvlIndex<String,E>();
-            ndnIdx.setAttributeId( ApacheSchemaConstants.APACHE_N_DN_OID );
+            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_N_DN_AT_OID );
+            ndnIdx = new AvlIndex<String, E>();
+            ndnIdx.setAttributeId( ApacheSchemaConstants.APACHE_N_DN_AT_OID );
             ndnIdx.initialize( attributeType );
-            systemIndices.put( ApacheSchemaConstants.APACHE_N_DN_OID, ndnIdx );
+            systemIndices.put( ApacheSchemaConstants.APACHE_N_DN_AT_OID, ndnIdx );
         }
 
         if ( updnIdx == null )
         {
-            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_UP_DN_OID );
-            updnIdx = new AvlIndex<String,E>();
-            updnIdx.setAttributeId( ApacheSchemaConstants.APACHE_UP_DN_OID );
+            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_UP_DN_AT_OID );
+            updnIdx = new AvlIndex<String, E>();
+            updnIdx.setAttributeId( ApacheSchemaConstants.APACHE_UP_DN_AT_OID );
             updnIdx.initialize( attributeType );
-            systemIndices.put( ApacheSchemaConstants.APACHE_UP_DN_OID, updnIdx );
+            systemIndices.put( ApacheSchemaConstants.APACHE_UP_DN_AT_OID, updnIdx );
         }
 
         if ( existenceIdx == null )
         {
-            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_EXISTANCE_OID );
-            existenceIdx = new AvlIndex<String,E>();
-            existenceIdx.setAttributeId( ApacheSchemaConstants.APACHE_EXISTANCE_OID );
+            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID );
+            existenceIdx = new AvlIndex<String, E>();
+            existenceIdx.setAttributeId( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID );
             existenceIdx.initialize( attributeType );
-            systemIndices.put( ApacheSchemaConstants.APACHE_EXISTANCE_OID, existenceIdx );
+            systemIndices.put( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID, existenceIdx );
         }
 
         if ( oneLevelIdx == null )
         {
-            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_ONE_LEVEL_OID );
-            oneLevelIdx = new AvlIndex<Long,E>();
-            oneLevelIdx.setAttributeId( ApacheSchemaConstants.APACHE_ONE_LEVEL_OID );
+            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID );
+            oneLevelIdx = new AvlIndex<Long, E>();
+            oneLevelIdx.setAttributeId( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID );
             oneLevelIdx.initialize( attributeType );
-            systemIndices.put( ApacheSchemaConstants.APACHE_ONE_LEVEL_OID, oneLevelIdx );
+            systemIndices.put( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID, oneLevelIdx );
         }
 
         if ( oneAliasIdx == null )
         {
-            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID );
-            oneAliasIdx = new AvlIndex<Long,E>();
-            oneAliasIdx.setAttributeId( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID );
+            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID );
+            oneAliasIdx = new AvlIndex<Long, E>();
+            oneAliasIdx.setAttributeId( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID );
             oneAliasIdx.initialize( attributeType );
-            systemIndices.put( ApacheSchemaConstants.APACHE_ONE_ALIAS_OID, oneAliasIdx );
+            systemIndices.put( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID, oneAliasIdx );
         }
 
         if ( subAliasIdx == null )
         {
-            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID );
-            subAliasIdx = new AvlIndex<Long,E>();
-            subAliasIdx.setAttributeId( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID );
+            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID );
+            subAliasIdx = new AvlIndex<Long, E>();
+            subAliasIdx.setAttributeId( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID );
             subAliasIdx.initialize( attributeType );
-            systemIndices.put( ApacheSchemaConstants.APACHE_SUB_ALIAS_OID, subAliasIdx );
+            systemIndices.put( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID, subAliasIdx );
         }
 
         if ( aliasIdx == null )
         {
-            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_ALIAS_OID );
-            aliasIdx = new AvlIndex<String,E>();
-            aliasIdx.setAttributeId( ApacheSchemaConstants.APACHE_ALIAS_OID );
+            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_ALIAS_AT_OID );
+            aliasIdx = new AvlIndex<String, E>();
+            aliasIdx.setAttributeId( ApacheSchemaConstants.APACHE_ALIAS_AT_OID );
             aliasIdx.initialize( attributeType );
-            systemIndices.put( ApacheSchemaConstants.APACHE_ALIAS_OID, aliasIdx );
+            systemIndices.put( ApacheSchemaConstants.APACHE_ALIAS_AT_OID, aliasIdx );
         }
-        
+
         if ( subLevelIdx == null )
         {
-            AttributeType attributeType = attributeTypeRegistry.lookup( SUBLEVEL );
+            AttributeType attributeType = attributeTypeRegistry.lookup( ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID );
             subLevelIdx = new AvlIndex<Long, E>();
-            subLevelIdx.setAttributeId( SUBLEVEL ); 
+            subLevelIdx.setAttributeId( ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID );
             subLevelIdx.initialize( attributeType );
-            systemIndices.put( SUBLEVEL, subLevelIdx );
+            systemIndices.put( ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID, subLevelIdx );
         }
+
+        if ( entryCsnIdx == null )
+        {
+            entryCsnIdx = new AvlIndex<String, E>();
+            entryCsnIdx.setAttributeId( SchemaConstants.ENTRY_CSN_AT_OID );
+            systemIndices.put( SchemaConstants.ENTRY_CSN_AT_OID, entryCsnIdx );
+        }
+
+        if ( entryUuidIdx == null )
+        {
+            entryUuidIdx = new AvlIndex<byte[], E>();
+            entryUuidIdx.setAttributeId( SchemaConstants.ENTRY_UUID_AT_OID );
+            systemIndices.put( SchemaConstants.ENTRY_UUID_AT_OID, entryUuidIdx );
+        }
+
+        if ( objectClassIdx == null )
+        {
+            objectClassIdx = new AvlIndex<String, E>();
+            objectClassIdx.setAttributeId( SchemaConstants.OBJECT_CLASS_AT_OID );
+            systemIndices.put( SchemaConstants.OBJECT_CLASS_AT_OID, objectClassIdx );
+        }
+
     }
 
 
@@ -654,16 +705,16 @@
     {
         if ( userIndices != null && userIndices.size() > 0 )
         {
-            Map<String, AvlIndex<?,E>> tmp = new HashMap<String, AvlIndex<?,E>>();
-            
-            for ( AvlIndex<?,E> index : userIndices.values() )
+            Map<String, AvlIndex<?, E>> tmp = new HashMap<String, AvlIndex<?, E>>();
+
+            for ( AvlIndex<?, E> index : userIndices.values() )
             {
-                String oid = oidRegistry.getOid( index.getAttributeId() );
+                String oid = attributeTypeRegistry.getOidByName( index.getAttributeId() );
                 AttributeType attributeType = attributeTypeRegistry.lookup( oid );
-                
+
                 // Check that the attributeType has an EQUALITY matchingRule
                 MatchingRule mr = attributeType.getEquality();
-                
+
                 if ( mr != null )
                 {
                     index.initialize( attributeTypeRegistry.lookup( oid ) );
@@ -675,16 +726,16 @@
                         attributeType.getName() );
                 }
             }
-            
+
             userIndices = tmp;
         }
         else
         {
-            userIndices = new HashMap<String, AvlIndex<?,E>>();
+            userIndices = new HashMap<String, AvlIndex<?, E>>();
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -709,12 +760,12 @@
      */
     public IndexCursor<Long, E> list( Long id ) throws Exception
     {
-        IndexCursor<Long,E> cursor = oneLevelIdx.forwardCursor( id );
+        IndexCursor<Long, E> cursor = oneLevelIdx.forwardCursor( id );
         cursor.beforeValue( id, null );
         return cursor;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -723,7 +774,7 @@
         return master.get( id );
     }
 
-    
+
     /**
      * Recursively modifies the distinguished name of an entry and the names of
      * its descendants calling itself in the recursion.
@@ -745,7 +796,7 @@
             updn.normalize( attributeTypeRegistry.getNormalizerMapping() );
         }
         ndnIdx.add( updn.toNormName(), id );
-        
+
         // update user provided DN index
         updnIdx.drop( id );
         updnIdx.add( updn.getUpName(), id );
@@ -770,11 +821,11 @@
             }
         }
 
-        Cursor<IndexEntry<Long,E>> children = list( id );
+        Cursor<IndexEntry<Long, E>> children = list( id );
         while ( children.next() )
         {
             // Get the child and its id
-            IndexEntry<Long,E> rec = children.get();
+            IndexEntry<Long, E> rec = children.get();
             Long childId = rec.getId();
 
             /* 
@@ -797,7 +848,7 @@
             // Recursively change the names of the children below
             modifyDn( childId, childUpdn, isMove );
         }
-        
+
         children.close();
     }
 
@@ -819,12 +870,12 @@
         {
             throw new Exception( "Cannot store a ClonedServerEntry" );
         }
-        
-        String modsOid = oidRegistry.getOid( mods.getId() );
+
+        String modsOid = attributeTypeRegistry.getOidByName( mods.getId() );
 
         if ( hasUserIndexOn( modsOid ) )
         {
-            Index<?,E> index = getUserIndex( modsOid );
+            Index<?, E> index = getUserIndex( modsOid );
 
             for ( Value<?> value : mods )
             {
@@ -846,7 +897,7 @@
             entry.add( type, value );
         }
 
-        if ( modsOid.equals( oidRegistry.getOid( SchemaConstants.ALIASED_OBJECT_NAME_AT ) ) )
+        if ( modsOid.equals( SchemaConstants.ALIASED_OBJECT_NAME_AT_OID ) )
         {
             String ndnStr = ndnIdx.reverseLookup( id );
             addAliasIndices( id, new LdapDN( ndnStr ), mods.getString() );
@@ -874,13 +925,13 @@
         {
             throw new Exception( "Cannot store a ClonedServerEntry" );
         }
-        
-        String modsOid = oidRegistry.getOid( mods.getId() );
+
+        String modsOid = attributeTypeRegistry.getOidByName( mods.getId() );
 
         if ( hasUserIndexOn( modsOid ) )
         {
-            Index<?,E> index = getUserIndex( modsOid );
-            
+            Index<?, E> index = getUserIndex( modsOid );
+
             for ( Value<?> value : mods )
             {
                 ( ( AvlIndex ) index ).drop( value.get(), id );
@@ -931,7 +982,7 @@
         }
 
         // Aliases->single valued comp/partial attr removal is not relevant here
-        if ( modsOid.equals( oidRegistry.getOid( SchemaConstants.ALIASED_OBJECT_NAME_AT ) ) )
+        if ( modsOid.equals( SchemaConstants.ALIASED_OBJECT_NAME_AT_OID ) )
         {
             dropAliasIndices( id );
         }
@@ -957,22 +1008,22 @@
         {
             throw new Exception( "Cannot store a ClonedServerEntry" );
         }
-        
-        String modsOid = oidRegistry.getOid( mods.getId() );
+
+        String modsOid = attributeTypeRegistry.getOidByName( mods.getId() );
 
         if ( hasUserIndexOn( modsOid ) )
         {
-            Index<?,E> index = getUserIndex( modsOid );
+            Index<?, E> index = getUserIndex( modsOid );
 
             // if the id exists in the index drop all existing attribute value index entries and add new ones
-            if( index.reverse( id ) )
+            if ( index.reverse( id ) )
             {
-                ( ( AvlIndex<?,E> ) index ).drop( id );
+                ( ( AvlIndex<?, E> ) index ).drop( id );
             }
-            
+
             for ( Value<?> value : mods )
             {
-                ( ( AvlIndex<Object,E> ) index ).add( value.get(), id );
+                ( ( AvlIndex<Object, E> ) index ).add( value.get(), id );
             }
 
             /* 
@@ -985,7 +1036,7 @@
             }
         }
 
-        String aliasAttributeOid = oidRegistry.getOid( SchemaConstants.ALIASED_OBJECT_NAME_AT );
+        String aliasAttributeOid = SchemaConstants.ALIASED_OBJECT_NAME_AT_OID;
 
         if ( modsOid.equals( aliasAttributeOid ) )
         {
@@ -1017,7 +1068,7 @@
         {
             throw new Exception( "Cannot store a ClonedServerEntry" );
         }
-        
+
         Long id = getEntryId( dn.toString() );
         ServerEntry entry = ( ServerEntry ) master.get( id );
 
@@ -1144,7 +1195,7 @@
         oneLevelIdx.add( newParentId, childId );
 
         updateSubLevelIndex( childId, oldParentId, newParentId );
-        
+
         /*
          * Build the new user provided DN (updn) for the child using the child's
          * user provided RDN & the new parent's UPDN.  Basically add the child's
@@ -1157,7 +1208,7 @@
 
         // Call the modifyDn operation with the new updn
         modifyDn( childId, newUpdn, true );
-        
+
         return newUpdn;
     }
 
@@ -1197,24 +1248,24 @@
         for ( AttributeTypeAndValue newAtav : newRdn )
         {
             String newNormType = newAtav.getNormType();
-            String newNormValue = ( String ) newAtav.getNormValue();
+            String newNormValue = newAtav.getNormValue().getString();
             AttributeType newRdnAttrType = attributeTypeRegistry.lookup( newNormType );
-            
-            Object unEscapedRdn = Rdn.unescapeValue( (String)newAtav.getUpValue() );
-            
+
+            Object unEscapedRdn = Rdn.unescapeValue( newAtav.getUpValue().getString() );
+
             Value<?> value = null;
-            
+
             if ( unEscapedRdn instanceof String )
             {
-                value = new ServerStringValue( newRdnAttrType, (String)unEscapedRdn );
+                value = new ServerStringValue( newRdnAttrType, ( String ) unEscapedRdn );
             }
             else
             {
-                value = new ServerBinaryValue( newRdnAttrType, (byte[])unEscapedRdn );
+                value = new ServerBinaryValue( newRdnAttrType, ( byte[] ) unEscapedRdn );
             }
-            
+
             value.normalize();
-            
+
             entry.add( newRdnAttrType, value );
 
             if ( hasUserIndexOn( newNormType ) )
@@ -1267,7 +1318,7 @@
                 if ( mustRemove )
                 {
                     String oldNormType = oldAtav.getNormType();
-                    String oldNormValue = ( String ) oldAtav.getNormValue();
+                    String oldNormValue = oldAtav.getNormValue().getString();
                     AttributeType oldRdnAttrType = attributeTypeRegistry.lookup( oldNormType );
                     entry.remove( oldRdnAttrType, oldNormValue );
 
@@ -1330,7 +1381,7 @@
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1339,7 +1390,7 @@
         this.name = name;
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1371,7 +1422,7 @@
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1387,7 +1438,7 @@
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1403,7 +1454,7 @@
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1412,7 +1463,7 @@
         master.setProperty( propertyName, propertyValue );
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1428,7 +1479,7 @@
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1440,21 +1491,27 @@
         }
         else
         {
-            this.subLevelIdx = ( AvlIndex<Long, E> ) convert( index ); 
+            this.subLevelIdx = ( AvlIndex<Long, E> ) convert( index );
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
-    public void setUpSuffixString( String suffixDn ) throws Exception
+    public void setSuffixDn( String suffixDn )
     {
-        // TODO fix this
-        this.suffixDn = new LdapDN( suffixDn );
+        try
+        {
+            this.suffixDn = new LdapDN( suffixDn );
+        }
+        catch ( InvalidNameException e )
+        {
+            throw new IllegalArgumentException( e );
+        }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1470,40 +1527,40 @@
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
-    public void setUserIndices( Set<? extends Index<?, E>> userIndices ) throws Exception
+    public void setUserIndices( Set<Index<?, E>> userIndices )
     {
         protect( "setUserIndices" );
-        
+
         for ( Index<?, E> index : userIndices )
         {
             if ( index instanceof AvlIndex )
             {
-                this.userIndices.put( index.getAttribute().getOid(), ( AvlIndex<?,E> ) index );
+                this.userIndices.put( index.getAttribute().getOid(), ( AvlIndex<?, E> ) index );
                 continue;
             }
 
-            LOG.warn( "Supplied index {} is not a AvlIndex.  " +
-                "Will create new AvlIndex using copied configuration parameters.", index );
-            
-            AvlIndex<?,E> avlIndex = ( AvlIndex<?, E> ) convert( index );
+            LOG.warn( "Supplied index {} is not a AvlIndex.  "
+                + "Will create new AvlIndex using copied configuration parameters.", index );
+
+            AvlIndex<?, E> avlIndex = ( AvlIndex<?, E> ) convert( index );
 
             this.userIndices.put( index.getAttributeId(), avlIndex );
         }
     }
 
-    
-    private <K> Index<K,E> convert( Index<K,E> index ) throws Exception
+
+    private <K> AvlIndex<K, E> convert( Index<K, E> index )
     {
-        AvlIndex<K, E> avlIndex = new AvlIndex<K, E>(); 
+        AvlIndex<K, E> avlIndex = new AvlIndex<K, E>();
         avlIndex.setAttributeId( index.getAttributeId() );
         return avlIndex;
     }
-    
-    
+
+
     private void protect( String method )
     {
         if ( initialized )
@@ -1512,7 +1569,7 @@
         }
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1521,7 +1578,7 @@
         return systemIndices.keySet().iterator();
     }
 
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1586,9 +1643,8 @@
         if ( !normalizedAliasTargetDn.startsWith( suffixDn ) )
         {
             // Complain specifically about aliases to outside naming contexts
-            throw new Exception( "[36] aliasDereferencingProblem -"
-                + " the alias points to an entry outside of the " + suffixDn.getUpName()
-                + " namingContext to an object whose existance cannot be" + " determined." );
+            throw new Exception( "[36] aliasDereferencingProblem -" + " the alias points to an entry outside of the "
+                + suffixDn.getUpName() + " namingContext to an object whose existance cannot be" + " determined." );
         }
 
         // L O O K U P   T A R G E T   I D
@@ -1603,8 +1659,7 @@
         if ( null == targetId )
         {
             // Complain about target not existing
-            throw new Exception( "[33] aliasProblem - "
-                + "the alias when dereferenced would not name a known object "
+            throw new Exception( "[33] aliasProblem - " + "the alias when dereferenced would not name a known object "
                 + "the aliasedObjectName must be set to a valid existing " + "entry." );
         }
 
@@ -1642,7 +1697,7 @@
         // check if alias parent and aliased entry are the same
         LdapDN normalizedAliasTargetParentDn = ( LdapDN ) normalizedAliasTargetDn.clone();
         normalizedAliasTargetParentDn.remove( normalizedAliasTargetDn.size() - 1 );
-        if ( ! aliasDn.startsWith( normalizedAliasTargetParentDn ) )
+        if ( !aliasDn.startsWith( normalizedAliasTargetParentDn ) )
         {
             oneAliasIdx.add( ancestorId, targetId );
         }
@@ -1729,53 +1784,53 @@
         List<Long> parentIds = new ArrayList<Long>();
 
         // find all the parents of the oldParentId
-        while( tempId != 0 && tempId != 1 && tempId != null )
+        while ( tempId != 0 && tempId != 1 && tempId != null )
         {
-          parentIds.add( tempId );
-          tempId = getParentId( tempId );
+            parentIds.add( tempId );
+            tempId = getParentId( tempId );
         }
 
         // find all the children of the childId
-        Cursor<IndexEntry<Long,E>> cursor = subLevelIdx.forwardCursor( childId );
-        
+        Cursor<IndexEntry<Long, E>> cursor = subLevelIdx.forwardCursor( childId );
+
         List<Long> childIds = new ArrayList<Long>();
         childIds.add( childId );
-        
-        while( cursor.next() )
+
+        while ( cursor.next() )
         {
             childIds.add( cursor.get().getId() );
         }
-        
+
         // detach the childId and all its children from oldParentId and all it parents excluding the root
-        for( Long pid : parentIds )
+        for ( Long pid : parentIds )
         {
-            for( Long cid: childIds )
+            for ( Long cid : childIds )
             {
                 subLevelIdx.drop( pid, cid );
             }
         }
-        
+
         parentIds.clear();
         tempId = newParentId;
 
         // find all the parents of the newParentId
-        while( tempId != 0 && tempId != 1 && tempId != null )
+        while ( tempId != 0 && tempId != 1 && tempId != null )
         {
-          parentIds.add( tempId );
-          tempId = getParentId( tempId );
+            parentIds.add( tempId );
+            tempId = getParentId( tempId );
         }
-        
+
         // attach the childId and all its children to newParentId and all it parents excluding the root
-        for( Long id : parentIds )
+        for ( Long id : parentIds )
         {
-            for( Long cid: childIds )
+            for ( Long cid : childIds )
             {
                 subLevelIdx.add( id, cid );
             }
         }
     }
-    
-    
+
+
     /**
      * For all aliases including and under the moved base, this method removes
      * one and subtree alias index tuples for old ancestors above the moved base
@@ -1786,15 +1841,15 @@
      */
     private void dropMovedAliasIndices( final LdapDN movedBase ) throws Exception
     {
-//        // Find all the aliases from movedBase down
-//        IndexAssertion<Object,E> isBaseDescendant = new IndexAssertion<Object,E>()
-//        {
-//            public boolean assertCandidate( IndexEntry<Object,E> rec ) throws Exception
-//            {
-//                String dn = getEntryDn( rec.getId() );
-//                return dn.endsWith( movedBase.toString() );
-//            }
-//        };
+        //        // Find all the aliases from movedBase down
+        //        IndexAssertion<Object,E> isBaseDescendant = new IndexAssertion<Object,E>()
+        //        {
+        //            public boolean assertCandidate( IndexEntry<Object,E> rec ) throws Exception
+        //            {
+        //                String dn = getEntryDn( rec.getId() );
+        //                return dn.endsWith( movedBase.toString() );
+        //            }
+        //        };
 
         Long movedBaseId = getEntryId( movedBase.toString() );
 
@@ -1803,16 +1858,16 @@
             dropAliasIndices( movedBaseId, movedBase );
         }
 
-//        throw new NotImplementedException( "Fix the code below this line" );
+        //        throw new NotImplementedException( "Fix the code below this line" );
 
-//        NamingEnumeration<ForwardIndexEntry> aliases =
-//                new IndexAssertionEnumeration( aliasIdx.listIndices( movedBase.toString(), true ), isBaseDescendant );
-//
-//        while ( aliases.hasMore() )
-//        {
-//            ForwardIndexEntry entry = aliases.next();
-//            dropAliasIndices( (Long)entry.getId(), movedBase );
-//        }
+        //        NamingEnumeration<ForwardIndexEntry> aliases =
+        //                new IndexAssertionEnumeration( aliasIdx.listIndices( movedBase.toString(), true ), isBaseDescendant );
+        //
+        //        while ( aliases.hasMore() )
+        //        {
+        //            ForwardIndexEntry entry = aliases.next();
+        //            dropAliasIndices( (Long)entry.getId(), movedBase );
+        //        }
     }
 
 
@@ -1867,6 +1922,91 @@
 
 
     /**
+     * always returns 0 (zero), cause this is a inmemory store
+     */
+    public int getCacheSize()
+    {
+        return 0;
+    }
+
+
+    public Index<String, E> getEntryCsnIndex()
+    {
+        return entryCsnIdx;
+    }
+
+
+    public Index<byte[], E> getEntryUuidIndex()
+    {
+        return entryUuidIdx;
+    }
+
+
+    public Index<String, E> getObjectClassIndex()
+    {
+        return objectClassIdx;
+    }
+
+
+    public void setEntryCsnIndex( Index<String, E> arg0 ) throws Exception
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+
+    public void setSyncOnWrite( boolean arg0 )
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+
+    public void setWorkingDirectory( File arg0 )
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+
+    public File getWorkingDirectory()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+
+    public boolean isSyncOnWrite()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+
+    public void setCacheSize( int arg0 )
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+
+    public void setObjectClassIndex( Index<String, E> index ) throws NamingException
+    {
+        protect( "objectClassIndex" );
+        objectClassIdx = convert( index );
+        systemIndices.put( index.getAttributeId(), objectClassIdx );
+    }
+
+
+    public void setEntryUuidIndex( Index<byte[], E> index ) throws NamingException
+    {
+        protect( "entryUuidIndex" );
+        entryUuidIdx = convert( index );
+        systemIndices.put( index.getAttributeId(), entryUuidIdx );
+    }
+
+
+    /**
      * @{inhertDoc}
      */
     public void sync() throws Exception

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTable.java?rev=810360&r1=810359&r2=810360&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTable.java (original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTable.java Wed Sep  2 04:59:13 2009
@@ -22,20 +22,20 @@
 
 import java.util.Comparator;
 
+import org.apache.directory.server.core.avltree.AvlSingletonOrOrderedSetCursor;
 import org.apache.directory.server.core.avltree.AvlTree;
 import org.apache.directory.server.core.avltree.AvlTreeCursor;
 import org.apache.directory.server.core.avltree.AvlTreeMap;
 import org.apache.directory.server.core.avltree.AvlTreeMapImpl;
-import org.apache.directory.server.core.avltree.AvlSingletonOrOrderedSetCursor;
 import org.apache.directory.server.core.avltree.AvlTreeMapNoDupsWrapperCursor;
 import org.apache.directory.server.core.avltree.KeyTupleAvlCursor;
 import org.apache.directory.server.core.avltree.LinkedAvlMapNode;
 import org.apache.directory.server.core.avltree.SingletonOrOrderedSet;
-import org.apache.directory.server.core.cursor.Cursor;
-import org.apache.directory.server.core.cursor.EmptyCursor;
-import org.apache.directory.server.core.cursor.SingletonCursor;
 import org.apache.directory.server.xdbm.Table;
 import org.apache.directory.server.xdbm.Tuple;
+import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.cursor.EmptyCursor;
+import org.apache.directory.shared.ldap.cursor.SingletonCursor;
 
 
 /**

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTableDupsCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTableDupsCursor.java?rev=810360&r1=810359&r2=810360&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTableDupsCursor.java (original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlTableDupsCursor.java Wed Sep  2 04:59:13 2009
@@ -20,16 +20,15 @@
 package org.apache.directory.server.core.partition.avl;
 
 
+import org.apache.directory.server.core.avltree.AvlSingletonOrOrderedSetCursor;
 import org.apache.directory.server.core.avltree.AvlTree;
 import org.apache.directory.server.core.avltree.AvlTreeCursor;
-import org.apache.directory.server.core.avltree.AvlSingletonOrOrderedSetCursor;
 import org.apache.directory.server.core.avltree.SingletonOrOrderedSet;
-import org.apache.directory.server.core.cursor.Cursor;
-import org.apache.directory.server.core.cursor.InvalidCursorPositionException;
-import org.apache.directory.server.core.cursor.SingletonCursor;
 import org.apache.directory.server.xdbm.AbstractTupleCursor;
 import org.apache.directory.server.xdbm.Tuple;
-
+import org.apache.directory.shared.ldap.cursor.Cursor;
+import org.apache.directory.shared.ldap.cursor.InvalidCursorPositionException;
+import org.apache.directory.shared.ldap.cursor.SingletonCursor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/apacheds/branches/apacheds-schema/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java?rev=810360&r1=810359&r2=810360&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java (original)
+++ directory/apacheds/branches/apacheds-schema/avl-partition/src/test/java/org/apache/directory/server/core/partition/avl/AvlTableTest.java Wed Sep  2 04:59:13 2009
@@ -20,15 +20,17 @@
 package org.apache.directory.server.core.partition.avl;
 
 
+import static org.apache.directory.server.core.partition.avl.TableData.injectDupsData;
+import static org.apache.directory.server.core.partition.avl.TableData.injectNoDupsData;
+
 import java.util.Comparator;
 
-import org.apache.directory.server.core.cursor.Cursor;
+import junit.framework.TestCase;
+
 import org.apache.directory.server.xdbm.Tuple;
+import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.junit.Before;
 
-import junit.framework.TestCase;
-import static org.apache.directory.server.core.partition.avl.TableData.*;
-
 
 /**
  * A set of test cases for the AvlTable class.



Mime
View raw message