Release dashboard image at version 2.1.0
[portal/ric-dashboard.git] / dashboard / webapp-backend / src / main / java / org / oransc / ric / portal / dashboard / model / StatsDetailsTransport.java
index d79644e..b3e1c69 100644 (file)
@@ -42,12 +42,6 @@ public class StatsDetailsTransport implements IDashboardResponse {
        public StatsDetailsTransport() {
        }
 
-       @Override
-       public String toString() {
-               return this.getClass().getName() + "[appId=" + getAppId() + ", appName=" + getAppName() + ", metricUrl="
-                               + getMetricUrl() + "]";
-       }
-
        public String getAppName() {
                return appName;
        }
@@ -63,4 +57,33 @@ public class StatsDetailsTransport implements IDashboardResponse {
        public void setMetricUrl(String metricUrl) {
                this.metricUrl = metricUrl;
        }
+
+       @Override
+       public String toString() {
+               return this.getClass().getName() + "[appId=" + getAppId() + ", appName=" + getAppName() + ", metricUrl="
+                               + getMetricUrl() + "]";
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               StatsDetailsTransport other = (StatsDetailsTransport) obj;
+               return appId == other.appId;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = super.hashCode();
+               result = prime * result + appId;
+               result = prime * result + ((appName == null) ? 0 : appName.hashCode());
+               result = prime * result + ((metricUrl == null) ? 0 : metricUrl.hashCode());
+               return result;
+       }
+
 }