directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1378653 [5/5] - in /directory: apacheds/branches/apacheds-mvbt/core-annotations/src/main/java/org/apache/directory/server/core/factory/ apacheds/branches/apacheds-mvbt/core-api/src/main/java/org/apache/directory/server/core/api/partition/ ...
Date Wed, 29 Aug 2012 17:13:59 GMT
Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java?rev=1378653&r1=1378652&r2=1378653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
Wed Aug 29 17:13:56 2012
@@ -26,7 +26,6 @@ import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.UUID;
 
 import javax.swing.tree.TreeNode;
 
@@ -52,16 +51,17 @@ public class EntryNode implements TreeNo
     private final EntryNode parent;
     private final Entry entry;
     private final ArrayList<TreeNode> children;
-    private final UUID id;
+    private final String id;
 
 
-    public EntryNode( UUID id, EntryNode parent, AbstractBTreePartition partition, Entry
entry, Map<UUID, EntryNode> map )
+    public EntryNode( String id, EntryNode parent, AbstractBTreePartition partition, Entry
entry,
+        Map<String, EntryNode> map )
     {
         this( id, parent, partition, entry, map, null, null );
     }
 
 
-    public EntryNode( UUID id, EntryNode parent, AbstractBTreePartition db, Entry entry,
Map<UUID, EntryNode> map,
+    public EntryNode( String id, EntryNode parent, AbstractBTreePartition db, Entry entry,
Map<String, EntryNode> map,
         ExprNode exprNode, SearchEngine engine )
     {
         this.partition = db;
@@ -81,7 +81,7 @@ public class EntryNode implements TreeNo
         try
         {
             List<ForwardIndexEntry> recordForwards = new ArrayList<ForwardIndexEntry>();
-            Cursor<IndexEntry<UUID, UUID>> childList = db.list( id );
+            Cursor<IndexEntry<String, String>> childList = db.list( id );
 
             while ( childList.next() )
             {
@@ -101,14 +101,14 @@ public class EntryNode implements TreeNo
 
                 if ( engine != null && exprNode != null )
                 {
-                    if ( db.getChildCount( ( UUID ) rec.getId() ) == 0 )
+                    if ( db.getChildCount( ( String ) rec.getId() ) == 0 )
                     {
                         Evaluator evaluator = engine.evaluator( exprNode );
 
                         if ( evaluator.evaluate( rec ) )
                         {
-                            Entry newEntry = db.lookup( ( UUID ) rec.getId() );
-                            EntryNode child = new EntryNode( ( UUID ) rec.getId(), this,
db, newEntry, map, exprNode,
+                            Entry newEntry = db.lookup( ( String ) rec.getId() );
+                            EntryNode child = new EntryNode( ( String ) rec.getId(), this,
db, newEntry, map, exprNode,
                                 engine );
                             children.add( child );
                         }
@@ -119,16 +119,16 @@ public class EntryNode implements TreeNo
                     }
                     else
                     {
-                        Entry newEntry = db.lookup( ( UUID ) rec.getId() );
-                        EntryNode child = new EntryNode( ( UUID ) rec.getId(), this, db,
newEntry, map, exprNode,
+                        Entry newEntry = db.lookup( ( String ) rec.getId() );
+                        EntryNode child = new EntryNode( ( String ) rec.getId(), this, db,
newEntry, map, exprNode,
                             engine );
                         children.add( child );
                     }
                 }
                 else
                 {
-                    Entry newEntry = db.lookup( ( UUID ) rec.getId() );
-                    EntryNode child = new EntryNode( ( UUID ) rec.getId(), this, db, newEntry,
map );
+                    Entry newEntry = db.lookup( ( String ) rec.getId() );
+                    EntryNode child = new EntryNode( ( String ) rec.getId(), this, db, newEntry,
map );
                     children.add( child );
                 }
             }
@@ -220,7 +220,7 @@ public class EntryNode implements TreeNo
     }
 
 
-    public UUID getEntryId()
+    public String getEntryId()
     {
         return id;
     }

Modified: directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=1378653&r1=1378652&r2=1378653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
(original)
+++ directory/apacheds/branches/apacheds-mvbt/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
Wed Aug 29 17:13:56 2012
@@ -33,7 +33,6 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Stack;
-import java.util.UUID;
 
 import javax.naming.NamingException;
 import javax.swing.JFileChooser;
@@ -114,7 +113,7 @@ public class PartitionFrame extends JFra
     // Non Swing Stuff
     private AbstractBTreePartition partition;
     private boolean doCleanUp;
-    private Map<UUID, EntryNode> nodes;
+    private Map<String, EntryNode> nodes;
     private EntryNode root;
 
     /** A handle on the global schemaManager */
@@ -655,7 +654,7 @@ public class PartitionFrame extends JFra
             limitMax = Integer.parseInt( limit );
         }
 
-        Cursor<IndexEntry<UUID, UUID>> cursor = partition.getSearchEngine().cursor(
new Dn( base ),
+        Cursor<IndexEntry<String, String>> cursor = partition.getSearchEngine().cursor(
new Dn( base ),
             AliasDerefMode.DEREF_ALWAYS, root, searchScope );
         String[] cols = new String[2];
         cols[0] = "id";
@@ -667,7 +666,7 @@ public class PartitionFrame extends JFra
         {
             IndexEntry rec = cursor.get();
             row[0] = rec.getId();
-            row[1] = partition.getEntryDn( ( UUID ) row[0] ).getNormName();
+            row[1] = partition.getEntryDn( ( String ) row[0] ).getNormName();
             tableModel.addRow( row );
             count++;
         }
@@ -861,7 +860,7 @@ public class PartitionFrame extends JFra
     }
 
 
-    void displayEntry( UUID id, Entry entry ) throws Exception
+    void displayEntry( String id, Entry entry ) throws Exception
     {
         String dn = partition.getEntryDn( id ).getName();
         AttributesTableModel model = new AttributesTableModel( entry, id, dn, false );
@@ -878,10 +877,10 @@ public class PartitionFrame extends JFra
     private void load() throws Exception
     {
         // boolean doFiltered = false;
-        nodes = new HashMap<UUID, EntryNode>();
+        nodes = new HashMap<String, EntryNode>();
 
         Entry suffix = partition.lookup( partition.getEntryId( partition.getSuffixDn() )
);
-        UUID id = partition.getEntryId( partition.getSuffixDn() );
+        String id = partition.getEntryId( partition.getSuffixDn() );
         root = new EntryNode( id, null, partition, suffix, nodes );
 
         /*

Modified: directory/shared/branches/shared-mvbt/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/UuidComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-mvbt/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/UuidComparator.java?rev=1378653&r1=1378652&r2=1378653&view=diff
==============================================================================
--- directory/shared/branches/shared-mvbt/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/UuidComparator.java
(original)
+++ directory/shared/branches/shared-mvbt/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/schema/comparators/UuidComparator.java
Wed Aug 29 17:13:56 2012
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class UuidComparator extends SerializableComparator<UUID>
+public class UuidComparator extends SerializableComparator<String>
 {
     /** The serial version UID */
     private static final long serialVersionUID = 2L;

Modified: directory/shared/branches/shared-mvbt/util/src/main/java/org/apache/directory/shared/util/Strings.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-mvbt/util/src/main/java/org/apache/directory/shared/util/Strings.java?rev=1378653&r1=1378652&r2=1378653&view=diff
==============================================================================
--- directory/shared/branches/shared-mvbt/util/src/main/java/org/apache/directory/shared/util/Strings.java
(original)
+++ directory/shared/branches/shared-mvbt/util/src/main/java/org/apache/directory/shared/util/Strings.java
Wed Aug 29 17:13:56 2012
@@ -2192,8 +2192,8 @@ public final class Strings
      * @param value The least significant bits.
      * @return
      */
-    public static UUID getUUID( long value )
+    public static String getUUID( long value )
     {
-        return new UUID( 0, value );
+        return new UUID( 0, value ).toString();
     }
 }



Mime
View raw message