From aaee394b8c7fdcb653d09d35ea1a28e574632a22 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 08 May 2007 21:29:14 +0000
Subject: [PATCH] Do not display the replication monitoring information if there are no replicated suffixes.

---
 opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/BaseDNDescriptor.java |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/BaseDNDescriptor.java b/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/BaseDNDescriptor.java
index 1974a64..b23cc38 100644
--- a/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/BaseDNDescriptor.java
+++ b/opendj-sdk/opends/src/statuspanel/org/opends/statuspanel/BaseDNDescriptor.java
@@ -34,7 +34,7 @@
  * used by the classes in the DatabasesTableModel class.
  *
  */
-public class BaseDNDescriptor
+public class BaseDNDescriptor implements Comparable
 {
   /**
    * An enumeration describing the type of base DN for a given Database.
@@ -102,7 +102,6 @@
         getDatabase().getBackendID().equals(
             desc.getDatabase().getBackendID()) &&
         (getDatabase().getEntries() == desc.getDatabase().getEntries());
-
       }
     }
     else
@@ -118,8 +117,22 @@
   public int hashCode()
   {
     return (getType().toString() + getAgeOfOldestMissingChange() + getDn() +
-        getMissingChanges()).hashCode();
+        getDatabase().getBackendID() + getMissingChanges()).hashCode();
   }
+  /**
+   * {@inheritDoc}
+   */
+  public int compareTo(Object o)
+  {
+    int returnValue = -1;
+    if (o instanceof BaseDNDescriptor)
+    {
+      BaseDNDescriptor desc = (BaseDNDescriptor)o;
+      returnValue = desc.getDn().compareTo(getDn());
+    }
+    return returnValue;
+  }
+
 
   /**
    * Returns the number of missing changes in the replication topology for

--
Gitblit v1.10.0