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 01:37:40 UTC
svn commit: r963530 [3/3] - in /directory/apacheds/trunk:
core-api/src/main/java/org/apache/directory/server/core/
core-api/src/main/java/org/apache/directory/server/core/event/
core-api/src/main/java/org/apache/directory/server/core/schema/ core-api/s...
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/EqualityCursor.java Mon Jul 12 23:37:38 2010
@@ -20,12 +20,12 @@
package org.apache.directory.server.xdbm.search.impl;
+import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.server.xdbm.AbstractIndexCursor;
import org.apache.directory.server.xdbm.Index;
+import org.apache.directory.server.xdbm.IndexCursor;
import org.apache.directory.server.xdbm.IndexEntry;
import org.apache.directory.server.xdbm.Store;
-import org.apache.directory.server.xdbm.AbstractIndexCursor;
-import org.apache.directory.server.xdbm.IndexCursor;
-import org.apache.directory.server.i18n.I18n;
import org.apache.directory.shared.ldap.cursor.InvalidCursorPositionException;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.entry.Value;
@@ -65,6 +65,7 @@ public class EqualityCursor<V, ID extend
String attribute = equalityEvaluator.getExpression().getAttribute();
Value<V> value = equalityEvaluator.getExpression().getValue();
+
if ( db.hasIndexOn( attribute ) )
{
Index<V, Entry, ID> userIndex = ( Index<V, Entry, ID> ) db.getIndex( attribute );
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=963530&r1=963529&r2=963530&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 Mon Jul 12 23:37:38 2010
@@ -27,8 +27,8 @@ import org.apache.directory.server.xdbm.
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.EntryAttribute;
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;
@@ -86,7 +86,7 @@ public class EqualityEvaluator<T, ID ext
else
{
idx = null;
- type = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
+ type = node.getAttributeType() ;
MatchingRule mr = type.getEquality();
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java Mon Jul 12 23:37:38 2010
@@ -70,6 +70,7 @@ public class GreaterEqCursor<V, ID exten
this.greaterEqEvaluator = greaterEqEvaluator;
String attribute = greaterEqEvaluator.getExpression().getAttribute();
+
if ( db.hasIndexOn( attribute ) )
{
userIdxCursor = ( ( Index<V, Entry, ID> ) db.getIndex( attribute ) ).forwardCursor();
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=963530&r1=963529&r2=963530&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 Mon Jul 12 23:37:38 2010
@@ -62,7 +62,7 @@ public class GreaterEqEvaluator<T, ID ex
this.db = db;
this.node = node;
this.schemaManager = schemaManager;
- this.type = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
+ this.type = node.getAttributeType();
if ( db.hasIndexOn( node.getAttribute() ) )
{
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=963530&r1=963529&r2=963530&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 Mon Jul 12 23:37:38 2010
@@ -70,6 +70,7 @@ public class LessEqCursor<V, ID extends
this.lessEqEvaluator = lessEqEvaluator;
String attribute = lessEqEvaluator.getExpression().getAttribute();
+
if ( db.hasIndexOn( attribute ) )
{
userIdxCursor = ( ( Index<V, Entry, ID> ) db.getIndex( attribute ) ).forwardCursor();
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=963530&r1=963529&r2=963530&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 Mon Jul 12 23:37:38 2010
@@ -27,8 +27,8 @@ import org.apache.directory.server.xdbm.
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.EntryAttribute;
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;
@@ -62,7 +62,7 @@ public class LessEqEvaluator<T, ID exten
this.db = db;
this.node = node;
this.schemaManager = schemaManager;
- this.type = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
+ this.type = node.getAttributeType();
if ( db.hasIndexOn( node.getAttribute() ) )
{
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/PresenceEvaluator.java Mon Jul 12 23:37:38 2010
@@ -26,8 +26,8 @@ import org.apache.directory.server.xdbm.
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.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.filter.PresenceNode;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -54,7 +54,7 @@ public class PresenceEvaluator<ID extend
this.db = db;
this.node = node;
this.schemaManager = schemaManager;
- this.type = schemaManager.lookupAttributeTypeRegistry( node.getAttribute() );
+ this.type = node.getAttributeType();
if ( db.hasUserIndexOn( node.getAttribute() ) )
{
Modified: directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/SubstringEvaluator.java Mon Jul 12 23:37:38 2010
@@ -82,8 +82,7 @@ public class SubstringEvaluator<ID exten
this.node = node;
this.schemaManager = schemaManager;
- String oid = schemaManager.getAttributeTypeRegistry().getOidByName( node.getAttribute() );
- type = schemaManager.lookupAttributeTypeRegistry( oid );
+ type = node.getAttributeType();
MatchingRule rule = type.getSubstring();
Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/AndCursorTest.java Mon Jul 12 23:37:38 2010
@@ -168,7 +168,7 @@ public class AndCursorTest
{
String filter = "(&(cn=J*)(sn=*))";
- ExprNode exprNode = FilterParser.parse( filter );
+ ExprNode exprNode = FilterParser.parse( schemaManager, filter );
IndexCursor<?, Entry, Long> cursor = cursorBuilder.build( exprNode );
@@ -205,7 +205,7 @@ public class AndCursorTest
List<Evaluator<? extends ExprNode, Entry, Long>> evaluators = new ArrayList<Evaluator<? extends ExprNode, Entry, Long>>();
Evaluator<? extends ExprNode, Entry, Long> eval;
- ExprNode exprNode = new SubstringNode( "cn", "J", null );
+ ExprNode exprNode = new SubstringNode( schemaManager.getAttributeType( "cn" ), "J", null );
eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store, schemaManager );
IndexCursor<?, Entry, Long> wrapped = new SubstringCursor( store, ( SubstringEvaluator ) eval );
@@ -215,7 +215,7 @@ public class AndCursorTest
andNode.addNode( exprNode );
- exprNode = new PresenceNode( "sn" );
+ exprNode = new PresenceNode( schemaManager.getAttributeType( "sn" ) );
eval = new PresenceEvaluator( ( PresenceNode ) exprNode, store, schemaManager );
evaluators.add( eval );
Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/FilterNormalizingVisitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/FilterNormalizingVisitor.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/FilterNormalizingVisitor.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/FilterNormalizingVisitor.java Mon Jul 12 23:37:38 2010
@@ -168,16 +168,8 @@ public class FilterNormalizingVisitor im
*/
private ExprNode visitPresenceNode( PresenceNode node )
{
- try
- {
- node.setAttribute( schemaManager.getAttributeTypeRegistry().getOidByName( node.getAttribute() ) );
- return node;
- }
- catch ( LdapException ne )
- {
- log.warn( "Failed to normalize filter node attribute: {}, error: {}", node.getAttribute(), ne.getMessage() );
- return null;
- }
+ node.setAttributeType( node.getAttributeType() );
+ return node;
}
@@ -208,17 +200,9 @@ public class FilterNormalizingVisitor im
return null;
}
- try
- {
- node.setAttribute( schemaManager.getAttributeTypeRegistry().getOidByName( node.getAttribute() ) );
- node.setValue( normalized );
- return node;
- }
- catch ( LdapException ne )
- {
- log.warn( "Failed to normalize filter node attribute: {}, error: {}", node.getAttribute(), ne.getMessage() );
- return null;
- }
+ node.setAttribute( node.getAttribute() );
+ node.setValue( normalized );
+ return node;
}
@@ -286,37 +270,29 @@ public class FilterNormalizingVisitor im
}
}
- try
- {
- node.setAttribute( schemaManager.getAttributeTypeRegistry().getOidByName( node.getAttribute() ) );
-
- if ( normInitial != null )
- {
- node.setInitial( normInitial.getString() );
- }
- else
- {
- node.setInitial( null );
- }
+ node.setAttribute( node.getAttribute() );
- node.setAny( normAnys );
+ if ( normInitial != null )
+ {
+ node.setInitial( normInitial.getString() );
+ }
+ else
+ {
+ node.setInitial( null );
+ }
- if ( normFinal != null )
- {
- node.setFinal( normFinal.getString() );
- }
- else
- {
- node.setFinal( null );
- }
+ node.setAny( normAnys );
- return node;
+ if ( normFinal != null )
+ {
+ node.setFinal( normFinal.getString() );
}
- catch ( LdapException ne )
+ else
{
- log.warn( "Failed to normalize filter node attribute: {}, error: {}", node.getAttribute(), ne.getMessage() );
- return null;
+ node.setFinal( null );
}
+
+ return node;
}
@@ -331,16 +307,8 @@ public class FilterNormalizingVisitor im
*/
private ExprNode visitExtensibleNode( ExtensibleNode node )
{
- try
- {
- node.setAttribute( schemaManager.getAttributeTypeRegistry().getOidByName( node.getAttribute() ) );
- return node;
- }
- catch ( LdapException ne )
- {
- log.warn( "Failed to normalize filter node attribute: {}, error: {}", node.getAttribute(), ne.getMessage() );
- return null;
- }
+ node.setAttributeType( node.getAttributeType() );
+ return node;
}
Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/GreaterEqTest.java Mon Jul 12 23:37:38 2010
@@ -165,7 +165,7 @@ public class GreaterEqTest
public void testCursorIndexed() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
- GreaterEqNode node = new GreaterEqNode( SchemaConstants.POSTALCODE_AT_OID, new StringValue( at, "3" ) );
+ GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "3" ) );
GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
GreaterEqCursor<String, Long> cursor = new GreaterEqCursor<String, Long>( store, evaluator );
assertNotNull( cursor );
@@ -402,7 +402,7 @@ public class GreaterEqTest
public void testCursorNotIndexed() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTOFFICEBOX_AT_OID );
- GreaterEqNode node = new GreaterEqNode( SchemaConstants.POSTOFFICEBOX_AT_OID, new StringValue( at, "3" ) );
+ GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "3" ) );
GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
GreaterEqCursor<String, Long> cursor = new GreaterEqCursor<String, Long>( store, evaluator );
assertNotNull( cursor );
@@ -552,7 +552,7 @@ public class GreaterEqTest
public void testEvaluatorIndexed() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
- GreaterEqNode node = new GreaterEqNode( SchemaConstants.POSTALCODE_AT_OID, new StringValue( at, "3" ) );
+ GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "3" ) );
GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
assertEquals( node, evaluator.getExpression() );
@@ -597,7 +597,7 @@ public class GreaterEqTest
public void testEvaluatorWithDescendantValue() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.STREET_AT_OID );
- GreaterEqNode node = new GreaterEqNode( SchemaConstants.STREET_AT_OID, new StringValue( at, "2" ) );
+ GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "2" ) );
GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
assertEquals( node, evaluator.getExpression() );
@@ -625,7 +625,7 @@ public class GreaterEqTest
public void testEvaluatorWithoutDescendants() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.C_POSTALCODE_AT_OID );
- GreaterEqNode node = new GreaterEqNode( SchemaConstants.C_POSTALCODE_AT_OID, new StringValue( at, "2" ) );
+ GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "2" ) );
GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
@@ -643,7 +643,7 @@ public class GreaterEqTest
public void testEvaluatorNotIndexed() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTOFFICEBOX_AT_OID );
- GreaterEqNode node = new GreaterEqNode( SchemaConstants.POSTOFFICEBOX_AT_OID, new StringValue( at, "3" ) );
+ GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "3" ) );
GreaterEqEvaluator evaluator = new GreaterEqEvaluator( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
@@ -699,7 +699,7 @@ public class GreaterEqTest
try
{
- GreaterEqNode node = new GreaterEqNode( at.getOid(), new StringValue( at, "3" ) );
+ GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "3" ) );
new GreaterEqEvaluator( node, store, schemaManager );
}
finally
@@ -737,7 +737,7 @@ public class GreaterEqTest
desc.setObsolete( false );
//schemaManager.register( at.getSyntax().getSyntaxChecker() );
- GreaterEqNode node = new GreaterEqNode( at.getOid(), new StringValue( at, "3" ) );
+ GreaterEqNode node = new GreaterEqNode( at, new StringValue( at, "3" ) );
new GreaterEqEvaluator( node, store, schemaManager );
schemaManager.delete( at );
}
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=963530&r1=963529&r2=963530&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 Mon Jul 12 23:37:38 2010
@@ -165,7 +165,7 @@ public class LessEqTest
public void testCursorIndexed() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
- LessEqNode node = new LessEqNode( SchemaConstants.POSTALCODE_AT_OID, new StringValue( at, "3" ) );
+ LessEqNode node = new LessEqNode( at, new StringValue( at, "3" ) );
LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
LessEqCursor<String, Long> cursor = new LessEqCursor<String, Long>( store, evaluator );
assertNotNull( cursor );
@@ -422,7 +422,7 @@ public class LessEqTest
public void testCursorNotIndexed() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTOFFICEBOX_AT_OID );
- LessEqNode node = new LessEqNode( SchemaConstants.POSTOFFICEBOX_AT_OID, new StringValue( at, "3" ) );
+ LessEqNode node = new LessEqNode( at, new StringValue( at, "3" ) );
LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
LessEqCursor<String, Long> cursor = new LessEqCursor<String, Long>( store, evaluator );
assertNotNull( cursor );
@@ -576,7 +576,7 @@ public class LessEqTest
public void testEvaluatorIndexed() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTALCODE_AT_OID );
- LessEqNode node = new LessEqNode( SchemaConstants.POSTALCODE_AT_OID, new StringValue( at, "3" ) );
+ LessEqNode node = new LessEqNode( at, new StringValue( at, "3" ) );
LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
@@ -622,7 +622,7 @@ public class LessEqTest
public void testEvaluatorWithDescendantValue() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.STREET_AT_OID );
- LessEqNode node = new LessEqNode( SchemaConstants.STREET_AT_OID, new StringValue( at, "2" ) );
+ LessEqNode node = new LessEqNode( at, new StringValue( at, "2" ) );
LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
@@ -651,7 +651,7 @@ public class LessEqTest
public void testEvaluatorWithoutDescendants() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.C_POSTALCODE_AT_OID );
- LessEqNode node = new LessEqNode( SchemaConstants.C_POSTALCODE_AT_OID, new StringValue( at, "2" ) );
+ LessEqNode node = new LessEqNode( at, new StringValue( at, "2" ) );
LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
@@ -669,7 +669,7 @@ public class LessEqTest
public void testEvaluatorNotIndexed() throws Exception
{
AttributeType at = schemaManager.lookupAttributeTypeRegistry( SchemaConstants.POSTOFFICEBOX_AT_OID );
- LessEqNode node = new LessEqNode( SchemaConstants.POSTOFFICEBOX_AT_OID, new StringValue( at, "3" ) );
+ LessEqNode node = new LessEqNode( at, new StringValue( at, "3" ) );
LessEqEvaluator evaluator = new LessEqEvaluator( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
@@ -725,7 +725,7 @@ public class LessEqTest
try
{
- LessEqNode node = new LessEqNode( at.getOid(), new StringValue( at, "3" ) );
+ LessEqNode node = new LessEqNode( at, new StringValue( at, "3" ) );
new LessEqEvaluator( node, store, schemaManager );
}
@@ -764,7 +764,7 @@ public class LessEqTest
desc.setNames( names );
desc.setObsolete( false );
- LessEqNode node = new LessEqNode( at.getOid(), new StringValue( at, "3" ) );
+ LessEqNode node = new LessEqNode( at, new StringValue( at, "3" ) );
new LessEqEvaluator( node, store, schemaManager );
schemaManager.delete( at );
}
Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NestedFilterTest.java Mon Jul 12 23:37:38 2010
@@ -167,7 +167,7 @@ public class NestedFilterTest
{
String filter = "(|(&(cn=J*)(sn=w*))(ou=apache))";
- ExprNode exprNode = FilterParser.parse( filter );
+ ExprNode exprNode = FilterParser.parse( schemaManager, filter );
exprNode.accept( visitor );
optimizer.annotate( exprNode );
@@ -197,7 +197,7 @@ public class NestedFilterTest
{
String filter = "(&(&(cn=Jo*)(sn=w*))(!(ou=apache)))";
- ExprNode exprNode = FilterParser.parse( filter );
+ ExprNode exprNode = FilterParser.parse( schemaManager, filter );
optimizer.annotate( exprNode );
IndexCursor<?, Entry, Long> cursor = cursorBuilder.build( exprNode );
@@ -218,7 +218,7 @@ public class NestedFilterTest
UuidSyntaxChecker uuidSynChecker = new UuidSyntaxChecker();
- ExprNode exprNode = FilterParser.parse( filter );
+ ExprNode exprNode = FilterParser.parse( schemaManager, filter );
optimizer.annotate( exprNode );
IndexCursor<?, Entry, Long> cursor = cursorBuilder.build( exprNode );
@@ -243,7 +243,7 @@ public class NestedFilterTest
{
String filter = "(!(|(|(cn=Jo*)(sn=w*))(!(ou=apache))))";
- ExprNode exprNode = FilterParser.parse( filter );
+ ExprNode exprNode = FilterParser.parse( schemaManager, filter );
optimizer.annotate( exprNode );
IndexCursor<?, Entry, Long> cursor = cursorBuilder.build( exprNode );
Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/NotCursorTest.java Mon Jul 12 23:37:38 2010
@@ -165,7 +165,7 @@ public class NotCursorTest
{
String filter = "(!(cn=J*))";
- ExprNode exprNode = FilterParser.parse( filter );
+ ExprNode exprNode = FilterParser.parse( schemaManager, filter );
IndexCursor<?, Entry, Long> cursor = cursorBuilder.build( exprNode );
@@ -200,7 +200,7 @@ public class NotCursorTest
{
NotNode notNode = new NotNode();
- ExprNode exprNode = new SubstringNode( "cn", "J", null );
+ ExprNode exprNode = new SubstringNode( schemaManager.getAttributeType( "cn" ), "J", null );
Evaluator<? extends ExprNode, Entry, Long> eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store,
schemaManager );
notNode.addNode( exprNode );
Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/OrCursorTest.java Mon Jul 12 23:37:38 2010
@@ -167,7 +167,7 @@ public class OrCursorTest
{
String filter = "(|(cn=J*)(sn=W*))";
- ExprNode exprNode = FilterParser.parse( filter );
+ ExprNode exprNode = FilterParser.parse( schemaManager, filter );
IndexCursor<?, Entry, Long> cursor = cursorBuilder.build( exprNode );
@@ -257,7 +257,7 @@ public class OrCursorTest
OrNode orNode = new OrNode();
- ExprNode exprNode = new SubstringNode( "cn", "J", null );
+ ExprNode exprNode = new SubstringNode( schemaManager.getAttributeType( "cn" ), "J", null );
eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store, schemaManager );
Cursor subStrCursor1 = new SubstringCursor( store, ( SubstringEvaluator ) eval );
cursors.add( subStrCursor1 );
@@ -271,7 +271,7 @@ public class OrCursorTest
// }
// catch( IllegalArgumentException ie ){ }
- exprNode = new SubstringNode( "sn", "W", null );
+ exprNode = new SubstringNode( schemaManager.getAttributeType( "sn" ), "W", null );
eval = new SubstringEvaluator( ( SubstringNode ) exprNode, store, schemaManager );
evaluators.add( eval );
Cursor subStrCursor2 = new SubstringCursor( store, ( SubstringEvaluator ) eval );
Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/PresenceTest.java Mon Jul 12 23:37:38 2010
@@ -149,7 +149,7 @@ public class PresenceTest
@Test
public void testIndexedServerEntry() throws Exception
{
- PresenceNode node = new PresenceNode( SchemaConstants.CN_AT_OID );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( "cn" ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
@@ -217,7 +217,7 @@ public class PresenceTest
assertTrue( cursor.available() );
assertEquals( SchemaConstants.CN_AT_OID, cursor.get().getValue() );
- node = new PresenceNode( SchemaConstants.OU_AT_OID );
+ node = new PresenceNode( schemaManager.getAttributeType( "ou" ) );
evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
cursor = new PresenceCursor<Long>( store, evaluator );
@@ -271,7 +271,7 @@ public class PresenceTest
public void testSystemIndexedServerEntry( String oid ) throws Exception
{
- PresenceNode node = new PresenceNode( oid );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( oid ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
@@ -294,7 +294,7 @@ public class PresenceTest
@Test
public void testNonIndexedServerEntry() throws Exception
{
- PresenceNode node = new PresenceNode( SchemaConstants.SN_AT_OID );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( "sn" ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
@@ -356,7 +356,7 @@ public class PresenceTest
// ----------- organizationName attribute
- node = new PresenceNode( SchemaConstants.O_AT_OID );
+ node = new PresenceNode( schemaManager.getAttributeType( "o" ) );
evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
cursor = new PresenceCursor<Long>( store, evaluator );
@@ -378,7 +378,7 @@ public class PresenceTest
@Test
public void testEvaluatorIndexed() throws Exception
{
- PresenceNode node = new PresenceNode( SchemaConstants.CN_AT_OID );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( "cn" ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> entry = new ForwardIndexEntry<String, Entry, Long>();
entry.setValue( SchemaConstants.CN_AT_OID );
@@ -402,7 +402,7 @@ public class PresenceTest
private void testEvaluatorSystemIndexed( String oid ) throws Exception
{
- PresenceNode node = new PresenceNode( oid );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( oid ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> entry = new ForwardIndexEntry<String, Entry, Long>();
@@ -420,7 +420,7 @@ public class PresenceTest
@Test
public void testEvaluatorNotIndexed() throws Exception
{
- PresenceNode node = new PresenceNode( SchemaConstants.NAME_AT_OID );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( "name" ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> entry = new ForwardIndexEntry<String, Entry, Long>();
entry.setValue( SchemaConstants.NAME_AT_OID );
@@ -431,7 +431,7 @@ public class PresenceTest
entry.setId( ( long ) 5 );
assertTrue( evaluator.evaluate( entry ) );
- node = new PresenceNode( SchemaConstants.SEARCHGUIDE_AT_OID );
+ node = new PresenceNode( schemaManager.getAttributeType( "searchGuide" ) );
evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
entry = new ForwardIndexEntry<String, Entry, Long>();
entry.setValue( SchemaConstants.SEARCHGUIDE_AT_OID );
@@ -443,7 +443,7 @@ public class PresenceTest
entry.setObject( store.lookup( ( long ) 5 ) );
assertFalse( evaluator.evaluate( entry ) );
- node = new PresenceNode( SchemaConstants.ST_AT_OID );
+ node = new PresenceNode( schemaManager.getAttributeType( "st" ) );
evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
entry = new ForwardIndexEntry<String, Entry, Long>();
entry.setValue( SchemaConstants.ST_AT_OID );
@@ -460,7 +460,7 @@ public class PresenceTest
@Test(expected = InvalidCursorPositionException.class)
public void testInvalidCursorPositionException() throws Exception
{
- PresenceNode node = new PresenceNode( SchemaConstants.SN_AT_OID );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( "sn" ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
cursor.get();
@@ -470,7 +470,7 @@ public class PresenceTest
@Test(expected = InvalidCursorPositionException.class)
public void testInvalidCursorPositionException2() throws Exception
{
- PresenceNode node = new PresenceNode( SchemaConstants.CN_AT_OID );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( "cn" ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
cursor.get();
@@ -480,7 +480,7 @@ public class PresenceTest
@Test(expected = UnsupportedOperationException.class)
public void testUnsupportBeforeWithoutIndex() throws Exception
{
- PresenceNode node = new PresenceNode( SchemaConstants.SN_AT_OID );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( "sn" ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
@@ -494,7 +494,7 @@ public class PresenceTest
@Test(expected = UnsupportedOperationException.class)
public void testUnsupportAfterWithoutIndex() throws Exception
{
- PresenceNode node = new PresenceNode( SchemaConstants.SN_AT_OID );
+ PresenceNode node = new PresenceNode( schemaManager.getAttributeType( "sn" ) );
PresenceEvaluator<Long> evaluator = new PresenceEvaluator<Long>( node, store, schemaManager );
PresenceCursor<Long> cursor = new PresenceCursor<Long>( store, evaluator );
Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java (original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/search/impl/SubstringTest.java Mon Jul 12 23:37:38 2010
@@ -145,7 +145,7 @@ public class SubstringTest
@Test
public void testIndexedCnStartsWithJ() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, "j", null );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "cn" ), "j", null );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
@@ -297,7 +297,7 @@ public class SubstringTest
@Test
public void testIndexedCnStartsWithJim() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, "jim", null );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "cn" ), "jim", null );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
@@ -389,7 +389,7 @@ public class SubstringTest
@Test
public void testIndexedCnEndsWithBean() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, null, "bean" );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "cn" ), null, "bean" );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
@@ -481,7 +481,7 @@ public class SubstringTest
@Test
public void testNonIndexedSnStartsWithB() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "b", null );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "sn" ), "b", null );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
@@ -543,7 +543,7 @@ public class SubstringTest
@Test
public void testIndexedSnEndsWithEr() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, null, "er" );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "sn" ), null, "er" );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
@@ -604,7 +604,7 @@ public class SubstringTest
@Test
public void testNonIndexedAttributes() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "walk", null );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "sn" ), "walk", null );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
indexEntry.setId( 5L );
@@ -616,35 +616,35 @@ public class SubstringTest
indexEntry.setObject( null );
assertFalse( evaluator.evaluate( indexEntry ) );
- node = new SubstringNode( SchemaConstants.SN_AT_OID, "wa", null );
+ node = new SubstringNode( schemaManager.getAttributeType( "sn" ), "wa", null );
evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
indexEntry = new ForwardIndexEntry<String, Entry, Long>();
indexEntry.setId( 5L );
indexEntry.setObject( store.lookup( 5L ) );
assertTrue( evaluator.evaluate( indexEntry ) );
- node = new SubstringNode( SchemaConstants.SEARCHGUIDE_AT_OID, "j", null );
+ node = new SubstringNode( schemaManager.getAttributeType( "searchGuide" ), "j", null );
evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
indexEntry = new ForwardIndexEntry<String, Entry, Long>();
indexEntry.setId( 6L );
indexEntry.setObject( store.lookup( 6L ) );
assertFalse( evaluator.evaluate( indexEntry ) );
- node = new SubstringNode( SchemaConstants.ST_AT_OID, "j", null );
+ node = new SubstringNode( schemaManager.getAttributeType( "st" ), "j", null );
evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
indexEntry = new ForwardIndexEntry<String, Entry, Long>();
indexEntry.setId( 6L );
indexEntry.setObject( store.lookup( 6L ) );
assertFalse( evaluator.evaluate( indexEntry ) );
- node = new SubstringNode( SchemaConstants.NAME_AT_OID, "j", null );
+ node = new SubstringNode( schemaManager.getAttributeType( "name" ), "j", null );
evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
indexEntry = new ForwardIndexEntry<String, Entry, Long>();
indexEntry.setId( 6L );
indexEntry.setObject( store.lookup( 6L ) );
assertTrue( evaluator.evaluate( indexEntry ) );
- node = new SubstringNode( SchemaConstants.NAME_AT_OID, "s", null );
+ node = new SubstringNode( schemaManager.getAttributeType( "name" ), "s", null );
evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
indexEntry = new ForwardIndexEntry<String, Entry, Long>();
indexEntry.setId( 6L );
@@ -656,7 +656,7 @@ public class SubstringTest
@Test
public void testEvaluatorIndexed() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, "jim", null );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "cn" ), "jim", null );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
ForwardIndexEntry<String, Entry, Long> indexEntry = new ForwardIndexEntry<String, Entry, Long>();
indexEntry.setId( 6L );
@@ -665,14 +665,14 @@ public class SubstringTest
indexEntry.setObject( null );
assertFalse( evaluator.evaluate( indexEntry ) );
- node = new SubstringNode( SchemaConstants.CN_AT_OID, "j", null );
+ node = new SubstringNode( schemaManager.getAttributeType( "cn" ), "j", null );
evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
indexEntry = new ForwardIndexEntry<String, Entry, Long>();
indexEntry.setId( 6L );
indexEntry.setObject( store.lookup( 6L ) );
assertTrue( evaluator.evaluate( indexEntry ) );
- node = new SubstringNode( SchemaConstants.CN_AT_OID, "s", null );
+ node = new SubstringNode( schemaManager.getAttributeType( "cn" ), "s", null );
evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
indexEntry = new ForwardIndexEntry<String, Entry, Long>();
indexEntry.setId( 6L );
@@ -690,7 +690,7 @@ public class SubstringTest
@Test(expected = InvalidCursorPositionException.class)
public void testInvalidCursorPositionException() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "b", null );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "sn" ), "b", null );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
cursor.get();
@@ -700,7 +700,7 @@ public class SubstringTest
@Test(expected = InvalidCursorPositionException.class)
public void testInvalidCursorPositionException2() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.CN_AT_OID, "j", null );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "cn" ), "j", null );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
cursor.get();
@@ -710,7 +710,7 @@ public class SubstringTest
@Test(expected = UnsupportedOperationException.class)
public void testUnsupportBeforeWithoutIndex() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "j", null );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "sn" ), "j", null );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
@@ -724,7 +724,7 @@ public class SubstringTest
@Test(expected = UnsupportedOperationException.class)
public void testUnsupportAfterWithoutIndex() throws Exception
{
- SubstringNode node = new SubstringNode( SchemaConstants.SN_AT_OID, "j", null );
+ SubstringNode node = new SubstringNode( schemaManager.getAttributeType( "sn" ), "j", null );
SubstringEvaluator<Long> evaluator = new SubstringEvaluator<Long>( node, store, schemaManager );
SubstringCursor<Long> cursor = new SubstringCursor<Long>( store, evaluator );
Modified: directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=963530&r1=963529&r2=963530&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/trunk/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Mon Jul 12 23:37:38 2010
@@ -609,7 +609,7 @@ public class PartitionFrame extends JFra
try
{
- root = FilterParser.parse( filter );
+ root = FilterParser.parse( schemaManager, filter );
}
catch ( Exception e )
{
@@ -751,7 +751,7 @@ public class PartitionFrame extends JFra
try
{
- root = FilterParser.parse( filter );
+ root = FilterParser.parse( schemaManager, filter );
}
catch ( Exception e )
{