You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2010/02/28 23:55:35 UTC

svn commit: r917312 [5/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/...

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java Sun Feb 28 22:55:33 2010
@@ -62,7 +62,7 @@
     private static final Logger LOG = LoggerFactory.getLogger( SubstringTest.class.getSimpleName() );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     static SchemaManager schemaManager = null;
 
 
@@ -147,8 +147,8 @@
     public void testIndexedCnStartsWithJ() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, "j", null );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        SubstringCursor cursor = new SubstringCursor( store, evaluator );
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
 
         assertEquals( node, evaluator.getExpression() );
         assertTrue( cursor.isElementReused() );
@@ -191,7 +191,7 @@
 
         // ---------- test first ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.first();
 
         assertTrue( cursor.available() );
@@ -225,7 +225,7 @@
 
         // ---------- test afterLast ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -261,7 +261,7 @@
 
         // ---------- test last ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.last();
         assertTrue( cursor.available() );
 
@@ -299,8 +299,8 @@
     public void testIndexedCnStartsWithJim() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, "jim", null );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        SubstringCursor cursor = new SubstringCursor( store, evaluator );
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
 
         assertEquals( node, evaluator.getExpression() );
         assertTrue( cursor.isElementReused() );
@@ -325,7 +325,7 @@
 
         // ---------- test first ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.first();
 
         assertTrue( cursor.available() );
@@ -345,7 +345,7 @@
 
         // ---------- test afterLast ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -367,7 +367,7 @@
 
         // ---------- test last ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.last();
         assertTrue( cursor.available() );
 
@@ -391,8 +391,8 @@
     public void testIndexedCnEndsWithBean() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, null, "bean" );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        SubstringCursor cursor = new SubstringCursor( store, evaluator );
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
 
         assertEquals( node, evaluator.getExpression() );
         assertTrue( cursor.isElementReused() );
@@ -417,7 +417,7 @@
 
         // ---------- test first ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.first();
 
         assertTrue( cursor.available() );
@@ -437,7 +437,7 @@
 
         // ---------- test afterLast ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -459,7 +459,7 @@
 
         // ---------- test last ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.last();
         assertTrue( cursor.available() );
 
@@ -483,8 +483,8 @@
     public void testNonIndexedSnStartsWithB() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "b", null );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        SubstringCursor cursor = new SubstringCursor( store, evaluator );
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
 
         assertEquals( node, evaluator.getExpression() );
         assertTrue( cursor.isElementReused() );
@@ -502,7 +502,7 @@
 
         // ---------- test first ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.first();
 
         assertTrue( cursor.available() );
@@ -514,7 +514,7 @@
 
         // ---------- test afterLast ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -528,7 +528,7 @@
 
         // ---------- test last ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.last();
         assertTrue( cursor.available() );
 
@@ -545,8 +545,8 @@
     public void testIndexedSnEndsWithEr() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, null, "er" );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        SubstringCursor cursor = new SubstringCursor( store, evaluator );
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
 
         assertEquals( node, evaluator.getExpression() );
         assertTrue( cursor.isElementReused() );
@@ -563,7 +563,7 @@
 
         // ---------- test first ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.first();
 
         assertTrue( cursor.available() );
@@ -575,7 +575,7 @@
 
         // ---------- test afterLast ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -589,7 +589,7 @@
 
         // ---------- test last ----------
 
-        cursor = new SubstringCursor( store, evaluator );
+        cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.last();
         assertTrue( cursor.available() );
 
@@ -606,8 +606,8 @@
     public void testNonIndexedAttributes() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "walk", null );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
         indexEntry.setId( 3L );
@@ -618,36 +618,36 @@
         assertFalse( evaluator.evaluate( indexEntry ) );
 
         node = new SubstringNode( SchemaConstants.SN_AT_OID, "wa", null );
-        evaluator = new SubstringEvaluator( node, store, schemaManager );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 5L );
         indexEntry.setObject( store.lookup( 5L ) );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
         node = new SubstringNode( SchemaConstants.SEARCHGUIDE_AT_OID, "j", null );
-        evaluator = new SubstringEvaluator( node, store, schemaManager );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         indexEntry.setObject( store.lookup( 6L ) );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
         node = new SubstringNode( SchemaConstants.ST_AT_OID, "j", null );
-        evaluator = new SubstringEvaluator( node, store, schemaManager );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         indexEntry.setObject( store.lookup( 6L ) );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
         node = new SubstringNode( SchemaConstants.NAME_AT_OID, "j", null );
-        evaluator = new SubstringEvaluator( node, store, schemaManager );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         indexEntry.setObject( store.lookup( 6L ) );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
         node = new SubstringNode( SchemaConstants.NAME_AT_OID, "s", null );
-        evaluator = new SubstringEvaluator( node, store, schemaManager );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         indexEntry.setObject( store.lookup( 6L ) );
         assertTrue( evaluator.evaluate( indexEntry ) );
@@ -658,8 +658,8 @@
     public void testEvaluatorIndexed() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, "jim", null );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         assertTrue( evaluator.evaluate( indexEntry ) );
         indexEntry.setId( 3L );
@@ -667,15 +667,15 @@
         assertFalse( evaluator.evaluate( indexEntry ) );
 
         node = new SubstringNode( SchemaConstants.CN_AT_OID, "j", null );
-        evaluator = new SubstringEvaluator( node, store, schemaManager );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         indexEntry.setObject( store.lookup( 6L ) );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
         node = new SubstringNode( SchemaConstants.CN_AT_OID, "s", null );
-        evaluator = new SubstringEvaluator( node, store, schemaManager );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         indexEntry.setObject( store.lookup( 6L ) );
         assertFalse( evaluator.evaluate( indexEntry ) );
@@ -692,8 +692,8 @@
     public void testInvalidCursorPositionException() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "b", null );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        SubstringCursor cursor = new SubstringCursor( store, evaluator );
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.get();
     }
 
@@ -702,8 +702,8 @@
     public void testInvalidCursorPositionException2() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, "j", null );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        SubstringCursor cursor = new SubstringCursor( store, evaluator );
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
         cursor.get();
     }
 
@@ -712,11 +712,11 @@
     public void testUnsupportBeforeWithoutIndex() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "j", null );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        SubstringCursor cursor = new SubstringCursor( store, evaluator );
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
 
         // test before()
-        ForwardIndexEntry<String, ServerEntry> entry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.SN_AT_OID );
         cursor.before( entry );
     }
@@ -726,11 +726,11 @@
     public void testUnsupportAfterWithoutIndex() throws Exception
     {
         SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "j", null );
-        SubstringEvaluator evaluator = new SubstringEvaluator( node, store, schemaManager );
-        SubstringCursor cursor = new SubstringCursor( store, evaluator );
+        SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
+        SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
 
         // test before()
-        ForwardIndexEntry<String, ServerEntry> entry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.SN_AT_OID );
         cursor.after( entry );
     }

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java Sun Feb 28 22:55:33 2010
@@ -47,7 +47,6 @@
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.SchemaUtils;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.loader.ldif.LdifSchemaLoader;
@@ -72,7 +71,7 @@
     public static final Logger LOG = LoggerFactory.getLogger( SubtreeScopeTest.class );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     static SchemaManager schemaManager = null;
 
 
@@ -158,8 +157,8 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
-        SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
+        SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
         assertTrue( cursor.isElementReused() );
 
@@ -170,7 +169,7 @@
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
-        IndexEntry<Long, ServerEntry> indexEntry = cursor.get();
+        IndexEntry<Long, ServerEntry, Long> indexEntry = cursor.get();
         assertNotNull( indexEntry );
         assertEquals( 2L, ( long ) indexEntry.getId() );
         assertEquals( 2L, ( long ) indexEntry.getValue() );
@@ -194,7 +193,7 @@
 
         // --------- Test first() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.first();
 
@@ -223,7 +222,7 @@
 
         // --------- Test afterLast() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -253,7 +252,7 @@
 
         // --------- Test last() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.last();
 
@@ -282,7 +281,7 @@
 
         // --------- Test previous() before positioning ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.previous();
 
@@ -316,8 +315,8 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID
             + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
-        SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
+        SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
         assertTrue( cursor.isElementReused() );
 
@@ -328,7 +327,7 @@
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
-        IndexEntry<Long, ServerEntry> indexEntry = cursor.get();
+        IndexEntry<Long, ServerEntry, Long> indexEntry = cursor.get();
         assertNotNull( indexEntry );
         assertEquals( 3L, ( long ) indexEntry.getId() );
         assertEquals( 3L, ( long ) indexEntry.getValue() );
@@ -352,7 +351,7 @@
 
         // --------- Test first() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.first();
 
@@ -381,7 +380,7 @@
 
         // --------- Test afterLast() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -411,7 +410,7 @@
 
         // --------- Test last() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.last();
 
@@ -440,7 +439,7 @@
 
         // --------- Test previous() before positioning ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.previous();
 
@@ -469,7 +468,7 @@
 
         // --------- Test next() before positioning ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.next();
 
@@ -504,8 +503,8 @@
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID + "=apache,"
             + SchemaConstants.OU_AT_OID + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.",
             SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
-        SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
+        SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
         assertTrue( cursor.isElementReused() );
 
@@ -516,7 +515,7 @@
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
-        IndexEntry<Long, ServerEntry> indexEntry = cursor.get();
+        IndexEntry<Long, ServerEntry, Long> indexEntry = cursor.get();
         assertNotNull( indexEntry );
         assertEquals( 7L, ( long ) indexEntry.getId() );
         assertEquals( 7L, ( long ) indexEntry.getValue() );
@@ -533,7 +532,7 @@
 
         // --------- Test first() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.first();
 
@@ -555,7 +554,7 @@
 
         // --------- Test afterLast() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -578,7 +577,7 @@
 
         // --------- Test last() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.last();
 
@@ -600,7 +599,7 @@
 
         // --------- Test previous() before positioning ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.previous();
 
@@ -651,8 +650,8 @@
 
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID
             + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
-        SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
+        SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
         assertTrue( cursor.isElementReused() );
 
@@ -663,7 +662,7 @@
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
-        IndexEntry<Long, ServerEntry> indexEntry = cursor.get();
+        IndexEntry<Long, ServerEntry, Long> indexEntry = cursor.get();
         assertNotNull( indexEntry );
         assertEquals( 3L, ( long ) indexEntry.getId() );
         assertEquals( 3L, ( long ) indexEntry.getValue() );
@@ -701,7 +700,7 @@
 
         // --------- Test first() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.first();
 
@@ -738,7 +737,7 @@
 
         // --------- Test afterLast() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         cursor.afterLast();
         assertFalse( cursor.available() );
 
@@ -782,7 +781,7 @@
 
         // --------- Test last() ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.last();
 
@@ -825,7 +824,7 @@
 
         // --------- Test previous() before positioning ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.previous();
 
@@ -868,7 +867,7 @@
 
         // --------- Test next() before positioning ---------
 
-        cursor = new SubtreeScopeCursor( store, evaluator );
+        cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         assertFalse( cursor.available() );
         cursor.next();
 
@@ -916,9 +915,9 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
 
-        ForwardIndexEntry<Long, ServerEntry> indexEntry = new ForwardIndexEntry<Long, ServerEntry>();
+        ForwardIndexEntry<Long, ServerEntry, Long> indexEntry = new ForwardIndexEntry<Long, ServerEntry, Long>();
         indexEntry.setId( 6L );
         assertTrue( evaluator.evaluate( indexEntry ) );
     }
@@ -929,22 +928,22 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_ALWAYS, SchemaConstants.OU_AT_OID + "=engineering,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         assertEquals( node, evaluator.getExpression() );
 
         /*
          * With dereferencing the evaluator does not accept candidates that
          * are aliases.  This is done to filter out aliases from the results.
          */
-        ForwardIndexEntry<Long, ServerEntry> indexEntry = new ForwardIndexEntry<Long, ServerEntry>();
+        ForwardIndexEntry<Long, ServerEntry, Long> indexEntry = new ForwardIndexEntry<Long, ServerEntry, Long>();
         indexEntry.setId( 11L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<Long, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<Long, ServerEntry, Long>();
         indexEntry.setId( 8L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<Long, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<Long, ServerEntry, Long>();
         indexEntry.setId( 6L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }
@@ -955,8 +954,8 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
-        SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
+        SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
         cursor.get();
     }
 
@@ -966,11 +965,11 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
-        SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
+        SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
         // test before()
-        ForwardIndexEntry<Long, ServerEntry> entry = new ForwardIndexEntry<Long, ServerEntry>();
+        ForwardIndexEntry<Long, ServerEntry, Long> entry = new ForwardIndexEntry<Long, ServerEntry, Long>();
         entry.setValue( 3L );
         cursor.before( entry );
     }
@@ -981,11 +980,11 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
-        SubtreeScopeCursor cursor = new SubtreeScopeCursor( store, evaluator );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
+        SubtreeScopeCursor<Long> cursor = new SubtreeScopeCursor<Long>( store, evaluator );
 
         // test after()
-        ForwardIndexEntry<Long, ServerEntry> entry = new ForwardIndexEntry<Long, ServerEntry>();
+        ForwardIndexEntry<Long, ServerEntry, Long> entry = new ForwardIndexEntry<Long, ServerEntry, Long>();
         entry.setValue( 3L );
         cursor.after( entry );
     }
@@ -996,7 +995,7 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        SubtreeScopeEvaluator<ServerEntry> evaluator = new SubtreeScopeEvaluator<ServerEntry>( store, node );
+        SubtreeScopeEvaluator<ServerEntry, Long> evaluator = new SubtreeScopeEvaluator<ServerEntry, Long>( store, node );
         assertNull( evaluator );
     }
 }

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java Sun Feb 28 22:55:33 2010
@@ -81,7 +81,7 @@
         try
         {
             List<ForwardIndexEntry> recordForwards = new ArrayList<ForwardIndexEntry>();
-            IndexCursor<Long, ServerEntry> childList = db.list( id );
+            IndexCursor<Long, ServerEntry, Long> childList = db.list( id );
 
             while ( childList.next() )
             {
@@ -104,10 +104,11 @@
                     if ( db.getChildCount( rec.getId() ) == 0 )
                     {
                         Evaluator evaluator = engine.evaluator( exprNode );
-                        if ( evaluator.evaluate( rec.getId() ) )
+                        if ( evaluator.evaluateId( rec.getId() ) )
                         {
                             ServerEntry newEntry = db.lookup( rec.getId() );
-                            EntryNode child = new EntryNode( rec.getId(), this, db, newEntry, map, exprNode, engine );
+                            EntryNode child = new EntryNode( ( Long ) rec.getId(), this, db, newEntry, map, exprNode,
+                                engine );
                             children.add( child );
                         }
                         else
@@ -118,7 +119,8 @@
                     else
                     {
                         ServerEntry newEntry = db.lookup( rec.getId() );
-                        EntryNode child = new EntryNode( rec.getId(), this, db, newEntry, map, exprNode, engine );
+                        EntryNode child = new EntryNode( ( Long ) rec.getId(), this, db, newEntry, map, exprNode,
+                            engine );
                         children.add( child );
                     }
                 }

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java Sun Feb 28 22:55:33 2010
@@ -62,7 +62,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class IndexDialog<K, O> extends JDialog
+public class IndexDialog<K, O, ID> extends JDialog
 {
     private static final Logger LOG = LoggerFactory.getLogger( IndexDialog.class );
 
@@ -88,10 +88,10 @@
     private JLabel jLabel2 = new JLabel();
     private JButton scanBut = new JButton();
 
-    private Index<K, O> index = null;
+    private Index<K, O, ID> index = null;
 
 
-    public IndexDialog( Frame parent, boolean modal, Index<K, O> index )
+    public IndexDialog( Frame parent, boolean modal, Index<K, O, ID> index )
     {
         super( parent, modal );
         this.index = index;
@@ -99,7 +99,7 @@
     }
 
 
-    public IndexDialog( Index<K, O> index )
+    public IndexDialog( Index<K, O, ID> index )
     {
         super();
         this.index = index;
@@ -289,7 +289,7 @@
 
         try
         {
-            Cursor<IndexEntry<K, O>> list;
+            Cursor<IndexEntry<K, O, ID>> list;
 
             if ( scanType.equals( EQUALITY_CURSOR ) )
             {
@@ -297,7 +297,7 @@
                 list.beforeFirst();
                 while ( list.next() )
                 {
-                    IndexEntry<K, O> rec = list.get();
+                    IndexEntry<K, O, ID> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -308,12 +308,12 @@
             else if ( scanType.equals( GREATER_CURSOR ) )
             {
                 list = index.forwardCursor();
-                ForwardIndexEntry<K, O> entry = new ForwardIndexEntry<K, O>();
+                ForwardIndexEntry<K, O, ID> entry = new ForwardIndexEntry<K, O, ID>();
                 entry.setValue( key );
                 list.before( entry );
                 while ( list.next() )
                 {
-                    IndexEntry<K, O> rec = list.get();
+                    IndexEntry<K, O, ID> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -324,12 +324,12 @@
             else if ( scanType.equals( LESS_CURSOR ) )
             {
                 list = index.forwardCursor();
-                ForwardIndexEntry<K, O> entry = new ForwardIndexEntry<K, O>();
+                ForwardIndexEntry<K, O, ID> entry = new ForwardIndexEntry<K, O, ID>();
                 entry.setValue( key );
                 list.after( entry );
                 while ( list.previous() )
                 {
-                    IndexEntry<K, O> rec = list.get();
+                    IndexEntry<K, O, ID> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -362,7 +362,7 @@
                 list = index.forwardCursor();
                 while ( list.next() )
                 {
-                    IndexEntry<K, O> rec = list.get();
+                    IndexEntry<K, O, ID> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Sun Feb 28 22:55:33 2010
@@ -111,7 +111,7 @@
     private JMenu indices = new JMenu();
 
     // Non Swing Stuff
-    private BTreePartition partition;
+    private BTreePartition<Long> partition;
     private boolean doCleanUp;
     private Map<Long, EntryNode> nodes;
     private EntryNode root;
@@ -126,7 +126,7 @@
      * @param db the partition to view
      * @throws NamingException if there are problems accessing the partition
      */
-    public PartitionFrame( BTreePartition db, SchemaManager schemaManager ) throws Exception
+    public PartitionFrame( BTreePartition<Long> db, SchemaManager schemaManager ) throws Exception
     {
         partition = db;
         this.schemaManager = schemaManager;
@@ -662,7 +662,7 @@
             limitMax = Integer.parseInt( limit );
         }
 
-        IndexCursor<Long, ServerEntry> cursor = partition.getSearchEngine().cursor( new LdapDN( base ),
+        IndexCursor<Long, ServerEntry, Long> cursor = partition.getSearchEngine().cursor( new LdapDN( base ),
             AliasDerefMode.DEREF_ALWAYS, root, ctls );
         String[] cols = new String[2];
         cols[0] = "id";

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexDialog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexDialog.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexDialog.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexDialog.java Sun Feb 28 22:55:33 2010
@@ -63,7 +63,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 639279 $
  */
-public class IndexDialog<K, O> extends JDialog
+public class IndexDialog<K, O, ID> extends JDialog
 {
     private static final Logger LOG = LoggerFactory.getLogger( IndexDialog.class );
 
@@ -89,10 +89,10 @@
     private JLabel jLabel2 = new JLabel();
     private JButton scanBut = new JButton();
 
-    private Index<K, O> index = null;
+    private Index<K, O, ID> index = null;
 
 
-    public IndexDialog( Frame parent, boolean modal, Index<K, O> index )
+    public IndexDialog( Frame parent, boolean modal, Index<K, O, ID> index )
     {
         super( parent, modal );
         this.index = index;
@@ -100,7 +100,7 @@
     }
 
 
-    public IndexDialog( Index<K, O> index )
+    public IndexDialog( Index<K, O, ID> index )
     {
         super();
         this.index = index;
@@ -291,7 +291,7 @@
 
         try
         {
-            Cursor<IndexEntry<K, O>> list;
+            Cursor<IndexEntry<K, O, ID>> list;
 
             if ( scanType.equals( EQUALITY_CURSOR ) )
             {
@@ -299,7 +299,7 @@
                 list.beforeFirst();
                 while ( list.next() )
                 {
-                    IndexEntry<K, O> rec = list.get();
+                    IndexEntry<K, O, ID> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -310,12 +310,12 @@
             else if ( scanType.equals( GREATER_CURSOR ) )
             {
                 list = index.forwardCursor();
-                ForwardIndexEntry<K, O> entry = new ForwardIndexEntry<K, O>();
+                ForwardIndexEntry<K, O, ID> entry = new ForwardIndexEntry<K, O, ID>();
                 entry.setValue( key );
                 list.before( entry );
                 while ( list.next() )
                 {
-                    IndexEntry<K, O> rec = list.get();
+                    IndexEntry<K, O, ID> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -326,12 +326,12 @@
             else if ( scanType.equals( LESS_CURSOR ) )
             {
                 list = index.forwardCursor();
-                ForwardIndexEntry<K, O> entry = new ForwardIndexEntry<K, O>();
+                ForwardIndexEntry<K, O, ID> entry = new ForwardIndexEntry<K, O, ID>();
                 entry.setValue( key );
                 list.after( entry );
                 while ( list.previous() )
                 {
-                    IndexEntry<K, O> rec = list.get();
+                    IndexEntry<K, O, ID> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -364,7 +364,7 @@
                 list = index.forwardCursor();
                 while ( list.next() )
                 {
-                    IndexEntry<K, O> rec = list.get();
+                    IndexEntry<K, O, ID> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -406,9 +406,9 @@
 
 
     @SuppressWarnings("unchecked")
-    public static void show( Index<?, ServerEntry> index )
+    public static void show( Index<?, ServerEntry, Long> index )
     {
-        IndexDialog<?, ServerEntry> dialog = new IndexDialog( index );
+        IndexDialog<?, ServerEntry, Long> dialog = new IndexDialog( index );
         dialog.setVisible( true );
     }
 }

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexUtils.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexUtils.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexUtils.java Sun Feb 28 22:55:33 2010
@@ -36,13 +36,13 @@
  */
 public class IndexUtils
 {
-    public static void printContents( Index<?, ServerEntry> idx ) throws Exception
+    public static void printContents( Index<?, ServerEntry, Long> idx ) throws Exception
     {
         printContents( idx, System.out );
     }
 
 
-    public static void printContents( Index<?, ServerEntry> idx, OutputStream outputStream ) throws Exception
+    public static void printContents( Index<?, ServerEntry, Long> idx, OutputStream outputStream ) throws Exception
     {
         PrintStream out;
 
@@ -59,7 +59,7 @@
             out = new PrintStream( outputStream );
         }
 
-        IndexCursor<?, ServerEntry> cursor = idx.forwardCursor();
+        IndexCursor<?, ServerEntry, Long> cursor = idx.forwardCursor();
         cursor.first();
         for ( Object entry : cursor )
         {

Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java Sun Feb 28 22:55:33 2010
@@ -20,13 +20,13 @@
 package org.apache.directory.server.xdbm.tools;
 
 
-import java.util.Set;
 import java.util.UUID;
 
 import org.apache.directory.server.core.entry.DefaultServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.xdbm.ForwardIndexEntry;
 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.Store;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -38,7 +38,6 @@
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.SchemaUtils;
 
 
 /**
@@ -65,7 +64,7 @@
      * @param registries oid registries
      * @throws Exception on access exceptions
      */
-    public static void loadExampleData( Store<ServerEntry> store, SchemaManager schemaManager ) throws Exception
+    public static void loadExampleData( Store<ServerEntry, Long> store, SchemaManager schemaManager ) throws Exception
     {
         store.setSuffixDn( "o=Good Times Co." );
 
@@ -201,7 +200,7 @@
      * @throws Exception if there are failures accessing the underlying store
      */
     @SuppressWarnings("unchecked")
-    public Entry getAttributes( Store store, Long id ) throws Exception
+    public Entry getAttributes( Store<Object, Long> store, Long id ) throws Exception
     {
         Entry entry = new DefaultClientEntry();
 
@@ -211,7 +210,7 @@
         entry.put( "_parent", Long.toString( store.getParentId( id ) ) );
 
         // Get all standard index attribute to value mappings
-        for ( Index index : ( Set<Index> ) store.getUserIndices() )
+        for ( Index index : store.getUserIndices() )
         {
             Cursor<ForwardIndexEntry> list = index.reverseCursor();
             ForwardIndexEntry recordForward = new ForwardIndexEntry();
@@ -237,7 +236,7 @@
 
         // Get all existence mappings for this id creating a special key
         // that looks like so 'existence[attribute]' and the value is set to id
-        Cursor<IndexEntry> list = store.getPresenceIndex().reverseCursor();
+        IndexCursor<String, Object, Long> list = store.getPresenceIndex().reverseCursor();
         ForwardIndexEntry recordForward = new ForwardIndexEntry();
         recordForward.setId( id );
         list.before( recordForward );
@@ -265,7 +264,7 @@
 
         // Get all parent child mappings for this entry as the parent using the
         // key 'child' with many entries following it.
-        Cursor<IndexEntry> children = store.getOneLevelIndex().forwardCursor();
+        IndexCursor<Long, Object, Long> children = store.getOneLevelIndex().forwardCursor();
         ForwardIndexEntry longRecordForward = new ForwardIndexEntry();
         recordForward.setId( id );
         children.before( longRecordForward );
@@ -293,7 +292,7 @@
      * @param entry the server entry
      * @throws Exception in case of any problems in adding the entry to the store
      */
-    public static void injectEntryInStore( Store<ServerEntry> store, ServerEntry entry ) throws Exception
+    public static void injectEntryInStore( Store<ServerEntry, Long> store, ServerEntry entry ) throws Exception
     {
         entry.add( SchemaConstants.ENTRY_CSN_AT, CSN_FACTORY.newInstance().toString() );
         entry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );