directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r655231 - in /directory/apacheds/branches/bigbang: xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/ xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/ xdbm-tools/src/main/java/org/apache/directory...
Date Sun, 11 May 2008 02:58:47 GMT
Author: akarasulu
Date: Sat May 10 19:58:47 2008
New Revision: 655231

URL: http://svn.apache.org/viewvc?rev=655231&view=rev
Log:
some fixes to make things work now using Values instead of the raw data in the value

Modified:
    directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
    directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
    directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
    directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
    directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
    directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
    directory/apacheds/branches/bigbang/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java

Modified: directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java?rev=655231&r1=655230&r2=655231&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
(original)
+++ directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqCursor.java
Sat May 10 19:58:47 2008
@@ -103,7 +103,7 @@
              */
             //noinspection unchecked
             if ( greaterEqEvaluator.getComparator().compare( element.getValue(),
-                 greaterEqEvaluator.getExpression().getValue() ) <= 0 )
+                 greaterEqEvaluator.getExpression().getValue().get() ) <= 0 )
             {
                 beforeFirst();
                 return;
@@ -125,7 +125,7 @@
         {
             //noinspection unchecked
             int comparedValue = greaterEqEvaluator.getComparator().compare( element.getValue(),
-                 greaterEqEvaluator.getExpression().getValue() );
+                 greaterEqEvaluator.getExpression().getValue().get() );
 
             /*
              * First we need to check and make sure this element is within
@@ -163,7 +163,7 @@
         if ( userIdxCursor != null )
         {
             IndexEntry<Object,ServerEntry> advanceTo = new ForwardIndexEntry<Object,ServerEntry>();
-            advanceTo.setValue( greaterEqEvaluator.getExpression().getValue() );
+            advanceTo.setValue( greaterEqEvaluator.getExpression().getValue().get() );
             userIdxCursor.before( advanceTo );
         }
         else
@@ -218,7 +218,7 @@
             {
                 IndexEntry<?,ServerEntry> candidate = userIdxCursor.get();
                 //noinspection unchecked
-                if ( greaterEqEvaluator.getComparator().compare( candidate.getValue(), greaterEqEvaluator.getExpression().getValue()
) >= 0 )
+                if ( greaterEqEvaluator.getComparator().compare( candidate.getValue(), greaterEqEvaluator.getExpression().getValue().get()
) >= 0 )
                 {
                     return available = true;
                 }

Modified: directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java?rev=655231&r1=655230&r2=655231&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
(original)
+++ directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/GreaterEqEvaluator.java
Sat May 10 19:58:47 2008
@@ -124,7 +124,7 @@
     {
         if ( idx != null )
         {
-            return idx.reverseGreaterOrEq( indexEntry.getId(), node.getValue() );
+            return idx.reverseGreaterOrEq( indexEntry.getId(), node.getValue().get() );
         }
 
         ServerEntry entry = indexEntry.getObject();

Modified: directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java?rev=655231&r1=655230&r2=655231&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
(original)
+++ directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqCursor.java
Sat May 10 19:58:47 2008
@@ -108,7 +108,7 @@
              */
             //noinspection unchecked
             int compareValue = lessEqEvaluator.getComparator().compare( element.getValue(),
-                 lessEqEvaluator.getExpression().getValue() );
+                 lessEqEvaluator.getExpression().getValue().get() );
 
             if ( compareValue > 0 )
             {
@@ -139,7 +139,7 @@
         {
             //noinspection unchecked
             int comparedValue = lessEqEvaluator.getComparator().compare( element.getValue(),
-                 lessEqEvaluator.getExpression().getValue() );
+                 lessEqEvaluator.getExpression().getValue().get() );
 
             /*
              * First we need to check and make sure this element is within
@@ -190,7 +190,7 @@
         if ( userIdxCursor != null )
         {
             IndexEntry<Object,ServerEntry> advanceTo = new ForwardIndexEntry<Object,ServerEntry>();
-            advanceTo.setValue( lessEqEvaluator.getExpression().getValue() );
+            advanceTo.setValue( lessEqEvaluator.getExpression().getValue().get() );
             userIdxCursor.after( advanceTo );
         }
         else
@@ -260,7 +260,8 @@
             {
                 IndexEntry<?,ServerEntry> candidate = userIdxCursor.get();
                 //noinspection unchecked
-                if ( lessEqEvaluator.getComparator().compare( candidate.getValue(), lessEqEvaluator.getExpression().getValue()
) <= 0 )
+                if ( lessEqEvaluator.getComparator().compare( candidate.getValue(),
+                     lessEqEvaluator.getExpression().getValue().get() ) <= 0 )
                 {
                     return available = true;
                 }

Modified: directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java?rev=655231&r1=655230&r2=655231&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
(original)
+++ directory/apacheds/branches/bigbang/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/LessEqEvaluator.java
Sat May 10 19:58:47 2008
@@ -124,7 +124,7 @@
     {
         if ( idx != null )
         {
-            return idx.reverseLessOrEq( indexEntry.getId(), node.getValue() );
+            return idx.reverseLessOrEq( indexEntry.getId(), node.getValue().get() );
         }
 
         ServerEntry entry = indexEntry.getObject();

Modified: directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java?rev=655231&r1=655230&r2=655231&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
(original)
+++ directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/OneLevelScopeTest.java
Sat May 10 19:58:47 2008
@@ -106,7 +106,7 @@
         store.setName( "example" );
         store.setCacheSize( 10 );
         store.setWorkingDirectory( wkdir );
-        store.setSyncOnWrite( false );
+        store.setSyncOnWrite( true );
 
         store.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID ) );
         store.addIndex( new JdbmIndex( SchemaConstants.CN_AT_OID ) );
@@ -651,6 +651,8 @@
             SchemaConstants.OU_AT_OID + "=board of directors," +
             SchemaConstants.O_AT_OID  + "=good times co."
         );
+        dn.normalize( attributeRegistry.getNormalizerMapping() );
+        
         ServerEntry attrs = new DefaultServerEntry( registries, dn );
         attrs.add( "objectClass", "alias", "extensibleObject" );
         attrs.add( "cn", "jd" );
@@ -662,6 +664,8 @@
             SchemaConstants.OU_AT_OID + "=board of directors," +
             SchemaConstants.O_AT_OID  + "=good times co."
         );
+        dn.normalize( attributeRegistry.getNormalizerMapping() );
+        
         attrs = new DefaultServerEntry( registries, dn );
         attrs.add( "objectClass", "person" );
         attrs.add( "cn", "jdoe" );

Modified: directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java?rev=655231&r1=655230&r2=655231&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
(original)
+++ directory/apacheds/branches/bigbang/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/SubtreeScopeTest.java
Sat May 10 19:58:47 2008
@@ -107,7 +107,7 @@
         store.setName( "example" );
         store.setCacheSize( 10 );
         store.setWorkingDirectory( wkdir );
-        store.setSyncOnWrite( false );
+        store.setSyncOnWrite( true );
 
         store.addIndex( new JdbmIndex( SchemaConstants.OU_AT_OID ) );
         store.addIndex( new JdbmIndex( SchemaConstants.CN_AT_OID ) );
@@ -507,6 +507,8 @@
             SchemaConstants.OU_AT_OID + "=board of directors," +
             SchemaConstants.O_AT_OID  + "=good times co."
         );
+        dn.normalize( attributeRegistry.getNormalizerMapping() );
+
         ServerEntry attrs = new DefaultServerEntry( registries, dn );
         attrs.add( "objectClass", "alias", "extensibleObject" );
         attrs.add( "cn", "jd" );
@@ -518,6 +520,8 @@
             SchemaConstants.OU_AT_OID + "=board of directors," +
             SchemaConstants.O_AT_OID  + "=good times co."
         );
+        dn.normalize( attributeRegistry.getNormalizerMapping() );
+
         attrs = new DefaultServerEntry( registries, dn );
         attrs.add( "objectClass", "person" );
         attrs.add( "cn", "jdoe" );

Modified: directory/apacheds/branches/bigbang/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java?rev=655231&r1=655230&r2=655231&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
(original)
+++ directory/apacheds/branches/bigbang/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/StoreUtils.java
Sat May 10 19:58:47 2008
@@ -62,8 +62,11 @@
     public static void loadExampleData( Store store, Registries registries ) throws Exception
     {
         store.setSuffixDn( "o=Good Times Co." );
+
+        LdapDN suffixDn = new LdapDN( "o=Good Times Co." );
+        suffixDn.normalize( registries.getAttributeTypeRegistry().getNormalizerMapping()
);
         
-        DefaultServerEntry contextEntry = new DefaultServerEntry( registries, new LdapDN(
"o=Good Times Co." ) );
+        DefaultServerEntry contextEntry = new DefaultServerEntry( registries, suffixDn );
         contextEntry.add( "objectClass", "organization" );
         contextEntry.add( "o", "Good Times Co." );
         contextEntry.add( "postalCode", "1" );



Mime
View raw message