directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r917312 [4/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
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringCursor.java Sun Feb 28 22:55:33 2010
@@ -37,25 +37,25 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class SubstringCursor extends AbstractIndexCursor<String, ServerEntry>
+public class SubstringCursor<ID> extends AbstractIndexCursor<String, ServerEntry, ID>
 {
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_725 );
     private final boolean hasIndex;
-    private final IndexCursor<String, ServerEntry> wrapped;
-    private final SubstringEvaluator evaluator;
-    private final ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+    private final IndexCursor<String, ServerEntry, ID> wrapped;
+    private final SubstringEvaluator<ID> evaluator;
+    private final ForwardIndexEntry<String, ServerEntry, ID> indexEntry = new ForwardIndexEntry<String, ServerEntry, ID>();
     private boolean available = false;
 
 
     @SuppressWarnings("unchecked")
-    public SubstringCursor( Store<ServerEntry> db, final SubstringEvaluator substringEvaluator ) throws Exception
+    public SubstringCursor( Store<ServerEntry, ID> db, final SubstringEvaluator<ID> substringEvaluator ) throws Exception
     {
         evaluator = substringEvaluator;
         hasIndex = db.hasUserIndexOn( evaluator.getExpression().getAttribute() );
 
         if ( hasIndex )
         {
-            wrapped = ( ( Index<String, ServerEntry> ) db.getUserIndex( evaluator.getExpression().getAttribute() ) )
+            wrapped = ( ( Index<String, ServerEntry, ID> ) db.getUserIndex( evaluator.getExpression().getAttribute() ) )
                 .forwardCursor();
         }
         else
@@ -82,25 +82,25 @@
     }
 
 
-    public void beforeValue( Long id, String value ) throws Exception
+    public void beforeValue( ID id, String value ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
 
 
-    public void afterValue( Long id, String value ) throws Exception
+    public void afterValue( ID id, String value ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
 
 
-    public void before( IndexEntry<String, ServerEntry> element ) throws Exception
+    public void before( IndexEntry<String, ServerEntry, ID> element ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
 
 
-    public void after( IndexEntry<String, ServerEntry> element ) throws Exception
+    public void after( IndexEntry<String, ServerEntry, ID> element ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
@@ -111,7 +111,7 @@
         checkNotClosed( "beforeFirst()" );
         if ( evaluator.getExpression().getInitial() != null && hasIndex )
         {
-            ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+            ForwardIndexEntry<String, ServerEntry, ID> indexEntry = new ForwardIndexEntry<String, ServerEntry, ID>();
             indexEntry.setValue( evaluator.getExpression().getInitial() );
             wrapped.before( indexEntry );
         }
@@ -152,7 +152,7 @@
     }
 
 
-    private boolean evaluateCandidate( IndexEntry<String, ServerEntry> indexEntry ) throws Exception
+    private boolean evaluateCandidate( IndexEntry<String, ServerEntry, ID> indexEntry ) throws Exception
     {
         if ( hasIndex )
         {
@@ -177,7 +177,7 @@
         while ( wrapped.previous() )
         {
             checkNotClosed( "previous()" );
-            IndexEntry<String, ServerEntry> entry = wrapped.get();
+            IndexEntry<String, ServerEntry, ID> entry = wrapped.get();
             if ( evaluateCandidate( entry ) )
             {
                 available = true;
@@ -198,7 +198,7 @@
         while ( wrapped.next() )
         {
             checkNotClosed( "next()" );
-            IndexEntry<String, ServerEntry> entry = wrapped.get();
+            IndexEntry<String, ServerEntry, ID> entry = wrapped.get();
             if ( evaluateCandidate( entry ) )
             {
                 available = true;
@@ -214,7 +214,7 @@
     }
 
 
-    public IndexEntry<String, ServerEntry> get() throws Exception
+    public IndexEntry<String, ServerEntry, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
         if ( available )

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java Sun Feb 28 22:55:33 2010
@@ -46,10 +46,10 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class SubstringEvaluator implements Evaluator<SubstringNode, ServerEntry>
+public class SubstringEvaluator<ID> implements Evaluator<SubstringNode, ServerEntry, ID>
 {
     /** Database used while evaluating candidates */
-    private final Store<ServerEntry> db;
+    private final Store<ServerEntry, ID> db;
 
     /** Reference to the SchemaManager */
     private final SchemaManager schemaManager;
@@ -64,7 +64,7 @@
 
     private final Normalizer normalizer;
 
-    private final Index<String, ServerEntry> idx;
+    private final Index<String, ServerEntry, ID> idx;
 
 
     /**
@@ -75,7 +75,7 @@
      * @param registries the set of registries
      * @throws Exception if there are failures accessing resources and the db
      */
-    public SubstringEvaluator( SubstringNode node, Store<ServerEntry> db, SchemaManager schemaManager )
+    public SubstringEvaluator( SubstringNode node, Store<ServerEntry, ID> db, SchemaManager schemaManager )
         throws Exception
     {
         this.db = db;
@@ -107,7 +107,7 @@
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
             //noinspection unchecked
-            idx = ( Index<String, ServerEntry> ) db.getUserIndex( node.getAttribute() );
+            idx = ( Index<String, ServerEntry, ID> ) db.getUserIndex( node.getAttribute() );
         }
         else
         {
@@ -116,13 +116,13 @@
     }
 
 
-    public boolean evaluate( IndexEntry<?, ServerEntry> indexEntry ) throws Exception
+    public boolean evaluate( IndexEntry<?, ServerEntry, ID> indexEntry ) throws Exception
     {
 
         if ( idx == null )
         {
             //noinspection unchecked
-            return evaluateWithoutIndex( ( IndexEntry<String, ServerEntry> ) indexEntry );
+            return evaluateWithoutIndex( ( IndexEntry<String, ServerEntry, ID> ) indexEntry );
         }
         else
         {
@@ -131,7 +131,7 @@
     }
 
 
-    public boolean evaluate( Long id ) throws Exception
+    public boolean evaluateId( ID id ) throws Exception
     {
 
         if ( idx == null )
@@ -146,7 +146,7 @@
     }
 
 
-    public boolean evaluate( ServerEntry entry ) throws Exception
+    public boolean evaluateEntry( ServerEntry entry ) throws Exception
     {
 
         if ( idx == null )
@@ -173,7 +173,7 @@
     }
 
 
-    private boolean evaluateWithIndex( IndexEntry<?, ServerEntry> indexEntry ) throws Exception
+    private boolean evaluateWithIndex( IndexEntry<?, ServerEntry, ID> indexEntry ) throws Exception
     {
         /*
          * Note that this is using the reverse half of the index giving a
@@ -181,12 +181,12 @@
          * Otherwise we would have to scan the entire index if there were
          * no reverse lookups.
          */
-        Cursor<IndexEntry<String, ServerEntry>> entries = idx.reverseCursor( indexEntry.getId() );
+        Cursor<IndexEntry<String, ServerEntry, ID>> entries = idx.reverseCursor( indexEntry.getId() );
 
         // cycle through the attribute values testing for a match
         while ( entries.next() )
         {
-            IndexEntry rec = entries.get();
+            IndexEntry<String, ServerEntry, ID> rec = entries.get();
 
             // once match is found cleanup and return true
             if ( regex.matcher( ( String ) rec.getValue() ).matches() )
@@ -207,7 +207,7 @@
     }
 
 
-    private boolean evaluateWithIndex( Long id ) throws Exception
+    private boolean evaluateWithIndex( ID id ) throws Exception
     {
         /*
          * Note that this is using the reverse half of the index giving a
@@ -215,12 +215,12 @@
          * Otherwise we would have to scan the entire index if there were
          * no reverse lookups.
          */
-        Cursor<IndexEntry<String, ServerEntry>> entries = idx.reverseCursor( id );
+        Cursor<IndexEntry<String, ServerEntry, ID>> entries = idx.reverseCursor( id );
 
         // cycle through the attribute values testing for a match
         while ( entries.next() )
         {
-            IndexEntry rec = entries.get();
+            IndexEntry<String, ServerEntry, ID> rec = entries.get();
 
             // once match is found cleanup and return true
             if ( regex.matcher( ( String ) rec.getValue() ).matches() )
@@ -237,7 +237,7 @@
 
     // TODO - determine if comaparator and index entry should have the Value
     // wrapper or the raw normalized value
-    private boolean evaluateWithoutIndex( Long id ) throws Exception
+    private boolean evaluateWithoutIndex( ID id ) throws Exception
     {
         return evaluateWithoutIndex( db.lookup( id ) );
     }
@@ -259,7 +259,7 @@
              * The test uses the comparator obtained from the appropriate
              * substring matching rule.
              */
-            for ( Value value : attr )
+            for ( Value<?> value : attr )
             {
                 value.normalize( normalizer );
                 String strValue = ( String ) value.getNormalizedValue();
@@ -300,7 +300,7 @@
                      * The test uses the comparator obtained from the appropriate
                      * substring matching rule.
                      */
-                    for ( Value value : attr )
+                    for ( Value<?> value : attr )
                     {
                         value.normalize( normalizer );
                         String strValue = ( String ) value.getNormalizedValue();
@@ -322,7 +322,7 @@
 
     // TODO - determine if comaparator and index entry should have the Value
     // wrapper or the raw normalized value
-    private boolean evaluateWithoutIndex( IndexEntry<String, ServerEntry> indexEntry ) throws Exception
+    private boolean evaluateWithoutIndex( IndexEntry<String, ServerEntry, ID> indexEntry ) throws Exception
     {
         ServerEntry entry = indexEntry.getObject();
 
@@ -351,7 +351,7 @@
              * The test uses the comparator obtained from the appropriate
              * substring matching rule.
              */
-            for ( Value value : attr )
+            for ( Value<?> value : attr )
             {
                 value.normalize( normalizer );
                 String strValue = ( String ) value.getNormalizedValue();
@@ -394,7 +394,7 @@
                      * The test uses the comparator obtained from the appropriate
                      * substring matching rule.
                      */
-                    for ( Value value : attr )
+                    for ( Value<?> value : attr )
                     {
                         value.normalize( normalizer );
                         String strValue = ( String ) value.getNormalizedValue();

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeCursor.java Sun Feb 28 22:55:33 2010
@@ -36,29 +36,29 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class SubtreeScopeCursor extends AbstractIndexCursor<Long, ServerEntry>
+public class SubtreeScopeCursor<ID> extends AbstractIndexCursor<ID, ServerEntry, ID>
 {
     private static final String UNSUPPORTED_MSG = I18n.err( I18n.ERR_719 );
 
     /** The Entry database/store */
-    private final Store<ServerEntry> db;
+    private final Store<ServerEntry, ID> db;
 
     /** A ScopeNode Evaluator */
-    private final SubtreeScopeEvaluator<ServerEntry> evaluator;
+    private final SubtreeScopeEvaluator<ServerEntry, ID> evaluator;
 
     /** A Cursor over the entries in the scope of the search base */
-    private final IndexCursor<Long, ServerEntry> scopeCursor;
+    private final IndexCursor<ID, ServerEntry, ID> scopeCursor;
 
     /** A Cursor over entries brought into scope by alias dereferencing */
-    private final IndexCursor<Long, ServerEntry> dereferencedCursor;
+    private final IndexCursor<ID, ServerEntry, ID> dereferencedCursor;
 
     /** Currently active Cursor: we switch between two cursors */
-    private IndexCursor<Long, ServerEntry> cursor;
+    private IndexCursor<ID, ServerEntry, ID> cursor;
 
     /** Whether or not this Cursor is positioned so an entry is available */
     private boolean available = false;
 
-    private Long contextEntryId;
+    private ID contextEntryId;
 
 
     /**
@@ -68,14 +68,15 @@
      * @param evaluator an IndexEntry (candidate) evaluator
      * @throws Exception on db access failures
      */
-    public SubtreeScopeCursor( Store<ServerEntry> db, SubtreeScopeEvaluator<ServerEntry> evaluator ) throws Exception
+    public SubtreeScopeCursor( Store<ServerEntry, ID> db, SubtreeScopeEvaluator<ServerEntry, ID> evaluator )
+        throws Exception
     {
         this.db = db;
         this.evaluator = evaluator;
 
         if ( evaluator.getBaseId() == getContextEntryId() )
         {
-            scopeCursor = new AllEntriesCursor( db );
+            scopeCursor = new AllEntriesCursor<ID>( db );
         }
         else
         {
@@ -93,7 +94,7 @@
     }
 
 
-    private Long getContextEntryId()
+    private ID getContextEntryId() throws Exception
     {
         if ( contextEntryId == null )
         {
@@ -110,7 +111,7 @@
 
         if ( contextEntryId == null )
         {
-            return 1L;
+            return db.getDefaultId();
         }
 
         return contextEntryId;
@@ -123,25 +124,25 @@
     }
 
 
-    public void beforeValue( Long id, Long value ) throws Exception
+    public void beforeValue( ID id, ID value ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
 
 
-    public void before( IndexEntry<Long, ServerEntry> element ) throws Exception
+    public void before( IndexEntry<ID, ServerEntry, ID> element ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
 
 
-    public void afterValue( Long id, Long value ) throws Exception
+    public void afterValue( ID id, ID value ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
 
 
-    public void after( IndexEntry<Long, ServerEntry> element ) throws Exception
+    public void after( IndexEntry<ID, ServerEntry, ID> element ) throws Exception
     {
         throw new UnsupportedOperationException( UNSUPPORTED_MSG );
     }
@@ -318,7 +319,7 @@
     }
 
 
-    public IndexEntry<Long, ServerEntry> get() throws Exception
+    public IndexEntry<ID, ServerEntry, ID> get() throws Exception
     {
         checkNotClosed( "get()" );
         if ( available )

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeEvaluator.java Sun Feb 28 22:55:33 2010
@@ -35,13 +35,13 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class SubtreeScopeEvaluator<E> implements Evaluator<ScopeNode, E>
+public class SubtreeScopeEvaluator<E, ID> implements Evaluator<ScopeNode, E, ID>
 {
     /** The ScopeNode containing initial search scope constraints */
     private final ScopeNode node;
 
     /** The entry identifier of the scope base */
-    private final Long baseId;
+    private final ID baseId;
 
     /** 
      * Whether or not to accept all candidates.  If this evaluator's baseId is
@@ -59,7 +59,7 @@
     private final boolean dereferencing;
 
     /** The entry database/store */
-    private final Store<E> db;
+    private final Store<E, ID> db;
 
 
     /**
@@ -69,7 +69,7 @@
      * @param db the database used to evaluate scope node
      * @throws Exception on db access failure
      */
-    public SubtreeScopeEvaluator( Store<E> db, ScopeNode node ) throws Exception
+    public SubtreeScopeEvaluator( Store<E, ID> db, ScopeNode node ) throws Exception
     {
         this.db = db;
         this.node = node;
@@ -84,10 +84,10 @@
         dereferencing = node.getDerefAliases().isDerefInSearching() || node.getDerefAliases().isDerefAlways();
     }
 
-    private Long contextEntryId;
+    private ID contextEntryId;
 
 
-    private Long getContextEntryId()
+    private ID getContextEntryId() throws Exception
     {
         if ( contextEntryId == null )
         {
@@ -104,7 +104,7 @@
 
         if ( contextEntryId == null )
         {
-            return 1L;
+            return db.getDefaultId();
         }
 
         return contextEntryId;
@@ -121,7 +121,7 @@
      * @throws Exception if the index lookups fail.
      * @see Evaluator#evaluate(org.apache.directory.server.xdbm.IndexEntry)
      */
-    public boolean evaluate( IndexEntry<?, E> candidate ) throws Exception
+    public boolean evaluate( IndexEntry<?, E, ID> candidate ) throws Exception
     {
         /*
          * This condition catches situations where the candidate is equal to 
@@ -130,7 +130,7 @@
          * to all it's subordinates since that would be the entire set of 
          * entries in the db.
          */
-        if ( baseIsContextEntry || baseId.longValue() == candidate.getId().longValue() )
+        if ( baseIsContextEntry || baseId.equals( candidate.getId() ) )
         {
             return true;
         }
@@ -193,7 +193,7 @@
      * @throws Exception if the index lookups fail.
      * @see Evaluator#evaluate(org.apache.directory.server.xdbm.IndexEntry)
      */
-    public boolean evaluate( Long id ) throws Exception
+    public boolean evaluateId( ID id ) throws Exception
     {
         boolean isDescendant = db.getSubLevelIndex().forward( baseId, id );
 
@@ -253,7 +253,7 @@
      * @throws Exception if the index lookups fail.
      * @see Evaluator#evaluate(org.apache.directory.server.xdbm.IndexEntry)
      */
-    public boolean evaluate( E candidate ) throws Exception
+    public boolean evaluateEntry( E candidate ) throws Exception
     {
         throw new UnsupportedOperationException( I18n.err( I18n.ERR_721 ) );
     }
@@ -265,7 +265,7 @@
     }
 
 
-    public Long getBaseId()
+    public ID getBaseId()
     {
         return baseId;
     }

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java Sun Feb 28 22:55:33 2010
@@ -71,7 +71,7 @@
     private static final Logger LOG = LoggerFactory.getLogger( AndCursorTest.class.getSimpleName() );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     EvaluatorBuilder evaluatorBuilder;
     CursorBuilder cursorBuilder;
     private static SchemaManager schemaManager;
@@ -171,7 +171,7 @@
 
         ExprNode exprNode = FilterParser.parse( filter );
 
-        IndexCursor<?, ServerEntry> cursor = cursorBuilder.build( exprNode );
+        IndexCursor<?, ServerEntry, Long> cursor = cursorBuilder.build( exprNode );
 
         cursor.beforeFirst();
 
@@ -203,12 +203,12 @@
     {
         AndNode andNode = new AndNode();
 
-        List<Evaluator<? extends ExprNode, ServerEntry>> evaluators = new ArrayList<Evaluator<? extends ExprNode, ServerEntry>>();
-        Evaluator<? extends ExprNode, ServerEntry> eval;
+        List<Evaluator<? extends ExprNode, ServerEntry, Long>> evaluators = new ArrayList<Evaluator<? extends ExprNode, ServerEntry, Long>>();
+        Evaluator<? extends ExprNode, ServerEntry, Long> eval;
 
         ExprNode exprNode = new SubstringNode( "cn", "J", null );
         eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store, schemaManager );
-        IndexCursor<?, ServerEntry> wrapped = new SubstringCursor( store, ( SubstringEvaluator ) eval );
+        IndexCursor<?, ServerEntry, Long> wrapped = new SubstringCursor( store, ( SubstringEvaluator ) eval );
 
         /* adding this results in NPE  adding Presence evaluator not 
          Substring evaluator but adding Substring cursor as wrapped cursor */
@@ -222,7 +222,7 @@
 
         andNode.addNode( exprNode );
 
-        IndexCursor<?, ServerEntry> cursor = new AndCursor( wrapped, evaluators ); //cursorBuilder.build( andNode );
+        IndexCursor<?, ServerEntry, Long> cursor = new AndCursor( wrapped, evaluators ); //cursorBuilder.build( andNode );
 
         cursor.beforeFirst();
 

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java Sun Feb 28 22:55:33 2010
@@ -49,7 +49,6 @@
 import org.apache.directory.shared.ldap.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.SchemaUtils;
 import org.apache.directory.shared.ldap.schema.comparators.StringComparator;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
@@ -76,7 +75,7 @@
     public static final Logger LOG = LoggerFactory.getLogger( GreaterEqTest.class );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     static SchemaManager schemaManager = null;
 
 
@@ -166,7 +165,7 @@
         AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
         GreaterEqNode node = new GreaterEqNode( SchemaConstants.POSTALCODE_AT_OID, new ServerStringValue( at, "3" ) );
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        GreaterEqCursor cursor = new GreaterEqCursor( store, evaluator );
+        GreaterEqCursor<String, Long> cursor = new GreaterEqCursor<String, Long>( store, evaluator );
         assertNotNull( cursor );
         assertFalse( cursor.available() );
         assertTrue( cursor.isElementReused() );
@@ -308,7 +307,7 @@
         // ---------- test before() ----------
 
         cursor = new GreaterEqCursor( store, evaluator );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "5" );
 
         assertFalse( cursor.available() );
@@ -331,7 +330,7 @@
         assertTrue( cursor.isClosed() );
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "7" );
         cursor.before( indexEntry );
         assertFalse( cursor.available() );
@@ -341,7 +340,7 @@
         cursor.close();
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "3" );
         cursor.before( indexEntry );
         assertFalse( cursor.available() );
@@ -353,7 +352,7 @@
         // ---------- test after() ----------
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "4" );
 
         assertFalse( cursor.available() );
@@ -376,7 +375,7 @@
         assertTrue( cursor.isClosed() );
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "7" );
         cursor.after( indexEntry );
         assertFalse( cursor.available() );
@@ -386,7 +385,7 @@
         cursor.close();
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "3" );
         cursor.after( indexEntry );
         assertFalse( cursor.available() );
@@ -403,7 +402,7 @@
         AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTOFFICEBOX_AT_OID );
         GreaterEqNode node = new GreaterEqNode( SchemaConstants.POSTOFFICEBOX_AT_OID, new ServerStringValue( at, "3" ) );
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        GreaterEqCursor cursor = new GreaterEqCursor( store, evaluator );
+        GreaterEqCursor<String, Long> cursor = new GreaterEqCursor<String, Long>( store, evaluator );
         assertNotNull( cursor );
         assertFalse( cursor.available() );
         assertTrue( cursor.isElementReused() );
@@ -540,7 +539,7 @@
         // ---------- test before() ----------
 
         cursor = new GreaterEqCursor( store, evaluator );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "2" );
         try
         {
@@ -554,7 +553,7 @@
         // ---------- test after() ----------
 
         cursor = new GreaterEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "2" );
         try
         {
@@ -577,7 +576,7 @@
         AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
         GreaterEqNode node = new GreaterEqNode( SchemaConstants.POSTALCODE_AT_OID, new ServerStringValue( at, "3" ) );
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -586,31 +585,31 @@
         indexEntry.setId( 1L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 4L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 7L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 8L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 9L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 10L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }
@@ -622,7 +621,7 @@
         AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.STREET_AT_OID );
         GreaterEqNode node = new GreaterEqNode( SchemaConstants.STREET_AT_OID, new ServerStringValue( at, "2" ) );
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.STREET_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -651,7 +650,7 @@
         GreaterEqNode node = new GreaterEqNode( SchemaConstants.C_POSTALCODE_AT_OID, new ServerStringValue( at, "2" ) );
 
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.C_POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -669,7 +668,7 @@
         GreaterEqNode node = new GreaterEqNode( SchemaConstants.POSTOFFICEBOX_AT_OID, new ServerStringValue( at, "3" ) );
 
         GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.POSTOFFICEBOX_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -678,31 +677,31 @@
         indexEntry.setId( 1L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 4L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 7L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 8L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 9L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 10L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java Sun Feb 28 22:55:33 2010
@@ -49,7 +49,6 @@
 import org.apache.directory.shared.ldap.schema.LdapSyntax;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
-import org.apache.directory.shared.ldap.schema.SchemaUtils;
 import org.apache.directory.shared.ldap.schema.comparators.StringComparator;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.SchemaLdifExtractor;
 import org.apache.directory.shared.ldap.schema.ldif.extractor.impl.DefaultSchemaLdifExtractor;
@@ -76,7 +75,7 @@
     public static final Logger LOG = LoggerFactory.getLogger( LessEqTest.class );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     static SchemaManager schemaManager = null;
 
 
@@ -166,7 +165,7 @@
         AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
         LessEqNode node = new LessEqNode( SchemaConstants.POSTALCODE_AT_OID, new ServerStringValue( at, "3" ) );
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        LessEqCursor cursor = new LessEqCursor( store, evaluator );
+        LessEqCursor<String, Long> cursor = new LessEqCursor<String, Long>( store, evaluator );
         assertNotNull( cursor );
         assertFalse( cursor.available() );
         assertTrue( cursor.isElementReused() );
@@ -328,7 +327,7 @@
         // ---------- test before() ----------
 
         cursor = new LessEqCursor( store, evaluator );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "2" );
 
         assertFalse( cursor.available() );
@@ -351,7 +350,7 @@
         assertTrue( cursor.isClosed() );
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "7" );
         cursor.before( indexEntry );
         assertFalse( cursor.available() );
@@ -361,7 +360,7 @@
         cursor.close();
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "3" );
         cursor.before( indexEntry );
         assertFalse( cursor.available() );
@@ -373,7 +372,7 @@
         // ---------- test after() ----------
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "1" );
 
         assertFalse( cursor.available() );
@@ -396,7 +395,7 @@
         assertTrue( cursor.isClosed() );
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "7" );
         cursor.after( indexEntry );
         assertFalse( cursor.available() );
@@ -406,7 +405,7 @@
         cursor.close();
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "3" );
         cursor.after( indexEntry );
         assertFalse( cursor.available() );
@@ -423,7 +422,7 @@
         AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTOFFICEBOX_AT_OID );
         LessEqNode node = new LessEqNode( SchemaConstants.POSTOFFICEBOX_AT_OID, new ServerStringValue( at, "3" ) );
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        LessEqCursor cursor = new LessEqCursor( store, evaluator );
+        LessEqCursor<String, Long> cursor = new LessEqCursor<String, Long>( store, evaluator );
         assertNotNull( cursor );
         assertFalse( cursor.available() );
         assertTrue( cursor.isElementReused() );
@@ -580,7 +579,7 @@
         // ---------- test before() ----------
 
         cursor = new LessEqCursor( store, evaluator );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "2" );
         try
         {
@@ -594,7 +593,7 @@
         // ---------- test after() ----------
 
         cursor = new LessEqCursor( store, evaluator );
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setValue( "2" );
         try
         {
@@ -618,7 +617,7 @@
         LessEqNode node = new LessEqNode( SchemaConstants.POSTALCODE_AT_OID, new ServerStringValue( at, "3" ) );
 
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -627,31 +626,31 @@
         indexEntry.setId( 1L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 4L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 7L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 8L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 9L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 10L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }
@@ -664,7 +663,7 @@
         LessEqNode node = new LessEqNode( SchemaConstants.STREET_AT_OID, new ServerStringValue( at, "2" ) );
 
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.STREET_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -693,7 +692,7 @@
         LessEqNode node = new LessEqNode( SchemaConstants.C_POSTALCODE_AT_OID, new ServerStringValue( at, "2" ) );
 
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.C_POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -711,7 +710,7 @@
         LessEqNode node = new LessEqNode( SchemaConstants.POSTOFFICEBOX_AT_OID, new ServerStringValue( at, "3" ) );
 
         LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         assertEquals( node, evaluator.getExpression() );
         assertEquals( SchemaConstants.POSTOFFICEBOX_AT_OID, evaluator.getAttributeType().getOid() );
         assertNotNull( evaluator.getNormalizer() );
@@ -720,31 +719,31 @@
         indexEntry.setId( 1L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 4L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 6L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 7L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 8L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 9L );
         assertFalse( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<String, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<String, ServerEntry, Long>();
         indexEntry.setId( 10L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java Sun Feb 28 22:55:33 2010
@@ -66,7 +66,7 @@
     private static final Logger LOG = LoggerFactory.getLogger( NestedFilterTest.class.getSimpleName() );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     static SchemaManager schemaManager = null;
     EvaluatorBuilder evaluatorBuilder;
     CursorBuilder cursorBuilder;
@@ -169,7 +169,7 @@
         exprNode.accept( visitor );
         optimizer.annotate( exprNode );
 
-        IndexCursor<?, ServerEntry> cursor = cursorBuilder.build( exprNode );
+        IndexCursor<?, ServerEntry, Long> cursor = cursorBuilder.build( exprNode );
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
@@ -198,7 +198,7 @@
         ExprNode exprNode = FilterParser.parse( filter );
         optimizer.annotate( exprNode );
 
-        IndexCursor<?, ServerEntry> cursor = cursorBuilder.build( exprNode );
+        IndexCursor<?, ServerEntry, Long> cursor = cursorBuilder.build( exprNode );
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
@@ -217,7 +217,7 @@
         ExprNode exprNode = FilterParser.parse( filter );
         optimizer.annotate( exprNode );
 
-        IndexCursor<?, ServerEntry> cursor = cursorBuilder.build( exprNode );
+        IndexCursor<?, ServerEntry, Long> cursor = cursorBuilder.build( exprNode );
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
@@ -241,6 +241,6 @@
         ExprNode exprNode = FilterParser.parse( filter );
         optimizer.annotate( exprNode );
 
-        IndexCursor<?, ServerEntry> cursor = cursorBuilder.build( exprNode );
+        IndexCursor<?, ServerEntry, Long> cursor = cursorBuilder.build( exprNode );
     }
 }

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java Sun Feb 28 22:55:33 2010
@@ -68,7 +68,7 @@
     private static final Logger LOG = LoggerFactory.getLogger( NotCursorTest.class.getSimpleName() );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     static SchemaManager schemaManager = null;
     EvaluatorBuilder evaluatorBuilder;
     CursorBuilder cursorBuilder;
@@ -163,7 +163,7 @@
 
         ExprNode exprNode = FilterParser.parse( filter );
 
-        IndexCursor<?, ServerEntry> cursor = cursorBuilder.build( exprNode );
+        IndexCursor<?, ServerEntry, Long> cursor = cursorBuilder.build( exprNode );
 
         assertFalse( cursor.available() );
 
@@ -208,11 +208,11 @@
         NotNode notNode = new NotNode();
 
         ExprNode exprNode = new SubstringNode( "cn", "J", null );
-        Evaluator<? extends ExprNode, ServerEntry> eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store,
-            schemaManager );
+        Evaluator<? extends ExprNode, ServerEntry, Long> eval = new SubstringEvaluator( ( SubstringNode ) exprNode,
+            store, schemaManager );
         notNode.addNode( exprNode );
 
-        NotCursor cursor = new NotCursor( store, eval ); //cursorBuilder.build( andNode );
+        NotCursor<String, Long> cursor = new NotCursor( store, eval ); //cursorBuilder.build( andNode );
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
@@ -288,7 +288,7 @@
 
         try
         {
-            cursor.after( new ForwardIndexEntry<Object, ServerEntry>() );
+            cursor.after( new ForwardIndexEntry<String, ServerEntry, Long>() );
             fail( "should fail with UnsupportedOperationException " );
         }
         catch ( UnsupportedOperationException uoe )
@@ -297,7 +297,7 @@
 
         try
         {
-            cursor.before( new ForwardIndexEntry<Object, ServerEntry>() );
+            cursor.before( new ForwardIndexEntry<String, ServerEntry, Long>() );
             fail( "should fail with UnsupportedOperationException " );
         }
         catch ( UnsupportedOperationException uoe )

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java Sun Feb 28 22:55:33 2010
@@ -71,7 +71,7 @@
     public static final Logger LOG = LoggerFactory.getLogger( OneLevelScopeTest.class );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     static SchemaManager schemaManager = null;
 
 
@@ -158,8 +158,9 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
-        OneLevelScopeCursor cursor = new OneLevelScopeCursor( store, evaluator );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
+            node );
+        OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
 
         assertTrue( cursor.isElementReused() );
 
@@ -170,7 +171,7 @@
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
-        IndexEntry<Long, ServerEntry> indexEntry = cursor.get();
+        IndexEntry<Long, ServerEntry, Long> indexEntry = cursor.get();
         assertNotNull( indexEntry );
         assertEquals( 5L, ( long ) indexEntry.getId() );
         assertEquals( 2L, ( long ) indexEntry.getValue() );
@@ -303,8 +304,9 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=engineering,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
-        OneLevelScopeCursor cursor = new OneLevelScopeCursor( store, evaluator );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
+            node );
+        OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
 
         assertTrue( cursor.isElementReused() );
 
@@ -315,7 +317,7 @@
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
-        IndexEntry<Long, ServerEntry> indexEntry = cursor.get();
+        IndexEntry<Long, ServerEntry, Long> indexEntry = cursor.get();
         assertNotNull( indexEntry );
         assertEquals( 8L, ( long ) indexEntry.getId() );
         assertEquals( 4L, ( long ) indexEntry.getValue() );
@@ -448,8 +450,9 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID
             + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
-        OneLevelScopeCursor cursor = new OneLevelScopeCursor( store, evaluator );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
+            node );
+        OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
 
         assertTrue( cursor.isElementReused() );
 
@@ -460,7 +463,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( 3L, ( long ) indexEntry.getValue() );
@@ -572,8 +575,9 @@
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID + "=apache,"
             + SchemaConstants.OU_AT_OID + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.",
             SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
-        OneLevelScopeCursor cursor = new OneLevelScopeCursor( store, evaluator );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
+            node );
+        OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
 
         assertTrue( cursor.isElementReused() );
 
@@ -584,7 +588,7 @@
 
         assertTrue( cursor.next() );
         assertTrue( cursor.available() );
-        IndexEntry<Long, ServerEntry> indexEntry = cursor.get();
+        IndexEntry<Long, ServerEntry, Long> indexEntry = cursor.get();
         assertNotNull( indexEntry );
         assertEquals( 6L, ( long ) indexEntry.getId() );
         assertEquals( 7L, ( long ) indexEntry.getValue() );
@@ -684,8 +688,9 @@
 
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_IN_SEARCHING, SchemaConstants.OU_AT_OID
             + "=board of directors," + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
-        OneLevelScopeCursor cursor = new OneLevelScopeCursor( store, evaluator );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
+            node );
+        OneLevelScopeCursor<Long> cursor = new OneLevelScopeCursor<Long>( store, evaluator );
 
         assertTrue( cursor.isElementReused() );
 
@@ -696,7 +701,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( 3L, ( long ) indexEntry.getValue() );
@@ -913,9 +918,10 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<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 ) );
     }
@@ -926,7 +932,8 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.DEREF_ALWAYS, SchemaConstants.OU_AT_OID + "=engineering,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
+            node );
         assertEquals( node, evaluator.getExpression() );
 
         /*
@@ -934,19 +941,19 @@
          * will not accept an alias candidate because aliases are not returned
          * when alias dereferencing while searching is enabled.
          */
-        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( 5L );
         assertTrue( evaluator.evaluate( indexEntry ) );
 
-        indexEntry = new ForwardIndexEntry<Long, ServerEntry>();
+        indexEntry = new ForwardIndexEntry<Long, ServerEntry, Long>();
         indexEntry.setId( 6L );
         assertFalse( evaluator.evaluate( indexEntry ) );
     }
@@ -957,7 +964,8 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
+            node );
         OneLevelScopeCursor cursor = new OneLevelScopeCursor( store, evaluator );
         cursor.get();
     }
@@ -968,11 +976,12 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
+            node );
         OneLevelScopeCursor cursor = new OneLevelScopeCursor( 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 );
     }
@@ -983,11 +992,12 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.ONELEVEL );
-        OneLevelScopeEvaluator<ServerEntry> evaluator = new OneLevelScopeEvaluator<ServerEntry>( store, node );
+        OneLevelScopeEvaluator<ServerEntry, Long> evaluator = new OneLevelScopeEvaluator<ServerEntry, Long>( store,
+            node );
         OneLevelScopeCursor cursor = new OneLevelScopeCursor( 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 );
     }
@@ -998,6 +1008,6 @@
     {
         ScopeNode node = new ScopeNode( AliasDerefMode.NEVER_DEREF_ALIASES, SchemaConstants.OU_AT_OID + "=sales,"
             + SchemaConstants.O_AT_OID + "=good times co.", SearchScope.SUBTREE );
-        new OneLevelScopeEvaluator<ServerEntry>( store, node );
+        new OneLevelScopeEvaluator<ServerEntry, Long>( store, node );
     }
 }
\ No newline at end of file

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java Sun Feb 28 22:55:33 2010
@@ -76,7 +76,7 @@
     private static final Logger LOG = LoggerFactory.getLogger( OrCursorTest.class.getSimpleName() );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     static SchemaManager schemaManager = null;
     EvaluatorBuilder evaluatorBuilder;
     CursorBuilder cursorBuilder;
@@ -170,7 +170,7 @@
 
         ExprNode exprNode = FilterParser.parse( filter );
 
-        IndexCursor<?, ServerEntry> cursor = cursorBuilder.build( exprNode );
+        IndexCursor<?, ServerEntry, Long> cursor = cursorBuilder.build( exprNode );
 
         cursor.afterLast();
 
@@ -251,10 +251,10 @@
     @SuppressWarnings("unchecked")
     public void testOrCursor() throws Exception
     {
-        List<Evaluator<? extends ExprNode, ServerEntry>> evaluators = new ArrayList<Evaluator<? extends ExprNode, ServerEntry>>();
-        List<Cursor<IndexEntry<?, ServerEntry>>> cursors = new ArrayList<Cursor<IndexEntry<?, ServerEntry>>>();
-        Evaluator<? extends ExprNode, ServerEntry> eval;
-        Cursor<IndexEntry<?, ServerEntry>> cursor;
+        List<Evaluator<? extends ExprNode, ServerEntry, Long>> evaluators = new ArrayList<Evaluator<? extends ExprNode, ServerEntry, Long>>();
+        List<Cursor<IndexEntry<?, ServerEntry, Long>>> cursors = new ArrayList<Cursor<IndexEntry<?, ServerEntry, Long>>>();
+        Evaluator<? extends ExprNode, ServerEntry, Long> eval;
+        Cursor<IndexEntry<?, ServerEntry, Long>> cursor;
 
         OrNode orNode = new OrNode();
 
@@ -265,14 +265,12 @@
         evaluators.add( eval );
         orNode.addNode( exprNode );
 
-        try
-        {
-            new OrCursor( cursors, evaluators );
-            fail( "should throw IllegalArgumentException" );
-        }
-        catch ( IllegalArgumentException ie )
-        {
-        }
+        //        try
+        //        {
+        //            new OrCursor( cursors, evaluators );
+        //            fail( "should throw IllegalArgumentException" );
+        //        }
+        //        catch( IllegalArgumentException ie ){ }
 
         exprNode = new SubstringNode( "sn", "W", null );
         eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store, schemaManager );

Modified: directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java?rev=917312&r1=917311&r2=917312&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java Sun Feb 28 22:55:33 2010
@@ -62,7 +62,7 @@
     private static final Logger LOG = LoggerFactory.getLogger( PresenceTest.class.getSimpleName() );
 
     File wkdir;
-    Store<ServerEntry> store;
+    Store<ServerEntry, Long> store;
     static SchemaManager schemaManager = null;
 
 
@@ -147,8 +147,8 @@
     public void testIndexedServerEntry() throws Exception
     {
         PresenceNode node = new PresenceNode( SchemaConstants.CN_AT_OID );
-        PresenceEvaluator evaluator = new PresenceEvaluator( node, store, schemaManager );
-        PresenceCursor cursor = new PresenceCursor( store, evaluator );
+        PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
 
         assertEquals( node, evaluator.getExpression() );
         assertTrue( cursor.isElementReused() );
@@ -200,7 +200,7 @@
         assertEquals( SchemaConstants.CN_AT_OID, cursor.get().getValue() );
 
         // test before()
-        ForwardIndexEntry<String, ServerEntry> entry = new ForwardIndexEntry<String, ServerEntry>();
+        ForwardIndexEntry<String, ServerEntry, Long> entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.CN_AT_OID );
         cursor.before( entry );
         assertTrue( cursor.next() );
@@ -208,7 +208,7 @@
         assertEquals( SchemaConstants.CN_AT_OID, cursor.get().getValue() );
 
         // test after()
-        entry = new ForwardIndexEntry<String, ServerEntry>();
+        entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         cursor.after( entry );
         assertTrue( cursor.previous() );
         assertTrue( cursor.available() );
@@ -261,8 +261,8 @@
     public void testNonIndexedServerEntry() throws Exception
     {
         PresenceNode node = new PresenceNode( SchemaConstants.SN_AT_OID );
-        PresenceEvaluator evaluator = new PresenceEvaluator( node, store, schemaManager );
-        PresenceCursor cursor = new PresenceCursor( store, evaluator );
+        PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
 
         assertEquals( node, evaluator.getExpression() );
         assertTrue( cursor.isElementReused() );
@@ -344,12 +344,12 @@
     public void testEvaluatorIndexed() throws Exception
     {
         PresenceNode node = new PresenceNode( SchemaConstants.CN_AT_OID );
-        PresenceEvaluator evaluator = new PresenceEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> entry = new ForwardIndexEntry<String, ServerEntry>();
+        PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        ForwardIndexEntry<String, ServerEntry, Long> entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.CN_AT_OID );
         entry.setId( ( long ) 3 );
         assertFalse( evaluator.evaluate( entry ) );
-        entry = new ForwardIndexEntry<String, ServerEntry>();
+        entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.CN_AT_OID );
         entry.setId( ( long ) 5 );
         assertTrue( evaluator.evaluate( entry ) );
@@ -360,35 +360,35 @@
     public void testEvaluatorNotIndexed() throws Exception
     {
         PresenceNode node = new PresenceNode( SchemaConstants.NAME_AT_OID );
-        PresenceEvaluator evaluator = new PresenceEvaluator( node, store, schemaManager );
-        ForwardIndexEntry<String, ServerEntry> entry = new ForwardIndexEntry<String, ServerEntry>();
+        PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        ForwardIndexEntry<String, ServerEntry, Long> entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.NAME_AT_OID );
         entry.setId( ( long ) 3 );
         assertTrue( evaluator.evaluate( entry ) );
-        entry = new ForwardIndexEntry<String, ServerEntry>();
+        entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.NAME_AT_OID );
         entry.setId( ( long ) 5 );
         assertTrue( evaluator.evaluate( entry ) );
 
         node = new PresenceNode( SchemaConstants.SEARCHGUIDE_AT_OID );
-        evaluator = new PresenceEvaluator( node, store, schemaManager );
-        entry = new ForwardIndexEntry<String, ServerEntry>();
+        evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.SEARCHGUIDE_AT_OID );
         entry.setId( ( long ) 3 );
         assertFalse( evaluator.evaluate( entry ) );
-        entry = new ForwardIndexEntry<String, ServerEntry>();
+        entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.SEARCHGUIDE_AT_OID );
         entry.setId( ( long ) 5 );
         entry.setObject( store.lookup( ( long ) 5 ) );
         assertFalse( evaluator.evaluate( entry ) );
 
         node = new PresenceNode( SchemaConstants.ST_AT_OID );
-        evaluator = new PresenceEvaluator( node, store, schemaManager );
-        entry = new ForwardIndexEntry<String, ServerEntry>();
+        evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.ST_AT_OID );
         entry.setId( ( long ) 3 );
         assertFalse( evaluator.evaluate( entry ) );
-        entry = new ForwardIndexEntry<String, ServerEntry>();
+        entry = new ForwardIndexEntry<String, ServerEntry, Long>();
         entry.setValue( SchemaConstants.ST_AT_OID );
         entry.setId( ( long ) 5 );
         entry.setObject( store.lookup( ( long ) 5 ) );
@@ -400,8 +400,8 @@
     public void testInvalidCursorPositionException() throws Exception
     {
         PresenceNode node = new PresenceNode( SchemaConstants.SN_AT_OID );
-        PresenceEvaluator evaluator = new PresenceEvaluator( node, store, schemaManager );
-        PresenceCursor cursor = new PresenceCursor( store, evaluator );
+        PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
         cursor.get();
     }
 
@@ -410,8 +410,8 @@
     public void testInvalidCursorPositionException2() throws Exception
     {
         PresenceNode node = new PresenceNode( SchemaConstants.CN_AT_OID );
-        PresenceEvaluator evaluator = new PresenceEvaluator( node, store, schemaManager );
-        PresenceCursor cursor = new PresenceCursor( store, evaluator );
+        PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
         cursor.get();
     }
 
@@ -420,11 +420,11 @@
     public void testUnsupportBeforeWithoutIndex() throws Exception
     {
         PresenceNode node = new PresenceNode( SchemaConstants.SN_AT_OID );
-        PresenceEvaluator evaluator = new PresenceEvaluator( node, store, schemaManager );
-        PresenceCursor cursor = new PresenceCursor( store, evaluator );
+        PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        PresenceCursor<Long> cursor = new PresenceCursor<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 );
     }
@@ -434,11 +434,11 @@
     public void testUnsupportAfterWithoutIndex() throws Exception
     {
         PresenceNode node = new PresenceNode( SchemaConstants.SN_AT_OID );
-        PresenceEvaluator evaluator = new PresenceEvaluator( node, store, schemaManager );
-        PresenceCursor cursor = new PresenceCursor( store, evaluator );
+        PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
+        PresenceCursor<Long> cursor = new PresenceCursor<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 );
     }



Mime
View raw message