directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r517022 - in /directory/apacheds/trunk: btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ core/src/main/java/org/apache/directory/server...
Date Sun, 11 Mar 2007 21:44:17 GMT
Author: elecharny
Date: Sun Mar 11 14:44:16 2007
New Revision: 517022

URL: http://svn.apache.org/viewvc?view=rev&rev=517022
Log:
Modified the API to use Object instead of BigInteger, allowing someone to write a partition
without having to use BigInteger everywhere. This is a first step, we should also get rid
of BigInteger completly, to use long instead.

Modified:
    directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java
    directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java
    directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexComparator.java
    directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java
    directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/MasterTable.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
    directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
    directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
    directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java

Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java
(original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/Index.java
Sun Mar 11 14:44:16 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.regex.Pattern;
 
 import javax.naming.NamingException;
@@ -79,42 +78,42 @@
     int count( Object attrVal, boolean isGreaterThan ) throws NamingException;
 
 
-    BigInteger forwardLookup( Object attrVal ) throws NamingException;
+    Object forwardLookup( Object attrVal ) throws NamingException;
 
 
-    Object reverseLookup( BigInteger id ) throws NamingException;
+    Object reverseLookup( Object id ) throws NamingException;
 
 
-    void add( Object attrVal, BigInteger id ) throws NamingException;
+    void add( Object attrVal, Object id ) throws NamingException;
 
 
-    void add( Attribute attr, BigInteger id ) throws NamingException;
+    void add( Attribute attr, Object id ) throws NamingException;
 
 
-    void add( Attributes attrs, BigInteger id ) throws NamingException;
+    void add( Attributes attrs, Object id ) throws NamingException;
 
 
-    void drop( BigInteger entryId ) throws NamingException;
+    void drop( Object entryId ) throws NamingException;
 
 
-    void drop( Object attrVal, BigInteger id ) throws NamingException;
+    void drop( Object attrVal, Object id ) throws NamingException;
 
 
     /**
      * If the Attribute does not have any values then this reduces to a 
      * drop(BigInteger) call.
      */
-    void drop( Attribute attr, BigInteger id ) throws NamingException;
+    void drop( Attribute attr, Object id ) throws NamingException;
 
 
     /**
      * If the Attribute for this index within the Attributes does not have any 
      * values then this reduces to a drop(BigInteger) call.
      */
-    void drop( Attributes attrs, BigInteger id ) throws NamingException;
+    void drop( Attributes attrs, Object id ) throws NamingException;
 
 
-    IndexEnumeration listReverseIndices( BigInteger id ) throws NamingException;
+    IndexEnumeration listReverseIndices( Object id ) throws NamingException;
 
 
     IndexEnumeration listIndices() throws NamingException;
@@ -132,13 +131,13 @@
     IndexEnumeration listIndices( Pattern regex, String prefix ) throws NamingException;
 
 
-    boolean hasValue( Object attrVal, BigInteger id ) throws NamingException;
+    boolean hasValue( Object attrVal, Object id ) throws NamingException;
 
 
-    boolean hasValue( Object attrVal, BigInteger id, boolean isGreaterThan ) throws NamingException;
+    boolean hasValue( Object attrVal, Object id, boolean isGreaterThan ) throws NamingException;
 
 
-    boolean hasValue( Pattern regex, BigInteger id ) throws NamingException;
+    boolean hasValue( Pattern regex, Object id ) throws NamingException;
 
 
     void close() throws NamingException;

Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java
(original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexAssertionEnumeration.java
Sun Mar 11 14:44:16 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.NoSuchElementException;
@@ -45,7 +44,7 @@
     /** The iteration cursor */
     private final NamingEnumeration underlying;
     /** LUT used to avoid returning duplicates */
-    private final Map<BigInteger,BigInteger> candidates;
+    private final Map<Object,Object> candidates;
     /** */
     private final IndexAssertion assertion;
     /** */
@@ -72,7 +71,7 @@
         throws NamingException
     {
         this.underlying = underlying;
-        candidates = new HashMap<BigInteger,BigInteger>();
+        candidates = new HashMap<Object,Object>();
         this.assertion = assertion;
         checkDups = enableDupCheck;
         prefetch();

Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexComparator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexComparator.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexComparator.java
(original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexComparator.java
Sun Mar 11 14:44:16 2007
@@ -21,6 +21,7 @@
 
 
 import org.apache.directory.server.schema.SerializableComparator;
+//import org.apache.directory.shared.ldap.util.BigIntegerComparator;
 import org.apache.directory.shared.ldap.util.BigIntegerComparator;
 
 

Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java
(original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexRecord.java
Sun Mar 11 14:44:16 2007
@@ -20,8 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
-
 import javax.naming.directory.Attributes;
 
 
@@ -75,9 +73,9 @@
      *
      * @return the id of the entry indexed
      */
-    public BigInteger getEntryId()
+    public Object getEntryId()
     {
-        return ( BigInteger ) tuple.getValue();
+        return ( Object ) tuple.getValue();
     }
 
 
@@ -97,7 +95,7 @@
      *
      * @param id the id of the entry
      */
-    public void setEntryId( BigInteger id )
+    public void setEntryId( Object id )
     {
         tuple.setValue( id );
     }

Modified: directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/MasterTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/MasterTable.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/MasterTable.java
(original)
+++ directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/MasterTable.java
Sun Mar 11 14:44:16 2007
@@ -20,8 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
-
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 
@@ -48,7 +46,7 @@
      * @return the Attributes of the entry with operational attributes and all.
      * @throws NamingException if there is a read error on the underlying Db.
      */
-    Attributes get( BigInteger id ) throws NamingException;
+    Attributes get( Object id ) throws NamingException;
 
 
     /**
@@ -61,7 +59,7 @@
      * @return the newly created entry's Attributes
      * @throws NamingException if there is a write error on the underlying Db.
      */
-    Attributes put( Attributes entry, BigInteger id ) throws NamingException;
+    Attributes put( Attributes entry, Object id ) throws NamingException;
 
 
     /**
@@ -71,7 +69,7 @@
      * @return the Attributes of the deleted entry
      * @throws NamingException if there is a write error on the underlying Db
      */
-    Attributes delete( BigInteger id ) throws NamingException;
+    Attributes delete( Object id ) throws NamingException;
 
 
     /**
@@ -82,7 +80,7 @@
      * @throws NamingException if the admin table storing sequences cannot be
      * read.
      */
-    BigInteger getCurrentId() throws NamingException;
+    Object getCurrentId() throws NamingException;
 
 
     /**
@@ -93,7 +91,7 @@
      * @throws NamingException if the admin table storing sequences cannot be
      * read and writen to.
      */
-    BigInteger getNextId() throws NamingException;
+    Object getNextId() throws NamingException;
 
 
     /**

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResultEnumeration.java
Sun Mar 11 14:44:16 2007
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
+import java.math.BigInteger;
 import java.util.Iterator;
 
 import javax.naming.NamingEnumeration;
@@ -104,11 +105,11 @@
     {
         IndexRecord rec = ( IndexRecord ) underlying.next();
         Attributes entry;
-        String name = partition.getEntryUpdn( rec.getEntryId() );
+        String name = partition.getEntryUpdn( (BigInteger)rec.getEntryId() );
 
         if ( null == rec.getAttributes() )
         {
-            rec.setAttributes( partition.lookup( rec.getEntryId() ) );
+            rec.setAttributes( partition.lookup( (BigInteger)rec.getEntryId() ) );
         }
 
         if ( attrIds == null )
@@ -234,7 +235,7 @@
             }
         }
 
-        BTreeSearchResult result = new BTreeSearchResult( rec.getEntryId(), name, null, entry
);
+        BTreeSearchResult result = new BTreeSearchResult( (BigInteger)rec.getEntryId(), name,
null, entry );
         result.setRelative( false );
         return result;
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/LeafEvaluator.java
Sun Mar 11 14:44:16 2007
@@ -156,7 +156,7 @@
     private boolean evalGreater( SimpleNode node, IndexRecord record, boolean isGreater )
throws NamingException
     {
         String attrId = node.getAttribute();
-        BigInteger id = record.getEntryId();
+        BigInteger id = (BigInteger)record.getEntryId();
 
         if ( db.hasUserIndexOn( attrId ) )
         {
@@ -251,7 +251,7 @@
         // resusitate entry if need be
         if ( null == rec.getAttributes() )
         {
-            rec.setAttributes( db.lookup( rec.getEntryId() ) );
+            rec.setAttributes( db.lookup( (BigInteger)rec.getEntryId() ) );
         }
 
         // get the attribute associated with the node 
@@ -298,7 +298,7 @@
         // resusitate entry if need be
         if ( null == rec.getAttributes() )
         {
-            rec.setAttributes( db.lookup( rec.getEntryId() ) );
+            rec.setAttributes( db.lookup( (BigInteger)rec.getEntryId() ) );
         }
 
         // get the attribute associated with the node 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEnumerator.java
Sun Mar 11 14:44:16 2007
@@ -203,7 +203,7 @@
          */
         public boolean assertCandidate( IndexRecord record ) throws NamingException
         {
-            String dn = db.getEntryDn( record.getEntryId() );
+            String dn = db.getEntryDn( (BigInteger)record.getEntryId() );
             return dn.endsWith( scope.getBaseDn() );
         }
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ScopeEvaluator.java
Sun Mar 11 14:44:16 2007
@@ -63,12 +63,12 @@
         switch ( snode.getScope() )
         {
             case ( SearchControls.OBJECT_SCOPE  ):
-                String dn = db.getEntryDn( record.getEntryId() );
+                String dn = db.getEntryDn( (BigInteger)record.getEntryId() );
                 return dn.equals( snode.getBaseDn() );
             case ( SearchControls.ONELEVEL_SCOPE  ):
-                return assertOneLevelScope( snode, record.getEntryId() );
+                return assertOneLevelScope( snode, (BigInteger)record.getEntryId() );
             case ( SearchControls.SUBTREE_SCOPE  ):
-                return assertSubtreeScope( snode, record.getEntryId() );
+                return assertSubtreeScope( snode, (BigInteger)record.getEntryId() );
             default:
                 throw new NamingException( "Unrecognized search scope!" );
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SubstringEvaluator.java
Sun Mar 11 14:44:16 2007
@@ -20,6 +20,7 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
+import java.math.BigInteger;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
@@ -137,7 +138,7 @@
         // resusitate the entry if it has not been and set entry in IndexRecord
         if ( null == record.getAttributes() )
         {
-            Attributes attrs = db.lookup( record.getEntryId() );
+            Attributes attrs = db.lookup( (BigInteger)record.getEntryId() );
             record.setAttributes( attrs );
         }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
Sun Mar 11 14:44:16 2007
@@ -98,12 +98,12 @@
 
                 if ( engine != null && exprNode != null )
                 {
-                    if ( db.getChildCount( rec.getEntryId() ) == 0 )
+                    if ( db.getChildCount( (BigInteger)rec.getEntryId() ) == 0 )
                     {
-                        if ( engine.evaluate( exprNode, rec.getEntryId() ) )
+                        if ( engine.evaluate( exprNode, (BigInteger)rec.getEntryId() ) )
                         {
-                            Attributes newEntry = db.lookup( rec.getEntryId() );
-                            EntryNode child = new EntryNode( rec.getEntryId(), this, db,
newEntry, map, exprNode,
+                            Attributes newEntry = db.lookup( (BigInteger)rec.getEntryId()
);
+                            EntryNode child = new EntryNode( (BigInteger)rec.getEntryId(),
this, db, newEntry, map, exprNode,
                                 engine );
                             children.add( child );
                         }
@@ -114,15 +114,15 @@
                     }
                     else
                     {
-                        Attributes newEntry = db.lookup( rec.getEntryId() );
-                        EntryNode child = new EntryNode( rec.getEntryId(), this, db, newEntry,
map, exprNode, engine );
+                        Attributes newEntry = db.lookup( (BigInteger)rec.getEntryId() );
+                        EntryNode child = new EntryNode( (BigInteger)rec.getEntryId(), this,
db, newEntry, map, exprNode, engine );
                         children.add( child );
                     }
                 }
                 else
                 {
-                    Attributes newEntry = db.lookup( rec.getEntryId() );
-                    EntryNode child = new EntryNode( rec.getEntryId(), this, db, newEntry,
map );
+                    Attributes newEntry = db.lookup( (BigInteger)rec.getEntryId() );
+                    EntryNode child = new EntryNode( (BigInteger)rec.getEntryId(), this,
db, newEntry, map );
                     children.add( child );
                 }
             }

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
(original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmIndex.java
Sun Mar 11 14:44:16 2007
@@ -207,7 +207,7 @@
     /**
      * @see Index#reverseLookup(java.math.BigInteger)
      */
-    public Object reverseLookup( BigInteger id ) throws NamingException
+    public Object reverseLookup( Object id ) throws NamingException
     {
         return reverse.get( id );
     }
@@ -221,7 +221,7 @@
      * @see org.apache.directory.server.core.partition.impl.btree.Index#add(java.lang.Object,
      * java.math.BigInteger)
      */
-    public synchronized void add( Object attrVal, BigInteger id ) throws NamingException
+    public synchronized void add( Object attrVal, Object id ) throws NamingException
     {
         forward.put( getNormalized( attrVal ), id );
         reverse.put( id, getNormalized( attrVal ) );
@@ -232,7 +232,7 @@
      * @see org.apache.directory.server.core.partition.impl.btree.Index#add(
      * javax.naming.directory.Attribute, java.math.BigInteger)
      */
-    public synchronized void add( Attribute attr, BigInteger id ) throws NamingException
+    public synchronized void add( Attribute attr, Object id ) throws NamingException
     {
         // Can efficiently batch add to the reverse table 
         NamingEnumeration values = attr.getAll();
@@ -251,7 +251,7 @@
      * @see Index#add(
      * javax.naming.directory.Attributes, java.math.BigInteger)
      */
-    public synchronized void add( Attributes attrs, BigInteger id ) throws NamingException
+    public synchronized void add( Attributes attrs, Object id ) throws NamingException
     {
         add( AttributeUtils.getAttribute( attrs, attribute ), id );
     }
@@ -261,7 +261,7 @@
      * @see org.apache.directory.server.core.partition.impl.btree.Index#drop(java.lang.Object,
      * java.math.BigInteger)
      */
-    public synchronized void drop( Object attrVal, BigInteger id ) throws NamingException
+    public synchronized void drop( Object attrVal, Object id ) throws NamingException
     {
         forward.remove( getNormalized( attrVal ), id );
         reverse.remove( id, getNormalized( attrVal ) );
@@ -271,7 +271,7 @@
     /**
      * @see Index#drop(java.math.BigInteger)
      */
-    public void drop( BigInteger entryId ) throws NamingException
+    public void drop( Object entryId ) throws NamingException
     {
         NamingEnumeration values = reverse.listValues( entryId );
 
@@ -288,7 +288,7 @@
      * @see Index#drop(
      * javax.naming.directory.Attribute, java.math.BigInteger)
      */
-    public void drop( Attribute attr, BigInteger id ) throws NamingException
+    public void drop( Attribute attr, Object id ) throws NamingException
     {
         // Can efficiently batch remove from the reverse table 
         NamingEnumeration values = attr.getAll();
@@ -315,7 +315,7 @@
      * @see org.apache.directory.server.core.partition.impl.btree.Index#drop(
      * javax.naming.directory.Attributes, java.math.BigInteger)
      */
-    public void drop( Attributes attrs, BigInteger id ) throws NamingException
+    public void drop( Attributes attrs, Object id ) throws NamingException
     {
         drop( AttributeUtils.getAttribute( attrs, attribute ), id );
     }
@@ -328,7 +328,7 @@
     /**
      * @see Index#listReverseIndices(BigInteger)
      */
-    public IndexEnumeration listReverseIndices( BigInteger id ) throws NamingException
+    public IndexEnumeration listReverseIndices( Object id ) throws NamingException
     {
         return new IndexEnumeration( reverse.listTuples( id ), true );
     }
@@ -389,7 +389,7 @@
      * @see Index#hasValue(java.lang.Object,
      * java.math.BigInteger)
      */
-    public boolean hasValue( Object attrVal, BigInteger id ) throws NamingException
+    public boolean hasValue( Object attrVal, Object id ) throws NamingException
     {
         return forward.has( getNormalized( attrVal ), id );
     }
@@ -399,7 +399,7 @@
      * @see Index#hasValue(java.lang.Object,
      * java.math.BigInteger, boolean)
      */
-    public boolean hasValue( Object attrVal, BigInteger id, boolean isGreaterThan ) throws
NamingException
+    public boolean hasValue( Object attrVal, Object id, boolean isGreaterThan ) throws NamingException
     {
         return forward.has( getNormalized( attrVal ), id, isGreaterThan );
     }
@@ -409,7 +409,7 @@
      * @see Index#hasValue(org.apache.regexp.RE,
      * java.math.BigInteger)
      */
-    public boolean hasValue( Pattern regex, BigInteger id ) throws NamingException
+    public boolean hasValue( Pattern regex, Object id ) throws NamingException
     {
         IndexEnumeration list = new IndexEnumeration( reverse.listTuples( id ), true, regex
);
         boolean hasValue = list.hasMore();

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
(original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmMasterTable.java
Sun Mar 11 14:44:16 2007
@@ -94,7 +94,7 @@
      * @return the Attributes of the entry with operational attributes and all.
      * @throws NamingException if there is a read error on the underlying Db.
      */
-    public Attributes get( BigInteger id ) throws NamingException
+    public Attributes get( Object id ) throws NamingException
     {
         return ( Attributes ) super.get( id );
     }
@@ -110,7 +110,7 @@
      * @return the Attributes of the entry put
      * @throws NamingException if there is a write error on the underlying Db.
      */
-    public Attributes put( Attributes entry, BigInteger id ) throws NamingException
+    public Attributes put( Attributes entry, Object id ) throws NamingException
     {
         return ( Attributes ) super.put( id, entry );
     }
@@ -123,7 +123,7 @@
      * @return the Attributes of the deleted entry
      * @throws NamingException if there is a write error on the underlying Db
      */
-    public Attributes delete( BigInteger id ) throws NamingException
+    public Attributes delete( Object id ) throws NamingException
     {
         return ( Attributes ) super.remove( id );
     }

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?view=diff&rev=517022&r1=517021&r2=517022
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
(original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
Sun Mar 11 14:44:16 2007
@@ -785,7 +785,7 @@
 
     public BigInteger getEntryId( String dn ) throws NamingException
     {
-        return ndnIdx.forwardLookup( dn );
+        return (BigInteger)ndnIdx.forwardLookup( dn );
     }
 
 
@@ -797,7 +797,7 @@
 
     public BigInteger getParentId( String dn ) throws NamingException
     {
-        BigInteger childId = ndnIdx.forwardLookup( dn );
+        BigInteger childId = (BigInteger)ndnIdx.forwardLookup( dn );
         return ( BigInteger ) hierarchyIdx.reverseLookup( childId );
     }
 
@@ -816,7 +816,7 @@
 
     public String getEntryUpdn( String dn ) throws NamingException
     {
-        BigInteger id = ndnIdx.forwardLookup( dn );
+        BigInteger id = (BigInteger)ndnIdx.forwardLookup( dn );
         return ( String ) updnIdx.reverseLookup( id );
     }
 
@@ -930,7 +930,7 @@
         }
 
         // L O O K U P   T A R G E T   I D
-        targetId = ndnIdx.forwardLookup( normalizedAliasTargetDn.toNormName() );
+        targetId = (BigInteger)ndnIdx.forwardLookup( normalizedAliasTargetDn.toNormName()
);
 
         /*
          * Check For Target Existance
@@ -1710,7 +1710,7 @@
         {
             // Get the child and its id
             IndexRecord rec = ( IndexRecord ) children.next();
-            BigInteger childId = rec.getEntryId();
+            BigInteger childId = (BigInteger)rec.getEntryId();
 
             /* 
              * Calculate the Dn for the child's new name by copying the parents
@@ -1818,7 +1818,7 @@
         {
             public boolean assertCandidate( IndexRecord rec ) throws NamingException
             {
-                String dn = getEntryDn( rec.getEntryId() );
+                String dn = getEntryDn( (BigInteger)rec.getEntryId() );
                 if ( dn.endsWith( movedBase.toString() ) )
                 {
                     return true;
@@ -1839,7 +1839,7 @@
         while ( aliases.hasMore() )
         {
             IndexRecord entry = ( IndexRecord ) aliases.next();
-            dropAliasIndices( entry.getEntryId(), movedBase );
+            dropAliasIndices( (BigInteger)entry.getEntryId(), movedBase );
         }
     }
 



Mime
View raw message