directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r517448 [1/3] - in /directory/apacheds/trunk: bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/ core-unit/src/test/java/org/apac...
Date Mon, 12 Mar 2007 22:53:58 GMT
Author: elecharny
Date: Mon Mar 12 15:53:56 2007
New Revision: 517448

URL: http://svn.apache.org/viewvc?view=rev&rev=517448
Log:
Changed BigInteger to Long, to improve the server performance.

Modified:
    directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
    directory/apacheds/trunk/btree-base/src/main/java/org/apache/directory/server/core/partition/impl/btree/IndexComparator.java
    directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.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/DefaultOptimizer.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.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/NoOpOptimizer.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/SearchEngine.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/AttributesTableModel.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/SearchResultDialog.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeEnumerationTest.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeIteratorTest.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumerationTest.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsBTreeTest.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableDupsTreeSetTest.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTableNoDupsTest.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
    directory/apacheds/trunk/schema-bootstrap/src/main/java/org/apache/directory/server/schema/bootstrap/ApacheComparatorProducer.java
    directory/apacheds/trunk/server-tools/src/main/java/org/apache/directory/server/tools/commands/dumpcmd/DumpCommandExecutor.java

Modified: directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java (original)
+++ directory/apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/BootstrapPlugin.java Mon Mar 12 15:53:56 2007
@@ -24,7 +24,6 @@
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.math.BigInteger;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -785,7 +784,7 @@
     
     private final boolean hasEntry( LdapDN dn ) throws NamingException
     {
-        BigInteger id = store.getEntryId( dn.toNormName() );
+        Long id = store.getEntryId( dn.toNormName() );
         if ( id == null )
         {
             return false;

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=517448&r1=517447&r2=517448
==============================================================================
--- 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 Mon Mar 12 15:53:56 2007
@@ -21,9 +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;
-
+import org.apache.directory.shared.ldap.util.LongComparator;
 
 /**
  * TupleComparator for index records.
@@ -35,7 +33,7 @@
 {
     private static final long serialVersionUID = 3257283621751633459L;
 
-    private static final SerializableComparator BIG_INTEGER_COMPARATOR = new SerializableComparator(
+    private static final SerializableComparator LONG_COMPARATOR = new SerializableComparator(
         "1.3.6.1.4.1.18060.0.4.1.1.2" )
     {
         private static final long serialVersionUID = 3690478030414165816L;
@@ -43,11 +41,13 @@
 
         public int compare( Object o1, Object o2 )
         {
-            return BigIntegerComparator.INSTANCE.compare( o1, o2 );
+            return LongComparator.INSTANCE.compare( o1, o2 );
         }
     };
+    
     /** Whether or not the key/value is swapped */
     private final boolean isForwardMap;
+    
     /** The key comparison to use */
     private final SerializableComparator keyComp;
 
@@ -79,7 +79,7 @@
             return keyComp;
         }
 
-        return BIG_INTEGER_COMPARATOR;
+        return LONG_COMPARATOR;
     }
 
 
@@ -93,7 +93,7 @@
     {
         if ( isForwardMap )
         {
-            return BIG_INTEGER_COMPARATOR;
+            return LONG_COMPARATOR;
         }
 
         return keyComp;

Modified: directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java (original)
+++ directory/apacheds/trunk/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java Mon Mar 12 15:53:56 2007
@@ -57,7 +57,7 @@
 
         Attributes user = new AttributesImpl( "uid", "bob" );
         user.put( "cn", "Bob Hamilton" );
-        user.put( "userPassword", "bobspassword".getBytes( "UTF-8" ) );
+        user.put( "userPassword", "bobspassword" );
 
         Attribute objectClass = new AttributeImpl( "objectClass" );
         user.put( objectClass );
@@ -122,7 +122,7 @@
 
         String filter = "(userPassword={0})";
         NamingEnumeration results = ctx.search( "uid=bob,ou=people", filter, new Object[]
-            { "bobspassword".getBytes( "UTF-8" ) }, ctls );
+            { "bobspassword" }, ctls );
 
         // We should have a match
         assertTrue( results.hasMore() );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
@@ -382,7 +381,7 @@
 
     public void delete( LdapDN dn ) throws NamingException
     {
-        BigInteger id = getEntryId( dn.toString() );
+        Long id = getEntryId( dn.toString() );
 
         // don't continue if id is null
         if ( id == null )
@@ -643,16 +642,16 @@
     public abstract Index getSystemIndex( String attribute ) throws IndexNotFoundException;
 
 
-    public abstract BigInteger getEntryId( String dn ) throws NamingException;
+    public abstract Long getEntryId( String dn ) throws NamingException;
 
 
-    public abstract String getEntryDn( BigInteger id ) throws NamingException;
+    public abstract String getEntryDn( Long id ) throws NamingException;
 
 
-    public abstract BigInteger getParentId( String dn ) throws NamingException;
+    public abstract Long getParentId( String dn ) throws NamingException;
 
 
-    public abstract BigInteger getParentId( BigInteger childId ) throws NamingException;
+    public abstract Long getParentId( Long childId ) throws NamingException;
 
 
     /**
@@ -662,7 +661,7 @@
      * @return the user provided distinguished name
      * @throws NamingException if the updn index cannot be accessed
      */
-    public abstract String getEntryUpdn( BigInteger id ) throws NamingException;
+    public abstract String getEntryUpdn( Long id ) throws NamingException;
 
 
     /**
@@ -675,16 +674,16 @@
     public abstract String getEntryUpdn( String dn ) throws NamingException;
 
 
-    public abstract Attributes lookup( BigInteger id ) throws NamingException;
+    public abstract Attributes lookup( Long id ) throws NamingException;
 
 
-    public abstract void delete( BigInteger id ) throws NamingException;
+    public abstract void delete( Long id ) throws NamingException;
 
 
-    public abstract NamingEnumeration list( BigInteger id ) throws NamingException;
+    public abstract NamingEnumeration list( Long id ) throws NamingException;
 
 
-    public abstract int getChildCount( BigInteger id ) throws NamingException;
+    public abstract int getChildCount( Long id ) throws NamingException;
 
 
     public abstract Attributes getSuffixEntry() throws NamingException;
@@ -702,7 +701,7 @@
     public abstract Iterator getSystemIndices();
 
 
-    public abstract Attributes getIndices( BigInteger id ) throws NamingException;
+    public abstract Attributes getIndices( Long id ) throws NamingException;
 
 
     /**

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreeSearchResult.java Mon Mar 12 15:53:56 2007
@@ -20,8 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
-
 import javax.naming.directory.Attributes;
 import javax.naming.directory.SearchResult;
 
@@ -39,7 +37,7 @@
     private static final long serialVersionUID = 3976739172700860977L;
 
     /** the primary key used for the resultant entry */
-    private final BigInteger id;
+    private final Long id;
 
 
     // ------------------------------------------------------------------------
@@ -54,7 +52,7 @@
      * @param obj the object if any
      * @param attrs the attributes of the entry
      */
-    public BTreeSearchResult(BigInteger id, String name, Object obj, Attributes attrs)
+    public BTreeSearchResult(Long id, String name, Object obj, Attributes attrs)
     {
         super( name, obj, attrs );
         this.id = id;
@@ -70,7 +68,7 @@
      * @param attrs the attributes of the entry
      * @param isRelative whether or not the name is relative to the base
      */
-    public BTreeSearchResult(BigInteger id, String name, Object obj, Attributes attrs, boolean isRelative)
+    public BTreeSearchResult(Long id, String name, Object obj, Attributes attrs, boolean isRelative)
     {
         super( name, obj, attrs, isRelative );
         this.id = id;
@@ -86,7 +84,7 @@
      * @param obj the object if any
      * @param attrs the attributes of the entry
      */
-    public BTreeSearchResult(BigInteger id, String name, String className, Object obj, Attributes attrs)
+    public BTreeSearchResult(Long id, String name, String className, Object obj, Attributes attrs)
     {
         super( name, className, obj, attrs );
         this.id = id;
@@ -103,7 +101,7 @@
      * @param attrs the attributes of the entry
      * @param isRelative whether or not the name is relative to the base
      */
-    public BTreeSearchResult(BigInteger id, String name, String className, Object obj, Attributes attrs,
+    public BTreeSearchResult(Long id, String name, String className, Object obj, Attributes attrs,
         boolean isRelative)
     {
         super( name, className, obj, attrs, isRelative );
@@ -116,7 +114,7 @@
      * 
      * @return Returns the id.
      */
-    public BigInteger getId()
+    public Long getId()
     {
         return id;
     }

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=517448&r1=517447&r2=517448
==============================================================================
--- 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 Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.Iterator;
 
 import javax.naming.NamingEnumeration;
@@ -105,11 +104,11 @@
     {
         IndexRecord rec = ( IndexRecord ) underlying.next();
         Attributes entry;
-        String name = partition.getEntryUpdn( (BigInteger)rec.getEntryId() );
+        String name = partition.getEntryUpdn( (Long)rec.getEntryId() );
 
         if ( null == rec.getAttributes() )
         {
-            rec.setAttributes( partition.lookup( (BigInteger)rec.getEntryId() ) );
+            rec.setAttributes( partition.lookup( (Long)rec.getEntryId() ) );
         }
 
         if ( attrIds == null )
@@ -235,7 +234,7 @@
             }
         }
 
-        BTreeSearchResult result = new BTreeSearchResult( (BigInteger)rec.getEntryId(), name, null, entry );
+        BTreeSearchResult result = new BTreeSearchResult( (Long)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/DefaultOptimizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.List;
 
 import javax.naming.NamingException;
@@ -44,7 +43,7 @@
 public class DefaultOptimizer implements Optimizer
 {
     /** the maximum size for a count Integer.MAX_VALUE as a BigInteger */
-    private static final BigInteger MAX = BigInteger.valueOf( Integer.MAX_VALUE );
+    private static final Long MAX = Long.MAX_VALUE;
     /** the database this optimizer operates on */
     private BTreePartition db;
 
@@ -71,7 +70,7 @@
     public void annotate( ExprNode node ) throws NamingException
     {
         // Start off with the worst case unless scan count says otherwise.
-        BigInteger count = MAX;
+        Long count = MAX;
 
         /* --------------------------------------------------------------------
          *                 H A N D L E   L E A F   N O D E S          
@@ -165,7 +164,7 @@
         }
 
         // Protect against overflow when counting.
-        if ( count.compareTo( BigInteger.ZERO ) < 0 )
+        if ( count.compareTo( 0L ) < 0 )
         {
             count = MAX;
         }
@@ -185,16 +184,16 @@
      * @return the calculated scan count
      * @throws NamingException if there is an error
      */
-    private BigInteger getConjunctionScan( BranchNode node ) throws NamingException
+    private Long getConjunctionScan( BranchNode node ) throws NamingException
     {
-        BigInteger count = MAX;
+        Long count = MAX;
         List<ExprNode> children = node.getChildren();
 
         for ( int ii = 0; ii < children.size(); ii++ )
         {
             ExprNode child = ( ExprNode ) children.get( ii );
             annotate( child );
-            count = ( ( BigInteger ) child.get( "count" ) ).min( count );
+            count = Math.min( ( ( Long ) child.get( "count" ) ), count );
         }
 
         return count;
@@ -215,7 +214,7 @@
      * @return the scan count
      * @throws NamingException if there is an error
      */
-    private BigInteger getNegationScan( BranchNode node ) throws NamingException
+    private Long getNegationScan( BranchNode node ) throws NamingException
     {
         ExprNode onlyChild = ( ExprNode ) node.getChildren().get( 0 );
 
@@ -229,13 +228,13 @@
             if ( db.hasUserIndexOn( leaf.getAttribute() ) )
             {
                 Index idx = db.getUserIndex( leaf.getAttribute() );
-                return BigInteger.valueOf( idx.count() );
+                return Long.valueOf( idx.count() );
             }
             
-            return BigInteger.valueOf( db.count() );
+            return Long.valueOf( db.count() );
         }
 
-        return BigInteger.valueOf( db.count() );
+        return Long.valueOf( db.count() );
     }
 
 
@@ -248,16 +247,16 @@
      * @return the scan count on the OR node
      * @throws NamingException if there is an error
      */
-    private BigInteger getDisjunctionScan( BranchNode node ) throws NamingException
+    private Long getDisjunctionScan( BranchNode node ) throws NamingException
     {
         List<ExprNode> children = node.getChildren();
-        BigInteger total = BigInteger.ZERO;
+        Long total = 0L;
 
         for ( int ii = 0; ii < children.size(); ii++ )
         {
             ExprNode child = ( ExprNode ) children.get( ii );
             annotate( child );
-            total = total.add( ( BigInteger ) child.get( "count" ) );
+            total += ( Long ) child.get( "count" );
         }
         
         // we don't want values bigger than Integer.MAX_VALUE
@@ -278,12 +277,12 @@
      * @return the worst case
      * @throws NamingException if there is an error accessing an index
      */
-    private BigInteger getEqualityScan( SimpleNode node ) throws NamingException
+    private Long getEqualityScan( SimpleNode node ) throws NamingException
     {
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
             Index idx = db.getUserIndex( node.getAttribute() );
-            return BigInteger.valueOf( idx.count( node.getValue() ) );
+            return Long.valueOf( idx.count( node.getValue() ) );
         }
 
         // count for non-indexed attribute is unknown so we presume da worst
@@ -300,13 +299,13 @@
      * @return the scan count of all nodes satisfying the AVA
      * @throws NamingException if there is an error accessing an index
      */
-    private BigInteger getGreaterLessScan( SimpleNode node, boolean isGreaterThan ) throws NamingException
+    private Long getGreaterLessScan( SimpleNode node, boolean isGreaterThan ) throws NamingException
     {
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
             Index idx = db.getUserIndex( node.getAttribute() );
             int count = idx.count( node.getValue(), isGreaterThan );
-            return BigInteger.valueOf( count );
+            return Long.valueOf( count );
         }
 
         // count for non-indexed attribute is unknown so we presume da worst
@@ -323,13 +322,13 @@
      * @return the worst case full scan count
      * @throws NamingException if there is an error access database indices
      */
-    private BigInteger getFullScan( LeafNode node ) throws NamingException
+    private Long getFullScan( LeafNode node ) throws NamingException
     {
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
             Index idx = db.getUserIndex( node.getAttribute() );
             int count = idx.count();
-            return BigInteger.valueOf( count );
+            return Long.valueOf( count );
         }
 
         return MAX;
@@ -344,13 +343,13 @@
      * @return the number of entries matched for the presence of an attribute
      * @throws NamingException if errors result
      */
-    private BigInteger getPresenceScan( PresenceNode node ) throws NamingException
+    private Long getPresenceScan( PresenceNode node ) throws NamingException
     {
         if ( db.hasUserIndexOn( node.getAttribute() ) )
         {
             Index idx = db.getExistanceIndex();
             int count = idx.count( node.getAttribute() );
-            return BigInteger.valueOf( count );
+            return Long.valueOf( count );
         }
 
         return MAX;
@@ -364,17 +363,20 @@
      * @return the scan count for scope
      * @throws NamingException if any errors result
      */
-    private BigInteger getScopeScan( ScopeNode node ) throws NamingException
+    private Long getScopeScan( ScopeNode node ) throws NamingException
     {
         switch ( node.getScope() )
         {
             case ( SearchControls.OBJECT_SCOPE  ):
-                return BigInteger.ONE;
+                return 1L;
+            
             case ( SearchControls.ONELEVEL_SCOPE  ):
-                BigInteger id = db.getEntryId( node.getBaseDn() );
-                return BigInteger.valueOf( db.getChildCount( id ) );
+                Long id = db.getEntryId( node.getBaseDn() );
+                return Long.valueOf( db.getChildCount( id ) );
+                
             case ( SearchControls.SUBTREE_SCOPE  ):
-                return BigInteger.valueOf( db.count() );
+                return Long.valueOf( db.count() );
+            
             default:
                 throw new IllegalArgumentException( "Unrecognized search scope " + "value for filter scope node" );
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.Map;
 
 import javax.naming.Name;
@@ -91,7 +90,7 @@
         throws NamingException
     {
         Name effectiveBase = null;
-        BigInteger baseId = db.getEntryId( base.toString() );
+        Long baseId = db.getEntryId( base.toString() );
         String aliasedBase = ( String ) db.getAliasIndex().reverseLookup( baseId );
         DerefAliasesEnum mode = DerefAliasesEnum.getEnum( env );
 
@@ -140,7 +139,7 @@
     /**
      * @see SearchEngine#evaluate(ExprNode, BigInteger)
      */
-    public boolean evaluate( ExprNode ilter, BigInteger id ) throws NamingException
+    public boolean evaluate( ExprNode ilter, Long id ) throws NamingException
     {
         IndexRecord rec = new IndexRecord();
         rec.setEntryId( id );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ExpressionEnumerator.java Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.List;
 
 import javax.naming.NamingEnumeration;
@@ -248,7 +247,7 @@
         for ( int ii = 0; ii < children.size(); ii++ )
         {
             ExprNode child = ( ExprNode ) children.get( ii );
-            value = ( ( BigInteger ) child.get( "count" ) ).intValue();
+            value = ( ( Long ) child.get( "count" ) ).intValue();
             minValue = Math.min( minValue, value );
 
             if ( minValue == value )

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=517448&r1=517447&r2=517448
==============================================================================
--- 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 Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.Comparator;
 
 import javax.naming.NamingEnumeration;
@@ -156,7 +155,7 @@
     private boolean evalGreater( SimpleNode node, IndexRecord record, boolean isGreater ) throws NamingException
     {
         String attrId = node.getAttribute();
-        BigInteger id = (BigInteger)record.getEntryId();
+        Long id = (Long)record.getEntryId();
 
         if ( db.hasUserIndexOn( attrId ) )
         {
@@ -251,7 +250,7 @@
         // resusitate entry if need be
         if ( null == rec.getAttributes() )
         {
-            rec.setAttributes( db.lookup( (BigInteger)rec.getEntryId() ) );
+            rec.setAttributes( db.lookup( (Long)rec.getEntryId() ) );
         }
 
         // get the attribute associated with the node 
@@ -298,7 +297,7 @@
         // resusitate entry if need be
         if ( null == rec.getAttributes() )
         {
-            rec.setAttributes( db.lookup( (BigInteger)rec.getEntryId() ) );
+            rec.setAttributes( db.lookup( (Long)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/NoOpOptimizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/NoOpOptimizer.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/NoOpOptimizer.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/NoOpOptimizer.java Mon Mar 12 15:53:56 2007
@@ -19,8 +19,6 @@
  */
 package org.apache.directory.server.core.partition.impl.btree;
 
-import java.math.BigInteger;
-
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.ldap.filter.BranchNode;
@@ -37,7 +35,7 @@
 public class NoOpOptimizer implements Optimizer
 {
     /** the maximum size for a count Integer.MAX_VALUE as a BigInteger */
-    private static final BigInteger MAX = BigInteger.valueOf( Integer.MAX_VALUE );
+    private static final Long MAX = Long.MAX_VALUE;
     
     public void annotate( ExprNode node ) throws NamingException
     {

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=517448&r1=517447&r2=517448
==============================================================================
--- 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 Mon Mar 12 15:53:56 2007
@@ -20,8 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
-
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
@@ -64,7 +62,7 @@
     public NamingEnumeration enumerate( ExprNode node ) throws NamingException
     {
         final ScopeNode snode = ( ScopeNode ) node;
-        final BigInteger id = db.getEntryId( snode.getBaseDn() );
+        final Long id = db.getEntryId( snode.getBaseDn() );
 
         switch ( snode.getScope() )
         {
@@ -97,7 +95,7 @@
     private NamingEnumeration enumerateChildren( String dn, boolean deref ) throws NamingException
     {
         Index idx = db.getHierarchyIndex();
-        final BigInteger id = db.getEntryId( dn );
+        final Long id = db.getEntryId( dn );
         final NamingEnumeration children = idx.listIndices( id );
 
         /*
@@ -203,7 +201,7 @@
          */
         public boolean assertCandidate( IndexRecord record ) throws NamingException
         {
-            String dn = db.getEntryDn( (BigInteger)record.getEntryId() );
+            String dn = db.getEntryDn( (Long)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=517448&r1=517447&r2=517448
==============================================================================
--- 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 Mon Mar 12 15:53:56 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.SearchControls;
 
@@ -63,12 +61,12 @@
         switch ( snode.getScope() )
         {
             case ( SearchControls.OBJECT_SCOPE  ):
-                String dn = db.getEntryDn( (BigInteger)record.getEntryId() );
+                String dn = db.getEntryDn( (Long)record.getEntryId() );
                 return dn.equals( snode.getBaseDn() );
             case ( SearchControls.ONELEVEL_SCOPE  ):
-                return assertOneLevelScope( snode, (BigInteger)record.getEntryId() );
+                return assertOneLevelScope( snode, (Long)record.getEntryId() );
             case ( SearchControls.SUBTREE_SCOPE  ):
-                return assertSubtreeScope( snode, (BigInteger)record.getEntryId() );
+                return assertSubtreeScope( snode, (Long)record.getEntryId() );
             default:
                 throw new NamingException( "Unrecognized search scope!" );
         }
@@ -85,7 +83,7 @@
      * alias dereferencing is enabled.
      * @throws NamingException if the index lookups fail.
      */
-    public boolean assertSubtreeScope( final ScopeNode node, final BigInteger id ) throws NamingException
+    public boolean assertSubtreeScope( final ScopeNode node, final Long id ) throws NamingException
     {
         String dn = db.getEntryDn( id );
         DerefAliasesEnum mode = node.getDerefAliases();
@@ -150,7 +148,7 @@
      * alias dereferencing is enabled.
      * @throws NamingException if the index lookups fail.
      */
-    public boolean assertOneLevelScope( final ScopeNode node, final BigInteger id ) throws NamingException
+    public boolean assertOneLevelScope( final ScopeNode node, final Long id ) throws NamingException
     {
         DerefAliasesEnum mode = node.getDerefAliases();
         Object baseId = db.getEntryId( node.getBaseDn() );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SearchEngine.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SearchEngine.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SearchEngine.java Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.Map;
 
 import javax.naming.Name;
@@ -96,5 +95,5 @@
      * @return true if the filter passes the entry, false otherwise
      * @throws NamingException if something goes wrong while accessing the db
      */
-    boolean evaluate( ExprNode filter, BigInteger id ) throws NamingException;
+    boolean evaluate( ExprNode filter, Long id ) throws NamingException;
 }

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=517448&r1=517447&r2=517448
==============================================================================
--- 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 Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree;
 
 
-import java.math.BigInteger;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
@@ -138,7 +137,7 @@
         // resusitate the entry if it has not been and set entry in IndexRecord
         if ( null == record.getAttributes() )
         {
-            Attributes attrs = db.lookup( (BigInteger)record.getEntryId() );
+            Attributes attrs = db.lookup( (Long)record.getEntryId() );
             record.setAttributes( attrs );
         }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AttributesTableModel.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AttributesTableModel.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AttributesTableModel.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/AttributesTableModel.java Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree.gui;
 
 
-import java.math.BigInteger;
 import java.util.ArrayList;
 
 import javax.naming.NamingEnumeration;
@@ -52,7 +51,7 @@
     /** the attributes for the entry */
     private final Attributes entry;
     /** the unique id of the entry  */
-    private final BigInteger id;
+    private final Long id;
     /** the distinguished name of the entry */
     private final String dn;
     /** whether or not the model is mutable */
@@ -67,7 +66,7 @@
      * @param dn the distinguished name of the entry
      * @param isMutable whether or not the model can be changed
      */
-    public AttributesTableModel(Attributes entry, BigInteger id, String dn, boolean isMutable)
+    public AttributesTableModel(Attributes entry, Long id, String dn, boolean isMutable)
     {
         this.dn = dn;
         this.id = id;
@@ -235,7 +234,7 @@
      *
      * @return the unique id for the entry
      */
-    public BigInteger getEntryId()
+    public Long getEntryId()
     {
         return id;
     }

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=517448&r1=517447&r2=517448
==============================================================================
--- 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 Mon Mar 12 15:53:56 2007
@@ -20,7 +20,6 @@
 package org.apache.directory.server.core.partition.impl.btree.gui;
 
 
-import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -51,16 +50,16 @@
     private final EntryNode parent;
     private final Attributes entry;
     private final ArrayList children;
-    private final BigInteger id;
+    private final Long id;
 
 
-    public EntryNode(BigInteger id, EntryNode parent, BTreePartition partition, Attributes entry, HashMap map)
+    public EntryNode(Long id, EntryNode parent, BTreePartition partition, Attributes entry, HashMap map)
     {
         this( id, parent, partition, entry, map, null, null );
     }
 
 
-    public EntryNode(BigInteger id, EntryNode parent, BTreePartition db, Attributes entry, HashMap map,
+    public EntryNode(Long id, EntryNode parent, BTreePartition db, Attributes entry, HashMap map,
         ExprNode exprNode, SearchEngine engine)
     {
         this.partition = db;
@@ -98,12 +97,12 @@
 
                 if ( engine != null && exprNode != null )
                 {
-                    if ( db.getChildCount( (BigInteger)rec.getEntryId() ) == 0 )
+                    if ( db.getChildCount( (Long)rec.getEntryId() ) == 0 )
                     {
-                        if ( engine.evaluate( exprNode, (BigInteger)rec.getEntryId() ) )
+                        if ( engine.evaluate( exprNode, (Long)rec.getEntryId() ) )
                         {
-                            Attributes newEntry = db.lookup( (BigInteger)rec.getEntryId() );
-                            EntryNode child = new EntryNode( (BigInteger)rec.getEntryId(), this, db, newEntry, map, exprNode,
+                            Attributes newEntry = db.lookup( (Long)rec.getEntryId() );
+                            EntryNode child = new EntryNode( (Long)rec.getEntryId(), this, db, newEntry, map, exprNode,
                                 engine );
                             children.add( child );
                         }
@@ -114,15 +113,15 @@
                     }
                     else
                     {
-                        Attributes newEntry = db.lookup( (BigInteger)rec.getEntryId() );
-                        EntryNode child = new EntryNode( (BigInteger)rec.getEntryId(), this, db, newEntry, map, exprNode, engine );
+                        Attributes newEntry = db.lookup( (Long)rec.getEntryId() );
+                        EntryNode child = new EntryNode( (Long)rec.getEntryId(), this, db, newEntry, map, exprNode, engine );
                         children.add( child );
                     }
                 }
                 else
                 {
-                    Attributes newEntry = db.lookup( (BigInteger)rec.getEntryId() );
-                    EntryNode child = new EntryNode( (BigInteger)rec.getEntryId(), this, db, newEntry, map );
+                    Attributes newEntry = db.lookup( (Long)rec.getEntryId() );
+                    EntryNode child = new EntryNode( (Long)rec.getEntryId(), this, db, newEntry, map );
                     children.add( child );
                 }
             }
@@ -215,7 +214,7 @@
     }
 
 
-    public BigInteger getEntryId()
+    public Long getEntryId()
     {
         return id;
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Mon Mar 12 15:53:56 2007
@@ -29,7 +29,6 @@
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
-import java.math.BigInteger;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
@@ -660,7 +659,7 @@
         {
             IndexRecord rec = ( IndexRecord ) cursor.next();
             row[0] = rec.getEntryId();
-            row[1] = partition.getEntryDn( ( BigInteger ) row[0] );
+            row[1] = partition.getEntryDn( ( Long ) row[0] );
             tableModel.addRow( row );
             count++;
         }
@@ -704,7 +703,7 @@
     }
 
 
-    public void selectTreeNode( BigInteger id )
+    public void selectTreeNode( Long id )
     {
         Stack stack = new Stack();
         Object[] comps = null;
@@ -851,7 +850,7 @@
     }
 
 
-    void displayEntry( BigInteger id, Attributes entry ) throws Exception
+    void displayEntry( Long id, Attributes entry ) throws Exception
     {
         String dn = partition.getEntryUpdn( id );
         AttributesTableModel model = new AttributesTableModel( entry, id, dn, false );
@@ -870,7 +869,7 @@
         nodes = new HashMap();
 
         Attributes suffix = partition.getSuffixEntry();
-        BigInteger id = partition.getEntryId( partition.getSuffix().toString() );
+        Long id = partition.getEntryId( partition.getSuffix().toString() );
         root = new EntryNode( id, null, partition, suffix, nodes );
 
         /*

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/SearchResultDialog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/SearchResultDialog.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/SearchResultDialog.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/SearchResultDialog.java Mon Mar 12 15:53:56 2007
@@ -24,7 +24,6 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.WindowEvent;
-import java.math.BigInteger;
 
 import javax.swing.JButton;
 import javax.swing.JDialog;
@@ -158,7 +157,7 @@
         {
             if ( selectionModel.isSelectedIndex( ii ) && !an_event.getValueIsAdjusting() )
             {
-                BigInteger id = ( BigInteger ) m_resultsTbl.getModel().getValueAt( ii, 0 );
+                Long id = ( Long ) m_resultsTbl.getModel().getValueAt( ii, 0 );
                 ( ( PartitionFrame ) getParent() ).selectTreeNode( id );
             }
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Mon Mar 12 15:53:56 2007
@@ -21,7 +21,6 @@
 
 
 import java.io.File;
-import java.math.BigInteger;
 import java.util.Iterator;
 import java.util.List;
 
@@ -265,31 +264,31 @@
     }
 
 
-    public final BigInteger getEntryId( String dn ) throws NamingException
+    public final Long getEntryId( String dn ) throws NamingException
     {
         return store.getEntryId( dn );
     }
 
 
-    public final String getEntryDn( BigInteger id ) throws NamingException
+    public final String getEntryDn( Long id ) throws NamingException
     {
         return store.getEntryDn( id );
     }
 
 
-    public final BigInteger getParentId( String dn ) throws NamingException
+    public final Long getParentId( String dn ) throws NamingException
     {
         return store.getParentId( dn );
     }
 
 
-    public final BigInteger getParentId( BigInteger childId ) throws NamingException
+    public final Long getParentId( Long childId ) throws NamingException
     {
         return store.getParentId( childId );
     }
 
 
-    public final String getEntryUpdn( BigInteger id ) throws NamingException
+    public final String getEntryUpdn( Long id ) throws NamingException
     {
         return store.getEntryUpdn( id );
     }
@@ -313,25 +312,25 @@
     }
 
 
-    public final Attributes lookup( BigInteger id ) throws NamingException
+    public final Attributes lookup( Long id ) throws NamingException
     {
         return store.lookup( id );
     }
 
 
-    public final void delete( BigInteger id ) throws NamingException
+    public final void delete( Long id ) throws NamingException
     {
         store.delete( id );
     }
 
 
-    public final NamingEnumeration list( BigInteger id ) throws NamingException
+    public final NamingEnumeration list( Long id ) throws NamingException
     {
         return store.list( id );
     }
 
 
-    public final int getChildCount( BigInteger id ) throws NamingException
+    public final int getChildCount( Long id ) throws NamingException
     {
         return store.getChildCount( id );
     }
@@ -366,7 +365,7 @@
     }
 
 
-    public final Attributes getIndices( BigInteger id ) throws NamingException
+    public final Attributes getIndices( Long id ) throws NamingException
     {
         return store.getIndices( id );
     }

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeEnumerationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeEnumerationTest.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeEnumerationTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeEnumerationTest.java Mon Mar 12 15:53:56 2007
@@ -22,15 +22,16 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.math.BigInteger;
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.ldap.util.LongComparator;
+
 import jdbm.RecordManager;
 import jdbm.btree.BTree;
 import jdbm.recman.BaseRecordManager;
 
-import org.apache.directory.shared.ldap.util.BigIntegerComparator;
+//import org.apache.directory.shared.ldap.util.BigIntegerComparator;
 
 import junit.framework.TestCase;
 
@@ -53,7 +54,7 @@
     {
         tempFile = File.createTempFile( "jdbm", "test" );
         rm = new BaseRecordManager( tempFile.getAbsolutePath() );
-        tree = BTree.createInstance( rm, new BigIntegerComparator() );
+        tree = BTree.createInstance( rm, new LongComparator() );
     }
     
     protected void tearDown() throws Exception
@@ -73,7 +74,7 @@
     
     public void testOneElement() throws IOException, NamingException
     {
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         BTreeEnumeration bte = new BTreeEnumeration( tree );
         assertTrue( bte.hasMore() );
@@ -91,32 +92,32 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
         BTreeEnumeration bte = new BTreeEnumeration( tree );
 
         assertTrue( bte.hasMore() );
-        assertEquals( new BigInteger( "1" ), bte.next() );
+        assertEquals( 1L, bte.next() );
 
         assertTrue( bte.hasMore() );
-        assertEquals( new BigInteger( "2" ), bte.next() );
+        assertEquals( 2L, bte.next() );
 
         assertTrue( bte.hasMore() );
-        assertEquals( new BigInteger( "4" ), bte.next() );
+        assertEquals( 4L, bte.next() );
 
         assertTrue( bte.hasMore() );
-        assertEquals( new BigInteger( "5" ), bte.next() );
+        assertEquals( 5L, bte.next() );
 
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeIteratorTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeIteratorTest.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeIteratorTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeIteratorTest.java Mon Mar 12 15:53:56 2007
@@ -22,15 +22,16 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.math.BigInteger;
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.ldap.util.LongComparator;
+
 import jdbm.RecordManager;
 import jdbm.btree.BTree;
 import jdbm.recman.BaseRecordManager;
 
-import org.apache.directory.shared.ldap.util.BigIntegerComparator;
+//import org.apache.directory.shared.ldap.util.BigIntegerComparator;
 
 import junit.framework.TestCase;
 
@@ -53,7 +54,7 @@
     {
         tempFile = File.createTempFile( "jdbm", "test" );
         rm = new BaseRecordManager( tempFile.getAbsolutePath() );
-        tree = BTree.createInstance( rm, new BigIntegerComparator() );
+        tree = BTree.createInstance( rm, new LongComparator() );
     }
     
     protected void tearDown() throws Exception
@@ -73,7 +74,7 @@
     
     public void testOneElement() throws IOException, NamingException
     {
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         BTreeIterator bte = new BTreeIterator( tree, true );
         assertTrue( bte.hasNext() );
@@ -91,32 +92,32 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
         BTreeIterator bte = new BTreeIterator( tree, true );
 
         assertTrue( bte.hasNext() );
-        assertEquals( new BigInteger( "1" ), bte.next() );
+        assertEquals( 1L, bte.next() );
 
         assertTrue( bte.hasNext() );
-        assertEquals( new BigInteger( "2" ), bte.next() );
+        assertEquals( 2L, bte.next() );
 
         assertTrue( bte.hasNext() );
-        assertEquals( new BigInteger( "4" ), bte.next() );
+        assertEquals( 4L, bte.next() );
 
         assertTrue( bte.hasNext() );
-        assertEquals( new BigInteger( "5" ), bte.next() );
+        assertEquals( 5L, bte.next() );
 
         assertFalse( "iterator consumed should not have elements", bte.hasNext() );
     }
@@ -131,32 +132,32 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
         BTreeIterator bte = new BTreeIterator( tree, false );
 
         assertTrue( bte.hasNext() );
-        assertEquals( new BigInteger( "5" ), bte.next() );
+        assertEquals( 5L, bte.next() );
 
         assertTrue( bte.hasNext() );
-        assertEquals( new BigInteger( "4" ), bte.next() );
+        assertEquals( 4L, bte.next() );
 
         assertTrue( bte.hasNext() );
-        assertEquals( new BigInteger( "2" ), bte.next() );
+        assertEquals( 2L, bte.next() );
 
         assertTrue( bte.hasNext() );
-        assertEquals( new BigInteger( "1" ), bte.next() );
+        assertEquals( 1L, bte.next() );
 
         assertFalse( "iterator consumed should not have elements", bte.hasNext() );
     }

Modified: directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumerationTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumerationTest.java?view=diff&rev=517448&r1=517447&r2=517448
==============================================================================
--- directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumerationTest.java (original)
+++ directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/BTreeTupleEnumerationTest.java Mon Mar 12 15:53:56 2007
@@ -22,7 +22,6 @@
 
 import java.io.File;
 import java.io.IOException;
-import java.math.BigInteger;
 
 import javax.naming.NamingException;
 
@@ -31,7 +30,8 @@
 import jdbm.recman.BaseRecordManager;
 
 import org.apache.directory.server.core.partition.impl.btree.Tuple;
-import org.apache.directory.shared.ldap.util.BigIntegerComparator;
+import org.apache.directory.shared.ldap.util.LongComparator;
+//import org.apache.directory.shared.ldap.util.BigIntegerComparator;
 
 import junit.framework.TestCase;
 
@@ -54,7 +54,7 @@
     {
         tempFile = File.createTempFile( "jdbm", "test" );
         rm = new BaseRecordManager( tempFile.getAbsolutePath() );
-        tree = BTree.createInstance( rm, new BigIntegerComparator() );
+        tree = BTree.createInstance( rm, new LongComparator() );
     }
     
     protected void tearDown() throws Exception
@@ -67,19 +67,19 @@
 
     public void testEmptyBTree() throws NamingException
     {
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, BigInteger.ONE );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, 1L );
         assertFalse( "enumeration on empty btree should not have elements", bte.hasMore() );
     }
     
     
     public void testOneElement() throws IOException, NamingException
     {
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, BigInteger.ONE );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, 1L );
         assertTrue( bte.hasMore() );
         Tuple tuple = ( Tuple ) bte.next();
-        assertEquals( BigInteger.ONE, tuple.getKey() );
+        assertEquals( 1L, tuple.getKey() );
         assertEquals( value, tuple.getValue() );
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }
@@ -94,39 +94,39 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, BigInteger.ONE );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, 1L );
         
         Tuple tuple = ( Tuple ) bte.next();
         assertTrue( bte.hasMore() );
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "1" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 1L, tuple.getValue() );
 
         bte.next();
         assertTrue( bte.hasMore() );
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "2" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 2L, tuple.getValue() );
 
         bte.next();
         assertTrue( bte.hasMore() );
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "4" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 4L, tuple.getValue() );
 
         bte.next();
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "5" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 5L, tuple.getValue() );
 
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }
@@ -141,30 +141,30 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new BigIntegerComparator(), 
-            BigInteger.ONE, new BigInteger( "3" ), false );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new LongComparator(), 
+            1L, 3L, false );
         
         Tuple tuple = ( Tuple ) bte.next();
         assertTrue( bte.hasMore() );
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "2" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 2L, tuple.getValue() );
 
         bte.next();
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "1" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 1L, tuple.getValue() );
 
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }
@@ -179,21 +179,21 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new BigIntegerComparator(), 
-            BigInteger.ONE, BigInteger.ZERO, false );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new LongComparator(), 
+            1L, 0L, false );
         
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }
@@ -208,25 +208,25 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new BigIntegerComparator(), 
-            BigInteger.ONE, BigInteger.ONE, false );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new LongComparator(), 
+            1L, 1L, false );
         
         Tuple tuple = ( Tuple ) bte.next();
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "1" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 1L, tuple.getValue() );
 
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }
@@ -241,30 +241,30 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new BigIntegerComparator(), 
-            BigInteger.ONE, new BigInteger( "3" ), true );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new LongComparator(), 
+            1L, 3L, true );
         
         Tuple tuple = ( Tuple ) bte.next();
         assertTrue( bte.hasMore() );
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "4" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 4L, tuple.getValue() );
 
         bte.next();
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "5" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 5L, tuple.getValue() );
 
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }
@@ -279,21 +279,21 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new BigIntegerComparator(), 
-            BigInteger.ONE, new BigInteger( "6" ), true );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new LongComparator(), 
+            1L, 6L, true );
         
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }
@@ -308,25 +308,25 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new BigIntegerComparator(), 
-            BigInteger.ONE, new BigInteger( "5" ), true );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new LongComparator(), 
+            1L, 5L, true );
         
         Tuple tuple = ( Tuple ) bte.next();
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "5" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 5L, tuple.getValue() );
 
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }
@@ -341,35 +341,35 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new BigIntegerComparator(), 
-            BigInteger.ONE, new BigInteger( "4" ), false );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new LongComparator(), 
+            1L, 4L, false );
         
         Tuple tuple = ( Tuple ) bte.next();
         assertTrue( bte.hasMore() );
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "4" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 4L, tuple.getValue() );
 
         bte.next();
         assertTrue( bte.hasMore() );
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "2" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 2L, tuple.getValue() );
 
         bte.next();
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "1" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 1L, tuple.getValue() );
 
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }
@@ -384,30 +384,30 @@
          * 4, -
          * 5, -
          */
-        BigInteger value = new BigInteger( "1" );
+        Long value = 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
-        value = value.add( BigInteger.ONE );
+        value += 1L;
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
 
-        value = value.add( BigInteger.ONE );
+        value += 1L;
         tree.insert( value, EMPTY_BYTES, true );
         
-        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new BigIntegerComparator(), 
-            BigInteger.ONE, new BigInteger( "4" ), true );
+        BTreeTupleEnumeration bte = new BTreeTupleEnumeration( tree, new LongComparator(), 
+            1L, 4L, true );
         
         Tuple tuple = ( Tuple ) bte.next();
         assertTrue( bte.hasMore() );
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "4" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 4L, tuple.getValue() );
 
         bte.next();
-        assertEquals( BigInteger.ONE, tuple.getKey() );
-        assertEquals( new BigInteger( "5" ), tuple.getValue() );
+        assertEquals( 1L, tuple.getKey() );
+        assertEquals( 5L, tuple.getValue() );
 
         assertFalse( "enumeration consumed should not have elements", bte.hasMore() );
     }



Mime
View raw message