From f30351411f5b7d951138dc9c607ea5ed39df1b91 Mon Sep 17 00:00:00 2001 From: Eric Long Date: Tue, 22 Jun 2021 15:09:41 -0400 Subject: [PATCH] 0005034: Initial load shows up as pending and loading at the same time --- .../symmetric/model/TableReloadStatus.java | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/symmetric-core/src/main/java/org/jumpmind/symmetric/model/TableReloadStatus.java b/symmetric-core/src/main/java/org/jumpmind/symmetric/model/TableReloadStatus.java index 516f879efc..bb1f43e1dc 100644 --- a/symmetric-core/src/main/java/org/jumpmind/symmetric/model/TableReloadStatus.java +++ b/symmetric-core/src/main/java/org/jumpmind/symmetric/model/TableReloadStatus.java @@ -35,6 +35,56 @@ public class TableReloadStatus { protected String lastUpdatedBy; protected Date lastUpdateTime = new Date(); + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + loadId; + result = prime * result + ((sourceNodeId == null) ? 0 : sourceNodeId.hashCode()); + result = prime * result + ((startTime == null) ? 0 : startTime.hashCode()); + result = prime * result + ((targetNodeId == null) ? 0 : targetNodeId.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + TableReloadStatus other = (TableReloadStatus) obj; + if (loadId != other.loadId) { + return false; + } + if (sourceNodeId == null) { + if (other.sourceNodeId != null) { + return false; + } + } else if (!sourceNodeId.equals(other.sourceNodeId)) { + return false; + } + if (startTime == null) { + if (other.startTime != null) { + return false; + } + } else if (!startTime.equals(other.startTime)) { + return false; + } + if (targetNodeId == null) { + if (other.targetNodeId != null) { + return false; + } + } else if (!targetNodeId.equals(other.targetNodeId)) { + return false; + } + return true; + } + public int getLoadId() { return loadId; }