directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r637708 [1/2] - in /directory/sandbox/akarasulu/bigbang: apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ apacheds/core-integ/src/test/java/org/apache/directory/server/core/jndi/ apacheds/core-integ/s...
Date Mon, 17 Mar 2008 03:20:46 GMT
Author: akarasulu
Date: Sun Mar 16 20:20:42 2008
New Revision: 637708

URL: http://svn.apache.org/viewvc?rev=637708&view=rev
Log:
changes to Index interfaces and helper classes ...

 o added new IndexEntry interface
 o added two forward and reverse index implementations of IndexEntry which swap
   the key and value fields
 o added IndexCursor to adapt tuple cursors with Tuples to Cursors that return 
   IndexEntry objects
 o changed interfaces for Index for cursor returns
 o added more unit tests for JdbmIndex
 o 100% code coverage achieved for JdbmIndex


Added:
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ForwardIndexEntry.java   (contents, props changed)
      - copied, changed from r637687, directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEntry.java
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ReverseIndexEntry.java   (contents, props changed)
      - copied, changed from r637687, directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java
    directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/IndexCursor.java
Removed:
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java
Modified:
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertion.java
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEnumeration.java
    directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
    directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DisjunctionEnumeration.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Evaluator.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEvaluator.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEnumerator.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
    directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java
    directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
    directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
    directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
    directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndexTest.java
    directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/AddingEntriesWithSpecialCharactersInRDNTest.java
    directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/ModifyRdnTest.java
    directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/SearchITest.java
    directory/sandbox/akarasulu/bigbang/apacheds/server-unit/src/test/java/org/apache/directory/server/jndi/ServerContextFactoryTest.java
    directory/sandbox/akarasulu/bigbang/project/site/src/site/xdoc/projects/providers.xml

Copied: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ForwardIndexEntry.java (from r637687, directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ForwardIndexEntry.java?p2=directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ForwardIndexEntry.java&p1=directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java&r1=637687&r2=637708&rev=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ForwardIndexEntry.java Sun Mar 16 20:20:42 2008
@@ -20,134 +20,97 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import javax.naming.directory.Attributes;
-
-
 /**
- * An index key value pair based on a Tuple which can optionally reference the
- * indexed entry if one has already been loaded.
+ * An index id value pair based on a Tuple which can optionally reference the
+ * indexed obj if one has already been loaded.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class IndexRecord<K>
+public class ForwardIndexEntry<V,O> implements IndexEntry<V,O>
 {
-    /** The underlying BTree Tuple */
-    private final Tuple<K,Long> tuple = new Tuple<K,Long>();
+    /** The underlying Tuple */
+    private final Tuple<V,Long> tuple = new Tuple<V,Long>();
 
-    /** The referenced entry if loaded from the store */
-    private Attributes entry;
+    /** The referenced obj if loaded from the store */
+    private O obj;
 
 
     /**
-     * Sets the key value tuple represented by this IndexRecord optionally 
-     * setting the entry associated with the id if one was loaded from the
+     * Sets the key value tuple represented by this ForwardIndexEntry optionally
+     * setting the obj associated with the id if one was loaded from the
      * master table.
      *
-     * @param tuple the tuple for the IndexRecord
-     * @param entry the resusitated entry if any
+     * @param tuple the tuple for the ForwardIndexEntry
+     * @param entry the resusitated obj if any
      */
-    public void setTuple( Tuple<K,Long> tuple, Attributes entry )
+    public void setTuple( Tuple<V,Long> tuple, O entry )
     {
         this.tuple.setKey( tuple.getKey() );
         this.tuple.setValue( tuple.getValue() );
-        this.entry = entry;
+        this.obj = entry;
     }
 
 
-    /**
-     * Gets the entry id for this IndexRecord. 
-     *
-     * @return the id of the entry indexed
-     */
-    public Long getEntryId()
+    public Long getId()
     {
         return tuple.getValue();
     }
 
 
-    /**
-     * Gets the index key ( the attribute's value ) for this IndexRecord.
-     *
-     * @return the key of the entry indexed
-     */
-    public K getIndexKey()
+    public V getValue()
     {
         return tuple.getKey();
     }
 
 
-    /**
-     * Sets the entry id.
-     *
-     * @param id the id of the entry
-     */
-    public void setEntryId( Long id )
+    public void setId( Long id )
     {
         tuple.setValue( id );
     }
 
 
-    /**
-     * Sets the index key.
-     *
-     * @param key the key of the IndexRecord
-     */
-    public void setIndexKey( K key )
+    public void setValue( V value )
     {
-        tuple.setKey( key );
+        tuple.setKey( value );
     }
 
 
-    /**
-     * Gets the entry of this IndexRecord if one was resusitated form the master
-     * table.
-     * 
-     * @return the entry's attributes
-     */
-    public Attributes getAttributes()
+    public O getObject()
     {
-        if ( entry == null )
+        if ( obj == null )
         {
             return null;
         }
 
-        return ( Attributes ) entry.clone();
+        return obj;
     }
 
 
-    /**
-     * Sets the entry's attributes.
-     * 
-     * @param entry the entry's attributes
-     */
-    public void setAttributes( Attributes entry )
+    public void setObject( O obj )
     {
-        this.entry = entry;
+        this.obj = obj;
+    }
+
+
+    public Tuple getTuple()
+    {
+        return tuple;
     }
 
 
-    /**
-     * Clears the tuple key, the tuple value and the entry fields.
-     */
     public void clear()
     {
-        entry = null;
+        obj = null;
         tuple.setKey( null );
         tuple.setValue( null );
     }
 
 
-    /**
-     * Utility method used to copy the contents of one IndexRecord into this
-     * IndexRecord.
-     * 
-     * @param record the record whose contents we copy
-     */
-    public void copy( IndexRecord<K> record )
+    public void copy( IndexEntry<V, O> entry )
     {
-        entry = record.getAttributes();
-        tuple.setKey( record.getIndexKey() );
-        tuple.setValue( record.getEntryId() );
+        this.obj = entry.getObject();
+        tuple.setKey( entry.getValue() );
+        tuple.setValue( entry.getId() );
     }
 }

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ForwardIndexEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ForwardIndexEntry.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Mar 16 20:20:42 2008
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java Sun Mar 16 20:20:42 2008
@@ -25,6 +25,8 @@
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.server.core.cursor.Cursor;
 
+import javax.naming.directory.Attributes;
+
 
 /**
  * An index into the master table which returns one or more entry's positions
@@ -174,10 +176,10 @@
     void drop( K attrVal, Long id ) throws Exception;
 
 
-    Cursor<IndexRecord> reverseCursor() throws Exception;
+    Cursor<IndexEntry<K, Attributes>> reverseCursor() throws Exception;
 
 
-    Cursor<IndexRecord> cursor() throws Exception;
+    Cursor<IndexEntry<K, Attributes>> forwardCursor() throws Exception;
 
 
     boolean has( K attrVal, Long id ) throws Exception;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertion.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertion.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertion.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertion.java Sun Mar 16 20:20:42 2008
@@ -36,14 +36,14 @@
     /**
      * Tests to see if a perspective candidate should be returned based on 
      * the evaluation of hard coded logic.  If the entry has not been 
-     * resusitated then the getAttributes member of the record will be null.  As
+     * resusitated then the getObject member of the record will be null.  As
      * a side-effect an index assertion may populate the entry attribute after
      * resusitating an entry from the master table.
      * 
-     * @param record an index record of the entry
+     * @param entry an index record of the entry
      * @return true if the entry should be returned, false otherwise
      * @throws NamingException if their are failures while asserting the 
      * condition
      */
-    boolean assertCandidate( IndexRecord record ) throws Exception;
+    boolean assertCandidate( IndexEntry entry ) throws Exception;
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java Sun Mar 16 20:20:42 2008
@@ -35,14 +35,14 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class IndexAssertionEnumeration implements NamingEnumeration<IndexRecord>
+public class IndexAssertionEnumeration implements NamingEnumeration<IndexEntry>
 {
     /** The prefetched candidate */
-    private final IndexRecord prefetched = new IndexRecord();
+    private final ForwardIndexEntry prefetched = new ForwardIndexEntry();
     /** The returned candidate */
-    private final IndexRecord candidate = new IndexRecord();
+    private final ForwardIndexEntry candidate = new ForwardIndexEntry();
     /** The iteration cursor */
-    private final NamingEnumeration<IndexRecord> underlying;
+    private final NamingEnumeration<ForwardIndexEntry> underlying;
     /** LUT used to avoid returning duplicates */
     private final Map<Object,Object> candidates;
     /** */
@@ -58,7 +58,7 @@
     // ------------------------------------------------------------------------
 
 
-    public IndexAssertionEnumeration( NamingEnumeration<IndexRecord> underlying, IndexAssertion assertion ) 
+    public IndexAssertionEnumeration( NamingEnumeration<ForwardIndexEntry> underlying, IndexAssertion assertion )
         throws NamingException
     {
         this.underlying = underlying;
@@ -69,7 +69,7 @@
     }
 
 
-    public IndexAssertionEnumeration( NamingEnumeration<IndexRecord> underlying, IndexAssertion assertion, 
+    public IndexAssertionEnumeration( NamingEnumeration<ForwardIndexEntry> underlying, IndexAssertion assertion,
         boolean enableDupCheck ) throws NamingException
     {
         this.underlying = underlying;
@@ -87,7 +87,7 @@
     /**
      * @see java.util.Enumeration#nextElement()
      */
-    public IndexRecord nextElement()
+    public IndexEntry nextElement()
     {
         try
         {
@@ -116,7 +116,7 @@
     /**
      * @see javax.naming.NamingEnumeration#next()
      */
-    public IndexRecord next() throws NamingException
+    public IndexEntry next() throws NamingException
     {
         candidate.copy( prefetched );
         prefetch();
@@ -149,7 +149,7 @@
 
     private void prefetch() throws NamingException
     {
-        IndexRecord rec = null;
+        IndexEntry rec = null;
 
         /*
          * Scan underlying Cursor until we arrive at the next valid candidate
@@ -166,7 +166,7 @@
                 {
                     if ( checkDups )
                     {
-                        boolean dup = candidates.containsKey( rec.getEntryId() );
+                        boolean dup = candidates.containsKey( rec.getId() );
 
                         if ( dup )
                         {
@@ -185,7 +185,7 @@
                              * time.
                              */
                             prefetched.copy( rec );
-                            candidates.put( rec.getEntryId(), rec.getEntryId() );
+                            candidates.put( rec.getId(), rec.getId() );
                             return;
                         }
                     }

Added: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEntry.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEntry.java?rev=637708&view=auto
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEntry.java (added)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEntry.java Sun Mar 16 20:20:42 2008
@@ -0,0 +1,99 @@
+/*
+ *  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.core.partition.impl.btree;
+
+
+/**
+ * Interface for index entries.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $$Rev$$
+ */
+public interface IndexEntry<V,O>
+{
+    /**
+     * Gets the value referred to by this IndexEntry.
+     *
+     * @return the value of the object referred to
+     */
+    V getValue();
+
+
+    /**
+     * Sets the value referred to by this IndexEntry.
+     *
+     * @param value the value of the object referred to
+     */
+    void setValue( V value );
+
+
+    /**
+     * Gets the id of the object indexed.
+     *
+     * @return the id of the object indexed
+     */
+    Long getId();
+
+
+    /**
+     * Sets the id of the object indexed.
+     *
+     * @param id the id of the object indexed
+     */
+    void setId( Long id );
+
+
+    /**
+     * Gets the object indexed if resusitated.
+     *
+     * @return the object indexed
+     */
+    O getObject();
+
+
+    /**
+     * Gets access to the underlying tuple.
+     *
+     * @return the underlying tuple
+     */
+    Tuple getTuple();
+
+
+    /**
+     * Sets the object indexed.
+     *
+     * @param obj the object indexed
+     */
+    void setObject( O obj );
+
+
+    /**
+     * Clears the id, value and object in this IndexEntry.
+     */
+    void clear();
+
+
+    /**
+     * Copies the values of another IndexEntry into this IndexEntry.
+     *
+     * @param entry the entry to copy fields of
+     */
+    void copy( IndexEntry<V, O> entry );
+}

Modified: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEnumeration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEnumeration.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEnumeration.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexEnumeration.java Sun Mar 16 20:20:42 2008
@@ -35,16 +35,16 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class IndexEnumeration<T> implements NamingEnumeration<IndexRecord>
+public class IndexEnumeration<T> implements NamingEnumeration<IndexEntry>
 {
     /** */
     private final Pattern re;
     /** */
-    private final IndexRecord tmp = new IndexRecord();
+    private final ForwardIndexEntry tmp = new ForwardIndexEntry();
     /** */
-    private final IndexRecord returned = new IndexRecord();
+    private final ForwardIndexEntry returned = new ForwardIndexEntry();
     /** */
-    private final IndexRecord prefetched = new IndexRecord();
+    private final ForwardIndexEntry prefetched = new ForwardIndexEntry();
     /** */
     private final boolean swapKeyVal;
     /** */
@@ -95,7 +95,7 @@
     /**
      * @see javax.naming.NamingEnumeration#next()
      */
-    public IndexRecord next() throws NamingException
+    public IndexEntry next() throws NamingException
     {
         returned.copy( prefetched );
         prefetch();
@@ -106,7 +106,7 @@
     /**
      * @see java.util.Enumeration#nextElement()
      */
-    public IndexRecord nextElement()
+    public IndexEntry nextElement()
     {
         try
         {
@@ -171,7 +171,7 @@
             // If regex is null just transfer into prefetched from tmp record
             // but if it is not then use it to match.  Successful match shorts
             // while loop.
-            if ( null == re || re.matcher( ( String ) tmp.getIndexKey() ).matches() )
+            if ( null == re || re.matcher( ( String ) tmp.getValue() ).matches() )
             {
                 prefetched.copy( tmp );
                 return;

Copied: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ReverseIndexEntry.java (from r637687, directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ReverseIndexEntry.java?p2=directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ReverseIndexEntry.java&p1=directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java&r1=637687&r2=637708&rev=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ReverseIndexEntry.java Sun Mar 16 20:20:42 2008
@@ -20,134 +20,97 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import javax.naming.directory.Attributes;
-
-
 /**
- * An index key value pair based on a Tuple which can optionally reference the
- * indexed entry if one has already been loaded.
- * 
+ * An index id value pair which can optionally reference the indexed obj
+ * if one has already been loaded.
+ *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class IndexRecord<K>
+public class ReverseIndexEntry<V,O> implements IndexEntry<V,O>
 {
-    /** The underlying BTree Tuple */
-    private final Tuple<K,Long> tuple = new Tuple<K,Long>();
+    /** The underlying Tuple */
+    private final Tuple<Long,V> tuple = new Tuple<Long,V>();
 
-    /** The referenced entry if loaded from the store */
-    private Attributes entry;
+    /** The indexed object if loaded from the store */
+    private O obj;
 
 
     /**
-     * Sets the key value tuple represented by this IndexRecord optionally 
-     * setting the entry associated with the id if one was loaded from the
+     * Sets the Tuple value represented by this ReverseIndexEntry optionally
+     * setting the obj associated with the id if one was loaded from the
      * master table.
      *
-     * @param tuple the tuple for the IndexRecord
-     * @param entry the resusitated entry if any
+     * @param tuple the tuple for the ReverseIndexEntry
+     * @param obj the resusitated object that is indexed if any
      */
-    public void setTuple( Tuple<K,Long> tuple, Attributes entry )
+    public void setTuple( Tuple<Long,V> tuple, O obj )
     {
         this.tuple.setKey( tuple.getKey() );
         this.tuple.setValue( tuple.getValue() );
-        this.entry = entry;
+        this.obj = obj;
     }
 
 
-    /**
-     * Gets the entry id for this IndexRecord. 
-     *
-     * @return the id of the entry indexed
-     */
-    public Long getEntryId()
+    public Long getId()
     {
-        return tuple.getValue();
+        return tuple.getKey();
     }
 
 
-    /**
-     * Gets the index key ( the attribute's value ) for this IndexRecord.
-     *
-     * @return the key of the entry indexed
-     */
-    public K getIndexKey()
+    public V getValue()
     {
-        return tuple.getKey();
+        return tuple.getValue();
     }
 
 
-    /**
-     * Sets the entry id.
-     *
-     * @param id the id of the entry
-     */
-    public void setEntryId( Long id )
+    public void setId( Long id )
     {
-        tuple.setValue( id );
+        tuple.setKey( id );
     }
 
 
-    /**
-     * Sets the index key.
-     *
-     * @param key the key of the IndexRecord
-     */
-    public void setIndexKey( K key )
+    public void setValue( V key )
     {
-        tuple.setKey( key );
+        tuple.setValue( key );
     }
 
 
-    /**
-     * Gets the entry of this IndexRecord if one was resusitated form the master
-     * table.
-     * 
-     * @return the entry's attributes
-     */
-    public Attributes getAttributes()
+    public O getObject()
     {
-        if ( entry == null )
+        if ( obj == null )
         {
             return null;
         }
 
-        return ( Attributes ) entry.clone();
+        return obj;
     }
 
 
-    /**
-     * Sets the entry's attributes.
-     * 
-     * @param entry the entry's attributes
-     */
-    public void setAttributes( Attributes entry )
+    public void setObject( O obj )
     {
-        this.entry = entry;
+        this.obj = obj;
+    }
+
+
+    public Tuple getTuple()
+    {
+        return tuple;
     }
 
 
-    /**
-     * Clears the tuple key, the tuple value and the entry fields.
-     */
     public void clear()
     {
-        entry = null;
+        obj = null;
         tuple.setKey( null );
         tuple.setValue( null );
     }
 
 
-    /**
-     * Utility method used to copy the contents of one IndexRecord into this
-     * IndexRecord.
-     * 
-     * @param record the record whose contents we copy
-     */
-    public void copy( IndexRecord<K> record )
+    public void copy( IndexEntry<V, O> entry )
     {
-        entry = record.getAttributes();
-        tuple.setKey( record.getIndexKey() );
-        tuple.setValue( record.getEntryId() );
+        this.obj = entry.getObject();
+        tuple.setKey( entry.getId() );
+        tuple.setValue( entry.getValue() );
     }
-}
+}
\ No newline at end of file

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ReverseIndexEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ReverseIndexEntry.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Sun Mar 16 20:20:42 2008
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java Sun Mar 16 20:20:42 2008
@@ -66,7 +66,7 @@
 //        attrs.put( cn );
 //        attrs.put( dc);
 //        sysRoot.createSubcontext( "uID=kevin", attrs );
-//        Attributes returned = sysRoot.getAttributes( "UID=kevin" );
+//        Attributes returned = sysRoot.getObject( "UID=kevin" );
 //        
 //        NamingEnumeration attrList = returned.getAll();
 //        while( attrList.hasMore() )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core-integ/src/test/java/org/apache/directory/server/core/operational/OperationalAttributeServiceIT.java Sun Mar 16 20:20:42 2008
@@ -154,10 +154,10 @@
         attributes.put( "jpegPhoto", "testing a string" );
         sysRoot.createSubcontext( "ou=yetanothertest", attributes );
         ctx = ( DirContext ) sysRoot.lookup( "ou=yetanothertest" );
-        ou = ctx.getAttributes( "" ).get( "ou" );
+        ou = ctx.getObject( "" ).get( "ou" );
         value = ou.get();
         assertEquals( "yetanothertest", value );
-        jpegPhoto = ctx.getAttributes( "" ).get( "jpegPhoto" );
+        jpegPhoto = ctx.getObject( "" ).get( "jpegPhoto" );
         value = jpegPhoto.get();
         assertTrue( value instanceof byte[] );*/
     }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Sun Mar 16 20:20:42 2008
@@ -700,7 +700,7 @@
                 switch( reverse.getChangeType().getChangeType() )
                 {
                     case( ChangeType.ADD_ORDINAL ):
-                        //System.out.println( "Reverted attributes : --> " + reverse.getAttributes() );
+                        //System.out.println( "Reverted attributes : --> " + reverse.getObject() );
                         ctx.createSubcontext( reverse.getDn(), reverse.getAttributes() );
                         break;
                     case( ChangeType.DELETE_ORDINAL ):

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Sun Mar 16 20:20:42 2008
@@ -1212,7 +1212,7 @@
          * not allowed are removed from the attribute.  If the attribute has no more
          * values remaining then the entire attribute is removed.
          */
-        //NamingEnumeration<String> idList = result.getAttributes().getIDs();
+        //NamingEnumeration<String> idList = result.getObject().getIDs();
         List<AttributeType> attributeToRemove = new ArrayList<AttributeType>();
         
         for ( AttributeType attributeType:resultEntry.getAttributeTypes() )

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Sun Mar 16 20:20:42 2008
@@ -571,7 +571,7 @@
     public abstract void delete( Long id ) throws NamingException;
 
 
-    public abstract NamingEnumeration<IndexRecord> list( Long id ) throws NamingException;
+    public abstract NamingEnumeration<ForwardIndexEntry> list( Long id ) throws NamingException;
 
 
     public abstract int getChildCount( Long id ) throws NamingException;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java Sun Mar 16 20:20:42 2008
@@ -56,7 +56,7 @@
     /** the attributes to return */
     private final String[] attrIds;
     /** underlying enumeration over IndexRecords */
-    private final NamingEnumeration<IndexRecord> underlying;
+    private final NamingEnumeration<ForwardIndexEntry> underlying;
 
     private boolean attrIdsHasStar = false;
     private boolean attrIdsHasPlus = false;
@@ -70,7 +70,7 @@
      * @param attrIds the returned attributes
      * @param underlying the enumeration over IndexRecords
      */
-    public BTreeSearchResultEnumeration(String[] attrIds, NamingEnumeration<IndexRecord> underlying, BTreePartition db,
+    public BTreeSearchResultEnumeration(String[] attrIds, NamingEnumeration<ForwardIndexEntry> underlying, BTreePartition db,
         AttributeTypeRegistry registry)
     {
         this.partition = db;
@@ -105,22 +105,22 @@
      */
     public SearchResult next() throws NamingException
     {
-        IndexRecord rec = underlying.next();
+        IndexEntry rec = underlying.next();
         Attributes entry;
-        String name = partition.getEntryUpdn( (Long)rec.getEntryId() );
+        String name = partition.getEntryUpdn( (Long)rec.getId() );
 
-        if ( null == rec.getAttributes() )
+        if ( null == rec.getObject() )
         {
-            rec.setAttributes( partition.lookup( (Long)rec.getEntryId() ) );
+            rec.setObject( partition.lookup( (Long)rec.getId() ) );
         }
 
         if ( attrIds == null )
         {
-            entry = ( Attributes ) rec.getAttributes().clone();
+            entry = ( Attributes ) rec.getObject().clone();
         }
         else if ( attrIdsHasPlus && attrIdsHasStar )
         {
-            entry = ( Attributes ) rec.getAttributes().clone();
+            entry = ( Attributes ) rec.getObject().clone();
         }
         else if ( attrIdsHasPlus )
         {
@@ -134,18 +134,18 @@
                     continue;
                 }
                 // there is no attribute by that name in the entry so we continue
-                if ( null == rec.getAttributes().get( attrIds[ii] ) )
+                if ( null == rec.getObject().get( attrIds[ii] ) )
                 {
                     continue;
                 }
 
                 // clone attribute to stuff into the new resultant entry
-                Attribute attr = ( Attribute ) rec.getAttributes().get( attrIds[ii] ).clone();
+                Attribute attr = ( Attribute ) rec.getObject().get( attrIds[ii] ).clone();
                 entry.put( attr );
             }
 
             // add all operational attributes
-            NamingEnumeration list = rec.getAttributes().getIDs();
+            NamingEnumeration list = rec.getObject().getIDs();
             while ( list.hasMore() )
             {
                 String attrId = ( String ) list.next();
@@ -155,7 +155,7 @@
                     continue;
                 }
 
-                Attribute attr = ( Attribute ) rec.getAttributes().get( attrId ).clone();
+                Attribute attr = ( Attribute ) rec.getObject().get( attrId ).clone();
                 entry.put( attr );
             }
         }
@@ -171,25 +171,25 @@
                     continue;
                 }
                 // there is no attribute by that name in the entry so we continue
-                if ( null == rec.getAttributes().get( attrIds[ii] ) )
+                if ( null == rec.getObject().get( attrIds[ii] ) )
                 {
                     continue;
                 }
 
                 // clone attribute to stuff into the new resultant entry
-                Attribute attr = ( Attribute ) rec.getAttributes().get( attrIds[ii] ).clone();
+                Attribute attr = ( Attribute ) rec.getObject().get( attrIds[ii] ).clone();
                 entry.put( attr );
             }
 
             // add all user attributes
-            NamingEnumeration list = rec.getAttributes().getIDs();
+            NamingEnumeration list = rec.getObject().getIDs();
             while ( list.hasMore() )
             {
                 String attrId = ( String ) list.next();
                 AttributeType attrType = registry.lookup( attrId );
                 if ( attrType.getUsage() == UsageEnum.USER_APPLICATIONS )
                 {
-                    Attribute attr = ( Attribute ) rec.getAttributes().get( attrId ).clone();
+                    Attribute attr = ( Attribute ) rec.getObject().get( attrId ).clone();
                     entry.put( attr );
                 }
             }
@@ -198,7 +198,7 @@
         {
             entry = new AttributesImpl();
 
-            Attributes attrs = rec.getAttributes();
+            Attributes attrs = rec.getObject();
             
             for ( int ii = 0; ii < attrIds.length; ii++ )
             {
@@ -237,7 +237,7 @@
             }
         }
 
-        BTreeSearchResult result = new BTreeSearchResult( (Long)rec.getEntryId(), name, null, entry );
+        BTreeSearchResult result = new BTreeSearchResult( (Long)rec.getId(), name, null, entry );
         result.setRelative( false );
         return result;
     }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java Sun Mar 16 20:20:42 2008
@@ -133,8 +133,8 @@
      */
     public boolean evaluate( ExprNode ilter, Long id ) throws NamingException
     {
-        IndexRecord rec = new IndexRecord();
-        rec.setEntryId( id );
+        IndexEntry rec = new ForwardIndexEntry();
+        rec.setId( id );
         return evaluator.evaluate( ilter, rec );
     }
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DisjunctionEnumeration.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DisjunctionEnumeration.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DisjunctionEnumeration.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DisjunctionEnumeration.java Sun Mar 16 20:20:42 2008
@@ -37,7 +37,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class DisjunctionEnumeration implements NamingEnumeration<IndexRecord>
+public class DisjunctionEnumeration implements NamingEnumeration<IndexEntry>
 {
     /** The underlying child enumerations */
     private final NamingEnumeration[] children;
@@ -46,9 +46,9 @@
     /** Index of current cursor used */
     private int index = 0;
     /** Candidate to return */
-    private final IndexRecord candidate = new IndexRecord();
+    private final ForwardIndexEntry candidate = new ForwardIndexEntry();
     /** Prefetched record returned */
-    private final IndexRecord prefetched = new IndexRecord();
+    private final ForwardIndexEntry prefetched = new ForwardIndexEntry();
     /** Used to determine if this enumeration has been exhausted */
     private boolean hasMore = true;
 
@@ -91,9 +91,9 @@
         }
 
         // Grab the next candidate and add it's id to the LUT/hash of candidates
-        IndexRecord rec = ( IndexRecord ) children[index].next();
+        IndexEntry rec = ( IndexEntry ) children[index].next();
         prefetched.copy( rec );
-        candidates.put( rec.getEntryId(), rec.getEntryId() );
+        candidates.put( rec.getId(), rec.getId() );
     }
 
 
@@ -104,7 +104,7 @@
     /**
      * @see java.util.Enumeration#nextElement()
      */
-    public IndexRecord nextElement()
+    public IndexEntry nextElement()
     {
         try
         {
@@ -139,7 +139,7 @@
      * @return a candidate element
      * @throws NamingException if an error occurs
      */
-    public IndexRecord next() throws NamingException
+    public IndexEntry next() throws NamingException
     {
         // Store the last prefetched candidate to return in candidate
         candidate.copy( prefetched );
@@ -163,16 +163,16 @@
             }
 
             // Grab next candidate!
-            IndexRecord rec = ( IndexRecord ) children[index].next();
+            IndexEntry rec = ( IndexEntry ) children[index].next();
             prefetched.copy( rec );
 
             // Break through do/while if the candidate is seen for the first
             // time, meaning we have not returned it already.
         }
-        while ( candidates.containsKey( prefetched.getEntryId() ) );
+        while ( candidates.containsKey( prefetched.getId() ) );
 
         // Add candidate to LUT of encountered candidates.
-        candidates.put( candidate.getEntryId(), candidate.getEntryId() );
+        candidates.put( candidate.getId(), candidate.getId() );
 
         // Return the original value saved before overwriting prefetched
         return candidate;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Evaluator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Evaluator.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Evaluator.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Evaluator.java Sun Mar 16 20:20:42 2008
@@ -39,9 +39,9 @@
      * Evaluates a candidate to determine if a filter expression selects it.
      * 
      * @param node the filter expression to evaluate on the candidate
-     * @param record the index record of the entry to evaluate
+     * @param entry the index record of the entry to evaluate
      * @return true if the filter selects the candidate false otherwise
      * @throws NamingException if there is a database fault during evaluation
      */
-    boolean evaluate( ExprNode node, IndexRecord record ) throws NamingException;
+    boolean evaluate( ExprNode node, IndexEntry entry ) throws NamingException;
 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.java Sun Mar 16 20:20:42 2008
@@ -89,9 +89,9 @@
      * @return an enumeration over the 
      * @throws NamingException if database access fails
      */
-    public NamingEnumeration<IndexRecord> enumerate( ExprNode node ) throws NamingException
+    public NamingEnumeration<ForwardIndexEntry> enumerate( ExprNode node ) throws NamingException
     {
-    	NamingEnumeration<IndexRecord> list = null;
+    	NamingEnumeration<ForwardIndexEntry> list = null;
 
         if ( node instanceof ScopeNode )
         {
@@ -170,7 +170,7 @@
      *
      * @param node the disjunction expression branch node
      */
-    private NamingEnumeration<IndexRecord> enumDisj( OrNode node ) throws NamingException
+    private NamingEnumeration<ForwardIndexEntry> enumDisj( OrNode node ) throws NamingException
     {
         List<ExprNode> children = node.getChildren();
         NamingEnumeration[] childEnumerations = new NamingEnumeration[children.size()];
@@ -190,10 +190,10 @@
      *
      * @param node a negation expression branch node
      */
-    private NamingEnumeration<IndexRecord> enumNeg( final BranchNode node ) throws NamingException
+    private NamingEnumeration<ForwardIndexEntry> enumNeg( final BranchNode node ) throws NamingException
     {
-    	NamingEnumeration<IndexRecord> baseEnumeration = null;
-    	NamingEnumeration<IndexRecord> enumeration = null;
+    	NamingEnumeration<ForwardIndexEntry> baseEnumeration = null;
+    	NamingEnumeration<ForwardIndexEntry> enumeration = null;
 
         try
         {
@@ -206,7 +206,7 @@
 
         IndexAssertion assertion = new IndexAssertion()
         {
-            public boolean assertCandidate( IndexRecord rec ) throws NamingException
+            public boolean assertCandidate( IndexEntry rec ) throws NamingException
             {
                 // NOTICE THE ! HERE
                 // The candidate is valid if it does not pass assertion. A
@@ -225,7 +225,7 @@
      *
      * @param node a conjunction expression branch node
      */
-    private NamingEnumeration<IndexRecord> enumConj( final AndNode node ) throws NamingException
+    private NamingEnumeration<ForwardIndexEntry> enumConj( final AndNode node ) throws NamingException
     {
         int minIndex = 0;
         long minValue = Long.MAX_VALUE;
@@ -255,7 +255,7 @@
         final ExprNode minChild = children.get( minIndex );
         IndexAssertion assertion = new IndexAssertion()
         {
-            public boolean assertCandidate( IndexRecord rec ) throws NamingException
+            public boolean assertCandidate( IndexEntry rec ) throws NamingException
             {
                 for ( int ii = 0; ii < children.size(); ii++ )
                 {
@@ -277,7 +277,7 @@
         };
 
         // Do recursive call to build child enumeration then wrap and return
-        NamingEnumeration<IndexRecord> underlying = enumerate( minChild );
+        NamingEnumeration<ForwardIndexEntry> underlying = enumerate( minChild );
         IndexAssertionEnumeration iae;
         iae = new IndexAssertionEnumeration( underlying, assertion );
         return iae;
@@ -292,7 +292,7 @@
      * @return an enumeration over the index records matching the AVA
      * @throws NamingException if there is a failure while accessing the db
      */
-    private NamingEnumeration<IndexRecord> enumPresence( final PresenceNode node ) throws NamingException
+    private NamingEnumeration<ForwardIndexEntry> enumPresence( final PresenceNode node ) throws NamingException
     {
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
@@ -320,7 +320,7 @@
      * @return an enumeration over the index records matching the AVA
      * @throws NamingException if there is a failure while accessing the db
      */
-    private NamingEnumeration<IndexRecord> enumGreaterOrLesser( final SimpleNode node, final boolean isGreaterOrLesser ) throws NamingException
+    private NamingEnumeration<ForwardIndexEntry> enumGreaterOrLesser( final SimpleNode node, final boolean isGreaterOrLesser ) throws NamingException
     {
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
@@ -348,7 +348,7 @@
      * @return an enumeration over the index records matching the AVA
      * @throws NamingException if there is a failure while accessing the db
      */
-    private NamingEnumeration<IndexRecord> enumEquality( final EqualityNode node ) throws NamingException
+    private NamingEnumeration<ForwardIndexEntry> enumEquality( final EqualityNode node ) throws NamingException
     {
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
@@ -375,11 +375,11 @@
      * @return the enumeration over all perspective candidates satisfying expr
      * @throws NamingException if db access failures result
      */
-    private NamingEnumeration<IndexRecord> nonIndexedScan( final LeafNode node ) throws NamingException
+    private NamingEnumeration<ForwardIndexEntry> nonIndexedScan( final LeafNode node ) throws NamingException
     {
         try
         {
-            NamingEnumeration<IndexRecord> underlying = db.getNdnIndex().listIndices();
+            NamingEnumeration<ForwardIndexEntry> underlying = db.getNdnIndex().listIndices();
         }
         catch ( java.io.IOException e )
         {
@@ -388,9 +388,9 @@
 
         IndexAssertion assertion = new IndexAssertion()
         {
-            public boolean assertCandidate( IndexRecord record ) throws NamingException
+            public boolean assertCandidate( IndexEntry entry ) throws NamingException
             {
-                return evaluator.getLeafEvaluator().evaluate( node, record );
+                return evaluator.getLeafEvaluator().evaluate( node, entry );
             }
         };
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEvaluator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEvaluator.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEvaluator.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEvaluator.java Sun Mar 16 20:20:42 2008
@@ -95,13 +95,13 @@
     // ------------------------------------------------------------------------
 
     /**
-     * @see org.apache.directory.server.core.partition.impl.btree.Evaluator#evaluate(ExprNode, IndexRecord)
+     * @see org.apache.directory.server.core.partition.impl.btree.Evaluator#evaluate(ExprNode, IndexEntry)
      */
-    public boolean evaluate( ExprNode node, IndexRecord record ) throws NamingException
+    public boolean evaluate( ExprNode node, IndexEntry entry ) throws NamingException
     {
         if ( node.isLeaf() )
         {
-            return leafEvaluator.evaluate( node, record );
+            return leafEvaluator.evaluate( node, entry );
         }
 
         BranchNode bnode = ( BranchNode ) node;
@@ -110,7 +110,7 @@
         {
             for ( ExprNode child:bnode.getChildren() )
             {
-                if ( evaluate( child, record ) )
+                if ( evaluate( child, entry ) )
                 {
                     return true;
                 }
@@ -122,7 +122,7 @@
         {
             for ( ExprNode child:bnode.getChildren() )
             {
-                if ( !evaluate( child, record ) )
+                if ( !evaluate( child, entry ) )
                 {
                     return false;
                 }
@@ -134,7 +134,7 @@
         {
             if ( null != bnode.getFirstChild() )
             {
-                return !evaluate( bnode.getFirstChild(), record );
+                return !evaluate( bnode.getFirstChild(), entry );
             }
 
             throw new NamingException( "Negation has no child: " + node );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java Sun Mar 16 20:20:42 2008
@@ -164,18 +164,18 @@
     /**
      * Get the entry from the backend, if it's not already into the record
      */
-    private Attributes getEntry( IndexRecord rec ) throws NamingException
+    private Attributes getEntry( IndexEntry rec ) throws NamingException
     {
         // get the attributes associated with the entry 
-        Attributes entry = rec.getAttributes();
+        Attributes entry = rec.getObject();
 
         // resuscitate entry if need be
         // TODO Is this really needed ? 
         // How possibly can't we have the entry at this point ?
         if ( null == entry )
         {
-            rec.setAttributes( db.lookup( ( Long ) rec.getEntryId() ) );
-            entry = rec.getAttributes();
+            rec.setObject( db.lookup( ( Long ) rec.getId() ) );
+            entry = rec.getObject();
         }
 
         return entry;
@@ -183,35 +183,35 @@
 
 
     /**
-     * @see org.apache.directory.server.core.partition.impl.btree.Evaluator#evaluate(ExprNode, IndexRecord)
+     * @see org.apache.directory.server.core.partition.impl.btree.Evaluator#evaluate(ExprNode, IndexEntry)
      */
-    public boolean evaluate( ExprNode node, IndexRecord record ) throws NamingException
+    public boolean evaluate( ExprNode node, IndexEntry entry ) throws NamingException
     {
         if ( node instanceof ScopeNode )
         {
-            return scopeEvaluator.evaluate( node, record );
+            return scopeEvaluator.evaluate( node, entry );
         }
 
         if ( node instanceof PresenceNode )
         {
             String attrId = ( ( PresenceNode ) node ).getAttribute();
-            return evalPresence( attrId, record );
+            return evalPresence( attrId, entry );
         }
         else if ( node instanceof EqualityNode )
         {
-            return evalEquality( ( EqualityNode ) node, record );
+            return evalEquality( ( EqualityNode ) node, entry );
         }
         else if ( node instanceof GreaterEqNode )
         {
-            return evalGreaterOrLesser( ( SimpleNode ) node, record, SimpleNode.EVAL_GREATER );
+            return evalGreaterOrLesser( ( SimpleNode ) node, entry, SimpleNode.EVAL_GREATER );
         }
         else if ( node instanceof LessEqNode )
         {
-            return evalGreaterOrLesser( ( SimpleNode ) node, record, SimpleNode.EVAL_LESSER );
+            return evalGreaterOrLesser( ( SimpleNode ) node, entry, SimpleNode.EVAL_LESSER );
         }
         else if ( node instanceof SubstringNode )
         {
-            return substringEvaluator.evaluate( node, record );
+            return substringEvaluator.evaluate( node, entry );
         }
         else if ( node instanceof ExtensibleNode )
         {
@@ -219,7 +219,7 @@
         }
         else if ( node instanceof ApproximateNode )
         {
-            return evalEquality( ( ApproximateNode ) node, record );
+            return evalEquality( ( ApproximateNode ) node, entry );
         }
         else
         {
@@ -233,17 +233,17 @@
      * a perspective candidate.
      * 
      * @param node the greater than or less than node to evaluate
-     * @param record the IndexRecord of the perspective candidate
+     * @param entry the ForwardIndexEntry of the perspective candidate
      * @param isGreaterOrLesser true if it is a greater than or equal to comparison,
      *      false if it is a less than or equal to comparison.
      * @return the ava evaluation on the perspective candidate
      * @throws NamingException if there is a database access failure
      */
-    private boolean evalGreaterOrLesser( SimpleNode node, IndexRecord record, boolean isGreaterOrLesser )
+    private boolean evalGreaterOrLesser( SimpleNode node, IndexEntry entry, boolean isGreaterOrLesser )
         throws NamingException
     {
         String attrId = node.getAttribute();
-        long id = ( Long ) record.getEntryId();
+        long id = ( Long ) entry.getId();
 
         if ( db.hasUserIndexOn( attrId ) )
         {
@@ -280,13 +280,13 @@
         }
 
         // resuscitate entry if need be
-        if ( null == record.getAttributes() )
+        if ( null == entry.getObject() )
         {
-            record.setAttributes( db.lookup( id ) );
+            entry.setObject( db.lookup( id ) );
         }
 
         // get the attribute associated with the node
-        Attribute attr = AttributeUtils.getAttribute( record.getAttributes(), attributeTypeRegistry.lookup( node
+        Attribute attr = AttributeUtils.getAttribute( entry.getObject(), attributeTypeRegistry.lookup( node
             .getAttribute() ) );
 
         // If we do not have the attribute just return false
@@ -345,11 +345,11 @@
      * candidate.
      * 
      * @param attrId the name of the attribute tested for presence 
-     * @param rec the IndexRecord of the perspective candidate
+     * @param rec the ForwardIndexEntry of the perspective candidate
      * @return the ava evaluation on the perspective candidate
      * @throws NamingException if there is a database access failure
      */
-    private boolean evalPresence( String attrId, IndexRecord rec ) throws NamingException
+    private boolean evalPresence( String attrId, IndexEntry rec ) throws NamingException
     {
         // First, check if the attributeType is indexed
         if ( db.hasUserIndexOn( attrId ) )
@@ -361,7 +361,7 @@
             // have a direct access to the entry.
             try
             {
-                if ( idx.hasValue( attrId, rec.getEntryId() ) )
+                if ( idx.hasValue( attrId, rec.getId() ) )
                 {
                     return true;
                 }
@@ -429,11 +429,11 @@
      * candidate.
      *
      * @param node the equality node to evaluate
-     * @param rec the IndexRecord of the perspective candidate
+     * @param rec the ForwardIndexEntry of the perspective candidate
      * @return the ava evaluation on the perspective candidate
      * @throws NamingException if there is a database access failure
      */
-    private boolean evalEquality( SimpleNode node, IndexRecord rec ) throws NamingException
+    private boolean evalEquality( SimpleNode node, IndexEntry rec ) throws NamingException
     {
         String filterAttr = node.getAttribute();
         Object filterValue = node.getValue();
@@ -448,7 +448,7 @@
 
             try
             {
-                if ( idx.hasValue( filterValue, rec.getEntryId() ) )
+                if ( idx.hasValue( filterValue, rec.getId() ) )
                 {
                     return true;
                 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java Sun Mar 16 20:20:42 2008
@@ -59,7 +59,7 @@
      * @throws NamingException if any system indices fail
      * @see org.apache.directory.server.core.partition.impl.btree.Enumerator#enumerate(ExprNode)
      */
-    public NamingEnumeration<IndexRecord> enumerate( ExprNode node ) throws NamingException
+    public NamingEnumeration<ForwardIndexEntry> enumerate( ExprNode node ) throws NamingException
     {
         final ScopeNode snode = ( ScopeNode ) node;
         final Long id = db.getEntryId( snode.getBaseDn() );
@@ -67,10 +67,10 @@
         switch ( snode.getScope() )
         {
             case ( SearchControls.OBJECT_SCOPE  ):
-                final IndexRecord record = new IndexRecord();
-                record.setEntryId( id );
-                record.setIndexKey( snode.getBaseDn() );
-                return new SingletonEnumeration<IndexRecord>( record );
+                final ForwardIndexEntry recordForward = new ForwardIndexEntry();
+                recordForward.setId( id );
+                recordForward.setValue( snode.getBaseDn() );
+                return new SingletonEnumeration<ForwardIndexEntry>( recordForward );
                 
             case ( SearchControls.ONELEVEL_SCOPE  ):
                 return enumerateChildren( snode.getBaseDn(), snode.getDerefAliases().isDerefInSearching() );
@@ -95,13 +95,13 @@
      * @throws NamingException if any failures occur while accessing system
      * indices.
      */
-    private NamingEnumeration<IndexRecord> enumerateChildren( String dn, boolean deref ) throws NamingException
+    private NamingEnumeration<ForwardIndexEntry> enumerateChildren( String dn, boolean deref ) throws NamingException
     {
         Index idx = db.getHierarchyIndex();
         final Long id = db.getEntryId( dn );
         try
         {
-            final NamingEnumeration<IndexRecord> children = idx.listIndices( id );
+            final NamingEnumeration<ForwardIndexEntry> children = idx.listIndices( id );
         }
         catch ( java.io.IOException e )
         {
@@ -159,7 +159,7 @@
      * @throws NamingException if any failures occur while accessing system
      * indices.
      */
-    private NamingEnumeration<IndexRecord> enumerateDescendants( final ScopeNode node ) throws NamingException
+    private NamingEnumeration<ForwardIndexEntry> enumerateDescendants( final ScopeNode node ) throws NamingException
     {
         Index idx = null;
 
@@ -173,7 +173,7 @@
             idx = db.getNdnIndex();
             try
             {
-                NamingEnumeration<IndexRecord> underlying = idx.listIndices();
+                NamingEnumeration<ForwardIndexEntry> underlying = idx.listIndices();
             }
             catch ( java.io.IOException e )
             {
@@ -185,7 +185,7 @@
         // Create an assertion to assert or evaluate an expression
         IndexAssertion assertion = new IndexAssertion()
         {
-            public boolean assertCandidate( IndexRecord rec ) throws NamingException
+            public boolean assertCandidate( IndexEntry rec ) throws NamingException
             {
                 return evaluator.evaluate( node, rec );
             }
@@ -195,7 +195,7 @@
         idx = db.getNdnIndex();
         try
         {
-            NamingEnumeration<IndexRecord> underlying = idx.listIndices();
+            NamingEnumeration<ForwardIndexEntry> underlying = idx.listIndices();
         }
         catch ( java.io.IOException e )
         {
@@ -228,11 +228,11 @@
          * Returns true if the candidate with id is a descendant of the base, 
          * false otherwise.
          * 
-         * @see org.apache.directory.server.core.partition.impl.btree.IndexAssertion#assertCandidate(IndexRecord)
+         * @see org.apache.directory.server.core.partition.impl.btree.IndexAssertion#assertCandidate(IndexEntry)
          */
-        public boolean assertCandidate( IndexRecord record ) throws NamingException
+        public boolean assertCandidate( IndexEntry entry ) throws NamingException
         {
-            String dn = db.getEntryDn( (Long)record.getEntryId() );
+            String dn = db.getEntryDn( (Long) entry.getId() );
             return dn.endsWith( scope.getBaseDn() );
         }
     }
@@ -245,15 +245,15 @@
         /**
          * Returns true if the candidate is not an alias, false otherwise.
          * 
-         * @see IndexAssertion#assertCandidate(IndexRecord)
+         * @see IndexAssertion#assertCandidate(IndexEntry)
          */
-        public boolean assertCandidate( IndexRecord record ) throws NamingException
+        public boolean assertCandidate( IndexEntry entry ) throws NamingException
         {
             Index aliasIdx = db.getAliasIndex();
 
             try
             {
-                if ( null == aliasIdx.reverseLookup( record.getEntryId() ) )
+                if ( null == aliasIdx.reverseLookup( entry.getId() ) )
                 {
                     return true;
                 }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java Sun Mar 16 20:20:42 2008
@@ -52,23 +52,23 @@
 
 
     /**
-     * @see org.apache.directory.server.core.partition.impl.btree.Evaluator#evaluate(ExprNode, org.apache.directory.server.core.partition.impl.btree.IndexRecord)
+     * @see org.apache.directory.server.core.partition.impl.btree.Evaluator#evaluate(ExprNode, IndexEntry)
      */
-    public boolean evaluate( ExprNode node, IndexRecord record ) throws NamingException
+    public boolean evaluate( ExprNode node, IndexEntry entry ) throws NamingException
     {
         ScopeNode snode = ( ScopeNode ) node;
 
         switch ( snode.getScope() )
         {
             case ( SearchControls.OBJECT_SCOPE  ):
-                String dn = db.getEntryDn( (Long)record.getEntryId() );
+                String dn = db.getEntryDn( (Long) entry.getId() );
                 return dn.equals( snode.getBaseDn() );
                 
             case ( SearchControls.ONELEVEL_SCOPE  ):
-                return assertOneLevelScope( snode, (Long)record.getEntryId() );
+                return assertOneLevelScope( snode, (Long) entry.getId() );
             
             case ( SearchControls.SUBTREE_SCOPE  ):
-                return assertSubtreeScope( snode, (Long)record.getEntryId() );
+                return assertSubtreeScope( snode, (Long) entry.getId() );
             
             default:
                 throw new NamingException( "Unrecognized search scope!" );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEnumerator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEnumerator.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEnumerator.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEnumerator.java Sun Mar 16 20:20:42 2008
@@ -74,7 +74,7 @@
      * @see Enumerator#enumerate(
      * org.apache.directory.shared.ldap.filter.ExprNode)
      */
-    public NamingEnumeration<IndexRecord> enumerate( final ExprNode node ) throws NamingException
+    public NamingEnumeration<ForwardIndexEntry> enumerate( final ExprNode node ) throws NamingException
     {
         Pattern regex = null;
         Index idx = null;
@@ -148,7 +148,7 @@
          */
         try
         {
-            NamingEnumeration<IndexRecord> underlying = db.getNdnIndex().listIndices();
+            NamingEnumeration<ForwardIndexEntry> underlying = db.getNdnIndex().listIndices();
         }
         catch ( java.io.IOException e )
         {
@@ -157,9 +157,9 @@
 
         IndexAssertion assertion = new IndexAssertion()
         {
-            public boolean assertCandidate( final IndexRecord record ) throws NamingException
+            public boolean assertCandidate( final IndexEntry entry ) throws NamingException
             {
-                return evaluator.evaluate( node, record );
+                return evaluator.evaluate( node, entry );
             }
         };
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java Sun Mar 16 20:20:42 2008
@@ -74,9 +74,9 @@
 
 
     /**
-     * @see org.apache.directory.server.core.partition.impl.btree.Evaluator#evaluate(ExprNode, IndexRecord)
+     * @see org.apache.directory.server.core.partition.impl.btree.Evaluator#evaluate(ExprNode, IndexEntry)
      */
-    public boolean evaluate( ExprNode node, IndexRecord record ) throws NamingException
+    public boolean evaluate( ExprNode node, IndexEntry entry ) throws NamingException
     {
         Pattern regex = null;
         SubstringNode snode = ( SubstringNode ) node;
@@ -129,10 +129,10 @@
             // cycle through the attribute values testing for a match
             while ( entries.hasMore() )
             {
-                IndexRecord rec = ( IndexRecord ) entries.next();
+                IndexEntry rec = ( IndexEntry ) entries.next();
 
                 // once match is found cleanup and return true
-                if ( regex.matcher( ( String ) rec.getIndexKey() ).matches() )
+                if ( regex.matcher( ( String ) rec.getValue() ).matches() )
                 {
                     entries.close();
                     return true;
@@ -149,7 +149,7 @@
 
         Attributes entry = record.getAttributes();
         
-        // resuscitate the entry if it has not been and set entry in IndexRecord
+        // resuscitate the entry if it has not been and set entry in ForwardIndexEntry
         if ( null == entry )
         {
             Attributes attrs = db.lookup( (Long)record.getEntryId() );

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java Sun Mar 16 20:20:42 2008
@@ -33,8 +33,9 @@
 import javax.swing.tree.TreeNode;
 
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
-import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
+import org.apache.directory.server.core.partition.impl.btree.ForwardIndexEntry;
 import org.apache.directory.server.core.partition.impl.btree.SearchEngine;
+import org.apache.directory.server.core.partition.impl.btree.IndexEntry;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
@@ -79,33 +80,33 @@
 
         try
         {
-            List<IndexRecord> records = new ArrayList<IndexRecord>();
+            List<ForwardIndexEntry> recordForwards = new ArrayList<ForwardIndexEntry>();
             NamingEnumeration childList = db.list( id );
             
             while ( childList.hasMore() )
             {
-                IndexRecord old = ( IndexRecord ) childList.next();
-                IndexRecord newRec = new IndexRecord();
+                IndexEntry old = ( IndexEntry ) childList.next();
+                ForwardIndexEntry newRec = new ForwardIndexEntry();
                 newRec.copy( old );
-                records.add( newRec );
+                recordForwards.add( newRec );
             }
             
             childList.close();
 
-            Iterator list = records.iterator();
+            Iterator list = recordForwards.iterator();
 
             while ( list.hasNext() )
             {
-                IndexRecord rec = ( IndexRecord ) list.next();
+                IndexEntry rec = ( IndexEntry ) list.next();
 
                 if ( engine != null && exprNode != null )
                 {
-                    if ( db.getChildCount( (Long)rec.getEntryId() ) == 0 )
+                    if ( db.getChildCount( (Long)rec.getId() ) == 0 )
                     {
-                        if ( engine.evaluate( exprNode, (Long)rec.getEntryId() ) )
+                        if ( engine.evaluate( exprNode, (Long)rec.getId() ) )
                         {
-                            Attributes newEntry = db.lookup( (Long)rec.getEntryId() );
-                            EntryNode child = new EntryNode( (Long)rec.getEntryId(), this, db, newEntry, map, exprNode,
+                            Attributes newEntry = db.lookup( (Long)rec.getId() );
+                            EntryNode child = new EntryNode( (Long)rec.getId(), this, db, newEntry, map, exprNode,
                                 engine );
                             children.add( child );
                         }
@@ -116,15 +117,15 @@
                     }
                     else
                     {
-                        Attributes newEntry = db.lookup( (Long)rec.getEntryId() );
-                        EntryNode child = new EntryNode( (Long)rec.getEntryId(), this, db, newEntry, map, exprNode, engine );
+                        Attributes newEntry = db.lookup( (Long)rec.getId() );
+                        EntryNode child = new EntryNode( (Long)rec.getId(), this, db, newEntry, map, exprNode, engine );
                         children.add( child );
                     }
                 }
                 else
                 {
-                    Attributes newEntry = db.lookup( (Long)rec.getEntryId() );
-                    EntryNode child = new EntryNode( (Long)rec.getEntryId(), this, db, newEntry, map );
+                    Attributes newEntry = db.lookup( (Long)rec.getId() );
+                    EntryNode child = new EntryNode( (Long)rec.getId(), this, db, newEntry, map );
                     children.add( child );
                 }
             }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/IndexDialog.java Sun Mar 16 20:20:42 2008
@@ -47,7 +47,7 @@
 import javax.swing.table.DefaultTableModel;
 
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
+import org.apache.directory.server.core.partition.impl.btree.IndexEntry;
 import org.apache.directory.shared.ldap.util.ExceptionUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -333,10 +333,10 @@
 
             while ( list.hasMore() )
             {
-                IndexRecord rec = ( IndexRecord ) list.next();
+                IndexEntry rec = ( IndexEntry ) list.next();
                 row = new Object[2];
-                row[0] = rec.getIndexKey();
-                row[1] = rec.getEntryId();
+                row[0] = rec.getValue();
+                row[1] = rec.getId();
                 model.addRow( row );
                 count++;
             }

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Sun Mar 16 20:20:42 2008
@@ -66,7 +66,7 @@
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
-import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
+import org.apache.directory.server.core.partition.impl.btree.IndexEntry;
 
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
@@ -658,8 +658,8 @@
         int count = 0;
         while ( cursor.hasMore() && count < limitMax )
         {
-            IndexRecord rec = ( IndexRecord ) cursor.next();
-            row[0] = rec.getEntryId();
+            IndexEntry rec = ( IndexEntry ) cursor.next();
+            row[0] = rec.getId();
             row[1] = partition.getEntryDn( ( Long ) row[0] );
             tableModel.addRow( row );
             count++;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java?rev=637708&r1=637707&r2=637708&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/DupsCursor.java Sun Mar 16 20:20:42 2008
@@ -29,7 +29,7 @@
     private final JdbmTable<K,V> table;
 
     /**
-     * An underlying Cursor which returns Tuples whose values are
+     * An wrappedCursor Cursor which returns Tuples whose values are
      * DupsContainer objects representing either AvlTrees or BTreeRedirect
      * objects used to store the values of duplicate keys.  It does not return
      * different values for the same key.
@@ -37,7 +37,7 @@
     private final DupsContainerCursor<K,V> containerCursor;
 
     /**
-     * The current Tuple returned from the underlying DupsContainerCursor.
+     * The current Tuple returned from the wrappedCursor DupsContainerCursor.
      */
     private final Tuple<K,DupsContainer<V>> containerTuple = new Tuple<K, DupsContainer<V>>();
 
@@ -296,7 +296,7 @@
         if ( null == dupsCursor || ! dupsCursor.previous() )
         {
             /*
-             * If the underlying cursor has more elements we get the previous
+             * If the wrappedCursor cursor has more elements we get the previous
              * key/AvlTree Tuple to work with and get a cursor over it's
              * values.
              */
@@ -347,7 +347,7 @@
         if ( null == dupsCursor || ! dupsCursor.next() )
         {
             /*
-             * If the underlying cursor has more elements we get the next
+             * If the wrappedCursor cursor has more elements we get the next
              * key/AvlTree Tuple to work with and get a cursor over it.
              */
             if ( containerCursor.next() )



Mime
View raw message