From: Roland Häder Date: Sun, 26 Apr 2020 16:25:57 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b3e5fe9338dae5cd484f3d6c9e94f7460f6ee285;p=jbonuscard-core.git Continued: - let's also compare primary keys Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jbonuscard/model/bonus_card/RoyalityCard.java b/src/org/mxchange/jbonuscard/model/bonus_card/RoyalityCard.java index 478aded..2f9a1ce 100644 --- a/src/org/mxchange/jbonuscard/model/bonus_card/RoyalityCard.java +++ b/src/org/mxchange/jbonuscard/model/bonus_card/RoyalityCard.java @@ -220,6 +220,8 @@ public class RoyalityCard implements BonusCard { return false; } else if (!Objects.equals(this.getBonusCardCustomer(), other.getBonusCardCustomer())) { return false; + } else if (!Objects.equals(this.getBonusCardId(), other.getBonusCardId())) { + return false; } else if (!Objects.equals(this.getBonusCardIssuer(), other.getBonusCardIssuer())) { return false; } else if (!Objects.equals(this.getBonusCardNumber(), other.getBonusCardNumber())) { @@ -332,6 +334,7 @@ public class RoyalityCard implements BonusCard { hash = 13 * hash + Objects.hashCode(this.getBonusCardBarCode()); hash = 13 * hash + Objects.hashCode(this.getBonusCardContact()); hash = 13 * hash + Objects.hashCode(this.getBonusCardCustomer()); + hash = 13 * hash + Objects.hashCode(this.getBonusCardId()); hash = 13 * hash + Objects.hashCode(this.getBonusCardIssuer()); hash = 13 * hash + Objects.hashCode(this.getBonusCardNumber()); hash = 13 * hash + Objects.hashCode(this.getBonusCardPartner());