You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2010/07/13 17:59:11 UTC
svn commit: r963773 - in /directory/apacheds/trunk/xdbm-partition/src:
main/java/org/apache/directory/server/xdbm/search/impl/
test/java/org/apache/directory/server/xdbm/search/impl/
Author: elecharny
Date: Tue Jul 13 15:59:10 2010
New Revision: 963773
URL: http://svn.apache.org/viewvc?rev=963773&view=rev
Log:
Created an Abstract SimpleEvaluator class to gather some common informations
Added:
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SimpleEvaluator.java
Modified:
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java?rev=963773&r1=963772&r2=963773&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/ApproximateEvaluator.java Tue Jul 13 15:59:10 2010
@@ -26,15 +26,12 @@ import org.apache.directory.server.i18n.
import org.apache.directory.server.xdbm.Index;
import org.apache.directory.server.xdbm.IndexEntry;
import org.apache.directory.server.xdbm.Store;
-import org.apache.directory.server.xdbm.search.Evaluator;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.filter.ApproximateNode;
import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.LdapComparator;
import org.apache.directory.shared.ldap.schema.MatchingRule;
-import org.apache.directory.shared.ldap.schema.Normalizer;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -44,39 +41,13 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class ApproximateEvaluator<T, ID extends Comparable<ID>> implements Evaluator<ApproximateNode<T>, Entry, ID>
+public class ApproximateEvaluator<T, ID extends Comparable<ID>> extends SimpleEvaluator<T, ID>
{
- /** The ExprNode to evaluate */
- private final ApproximateNode<T> node;
-
- /** The backend */
- private final Store<Entry, ID> db;
-
- /** The SchemaManager instance */
- private final SchemaManager schemaManager;
-
- /** The AttributeType we will use for the evaluation */
- private final AttributeType attributeType;
-
- /** The associated normalizer */
- private final Normalizer normalizer;
-
- /** The associated comparator */
- private final LdapComparator<? super Object> ldapComparator;
-
- /** The index to use if any */
- private final Index<T, Entry, ID> idx;
-
-
- @SuppressWarnings("unchecked")
public ApproximateEvaluator( ApproximateNode<T> node, Store<Entry, ID> db, SchemaManager schemaManager )
throws Exception
{
- this.db = db;
- this.node = node;
- this.schemaManager = schemaManager;
- this.attributeType = node.getAttributeType();
-
+ super( node, db, schemaManager );
+
if ( db.hasIndexOn( attributeType ) )
{
idx = ( Index<T, Entry, ID> ) db.getIndex( attributeType );
@@ -102,7 +73,7 @@ public class ApproximateEvaluator<T, ID
public ApproximateNode<T> getExpression()
{
- return node;
+ return (ApproximateNode<T>)node;
}
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java?rev=963773&r1=963772&r2=963773&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityEvaluator.java Tue Jul 13 15:59:10 2010
@@ -26,15 +26,12 @@ import java.util.Iterator;
import org.apache.directory.server.xdbm.Index;
import org.apache.directory.server.xdbm.IndexEntry;
import org.apache.directory.server.xdbm.Store;
-import org.apache.directory.server.xdbm.search.Evaluator;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.filter.EqualityNode;
import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.LdapComparator;
import org.apache.directory.shared.ldap.schema.MatchingRule;
-import org.apache.directory.shared.ldap.schema.Normalizer;
import org.apache.directory.shared.ldap.schema.SchemaManager;
import org.apache.directory.shared.ldap.schema.comparators.ByteArrayComparator;
import org.apache.directory.shared.ldap.schema.comparators.StringComparator;
@@ -48,50 +45,26 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class EqualityEvaluator<T, ID extends Comparable<ID>> implements Evaluator<EqualityNode<T>, Entry, ID>
+public class EqualityEvaluator<T, ID extends Comparable<ID>> extends SimpleEvaluator<T, ID>
{
- /** The ExprNode to evaluate */
- private final EqualityNode<T> node;
-
- /** The backend */
- private final Store<Entry, ID> db;
-
- /** The SchemaManager instance */
- private final SchemaManager schemaManager;
-
- /** The AttributeType we will use for the evaluation */
- private final AttributeType attributeType;
-
- /** The associated normalizer */
- private final Normalizer normalizer;
-
- /** The comparator to use */
- private final LdapComparator<?> comparator;
-
/** The default byte[] comparator if no comparator has been defined */
private static final Comparator<byte[]> BINARY_COMPARATOR = new ByteArrayComparator( null );
/** The default String comparator if no comparator has been defined */
private static final Comparator<String> STRING_COMPARATOR = new StringComparator( null );
- /** The index to use if any */
- private final Index<T, Entry, ID> idx;
-
@SuppressWarnings("unchecked")
public EqualityEvaluator( EqualityNode<T> node, Store<Entry, ID> db, SchemaManager schemaManager )
throws Exception
{
- this.db = db;
- this.node = node;
- this.schemaManager = schemaManager;
- this.attributeType = node.getAttributeType();
+ super( node, db, schemaManager );
if ( db.hasIndexOn( attributeType ) )
{
idx = ( Index<T, Entry, ID> ) db.getIndex( attributeType );
normalizer = null;
- comparator = null;
+ ldapComparator = null;
}
else
{
@@ -102,12 +75,12 @@ public class EqualityEvaluator<T, ID ext
if ( mr == null )
{
normalizer = new NoOpNormalizer( attributeType.getOid() );
- comparator = null;
+ ldapComparator = null;
}
else
{
normalizer = mr.getNormalizer();
- comparator = mr.getLdapComparator();
+ ldapComparator = mr.getLdapComparator();
}
}
}
@@ -115,7 +88,7 @@ public class EqualityEvaluator<T, ID ext
public EqualityNode<T> getExpression()
{
- return node;
+ return (EqualityNode<T>)node;
}
@@ -210,9 +183,9 @@ public class EqualityEvaluator<T, ID ext
byte[] serverValue = ( ( Value<byte[]> ) value ).getNormalizedValue();
byte[] nodeValue = ( ( Value<byte[]> ) node.getValue() ).getNormalizedValue();
- if ( comparator != null )
+ if ( ldapComparator != null )
{
- if ( ( ( ( LdapComparator<byte[]> ) comparator ).compare( serverValue, nodeValue ) == 0 ) )
+ if ( ldapComparator.compare( (Object)serverValue, (Object)nodeValue ) == 0 )
{
return true;
}
@@ -240,9 +213,9 @@ public class EqualityEvaluator<T, ID ext
nodeValue = ( ( Value<String> ) node.getValue() ).getNormalizedValue();
}
- if ( comparator != null )
+ if ( ldapComparator != null )
{
- if ( ( ( LdapComparator<String> ) comparator ).compare( serverValue, nodeValue ) == 0 )
+ if ( ldapComparator.compare( serverValue, nodeValue ) == 0 )
{
return true;
}
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java?rev=963773&r1=963772&r2=963773&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java Tue Jul 13 15:59:10 2010
@@ -20,21 +20,18 @@
package org.apache.directory.server.xdbm.search.impl;
-import java.util.Comparator;
import java.util.Iterator;
import org.apache.directory.server.i18n.I18n;
import org.apache.directory.server.xdbm.Index;
import org.apache.directory.server.xdbm.IndexEntry;
import org.apache.directory.server.xdbm.Store;
-import org.apache.directory.server.xdbm.search.Evaluator;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.filter.GreaterEqNode;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.MatchingRule;
-import org.apache.directory.shared.ldap.schema.Normalizer;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -44,42 +41,17 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class GreaterEqEvaluator<T, ID extends Comparable<ID>> implements Evaluator<GreaterEqNode<T>, Entry, ID>
+public class GreaterEqEvaluator<T, ID extends Comparable<ID>> extends SimpleEvaluator<T, ID>
{
- /** The ExprNode to evaluate */
- private final GreaterEqNode<T> node;
-
- /** The backend */
- private final Store<Entry, ID> db;
-
- /** The SchemaManager instance */
- private final SchemaManager schemaManager;
-
- /** The AttributeType we will use for the evaluation */
- private final AttributeType attributeType;
-
- /** The associated normalizer */
- private final Normalizer normalizer;
-
- /** The associated comparator */
- private final Comparator comparator;
-
- /** The index to use if any */
- private final Index<Object, Entry, ID> idx;
-
-
@SuppressWarnings("unchecked")
public GreaterEqEvaluator( GreaterEqNode<T> node, Store<Entry, ID> db, SchemaManager schemaManager )
throws Exception
{
- this.db = db;
- this.node = node;
- this.schemaManager = schemaManager;
- this.attributeType = node.getAttributeType();
+ super( node, db, schemaManager );
if ( db.hasIndexOn( node.getAttributeType() ) )
{
- idx = ( Index<Object, Entry, ID> ) db.getIndex( attributeType );
+ idx = ( Index<T, Entry, ID> ) db.getIndex( attributeType );
}
else
{
@@ -105,31 +77,13 @@ public class GreaterEqEvaluator<T, ID ex
}
normalizer = mr.getNormalizer();
- comparator = mr.getLdapComparator();
+ ldapComparator = mr.getLdapComparator();
}
public GreaterEqNode getExpression()
{
- return node;
- }
-
-
- public AttributeType getAttributeType()
- {
- return attributeType;
- }
-
-
- public Normalizer getNormalizer()
- {
- return normalizer;
- }
-
-
- public Comparator getComparator()
- {
- return comparator;
+ return (GreaterEqNode)node;
}
@@ -262,7 +216,7 @@ public class GreaterEqEvaluator<T, ID ex
value.normalize( normalizer );
//noinspection unchecked
- if ( comparator.compare( value.getNormalizedValue(), node.getValue().getNormalizedValue() ) >= 0 )
+ if ( ldapComparator.compare( value.getNormalizedValue(), node.getValue().getNormalizedValue() ) >= 0 )
{
if ( indexEntry != null )
{
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java?rev=963773&r1=963772&r2=963773&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java Tue Jul 13 15:59:10 2010
@@ -110,7 +110,7 @@ public class LessEqCursor<V, ID extends
* before() method of the userIdxCursor.
*/
//noinspection unchecked
- int compareValue = lessEqEvaluator.getLdapComparator().compare( value,
+ int compareValue = lessEqEvaluator.getComparator().compare( value,
lessEqEvaluator.getExpression().getValue().get() );
if ( compareValue > 0 )
@@ -154,7 +154,7 @@ public class LessEqCursor<V, ID extends
* If the element's value is smaller, then we delegate to the
* before() method of the userIdxCursor.
*/
- int compareValue = lessEqEvaluator.getLdapComparator().compare( element.getValue(),
+ int compareValue = lessEqEvaluator.getComparator().compare( element.getValue(),
lessEqEvaluator.getExpression().getValue().get() );
if ( compareValue > 0 )
@@ -185,7 +185,7 @@ public class LessEqCursor<V, ID extends
checkNotClosed( "afterValue()" );
if ( userIdxCursor != null )
{
- int comparedValue = lessEqEvaluator.getLdapComparator().compare( value,
+ int comparedValue = lessEqEvaluator.getComparator().compare( value,
lessEqEvaluator.getExpression().getValue().get() );
/*
@@ -221,7 +221,7 @@ public class LessEqCursor<V, ID extends
checkNotClosed( "after()" );
if ( userIdxCursor != null )
{
- int comparedValue = lessEqEvaluator.getLdapComparator().compare( element.getValue(),
+ int comparedValue = lessEqEvaluator.getComparator().compare( element.getValue(),
lessEqEvaluator.getExpression().getValue().get() );
/*
@@ -350,7 +350,7 @@ public class LessEqCursor<V, ID extends
{
checkNotClosed( "next()" );
IndexEntry<?, Entry, ID> candidate = userIdxCursor.get();
- if ( lessEqEvaluator.getLdapComparator().compare( candidate.getValue(),
+ if ( lessEqEvaluator.getComparator().compare( candidate.getValue(),
lessEqEvaluator.getExpression().getValue().get() ) <= 0 )
{
return available = true;
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java?rev=963773&r1=963772&r2=963773&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java Tue Jul 13 15:59:10 2010
@@ -26,15 +26,12 @@ import org.apache.directory.server.i18n.
import org.apache.directory.server.xdbm.Index;
import org.apache.directory.server.xdbm.IndexEntry;
import org.apache.directory.server.xdbm.Store;
-import org.apache.directory.server.xdbm.search.Evaluator;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.filter.LessEqNode;
import org.apache.directory.shared.ldap.schema.AttributeType;
-import org.apache.directory.shared.ldap.schema.LdapComparator;
import org.apache.directory.shared.ldap.schema.MatchingRule;
-import org.apache.directory.shared.ldap.schema.Normalizer;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -44,38 +41,13 @@ import org.apache.directory.shared.ldap.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
-public class LessEqEvaluator<T, ID extends Comparable<ID>> implements Evaluator<LessEqNode<T>, Entry, ID>
+public class LessEqEvaluator<T, ID extends Comparable<ID>> extends SimpleEvaluator<T, ID>
{
- /** The ExprNode to evaluate */
- private final LessEqNode<T> node;
-
- /** The backend */
- private final Store<Entry, ID> db;
-
- /** The SchemaManager instance */
- private final SchemaManager schemaManager;
-
- /** The AttributeType we will use for the evaluation */
- private final AttributeType attributeType;
-
- /** The associated normalizer */
- private final Normalizer normalizer;
-
- /** The associated comparator */
- private final LdapComparator<? super Object> ldapComparator;
-
- /** The index to use if any */
- private final Index<T, Entry, ID> idx;
-
-
@SuppressWarnings("unchecked")
public LessEqEvaluator( LessEqNode<T> node, Store<Entry, ID> db, SchemaManager schemaManager )
throws Exception
{
- this.db = db;
- this.node = node;
- this.schemaManager = schemaManager;
- this.attributeType = node.getAttributeType();
+ super( node, db, schemaManager );
if ( db.hasIndexOn( attributeType ) )
{
@@ -111,25 +83,7 @@ public class LessEqEvaluator<T, ID exten
public LessEqNode<T> getExpression()
{
- return node;
- }
-
-
- public AttributeType getAttributeType()
- {
- return attributeType;
- }
-
-
- public Normalizer getNormalizer()
- {
- return normalizer;
- }
-
-
- public LdapComparator<? super Object> getLdapComparator()
- {
- return ldapComparator;
+ return (LessEqNode<T>)node;
}
Added: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SimpleEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SimpleEvaluator.java?rev=963773&view=auto
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SimpleEvaluator.java (added)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SimpleEvaluator.java Tue Jul 13 15:59:10 2010
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.directory.server.xdbm.search.impl;
+
+import org.apache.directory.server.xdbm.Index;
+import org.apache.directory.server.xdbm.Store;
+import org.apache.directory.server.xdbm.search.Evaluator;
+import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.filter.SimpleNode;
+import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.LdapComparator;
+import org.apache.directory.shared.ldap.schema.Normalizer;
+import org.apache.directory.shared.ldap.schema.SchemaManager;
+
+/**
+ * An abstract evaluator to store the common fileds for the Simple node evaluators
+ * (ApproximateEvaluator, EqualityEvaluator, GreaterEqEvluator and LessEqEvluator)
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public abstract class SimpleEvaluator<T, ID extends Comparable<ID>> implements Evaluator<SimpleNode<T>, Entry, ID>
+{
+ /** The ExprNode to evaluate */
+ protected final SimpleNode<T> node;
+
+ /** The backend */
+ protected final Store<Entry, ID> db;
+
+ /** The SchemaManager instance */
+ protected final SchemaManager schemaManager;
+
+ /** The AttributeType we will use for the evaluation */
+ protected final AttributeType attributeType;
+
+ /** The associated normalizer */
+ protected Normalizer normalizer;
+
+ /** The associated comparator */
+ protected LdapComparator<? super Object> ldapComparator;
+
+ /** The index to use if any */
+ protected Index<T, Entry, ID> idx;
+
+ @SuppressWarnings("unchecked")
+ public SimpleEvaluator( SimpleNode<T> node, Store<Entry, ID> db, SchemaManager schemaManager )
+ throws Exception
+ {
+ this.db = db;
+ this.node = node;
+ this.schemaManager = schemaManager;
+ this.attributeType = node.getAttributeType();
+ }
+
+
+ /**
+ * @return The AttributeType
+ */
+ public AttributeType getAttributeType()
+ {
+ return attributeType;
+ }
+
+
+ /**
+ * @return The Normalizer associated with the AttributeType
+ */
+ public Normalizer getNormalizer()
+ {
+ return normalizer;
+ }
+
+
+ /**
+ * @return The LdapComparator associated with the AttributeType
+ */
+ public LdapComparator<? super Object> getComparator()
+ {
+ return ldapComparator;
+ }
+}
Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java?rev=963773&r1=963772&r2=963773&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/LessEqTest.java Tue Jul 13 15:59:10 2010
@@ -583,7 +583,7 @@ public class LessEqTest
assertEquals( node, evaluator.getExpression() );
assertEquals( SchemaConstants.POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
assertNotNull( evaluator.getNormalizer() );
- assertNotNull( evaluator.getLdapComparator() );
+ assertNotNull( evaluator.getComparator() );
indexEntry.setId( 1L );
assertTrue( evaluator.evaluate( indexEntry ) );
@@ -629,7 +629,7 @@ public class LessEqTest
assertEquals( node, evaluator.getExpression() );
assertEquals( SchemaConstants.STREET_AT_OID, evaluator.getAttributeType().getOid() );
assertNotNull( evaluator.getNormalizer() );
- assertNotNull( evaluator.getLdapComparator() );
+ assertNotNull( evaluator.getComparator() );
DN dn = new DN( "cn=jane doe,o=good times co." );
dn.normalize( schemaManager.getNormalizerMapping() );
@@ -658,7 +658,7 @@ public class LessEqTest
assertEquals( node, evaluator.getExpression() );
assertEquals( SchemaConstants.C_POSTALCODE_AT_OID, evaluator.getAttributeType().getOid() );
assertNotNull( evaluator.getNormalizer() );
- assertNotNull( evaluator.getLdapComparator() );
+ assertNotNull( evaluator.getComparator() );
indexEntry.setId( 1L );
assertFalse( evaluator.evaluate( indexEntry ) );
@@ -676,7 +676,7 @@ public class LessEqTest
assertEquals( node, evaluator.getExpression() );
assertEquals( SchemaConstants.POSTOFFICEBOX_AT_OID, evaluator.getAttributeType().getOid() );
assertNotNull( evaluator.getNormalizer() );
- assertNotNull( evaluator.getLdapComparator() );
+ assertNotNull( evaluator.getComparator() );
indexEntry.setId( 1L );
assertTrue( evaluator.evaluate( indexEntry ) );