Fix equals and hashCode methods
[aai/champ.git] / champ-lib / champ-core / src / main / java / org / onap / aai / champcore / model / ChampRelationshipConstraint.java
index b8e8eef..5191ff8 100644 (file)
@@ -23,6 +23,7 @@ package org.onap.aai.champcore.model;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Optional;
 import java.util.Set;
 
@@ -135,4 +136,9 @@ public final class ChampRelationshipConstraint {
                
                return false;
        }
+
+       @Override
+       public int hashCode() {
+               return Objects.hash(getType(), getConnectionConstraints(), getPropertyConstraints());
+       }
 }