directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r917442 - in /directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl: CursorBuilder.java EvaluatorBuilder.java
Date Mon, 01 Mar 2010 10:18:59 GMT
Author: seelmann
Date: Mon Mar  1 10:18:59 2010
New Revision: 917442

URL: http://svn.apache.org/viewvc?rev=917442&view=rev
Log:
Added type parameters

Modified:
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java
    directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java?rev=917442&r1=917441&r2=917442&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java
(original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/CursorBuilder.java
Mon Mar  1 10:18:59 2010
@@ -20,27 +20,21 @@
 package org.apache.directory.server.xdbm.search.impl;
 
 
-import java.util.List;
 import java.util.ArrayList;
-import java.util.Set;
+import java.util.List;
 
-import org.apache.directory.server.xdbm.Store;
-import org.apache.directory.server.xdbm.IndexCursor;
-import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.server.xdbm.IndexCursor;
+import org.apache.directory.server.xdbm.Store;
+import org.apache.directory.server.xdbm.search.Evaluator;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.filter.AndNode;
-import org.apache.directory.shared.ldap.filter.ApproximateNode;
-import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
-import org.apache.directory.shared.ldap.filter.GreaterEqNode;
-import org.apache.directory.shared.ldap.filter.LessEqNode;
 import org.apache.directory.shared.ldap.filter.NotNode;
 import org.apache.directory.shared.ldap.filter.OrNode;
 import org.apache.directory.shared.ldap.filter.ScopeNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
-import org.apache.directory.shared.ldap.filter.SimpleNode;
 
 
 /**
@@ -71,23 +65,23 @@
     }
 
 
-    public IndexCursor<?, ServerEntry, ID> build( ExprNode node ) throws Exception
+    public <T> IndexCursor<?, ServerEntry, ID> build( ExprNode node ) throws
Exception
     {
         switch ( node.getAssertionType() )
         {
             /* ---------- LEAF NODE HANDLING ---------- */
 
             case APPROXIMATE:
-                return new ApproximateCursor( db, ( ApproximateEvaluator ) evaluatorBuilder.build(
node ) );
+                return new ApproximateCursor<T, ID>( db, ( ApproximateEvaluator<T,
ID> ) evaluatorBuilder.build( node ) );
 
             case EQUALITY:
-                return new EqualityCursor( db, ( EqualityEvaluator ) evaluatorBuilder.build(
node ) );
+                return new EqualityCursor<T, ID>( db, ( EqualityEvaluator<T, ID>
) evaluatorBuilder.build( node ) );
 
             case GREATEREQ:
-                return new GreaterEqCursor( db, ( GreaterEqEvaluator ) evaluatorBuilder.build(
node ) );
+                return new GreaterEqCursor<T, ID>( db, ( GreaterEqEvaluator<T, ID>
) evaluatorBuilder.build( node ) );
 
             case LESSEQ:
-                return new LessEqCursor( db, ( LessEqEvaluator ) evaluatorBuilder.build(
node ) );
+                return new LessEqCursor<T, ID>( db, ( LessEqEvaluator<T, ID>
) evaluatorBuilder.build( node ) );
 
             case PRESENCE:
                 return new PresenceCursor<ID>( db, ( PresenceEvaluator<ID> )
evaluatorBuilder.build( node ) );
@@ -95,15 +89,17 @@
             case SCOPE:
                 if ( ( ( ScopeNode ) node ).getScope() == SearchScope.ONELEVEL )
                 {
-                    return new OneLevelScopeCursor( db, ( OneLevelScopeEvaluator ) evaluatorBuilder.build(
node ) );
+                    return new OneLevelScopeCursor<ID>( db,
+                        ( OneLevelScopeEvaluator<ServerEntry, ID> ) evaluatorBuilder.build(
node ) );
                 }
                 else
                 {
-                    return new SubtreeScopeCursor( db, ( SubtreeScopeEvaluator ) evaluatorBuilder.build(
node ) );
+                    return new SubtreeScopeCursor<ID>( db, ( SubtreeScopeEvaluator<ServerEntry,
ID> ) evaluatorBuilder
+                        .build( node ) );
                 }
 
             case SUBSTRING:
-                return new SubstringCursor( db, ( SubstringEvaluator ) evaluatorBuilder.build(
node ) );
+                return new SubstringCursor<ID>( db, ( SubstringEvaluator<ID>
) evaluatorBuilder.build( node ) );
 
                 /* ---------- LOGICAL OPERATORS ---------- */
 

Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java?rev=917442&r1=917441&r2=917442&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java
(original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/EvaluatorBuilder.java
Mon Mar  1 10:18:59 2010
@@ -70,23 +70,23 @@
     }
 
 
-    public Evaluator<? extends ExprNode, ServerEntry, ID> build( ExprNode node ) throws
Exception
+    public <T> Evaluator<? extends ExprNode, ServerEntry, ID> build( ExprNode
node ) throws Exception
     {
         switch ( node.getAssertionType() )
         {
             /* ---------- LEAF NODE HANDLING ---------- */
 
             case APPROXIMATE:
-                return new ApproximateEvaluator( ( ApproximateNode ) node, db, schemaManager
);
+                return new ApproximateEvaluator<T, ID>( ( ApproximateNode<T>
) node, db, schemaManager );
 
             case EQUALITY:
-                return new EqualityEvaluator( ( EqualityNode ) node, db, schemaManager );
+                return new EqualityEvaluator<T, ID>( ( EqualityNode<T> ) node,
db, schemaManager );
 
             case GREATEREQ:
-                return new GreaterEqEvaluator( ( GreaterEqNode ) node, db, schemaManager
);
+                return new GreaterEqEvaluator<T, ID>( ( GreaterEqNode<T> ) node,
db, schemaManager );
 
             case LESSEQ:
-                return new LessEqEvaluator( ( LessEqNode ) node, db, schemaManager );
+                return new LessEqEvaluator<T, ID>( ( LessEqNode<T> ) node, db,
schemaManager );
 
             case PRESENCE:
                 return new PresenceEvaluator<ID>( ( PresenceNode ) node, db, schemaManager
);



Mime
View raw message