diff options
Diffstat (limited to 'src/main/java/org/onap/crud/event/GraphEvent.java')
-rw-r--r-- | src/main/java/org/onap/crud/event/GraphEvent.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/main/java/org/onap/crud/event/GraphEvent.java b/src/main/java/org/onap/crud/event/GraphEvent.java index 958c227..b189373 100644 --- a/src/main/java/org/onap/crud/event/GraphEvent.java +++ b/src/main/java/org/onap/crud/event/GraphEvent.java @@ -172,11 +172,28 @@ public class GraphEvent { public String toString() { return toJson(); } - + + @Override + public boolean equals(Object o){ + if(o == this){ + return true; + } + + if( !(o instanceof GraphEvent)){ + return false; + } + + GraphEvent graphEvent = (GraphEvent) o; + return this.dbTransactionId.equals( + graphEvent.getDbTransactionId()) + && this.timestamp == graphEvent.getTimestamp() + && this.operation.equals(graphEvent.getOperation() + ); + } + @Override public int hashCode() { - return Objects.hash(this.dbTransactionId, this.timestamp, this.edge, this.vertex, this.operation, - this.result); + return Objects.hash(this.dbTransactionId, this.timestamp, this.operation); } public String getObjectKey() { |