You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sa...@apache.org on 2011/11/09 18:18:54 UTC

svn commit: r1199875 [3/3] - in /directory/apacheds/branches/apacheds-txns: core-annotations/src/main/java/org/apache/directory/server/core/factory/ core-shared/src/main/java/org/apache/directory/server/core/shared/txn/ core-shared/src/main/java/org/ap...

Modified: directory/apacheds/branches/apacheds-txns/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-txns/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?rev=1199875&r1=1199874&r2=1199875&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java (original)
+++ directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java Wed Nov  9 17:18:53 2011
@@ -33,6 +33,7 @@ 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.naming.directory.SearchControls;
@@ -111,9 +112,9 @@ public class PartitionFrame extends JFra
     private JMenu indices = new JMenu();
 
     // Non Swing Stuff
-    private AbstractBTreePartition<Long> partition;
+    private AbstractBTreePartition partition;
     private boolean doCleanUp;
-    private Map<Long, EntryNode> nodes;
+    private Map<UUID, EntryNode> nodes;
     private EntryNode root;
 
     /** A handle on the global schemaManager */
@@ -126,7 +127,7 @@ public class PartitionFrame extends JFra
      * @param db the partition to view
      * @throws NamingException if there are problems accessing the partition
      */
-    public PartitionFrame( AbstractBTreePartition<Long> db, SchemaManager schemaManager ) throws Exception
+    public PartitionFrame( AbstractBTreePartition db, SchemaManager schemaManager ) throws Exception
     {
         partition = db;
         this.schemaManager = schemaManager;
@@ -654,7 +655,7 @@ public class PartitionFrame extends JFra
             limitMax = Integer.parseInt( limit );
         }
 
-        IndexCursor<Long, Entry, Long> cursor = partition.getSearchEngine().cursor( new Dn( base ),
+        IndexCursor<UUID> cursor = partition.getSearchEngine().cursor( new Dn( base ),
             AliasDerefMode.DEREF_ALWAYS, root, ctls );
         String[] cols = new String[2];
         cols[0] = "id";
@@ -666,7 +667,7 @@ public class PartitionFrame extends JFra
         {
             IndexEntry rec = ( IndexEntry ) cursor.get();
             row[0] = rec.getId();
-            row[1] = partition.getEntryDn( ( Long ) row[0] ).getNormName();
+            row[1] = partition.getEntryDn( (UUID)row[0] ).getNormName();
             tableModel.addRow( row );
             count++;
         }
@@ -860,7 +861,7 @@ public class PartitionFrame extends JFra
     }
 
 
-    void displayEntry( Long id, Entry entry ) throws Exception
+    void displayEntry( UUID id, Entry entry ) throws Exception
     {
         String dn = partition.getEntryDn( id ).getName();
         AttributesTableModel model = new AttributesTableModel( entry, id, dn, false );
@@ -877,10 +878,10 @@ public class PartitionFrame extends JFra
     private void load() throws Exception
     {
         // boolean doFiltered = false;
-        nodes = new HashMap<Long, EntryNode>();
+        nodes = new HashMap<UUID, EntryNode>();
 
         Entry suffix = partition.lookup( partition.getEntryId( partition.getSuffixDn() ) );
-        Long id = partition.getEntryId( partition.getSuffixDn() );
+        UUID id = partition.getEntryId( partition.getSuffixDn() );
         root = new EntryNode( id, null, partition, suffix, nodes );
 
         /*

Modified: directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexDialog.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexDialog.java?rev=1199875&r1=1199874&r2=1199875&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexDialog.java (original)
+++ directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexDialog.java Wed Nov  9 17:18:53 2011
@@ -87,10 +87,10 @@ public class IndexDialog<K, O, ID> exten
     private JLabel jLabel2 = new JLabel();
     private JButton scanBut = new JButton();
 
-    private Index<K, O, ID> index = null;
+    private Index<K> index = null;
 
 
-    public IndexDialog( Frame parent, boolean modal, Index<K, O, ID> index )
+    public IndexDialog( Frame parent, boolean modal, Index<K> index )
     {
         super( parent, modal );
         this.index = index;
@@ -98,7 +98,7 @@ public class IndexDialog<K, O, ID> exten
     }
 
 
-    public IndexDialog( Index<K, O, ID> index )
+    public IndexDialog( Index<K> index )
     {
         super();
         this.index = index;
@@ -289,7 +289,7 @@ public class IndexDialog<K, O, ID> exten
 
         try
         {
-            Cursor<IndexEntry<K, ID>> list;
+            Cursor<IndexEntry<K>> list;
 
             if ( scanType.equals( EQUALITY_CURSOR ) )
             {
@@ -297,7 +297,7 @@ public class IndexDialog<K, O, ID> exten
                 list.beforeFirst();
                 while ( list.next() )
                 {
-                    IndexEntry<K, ID> rec = list.get();
+                    IndexEntry<K> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -308,12 +308,12 @@ public class IndexDialog<K, O, ID> exten
             else if ( scanType.equals( GREATER_CURSOR ) )
             {
                 list = index.forwardCursor();
-                ForwardIndexEntry<K, ID> entry = new ForwardIndexEntry<K, ID>();
+                ForwardIndexEntry<K> entry = new ForwardIndexEntry<K>();
                 entry.setValue( key );
                 list.before( entry );
                 while ( list.next() )
                 {
-                    IndexEntry<K, ID> rec = list.get();
+                    IndexEntry<K> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -324,12 +324,12 @@ public class IndexDialog<K, O, ID> exten
             else if ( scanType.equals( LESS_CURSOR ) )
             {
                 list = index.forwardCursor();
-                ForwardIndexEntry<K, ID> entry = new ForwardIndexEntry<K, ID>();
+                ForwardIndexEntry<K> entry = new ForwardIndexEntry<K>();
                 entry.setValue( key );
                 list.after( entry );
                 while ( list.previous() )
                 {
-                    IndexEntry<K, ID> rec = list.get();
+                    IndexEntry<K> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -362,7 +362,7 @@ public class IndexDialog<K, O, ID> exten
                 list = index.forwardCursor();
                 while ( list.next() )
                 {
-                    IndexEntry<K, ID> rec = list.get();
+                    IndexEntry<K> rec = list.get();
                     row = new Object[2];
                     row[0] = rec.getValue();
                     row[1] = rec.getId();
@@ -404,7 +404,7 @@ public class IndexDialog<K, O, ID> exten
 
 
     @SuppressWarnings("unchecked")
-    public static void show( Index<?, Entry, Long> index )
+    public static void show( Index<?> index )
     {
         IndexDialog<?, Entry, Long> dialog = new IndexDialog( index );
         dialog.setVisible( true );

Modified: directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexUtils.java?rev=1199875&r1=1199874&r2=1199875&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexUtils.java (original)
+++ directory/apacheds/branches/apacheds-txns/xdbm-tools/src/main/java/org/apache/directory/server/xdbm/tools/IndexUtils.java Wed Nov  9 17:18:53 2011
@@ -35,13 +35,13 @@ import java.io.PrintStream;
  */
 public class IndexUtils
 {
-    public static void printContents( Index<?, Entry, Long> idx ) throws Exception
+    public static void printContents( Index<?> idx ) throws Exception
     {
         printContents( idx, System.out );
     }
 
 
-    public static void printContents( Index<?, Entry, Long> idx, OutputStream outputStream ) throws Exception
+    public static void printContents( Index<?> idx, OutputStream outputStream ) throws Exception
     {
         PrintStream out;
 
@@ -58,7 +58,7 @@ public class IndexUtils
             out = new PrintStream( outputStream );
         }
 
-        IndexCursor<?, Entry, Long> cursor = idx.forwardCursor();
+        IndexCursor<?> cursor = idx.forwardCursor();
         cursor.first();
         for ( Object entry : cursor )
         {