directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r917312 [1/5] - 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-annotations/src/main/java/org/apache/...
Date Sun, 28 Feb 2010 22:55:35 GMT
Author: seelmann
Date: Sun Feb 28 22:55:33 2010
New Revision: 917312

URL: http://svn.apache.org/viewvc?rev=917312&view=rev
Log:
Fix for DIRSERVER-1472 (Use Generic Type Parameter for ID in XDBM instead of Long)

Modified:
    directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java
    directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
    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-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
    directory/apacheds/trunk/default-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
    directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.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/JdbmIndexTest.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/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/core/partition/impl/btree/DefaultTupleComparator.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertion.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexCursorAdaptor.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ServerEntryCursorAdaptor.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ValueArrayCursor.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/AbstractIndexCursor.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/EmptyIndexCursor.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/ForwardIndexEntry.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Index.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/IndexCursor.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/IndexEntry.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/ReverseIndexEntry.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/SingletonIndexCursor.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/Store.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/search/Evaluator.java
    directory/apacheds/trunk/xdbm-base/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AllEntriesCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AndCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/AndEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.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/EqualityCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/NotCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/NotEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OrCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/OrEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.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/AndCursorTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.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/OrCursorTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java
    directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.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/EntryNode.java
    directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java
    directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
    directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexDialog.java
    directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexUtils.java
    directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java

Modified: directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java (original)
+++ directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java Sun Feb 28 22:55:33 2010
@@ -42,7 +42,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AvlIndex<K, O> implements Index<K, O>
+public class AvlIndex<K, O> implements Index<K, O, Long>
 {
     private Normalizer normalizer;
     private AttributeType attributeType;
@@ -85,7 +85,7 @@
             throw new Exception( I18n.err( I18n.ERR_212, attributeType ) );
         }
 
-        LdapComparator comp = mr.getLdapComparator();
+        LdapComparator<K> comp = ( LdapComparator<K> ) mr.getLdapComparator();
 
         /*
          * The forward key/value map stores attribute values to master table 
@@ -195,7 +195,7 @@
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public IndexCursor<K, O> forwardCursor() throws Exception
+    public IndexCursor<K, O, Long> forwardCursor() throws Exception
     {
         return new IndexCursorAdaptor( forward.cursor(), true );
     }
@@ -205,7 +205,7 @@
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public IndexCursor<K, O> forwardCursor( K key ) throws Exception
+    public IndexCursor<K, O, Long> forwardCursor( K key ) throws Exception
     {
         return new IndexCursorAdaptor( forward.cursor( key ), true );
     }
@@ -354,7 +354,7 @@
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public IndexCursor<K, O> reverseCursor() throws Exception
+    public IndexCursor<K, O, Long> reverseCursor() throws Exception
     {
         return new IndexCursorAdaptor( reverse.cursor(), false );
     }
@@ -364,7 +364,7 @@
      * {@inheritDoc}
      */
     @SuppressWarnings("unchecked")
-    public IndexCursor<K, O> reverseCursor( Long id ) throws Exception
+    public IndexCursor<K, O, Long> reverseCursor( Long id ) throws Exception
     {
         return new IndexCursorAdaptor( reverse.cursor( id ), false );
     }

Modified: directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java (original)
+++ directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlPartition.java Sun Feb 28 22:55:33 2010
@@ -43,7 +43,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AvlPartition extends AbstractXdbmPartition
+public class AvlPartition extends AbstractXdbmPartition<Long>
 {
     private Set<AvlIndex<?, ServerEntry>> indexedAttributes;
 
@@ -65,8 +65,8 @@
     {
         setSchemaManager( schemaManager );
 
-        EvaluatorBuilder evaluatorBuilder = new EvaluatorBuilder( store, schemaManager );
-        CursorBuilder cursorBuilder = new CursorBuilder( store, evaluatorBuilder );
+        EvaluatorBuilder<Long> evaluatorBuilder = new EvaluatorBuilder<Long>( store, schemaManager );
+        CursorBuilder<Long> cursorBuilder = new CursorBuilder<Long>( store, evaluatorBuilder );
 
         // setup optimizer and registries for parent
         if ( !optimizerEnabled )
@@ -75,16 +75,16 @@
         }
         else
         {
-            optimizer = new DefaultOptimizer<ServerEntry>( store );
+            optimizer = new DefaultOptimizer<ServerEntry, Long>( store );
         }
 
-        searchEngine = new DefaultSearchEngine( store, cursorBuilder, evaluatorBuilder, optimizer );
+        searchEngine = new DefaultSearchEngine<Long>( store, cursorBuilder, evaluatorBuilder, optimizer );
 
         // initialize the store
         store.setName( getId() );
         store.setSuffixDn( suffix.getName() );
 
-        Set<Index<?, ServerEntry>> userIndices = new HashSet<Index<?, ServerEntry>>();
+        Set<Index<?, ServerEntry, Long>> userIndices = new HashSet<Index<?, ServerEntry, Long>>();
 
         for ( AvlIndex<?, ServerEntry> obj : indexedAttributes )
         {
@@ -107,35 +107,35 @@
             {
                 if ( oid.equals( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) )
                 {
-                    store.setAliasIndex( ( Index<String, ServerEntry> ) index );
+                    store.setAliasIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID ) )
                 {
-                    store.setPresenceIndex( ( Index<String, ServerEntry> ) index );
+                    store.setPresenceIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID ) )
                 {
-                    store.setOneLevelIndex( ( Index<Long, ServerEntry> ) index );
+                    store.setOneLevelIndex( ( Index<Long, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_N_DN_AT_OID ) )
                 {
-                    store.setNdnIndex( ( Index<String, ServerEntry> ) index );
+                    store.setNdnIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID ) )
                 {
-                    store.setOneAliasIndex( ( Index<Long, ServerEntry> ) index );
+                    store.setOneAliasIndex( ( Index<Long, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID ) )
                 {
-                    store.setSubAliasIndex( ( Index<Long, ServerEntry> ) index );
+                    store.setSubAliasIndex( ( Index<Long, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_UP_DN_AT_OID ) )
                 {
-                    store.setUpdnIndex( ( Index<String, ServerEntry> ) index );
+                    store.setUpdnIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( SchemaConstants.OBJECT_CLASS_AT_OID ) )
                 {
-                    store.addIndex( ( Index<String, ServerEntry> ) index );
+                    store.addIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else
                 {

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=917312&r1=917311&r2=917312&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 Sun Feb 28 22:55:33 2010
@@ -74,7 +74,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class AvlStore<E> implements Store<E>
+public class AvlStore<E> implements Store<E, Long>
 {
     /** static logger */
     private static final Logger LOG = LoggerFactory.getLogger( AvlStore.class );
@@ -120,10 +120,10 @@
     private AvlIndex<String, 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<? extends Object, E>> userIndices = new HashMap<String, AvlIndex<? extends Object, 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<? extends Object, E>> systemIndices = new HashMap<String, AvlIndex<? extends Object, E>>();
 
     /** true if initialized */
     private boolean initialized;
@@ -146,7 +146,6 @@
     /**
      * {@inheritDoc}
      */
-    @SuppressWarnings("unchecked")
     public void add( ServerEntry entry ) throws Exception
     {
         if ( entry instanceof ClonedServerEntry )
@@ -256,7 +255,7 @@
 
             if ( hasUserIndexOn( attributeOid ) )
             {
-                Index<Object, E> idx = ( Index<Object, E> ) getUserIndex( attributeOid );
+                Index<Object, E, Long> idx = ( Index<Object, E, Long> ) 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
@@ -278,15 +277,15 @@
     /**
      * {@inheritDoc}
      */
-    public void addIndex( Index<?, E> index ) throws Exception
+    public void addIndex( Index<? extends Object, E, Long> index ) throws Exception
     {
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
-            userIndices.put( index.getAttributeId(), ( AvlIndex<?, E> ) index );
+            userIndices.put( index.getAttributeId(), ( AvlIndex<? extends Object, E> ) index );
         }
         else
         {
-            userIndices.put( index.getAttributeId(), ( AvlIndex<?, E> ) convert( index ) );
+            userIndices.put( index.getAttributeId(), ( AvlIndex<? extends Object, E> ) convert( index ) );
         }
     }
 
@@ -344,7 +343,7 @@
 
             if ( hasUserIndexOn( attributeOid ) )
             {
-                Index<?, E> index = getUserIndex( attributeOid );
+                Index<?, E, Long> 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
@@ -373,7 +372,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getAliasIndex()
+    public Index<String, E, Long> getAliasIndex()
     {
         return aliasIdx;
     }
@@ -437,7 +436,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getNdnIndex()
+    public Index<String, E, Long> getNdnIndex()
     {
         return ndnIdx;
     }
@@ -446,7 +445,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<Long, E> getOneAliasIndex()
+    public Index<Long, E, Long> getOneAliasIndex()
     {
         return oneAliasIdx;
     }
@@ -455,7 +454,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<Long, E> getOneLevelIndex()
+    public Index<Long, E, Long> getOneLevelIndex()
     {
         return oneLevelIdx;
     }
@@ -483,7 +482,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getPresenceIndex()
+    public Index<String, E, Long> getPresenceIndex()
     {
         return existenceIdx;
     }
@@ -501,7 +500,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<Long, E> getSubAliasIndex()
+    public Index<Long, E, Long> getSubAliasIndex()
     {
         return subAliasIdx;
     }
@@ -510,7 +509,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<Long, E> getSubLevelIndex()
+    public Index<Long, E, Long> getSubLevelIndex()
     {
         return subLevelIdx;
     }
@@ -578,7 +577,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<?, E> getSystemIndex( String id ) throws IndexNotFoundException
+    public Index<?, E, Long> getSystemIndex( String id ) throws IndexNotFoundException
     {
         try
         {
@@ -603,7 +602,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getUpdnIndex()
+    public Index<String, E, Long> getUpdnIndex()
     {
         return updnIdx;
     }
@@ -612,7 +611,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<?, E> getUserIndex( String id ) throws IndexNotFoundException
+    public Index<? extends Object, E, Long> getUserIndex( String id ) throws IndexNotFoundException
     {
         try
         {
@@ -636,9 +635,9 @@
     /**
      * {@inheritDoc}
      */
-    public Set<Index<?, E>> getUserIndices()
+    public Set<Index<? extends Object, E, Long>> getUserIndices()
     {
-        return new HashSet<Index<?, E>>( userIndices.values() );
+        return new HashSet<Index<? extends Object, E, Long>>( userIndices.values() );
     }
 
 
@@ -806,9 +805,9 @@
     {
         if ( userIndices != null && userIndices.size() > 0 )
         {
-            Map<String, AvlIndex<?, E>> tmp = new HashMap<String, AvlIndex<?, E>>();
+            Map<String, AvlIndex<? extends Object, E>> tmp = new HashMap<String, AvlIndex<? extends Object, E>>();
 
-            for ( AvlIndex<?, E> index : userIndices.values() )
+            for ( AvlIndex<? extends Object, E> index : userIndices.values() )
             {
                 String oid = schemaManager.getAttributeTypeRegistry().getOidByName( index.getAttributeId() );
                 AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( oid );
@@ -831,7 +830,7 @@
         }
         else
         {
-            userIndices = new HashMap<String, AvlIndex<?, E>>();
+            userIndices = new HashMap<String, AvlIndex<? extends Object, E>>();
         }
     }
 
@@ -848,9 +847,9 @@
     /**
      * {@inheritDoc}
      */
-    public IndexCursor<Long, E> list( Long id ) throws Exception
+    public IndexCursor<Long, E, Long> list( Long id ) throws Exception
     {
-        IndexCursor<Long, E> cursor = oneLevelIdx.forwardCursor( id );
+        IndexCursor<Long, E, Long> cursor = oneLevelIdx.forwardCursor( id );
         cursor.beforeValue( id, null );
         return cursor;
     }
@@ -911,11 +910,11 @@
             }
         }
 
-        Cursor<IndexEntry<Long, E>> children = list( id );
+        Cursor<IndexEntry<Long, E, Long>> children = list( id );
         while ( children.next() )
         {
             // Get the child and its id
-            IndexEntry<Long, E> rec = children.get();
+            IndexEntry<Long, E, Long> rec = children.get();
             Long childId = rec.getId();
 
             /* 
@@ -973,7 +972,7 @@
         }
         else if ( hasUserIndexOn( modsOid ) )
         {
-            Index<?, E> index = getUserIndex( modsOid );
+            Index<?, E, Long> index = getUserIndex( modsOid );
 
             for ( Value<?> value : mods )
             {
@@ -1036,7 +1035,7 @@
         }
         else if ( hasUserIndexOn( modsOid ) )
         {
-            Index<?, E> index = getUserIndex( modsOid );
+            Index<?, E, Long> index = getUserIndex( modsOid );
 
             for ( Value<?> value : mods )
             {
@@ -1134,7 +1133,7 @@
         }
         else if ( hasUserIndexOn( modsOid ) )
         {
-            Index<?, E> index = getUserIndex( modsOid );
+            Index<?, E, Long> 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 ) )
@@ -1382,7 +1381,7 @@
 
             if ( hasUserIndexOn( newNormType ) )
             {
-                Index<?, E> index = getUserIndex( newNormType );
+                Index<?, E, Long> index = getUserIndex( newNormType );
                 ( ( Index ) index ).add( newNormValue, id );
 
                 // Make sure the altered entry shows the existence of the new attrib
@@ -1436,7 +1435,7 @@
 
                     if ( hasUserIndexOn( oldNormType ) )
                     {
-                        Index<?, E> index = getUserIndex( oldNormType );
+                        Index<?, E, Long> index = getUserIndex( oldNormType );
                         ( ( AvlIndex ) index ).drop( oldNormValue, id );
 
                         /*
@@ -1481,10 +1480,10 @@
     /**
      * {@inheritDoc}
      */
-    public void setAliasIndex( Index<String, E> index ) throws Exception
+    public void setAliasIndex( Index<String, E, Long> index ) throws Exception
     {
         protect( "aliasIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.aliasIdx = ( AvlIndex<String, E> ) index;
         }
@@ -1511,10 +1510,10 @@
     /**
      * {@inheritDoc}
      */
-    public void setNdnIndex( Index<String, E> index ) throws Exception
+    public void setNdnIndex( Index<String, E, Long> index ) throws Exception
     {
         protect( "ndnIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.ndnIdx = ( AvlIndex<String, E> ) index;
         }
@@ -1530,10 +1529,10 @@
     /**
      * {@inheritDoc}
      */
-    public void setOneAliasIndex( Index<Long, E> index ) throws Exception
+    public void setOneAliasIndex( Index<Long, E, Long> index ) throws Exception
     {
         protect( "oneAliasIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.oneAliasIdx = ( AvlIndex<Long, E> ) index;
         }
@@ -1549,10 +1548,10 @@
     /**
      * {@inheritDoc}
      */
-    public void setOneLevelIndex( Index<Long, E> index ) throws Exception
+    public void setOneLevelIndex( Index<Long, E, Long> index ) throws Exception
     {
         protect( "oneLevelIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.oneLevelIdx = ( AvlIndex<Long, E> ) index;
         }
@@ -1568,10 +1567,10 @@
     /**
      * {@inheritDoc}
      */
-    public void setPresenceIndex( Index<String, E> index ) throws Exception
+    public void setPresenceIndex( Index<String, E, Long> index ) throws Exception
     {
         protect( "presenceIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.existenceIdx = ( AvlIndex<String, E> ) index;
         }
@@ -1596,10 +1595,10 @@
     /**
      * {@inheritDoc}
      */
-    public void setSubAliasIndex( Index<Long, E> index ) throws Exception
+    public void setSubAliasIndex( Index<Long, E, Long> index ) throws Exception
     {
         protect( "subAliasIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.subAliasIdx = ( AvlIndex<Long, E> ) index;
         }
@@ -1615,10 +1614,10 @@
     /**
      * {@inheritDoc}
      */
-    public void setSubLevelIndex( Index<Long, E> index ) throws Exception
+    public void setSubLevelIndex( Index<Long, E, Long> index ) throws Exception
     {
         protect( "subLevelIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.subLevelIdx = ( AvlIndex<Long, E> ) index;
         }
@@ -1651,10 +1650,10 @@
     /**
      * {@inheritDoc}
      */
-    public void setUpdnIndex( Index<String, E> index ) throws Exception
+    public void setUpdnIndex( Index<String, E, Long> index ) throws Exception
     {
         protect( "updnIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.updnIdx = ( AvlIndex<String, E> ) index;
         }
@@ -1670,29 +1669,29 @@
     /**
      * {@inheritDoc}
      */
-    public void setUserIndices( Set<Index<?, E>> userIndices )
+    public void setUserIndices( Set<Index<? extends Object, E, Long>> userIndices )
     {
         protect( "setUserIndices" );
 
-        for ( Index<?, E> index : userIndices )
+        for ( Index<? extends Object, E, Long> index : userIndices )
         {
-            if ( index instanceof AvlIndex )
+            if ( index instanceof AvlIndex<?, ?> )
             {
-                this.userIndices.put( index.getAttributeId(), ( AvlIndex<?, E> ) index );
+                this.userIndices.put( index.getAttributeId(), ( AvlIndex<? extends Object, 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 );
+            AvlIndex<Object, E> avlIndex = ( AvlIndex<Object, E> ) convert( index );
 
             this.userIndices.put( index.getAttributeId(), avlIndex );
         }
     }
 
 
-    private <K> AvlIndex<K, E> convert( Index<K, E> index )
+    private <K> AvlIndex<K, E> convert( Index<K, E, Long> index )
     {
         AvlIndex<K, E> avlIndex = new AvlIndex<K, E>();
         avlIndex.setAttributeId( index.getAttributeId() );
@@ -1925,7 +1924,7 @@
         }
 
         // find all the children of the childId
-        Cursor<IndexEntry<Long, E>> cursor = subLevelIdx.forwardCursor( childId );
+        Cursor<IndexEntry<Long, E, Long>> cursor = subLevelIdx.forwardCursor( childId );
 
         List<Long> childIds = new ArrayList<Long>();
         childIds.add( childId );
@@ -2064,29 +2063,29 @@
     }
 
 
-    public Index<String, E> getEntryCsnIndex()
+    public Index<String, E, Long> getEntryCsnIndex()
     {
         return entryCsnIdx;
     }
 
 
-    public Index<String, E> getEntryUuidIndex()
+    public Index<String, E, Long> getEntryUuidIndex()
     {
         return entryUuidIdx;
     }
 
 
-    public Index<String, E> getObjectClassIndex()
+    public Index<String, E, Long> getObjectClassIndex()
     {
         return objectClassIdx;
     }
 
 
-    public void setEntryCsnIndex( Index<String, E> index ) throws Exception
+    public void setEntryCsnIndex( Index<String, E, Long> index ) throws Exception
     {
         protect( "entryCsnIndex" );
 
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.entryCsnIdx = ( AvlIndex<String, E> ) index;
         }
@@ -2130,10 +2129,10 @@
     }
 
 
-    public void setObjectClassIndex( Index<String, E> index ) throws NamingException
+    public void setObjectClassIndex( Index<String, E, Long> index ) throws NamingException
     {
         protect( "objectClassIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.objectClassIdx = ( AvlIndex<String, E> ) index;
         }
@@ -2146,10 +2145,10 @@
     }
 
 
-    public void setEntryUuidIndex( Index<String, E> index ) throws NamingException
+    public void setEntryUuidIndex( Index<String, E, Long> index ) throws NamingException
     {
         protect( "entryUuidIndex" );
-        if ( index instanceof AvlIndex )
+        if ( index instanceof AvlIndex<?, ?> )
         {
             this.entryUuidIdx = ( AvlIndex<String, E> ) index;
         }
@@ -2168,4 +2167,14 @@
     public void sync() throws Exception
     {
     }
+
+
+    /**
+     * @{inhertDoc}
+     */
+    public Long getDefaultId()
+    {
+        return 1L;
+    }
+
 }

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=917312&r1=917311&r2=917312&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 Sun Feb 28 22:55:33 2010
@@ -198,7 +198,7 @@
         assertNotNull( store.getSuffix() );
 
         assertEquals( 0, store.getUserIndices().size() );
-        Set<Index<?, Attributes>> set = new HashSet<Index<?, Attributes>>();
+        Set<Index<?, Attributes, Long>> set = new HashSet<Index<?, Attributes, Long>>();
         set.add( new AvlIndex<Object, Attributes>( "foo" ) );
         store.setUserIndices( set );
         assertEquals( set.size(), store.getUserIndices().size() );
@@ -422,7 +422,7 @@
     {
         assertEquals( 3, store.getChildCount( 1L ) );
 
-        Cursor<IndexEntry<Long, ServerEntry>> cursor = store.list( 1L );
+        Cursor<IndexEntry<Long, ServerEntry, Long>> cursor = store.list( 1L );
         assertNotNull( cursor );
         cursor.beforeFirst();
         assertTrue( cursor.next() );
@@ -458,7 +458,7 @@
 
         assertEquals( 19, idx.count() );
 
-        Cursor<IndexEntry<Long, Attributes>> cursor = idx.forwardCursor( 2L );
+        Cursor<IndexEntry<Long, Attributes, Long>> cursor = idx.forwardCursor( 2L );
 
         assertTrue( cursor.next() );
         assertEquals( 2, ( long ) cursor.get().getId() );
@@ -562,7 +562,7 @@
     @Test
     public void testConvertIndex() throws Exception
     {
-        Index nonAvlIndex = new Index()
+        Index nonAvlIndex = new Index<Object, ServerEntry, Long>()
         {
 
             public void add( Object attrVal, Long id ) throws Exception

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java Sun Feb 28 22:55:33 2010
@@ -93,9 +93,9 @@
             partition.setSuffix( createPartition.suffix() );
             partition.setSchemaManager( service.getSchemaManager() );
 
-            if ( partition instanceof BTreePartition )
+            if ( partition instanceof BTreePartition<?> )
             {
-                BTreePartition btreePartition = ( BTreePartition ) partition;
+                BTreePartition<Object> btreePartition = ( BTreePartition<Object> ) partition;
                 btreePartition.setCacheSize( createPartition.cacheSize() );
                 btreePartition.setPartitionDir( new File( service.getWorkingDirectory(), createPartition.name() ) );
 
@@ -104,7 +104,7 @@
 
                 for ( CreateIndex createIndex : indexes )
                 {
-                    Index<?, ServerEntry> index = createIndex.type().newInstance();
+                    Index<? extends Object, ServerEntry, Object> index = createIndex.type().newInstance();
                     index.setAttributeId( createIndex.attribute() );
                     index.setCacheSize( createIndex.cacheSize() );
                     btreePartition.addIndexedAttributes( index );

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java Sun Feb 28 22:55:33 2010
@@ -158,7 +158,7 @@
             "system" ) );
 
         // Add objectClass attribute for the system partition
-        Set<Index<?, ServerEntry>> indexedAttrs = new HashSet<Index<?, ServerEntry>>();
+        Set<Index<?, ServerEntry, Long>> indexedAttrs = new HashSet<Index<?, ServerEntry, Long>>();
         indexedAttrs.add( new JdbmIndex<Object, ServerEntry>( SchemaConstants.OBJECT_CLASS_AT ) );
         ( ( JdbmPartition ) systemPartition ).setIndexedAttributes( indexedAttrs );
 

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/partition/Partition.java Sun Feb 28 22:55:33 2010
@@ -227,16 +227,6 @@
 
 
     /**
-     * Looks up an entry by id.
-     *
-     * @param id the id of the entry to look up
-     * @return the entry with the id
-     * @throws Exception if there are any problems
-     */
-    ClonedServerEntry lookup( Long id ) throws Exception;
-
-
-    /**
      * Fast operation to check and see if a particular entry exists.
      *
      * @param opContext The context used to pass informations

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java Sun Feb 28 22:55:33 2010
@@ -346,15 +346,6 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.core.partition.Partition#lookup(java.lang.Long)
-     */
-    public ClonedServerEntry lookup( Long id ) throws Exception
-    {
-        return wrapped.lookup( id );
-    }
-
-
     /**
      * {@inheritDoc}
      */

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/operations/search/SearchWithIndicesITest.java Sun Feb 28 22:55:33 2010
@@ -89,7 +89,8 @@
         }
 
         Partition systemPartition = service.getSystemPartition();
-        Set<Index<?, ServerEntry>> indexedAtributes = ( ( JdbmPartition ) systemPartition ).getIndexedAttributes();
+        Set<Index<? extends Object, ServerEntry, Long>> indexedAtributes = ( ( JdbmPartition ) systemPartition )
+            .getIndexedAttributes();
         indexedAtributes.add( new JdbmIndex<String, ServerEntry>( "gidNumber" ) );
 
         // -------------------------------------------------------------------

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=917312&r1=917311&r2=917312&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 Sun Feb 28 22:55:33 2010
@@ -99,7 +99,7 @@
     private LdifPartition configPartition;
 
     /** the search engine of the partition */
-    private SearchEngine<ServerEntry> se;
+    private SearchEngine<ServerEntry, Long> se;
 
     /** the schema manager set in the config partition */
     private SchemaManager schemaManager;
@@ -159,7 +159,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( configPartition.getSuffixDn(),
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
             AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
 
         if ( !cursor.next() )
@@ -168,7 +168,8 @@
             return null;
         }
 
-        ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+        ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+            .get();
         cursor.close();
 
         ClonedServerEntry ldapServerEntry = configPartition.lookup( forwardEntry.getId() );
@@ -198,7 +199,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( configPartition.getSuffixDn(),
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
             AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
 
         if ( !cursor.next() )
@@ -207,7 +208,8 @@
             return null;
         }
 
-        ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+        ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+            .get();
         cursor.close();
 
         ClonedServerEntry kdcEntry = configPartition.lookup( forwardEntry.getId() );
@@ -339,7 +341,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( configPartition.getSuffixDn(),
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
             AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
 
         if ( !cursor.next() )
@@ -348,7 +350,8 @@
             return null;
         }
 
-        ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+        ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+            .get();
         cursor.close();
 
         ClonedServerEntry dnsEntry = configPartition.lookup( forwardEntry.getId() );
@@ -379,7 +382,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( configPartition.getSuffixDn(),
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
             AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
 
         if ( !cursor.next() )
@@ -388,7 +391,8 @@
             return null;
         }
 
-        ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+        ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+            .get();
         cursor.close();
 
         ClonedServerEntry dhcpEntry = configPartition.lookup( forwardEntry.getId() );
@@ -412,7 +416,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( configPartition.getSuffixDn(),
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
             AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
 
         if ( !cursor.next() )
@@ -421,7 +425,8 @@
             return null;
         }
 
-        ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+        ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+            .get();
         cursor.close();
 
         ClonedServerEntry ntpEntry = configPartition.lookup( forwardEntry.getId() );
@@ -451,7 +456,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( configPartition.getSuffixDn(),
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
             AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
 
         if ( !cursor.next() )
@@ -460,7 +465,8 @@
             return null;
         }
 
-        ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+        ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+            .get();
         cursor.close();
 
         ClonedServerEntry httpEntry = configPartition.lookup( forwardEntry.getId() );
@@ -515,7 +521,7 @@
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
 
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( configPartition.getSuffixDn(),
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( configPartition.getSuffixDn(),
             AliasDerefMode.NEVER_DEREF_ALIASES, filter, controls );
 
         if ( !cursor.next() )
@@ -525,7 +531,8 @@
                 + configPartition.getSuffixDn() );
         }
 
-        ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+        ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+            .get();
         cursor.close();
 
         ClonedServerEntry dsEntry = configPartition.lookup( forwardEntry.getId() );
@@ -658,14 +665,15 @@
         PresenceNode filter = new PresenceNode( "ads-interceptorId" );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( interceptorsDN, AliasDerefMode.NEVER_DEREF_ALIASES, filter,
-            controls );
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( interceptorsDN, AliasDerefMode.NEVER_DEREF_ALIASES,
+            filter, controls );
 
         Set<InterceptorConfig> set = new TreeSet<InterceptorConfig>();
 
         while ( cursor.next() )
         {
-            ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+            ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+                .get();
             ServerEntry interceptorEntry = configPartition.lookup( forwardEntry.getId() );
 
             String id = getString( "ads-interceptorId", interceptorEntry );
@@ -703,14 +711,15 @@
         PresenceNode filter = new PresenceNode( "ads-partitionId" );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( partitionsDN, AliasDerefMode.NEVER_DEREF_ALIASES, filter,
-            controls );
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( partitionsDN, AliasDerefMode.NEVER_DEREF_ALIASES,
+            filter, controls );
 
         Map<String, Partition> partitions = new HashMap<String, Partition>();
 
         while ( cursor.next() )
         {
-            ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+            ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+                .get();
             ServerEntry partitionEntry = configPartition.lookup( forwardEntry.getId() );
 
             if ( !isEnabled( partitionEntry ) )
@@ -769,26 +778,27 @@
 
         String indexesDN = partitionEntry.get( "ads-partitionIndexedAttributes" ).getString();
 
-        Set<Index<?, ServerEntry>> indexedAttributes = getIndexes( new LdapDN( indexesDN ) );
+        Set<Index<?, ServerEntry, Long>> indexedAttributes = getIndexes( new LdapDN( indexesDN ) );
         partition.setIndexedAttributes( indexedAttributes );
 
         return partition;
     }
 
 
-    private Set<Index<?, ServerEntry>> getIndexes( LdapDN indexesDN ) throws Exception
+    private Set<Index<?, ServerEntry, Long>> getIndexes( LdapDN indexesDN ) throws Exception
     {
         PresenceNode filter = new PresenceNode( "ads-indexAttributeId" );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( indexesDN, AliasDerefMode.NEVER_DEREF_ALIASES, filter,
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( indexesDN, AliasDerefMode.NEVER_DEREF_ALIASES, filter,
             controls );
 
-        Set<Index<?, ServerEntry>> indexes = new HashSet<Index<?, ServerEntry>>();
+        Set<Index<?, ServerEntry, Long>> indexes = new HashSet<Index<?, ServerEntry, Long>>();
 
         while ( cursor.next() )
         {
-            ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+            ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+                .get();
             ServerEntry indexEntry = configPartition.lookup( forwardEntry.getId() );
 
             if ( !isEnabled( indexEntry ) )
@@ -832,14 +842,15 @@
         PresenceNode filter = new PresenceNode( "ads-transportId" );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( transportsDN, AliasDerefMode.NEVER_DEREF_ALIASES, filter,
-            controls );
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( transportsDN, AliasDerefMode.NEVER_DEREF_ALIASES,
+            filter, controls );
 
         List<Transport> transports = new ArrayList<Transport>();
 
         while ( cursor.next() )
         {
-            ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+            ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+                .get();
             ServerEntry transportEntry = configPartition.lookup( forwardEntry.getId() );
 
             if ( !isEnabled( transportEntry ) )
@@ -1012,14 +1023,15 @@
         PresenceNode filter = new PresenceNode( "ads-httpWarFile" );
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
-        IndexCursor<Long, ServerEntry> cursor = se.cursor( webAppsDN, AliasDerefMode.NEVER_DEREF_ALIASES, filter,
+        IndexCursor<Long, ServerEntry, Long> cursor = se.cursor( webAppsDN, AliasDerefMode.NEVER_DEREF_ALIASES, filter,
             controls );
 
         Set<WebApp> webApps = new HashSet<WebApp>();
 
         while ( cursor.next() )
         {
-            ForwardIndexEntry<Long, ServerEntry> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry> ) cursor.get();
+            ForwardIndexEntry<Long, ServerEntry, Long> forwardEntry = ( ForwardIndexEntry<Long, ServerEntry, Long> ) cursor
+                .get();
             ServerEntry webAppEntry = configPartition.lookup( forwardEntry.getId() );
 
             WebApp app = new WebApp();

Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Sun Feb 28 22:55:33 2010
@@ -45,7 +45,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class JdbmPartition extends AbstractXdbmPartition
+public class JdbmPartition extends AbstractXdbmPartition<Long>
 {
 
     /**
@@ -62,8 +62,8 @@
     {
         store.setWorkingDirectory( getPartitionDir() );
 
-        EvaluatorBuilder evaluatorBuilder = new EvaluatorBuilder( store, schemaManager );
-        CursorBuilder cursorBuilder = new CursorBuilder( store, evaluatorBuilder );
+        EvaluatorBuilder<Long> evaluatorBuilder = new EvaluatorBuilder<Long>( store, schemaManager );
+        CursorBuilder<Long> cursorBuilder = new CursorBuilder<Long>( store, evaluatorBuilder );
 
         // setup optimizer and registries for parent
         if ( !optimizerEnabled )
@@ -72,10 +72,10 @@
         }
         else
         {
-            optimizer = new DefaultOptimizer<ServerEntry>( store );
+            optimizer = new DefaultOptimizer<ServerEntry, Long>( store );
         }
 
-        searchEngine = new DefaultSearchEngine( store, cursorBuilder, evaluatorBuilder, optimizer );
+        searchEngine = new DefaultSearchEngine<Long>( store, cursorBuilder, evaluatorBuilder, optimizer );
 
         // initialize the store
         store.setCacheSize( cacheSize );
@@ -86,13 +86,13 @@
         store.setSuffixDn( suffix.getNormName() );
         store.setWorkingDirectory( getPartitionDir() );
 
-        Set<Index<?, ServerEntry>> userIndices = new HashSet<Index<?, ServerEntry>>();
+        Set<Index<?, ServerEntry, Long>> userIndices = new HashSet<Index<?, ServerEntry, Long>>();
 
-        for ( Index<?, ServerEntry> obj : getIndexedAttributes() )
+        for ( Index<?, ServerEntry, Long> obj : getIndexedAttributes() )
         {
-            Index<?, ServerEntry> index;
+            Index<?, ServerEntry, Long> index;
 
-            if ( obj instanceof JdbmIndex )
+            if ( obj instanceof JdbmIndex<?, ?> )
             {
                 index = ( JdbmIndex<?, ServerEntry> ) obj;
             }
@@ -110,43 +110,43 @@
             {
                 if ( oid.equals( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) )
                 {
-                    store.setAliasIndex( ( Index<String, ServerEntry> ) index );
+                    store.setAliasIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID ) )
                 {
-                    store.setPresenceIndex( ( Index<String, ServerEntry> ) index );
+                    store.setPresenceIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID ) )
                 {
-                    store.setOneLevelIndex( ( Index<Long, ServerEntry> ) index );
+                    store.setOneLevelIndex( ( Index<Long, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_N_DN_AT_OID ) )
                 {
-                    store.setNdnIndex( ( Index<String, ServerEntry> ) index );
+                    store.setNdnIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID ) )
                 {
-                    store.setOneAliasIndex( ( Index<Long, ServerEntry> ) index );
+                    store.setOneAliasIndex( ( Index<Long, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID ) )
                 {
-                    store.setSubAliasIndex( ( Index<Long, ServerEntry> ) index );
+                    store.setSubAliasIndex( ( Index<Long, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( ApacheSchemaConstants.APACHE_UP_DN_AT_OID ) )
                 {
-                    store.setUpdnIndex( ( Index<String, ServerEntry> ) index );
+                    store.setUpdnIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( SchemaConstants.OBJECT_CLASS_AT_OID ) )
                 {
-                    store.setObjectClassIndex( ( Index<String, ServerEntry> ) index );
+                    store.setObjectClassIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( SchemaConstants.ENTRY_CSN_AT_OID ) )
                 {
-                    store.setEntryCsnIndex( ( Index<String, ServerEntry> ) index );
+                    store.setEntryCsnIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else if ( oid.equals( SchemaConstants.ENTRY_UUID_AT_OID ) )
                 {
-                    store.setEntryUuidIndex( ( Index<String, ServerEntry> ) index );
+                    store.setEntryUuidIndex( ( Index<String, ServerEntry, Long> ) index );
                 }
                 else
                 {
@@ -165,19 +165,19 @@
     }
 
 
-    public Index<String, ServerEntry> getObjectClassIndex()
+    public Index<String, ServerEntry, Long> getObjectClassIndex()
     {
         return store.getObjectClassIndex();
     }
 
 
-    public Index<String, ServerEntry> getEntryCsnIndex()
+    public Index<String, ServerEntry, Long> getEntryCsnIndex()
     {
         return store.getEntryCsnIndex();
     }
 
 
-    public Index<String, ServerEntry> getEntryUuidIndex()
+    public Index<String, ServerEntry, Long> getEntryUuidIndex()
     {
         return store.getEntryUuidIndex();
     }

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java Sun Feb 28 22:55:33 2010
@@ -55,7 +55,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class JdbmIndex<K, O> implements Index<K, O>
+public class JdbmIndex<K, O> implements Index<K, O, Long>
 {
     /** A logger for this class */
     private static final Logger LOG = LoggerFactory.getLogger( JdbmIndex.class.getSimpleName() );
@@ -482,30 +482,30 @@
     // Index Cursor Operations
     // ------------------------------------------------------------------------
     @SuppressWarnings("unchecked")
-    public IndexCursor<K, O> reverseCursor() throws Exception
+    public IndexCursor<K, O, Long> reverseCursor() throws Exception
     {
-        return new IndexCursorAdaptor<K, O>( ( Cursor ) reverse.cursor(), false );
+        return new IndexCursorAdaptor<K, O, Long>( ( Cursor ) reverse.cursor(), false );
     }
 
 
     @SuppressWarnings("unchecked")
-    public IndexCursor<K, O> forwardCursor() throws Exception
+    public IndexCursor<K, O, Long> forwardCursor() throws Exception
     {
-        return new IndexCursorAdaptor<K, O>( ( Cursor ) forward.cursor(), true );
+        return new IndexCursorAdaptor<K, O, Long>( ( Cursor ) forward.cursor(), true );
     }
 
 
     @SuppressWarnings("unchecked")
-    public IndexCursor<K, O> reverseCursor( Long id ) throws Exception
+    public IndexCursor<K, O, Long> reverseCursor( Long id ) throws Exception
     {
-        return new IndexCursorAdaptor<K, O>( ( Cursor ) reverse.cursor( id ), false );
+        return new IndexCursorAdaptor<K, O, Long>( ( Cursor ) reverse.cursor( id ), false );
     }
 
 
     @SuppressWarnings("unchecked")
-    public IndexCursor<K, O> forwardCursor( K key ) throws Exception
+    public IndexCursor<K, O, Long> forwardCursor( K key ) throws Exception
     {
-        return new IndexCursorAdaptor<K, O>( ( Cursor ) forward.cursor( key ), true );
+        return new IndexCursorAdaptor<K, O, Long>( ( Cursor ) forward.cursor( key ), true );
     }
 
 

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=917312&r1=917311&r2=917312&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 Sun Feb 28 22:55:33 2010
@@ -68,7 +68,7 @@
 import org.slf4j.LoggerFactory;
 
 
-public class JdbmStore<E> implements Store<E>
+public class JdbmStore<E> implements Store<E, Long>
 {
     /** static logger */
     private static final Logger LOG = LoggerFactory.getLogger( JdbmStore.class );
@@ -92,10 +92,10 @@
     private JdbmMasterTable<ServerEntry> master;
 
     /** a map of attributeType numeric ID to user userIndices */
-    private Map<String, Index<?, E>> userIndices = new HashMap<String, Index<?, E>>();
+    private Map<String, Index<?, E, Long>> userIndices = new HashMap<String, Index<?, E, Long>>();
 
     /** a map of attributeType numeric ID to system userIndices */
-    private Map<String, Index<?, E>> systemIndices = new HashMap<String, Index<?, E>>();
+    private Map<String, Index<?, E, Long>> systemIndices = new HashMap<String, Index<?, E, Long>>();
 
     /** true if initialized */
     private boolean initialized;
@@ -242,6 +242,12 @@
     // E N D   C O N F I G U R A T I O N   M E T H O D S
     // -----------------------------------------------------------------------
 
+    public Long getDefaultId()
+    {
+        return 1L;
+    };
+
+
     /**
      * Initialize the JDBM storage system.
      *
@@ -300,9 +306,9 @@
     {
         if ( systemIndices.size() > 0 )
         {
-            HashMap<String, Index<?, E>> tmp = new HashMap<String, Index<?, E>>();
+            HashMap<String, Index<?, E, Long>> tmp = new HashMap<String, Index<?, E, Long>>();
 
-            for ( Index<?, E> index : systemIndices.values() )
+            for ( Index<?, E, Long> index : systemIndices.values() )
             {
                 String oid = schemaManager.getAttributeTypeRegistry().getOidByName( index.getAttributeId() );
                 tmp.put( oid, index );
@@ -418,9 +424,9 @@
     {
         if ( ( userIndices != null ) && ( userIndices.size() > 0 ) )
         {
-            Map<String, Index<?, E>> tmp = new HashMap<String, Index<?, E>>();
+            Map<String, Index<?, E, Long>> tmp = new HashMap<String, Index<?, E, Long>>();
 
-            for ( Index<?, E> index : userIndices.values() )
+            for ( Index<?, E, Long> index : userIndices.values() )
             {
                 String oid = schemaManager.getAttributeTypeRegistry().getOidByName( index.getAttributeId() );
 
@@ -451,7 +457,7 @@
         }
         else
         {
-            userIndices = new HashMap<String, Index<?, E>>();
+            userIndices = new HashMap<String, Index<?, E, Long>>();
         }
     }
 
@@ -471,12 +477,12 @@
             return;
         }
 
-        List<Index<?, E>> array = new ArrayList<Index<?, E>>();
+        List<Index<?, E, Long>> array = new ArrayList<Index<?, E, Long>>();
         array.addAll( userIndices.values() );
         array.addAll( systemIndices.values() );
         MultiException errors = new MultiException( I18n.err( I18n.ERR_577 ) );
 
-        for ( Index<?, E> index : array )
+        for ( Index<?, E, Long> index : array )
         {
             try
             {
@@ -545,7 +551,7 @@
             return;
         }
 
-        List<Index<?, E>> array = new ArrayList<Index<?, E>>();
+        List<Index<?, E, Long>> array = new ArrayList<Index<?, E, Long>>();
         array.addAll( userIndices.values() );
         array.add( ndnIdx );
         array.add( updnIdx );
@@ -560,7 +566,7 @@
         array.add( objectClassIdx );
 
         // Sync all user defined userIndices
-        for ( Index<?, E> idx : array )
+        for ( Index<?, E, Long> idx : array )
         {
             idx.sync();
         }
@@ -574,9 +580,9 @@
     // I N D E X   M E T H O D S
     // ------------------------------------------------------------------------
 
-    private <K> JdbmIndex<K, E> convertIndex( Index<K, E> index )
+    private <K> JdbmIndex<K, E> convertIndex( Index<K, E, Long> index )
     {
-        if ( index instanceof JdbmIndex )
+        if ( index instanceof JdbmIndex<?, ?> )
         {
             return ( JdbmIndex<K, E> ) index;
         }
@@ -591,23 +597,23 @@
     }
 
 
-    public void setUserIndices( Set<Index<?, E>> userIndices )
+    public void setUserIndices( Set<Index<?, E, Long>> userIndices )
     {
         protect( "userIndices" );
-        for ( Index<?, E> index : userIndices )
+        for ( Index<?, E, Long> index : userIndices )
         {
             this.userIndices.put( index.getAttributeId(), convertIndex( index ) );
         }
     }
 
 
-    public Set<Index<?, E>> getUserIndices()
+    public Set<Index<?, E, Long>> getUserIndices()
     {
-        return new HashSet<Index<?, E>>( userIndices.values() );
+        return new HashSet<Index<?, E, Long>>( userIndices.values() );
     }
 
 
-    public void addIndex( Index<?, E> index ) throws Exception
+    public void addIndex( Index<?, E, Long> index ) throws Exception
     {
         userIndices.put( index.getAttributeId(), convertIndex( index ) );
     }
@@ -619,7 +625,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getPresenceIndex()
+    public Index<String, E, Long> getPresenceIndex()
     {
         return presenceIdx;
     }
@@ -628,7 +634,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setPresenceIndex( Index<String, E> index ) throws Exception
+    public void setPresenceIndex( Index<String, E, Long> index ) throws Exception
     {
         protect( "presenceIndex" );
         presenceIdx = convertIndex( index );
@@ -639,7 +645,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<Long, E> getOneLevelIndex()
+    public Index<Long, E, Long> getOneLevelIndex()
     {
         return oneLevelIdx;
     }
@@ -648,7 +654,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setOneLevelIndex( Index<Long, E> index ) throws Exception
+    public void setOneLevelIndex( Index<Long, E, Long> index ) throws Exception
     {
         protect( "hierarchyIndex" );
         oneLevelIdx = convertIndex( index );
@@ -659,7 +665,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getAliasIndex()
+    public Index<String, E, Long> getAliasIndex()
     {
         return aliasIdx;
     }
@@ -668,7 +674,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setAliasIndex( Index<String, E> index ) throws NamingException
+    public void setAliasIndex( Index<String, E, Long> index ) throws NamingException
     {
         protect( "aliasIndex" );
         aliasIdx = convertIndex( index );
@@ -679,7 +685,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<Long, E> getOneAliasIndex()
+    public Index<Long, E, Long> getOneAliasIndex()
     {
         return oneAliasIdx;
     }
@@ -688,7 +694,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setOneAliasIndex( Index<Long, E> index ) throws NamingException
+    public void setOneAliasIndex( Index<Long, E, Long> index ) throws NamingException
     {
         protect( "oneAliasIndex" );
         oneAliasIdx = convertIndex( index );
@@ -699,7 +705,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<Long, E> getSubAliasIndex()
+    public Index<Long, E, Long> getSubAliasIndex()
     {
         return subAliasIdx;
     }
@@ -708,7 +714,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setSubAliasIndex( Index<Long, E> index ) throws NamingException
+    public void setSubAliasIndex( Index<Long, E, Long> index ) throws NamingException
     {
         protect( "subAliasIndex" );
         subAliasIdx = convertIndex( index );
@@ -719,7 +725,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getUpdnIndex()
+    public Index<String, E, Long> getUpdnIndex()
     {
         return updnIdx;
     }
@@ -728,7 +734,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setUpdnIndex( Index<String, E> index ) throws NamingException
+    public void setUpdnIndex( Index<String, E, Long> index ) throws NamingException
     {
         protect( "updnIndex" );
         updnIdx = convertIndex( index );
@@ -739,7 +745,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getNdnIndex()
+    public Index<String, E, Long> getNdnIndex()
     {
         return ndnIdx;
     }
@@ -748,7 +754,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setNdnIndex( Index<String, E> index ) throws NamingException
+    public void setNdnIndex( Index<String, E, Long> index ) throws NamingException
     {
         protect( "ndnIndex" );
         ndnIdx = convertIndex( index );
@@ -759,7 +765,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<Long, E> getSubLevelIndex()
+    public Index<Long, E, Long> getSubLevelIndex()
     {
         return subLevelIdx;
     }
@@ -768,7 +774,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setSubLevelIndex( Index<Long, E> index ) throws NamingException
+    public void setSubLevelIndex( Index<Long, E, Long> index ) throws NamingException
     {
         protect( "subLevelIndex" );
         subLevelIdx = convertIndex( index );
@@ -779,7 +785,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getObjectClassIndex()
+    public Index<String, E, Long> getObjectClassIndex()
     {
         return objectClassIdx;
     }
@@ -788,7 +794,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setObjectClassIndex( Index<String, E> index ) throws NamingException
+    public void setObjectClassIndex( Index<String, E, Long> index ) throws NamingException
     {
         protect( "objectClassIndex" );
         objectClassIdx = convertIndex( index );
@@ -799,7 +805,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getEntryUuidIndex()
+    public Index<String, E, Long> getEntryUuidIndex()
     {
         return entryUuidIdx;
     }
@@ -808,7 +814,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setEntryUuidIndex( Index<String, E> index ) throws NamingException
+    public void setEntryUuidIndex( Index<String, E, Long> index ) throws NamingException
     {
         protect( "entryUuidIndex" );
         entryUuidIdx = convertIndex( index );
@@ -819,7 +825,7 @@
     /**
      * {@inheritDoc}
      */
-    public Index<String, E> getEntryCsnIndex()
+    public Index<String, E, Long> getEntryCsnIndex()
     {
         return entryCsnIdx;
     }
@@ -828,7 +834,7 @@
     /**
      * {@inheritDoc}
      */
-    public void setEntryCsnIndex( Index<String, E> index ) throws NamingException
+    public void setEntryCsnIndex( Index<String, E, Long> index ) throws NamingException
     {
         protect( "entryCsnIndex" );
         entryCsnIdx = convertIndex( index );
@@ -860,7 +866,7 @@
     }
 
 
-    public Index<?, E> getUserIndex( String id ) throws IndexNotFoundException
+    public Index<?, E, Long> getUserIndex( String id ) throws IndexNotFoundException
     {
         try
         {
@@ -882,7 +888,7 @@
     }
 
 
-    public Index<?, E> getSystemIndex( String id ) throws IndexNotFoundException
+    public Index<?, E, Long> getSystemIndex( String id ) throws IndexNotFoundException
     {
         try
         {
@@ -1271,7 +1277,7 @@
 
             if ( hasUserIndexOn( attributeOid ) )
             {
-                Index<Object, E> idx = ( Index<Object, E> ) getUserIndex( attributeOid );
+                Index<Object, E, Long> idx = ( Index<Object, E, Long> ) 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
@@ -1344,7 +1350,7 @@
 
             if ( hasUserIndexOn( attributeOid ) )
             {
-                Index<?, E> index = getUserIndex( attributeOid );
+                Index<?, E, Long> 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
@@ -1373,9 +1379,9 @@
      * @return an IndexEntry Cursor over the child entries
      * @throws Exception on failures to access the underlying store
      */
-    public IndexCursor<Long, E> list( Long id ) throws Exception
+    public IndexCursor<Long, E, Long> list( Long id ) throws Exception
     {
-        IndexCursor<Long, E> cursor = oneLevelIdx.forwardCursor( id );
+        IndexCursor<Long, E, Long> cursor = oneLevelIdx.forwardCursor( id );
         cursor.beforeValue( id, null );
         return cursor;
     }
@@ -1441,7 +1447,7 @@
         }
         else if ( hasUserIndexOn( modsOid ) )
         {
-            Index<?, E> index = getUserIndex( modsOid );
+            Index<?, E, Long> index = getUserIndex( modsOid );
 
             for ( Value<?> value : mods )
             {
@@ -1504,7 +1510,7 @@
         }
         else if ( hasUserIndexOn( modsOid ) )
         {
-            Index<?, E> index = getUserIndex( modsOid );
+            Index<?, E, Long> index = getUserIndex( modsOid );
 
             for ( Value<?> value : mods )
             {
@@ -1605,7 +1611,7 @@
         }
         else if ( hasUserIndexOn( modsOid ) )
         {
-            Index<?, E> index = getUserIndex( modsOid );
+            Index<?, E, Long> index = getUserIndex( modsOid );
 
             // if the id exists in the index drop all existing attribute 
             // value index entries and add new ones
@@ -1778,7 +1784,7 @@
 
             if ( hasUserIndexOn( newNormType ) )
             {
-                Index<?, E> index = getUserIndex( newNormType );
+                Index<?, E, Long> index = getUserIndex( newNormType );
                 ( ( JdbmIndex ) index ).add( newNormValue, id );
 
                 // Make sure the altered entry shows the existence of the new attrib
@@ -1832,7 +1838,7 @@
 
                     if ( hasUserIndexOn( oldNormType ) )
                     {
-                        Index<?, E> index = getUserIndex( oldNormType );
+                        Index<?, E, Long> index = getUserIndex( oldNormType );
                         ( ( JdbmIndex ) index ).drop( oldNormValue, id );
 
                         /*
@@ -1934,12 +1940,12 @@
             }
         }
 
-        Cursor<IndexEntry<Long, E>> children = list( id );
+        Cursor<IndexEntry<Long, E, Long>> children = list( id );
 
         while ( children.next() )
         {
             // Get the child and its id
-            IndexEntry<Long, E> rec = children.get();
+            IndexEntry<Long, E, Long> rec = children.get();
             Long childId = rec.getId();
 
             /* 
@@ -2080,7 +2086,7 @@
         }
 
         // find all the children of the childId
-        Cursor<IndexEntry<Long, E>> cursor = subLevelIdx.forwardCursor( childId );
+        Cursor<IndexEntry<Long, E, Long>> cursor = subLevelIdx.forwardCursor( childId );
 
         List<Long> childIds = new ArrayList<Long>();
         childIds.add( childId );

Modified: directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java Sun Feb 28 22:55:33 2010
@@ -57,7 +57,7 @@
 public class JdbmIndexTest
 {
     private static File dbFileDir;
-    Index<String, ServerEntry> idx;
+    Index<String, ServerEntry, Long> idx;
     private static SchemaManager schemaManager;
 
 
@@ -516,21 +516,21 @@
         assertEquals( 3, idx.count() );
 
         // use forward index's cursor
-        Cursor<IndexEntry<String, ServerEntry>> cursor = idx.forwardCursor();
+        Cursor<IndexEntry<String, ServerEntry, Long>> cursor = idx.forwardCursor();
         cursor.beforeFirst();
 
         cursor.next();
-        IndexEntry<String, ServerEntry> e1 = cursor.get();
+        IndexEntry<String, ServerEntry, Long> e1 = cursor.get();
         assertEquals( 555L, ( long ) e1.getId() );
         assertEquals( "bar", e1.getValue() );
 
         cursor.next();
-        IndexEntry<String, ServerEntry> e2 = cursor.get();
+        IndexEntry<String, ServerEntry, Long> e2 = cursor.get();
         assertEquals( 333L, ( long ) e2.getId() );
         assertEquals( "foo", e2.getValue() );
 
         cursor.next();
-        IndexEntry<String, ServerEntry> e3 = cursor.get();
+        IndexEntry<String, ServerEntry, Long> e3 = cursor.get();
         assertEquals( 1234L, ( long ) e3.getId() );
         assertEquals( "foo", e3.getValue() );
 

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=917312&r1=917311&r2=917312&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 Sun Feb 28 22:55:33 2010
@@ -216,7 +216,7 @@
         assertNull( store.getSuffix() );
 
         assertEquals( 0, store.getUserIndices().size() );
-        Set<Index<?, Attributes>> set = new HashSet<Index<?, Attributes>>();
+        Set<Index<?, Attributes, Long>> set = new HashSet<Index<?, Attributes, Long>>();
         set.add( new JdbmIndex<Object, Attributes>( "foo" ) );
         store.setUserIndices( set );
         assertEquals( set.size(), store.getUserIndices().size() );
@@ -455,7 +455,7 @@
     {
         assertEquals( 3, store.getChildCount( 1L ) );
 
-        Cursor<IndexEntry<Long, ServerEntry>> cursor = store.list( 1L );
+        Cursor<IndexEntry<Long, ServerEntry, Long>> cursor = store.list( 1L );
         assertNotNull( cursor );
         cursor.beforeFirst();
         assertTrue( cursor.next() );
@@ -491,7 +491,7 @@
 
         assertEquals( 19, idx.count() );
 
-        Cursor<IndexEntry<Long, Attributes>> cursor = idx.forwardCursor( 2L );
+        Cursor<IndexEntry<Long, Attributes, Long>> cursor = idx.forwardCursor( 2L );
 
         assertTrue( cursor.next() );
         assertEquals( 2, ( long ) cursor.get().getId() );
@@ -595,7 +595,7 @@
     @Test
     public void testConvertIndex() throws Exception
     {
-        Index nonJdbmIndex = new Index()
+        Index nonJdbmIndex = new Index<Object, Object, Long>()
         {
 
             public void add( Object attrVal, Long id ) throws Exception



Mime
View raw message