From 1785dd375fbacdda09a9a18ef36ad4e3e56de3b9 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Tue, 16 Jun 2009 10:48:51 +0000
Subject: [PATCH] Fix for issue 3912 (Default automatic Backup should be offered by the control panel)

---
 opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskEntry.java |   65 ++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 1 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskEntry.java b/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskEntry.java
index 279e541..ca1f636 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskEntry.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/tasks/TaskEntry.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Copyright 2008 Sun Microsystems, Inc.
+ *      Copyright 2008-2009 Sun Microsystems, Inc.
  */
 
 package org.opends.server.tools.tasks;
@@ -66,6 +66,7 @@
   private static Map<String, Message> mapAttrToDisplayName =
           new HashMap<String, Message>();
 
+  private int hashCode;
 
   // These attributes associated with the ds-task object
   // class are all handled explicitly below in the constructor
@@ -154,6 +155,68 @@
         }
       }
     }
+    hashCode += id.hashCode();
+    hashCode += className.hashCode();
+    hashCode += state.hashCode();
+    hashCode += schedStart.hashCode();
+    hashCode += actStart.hashCode();
+    hashCode += compTime.hashCode();
+    hashCode += depends.hashCode();
+    hashCode += depFailAct.hashCode();
+    hashCode += logs.hashCode();
+    hashCode += notifyErr.hashCode();
+    hashCode += notifyComp.hashCode();
+    hashCode += schedTab.hashCode();
+    hashCode += taskSpecificAttrValues.hashCode();
+  }
+
+  /**
+   * Retrieves a hash code for this task entry.
+   *
+   * @return  The hash code for this task entry.
+   */
+  @Override()
+  public int hashCode()
+  {
+    return hashCode;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override()
+  public boolean equals(Object o)
+  {
+    if (this == o)
+    {
+      return true;
+    }
+
+    if (o == null)
+    {
+      return false;
+    }
+
+    if (! (o instanceof TaskEntry))
+    {
+      return false;
+    }
+
+    TaskEntry e = (TaskEntry) o;
+
+    return e.id.equals(id) &&
+    e.className.equals(className) &&
+    e.state.equals(state) &&
+    e.schedStart.equals(schedStart) &&
+    e.actStart.equals(actStart) &&
+    e.compTime.equals(compTime) &&
+    e.depends.equals(depends) &&
+    e.depFailAct.equals(depFailAct) &&
+    e.logs.equals(logs) &&
+    e.notifyErr.equals(notifyErr) &&
+    e.notifyComp.equals(notifyComp) &&
+    e.schedTab.equals(schedTab) &&
+    e.taskSpecificAttrValues.equals(taskSpecificAttrValues);
   }
 
   /**

--
Gitblit v1.10.0