From b3e5fe9338dae5cd484f3d6c9e94f7460f6ee285 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 26 Apr 2020 18:25:57 +0200 Subject: [PATCH] Continued: - let's also compare primary keys MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- src/org/mxchange/jbonuscard/model/bonus_card/RoyalityCard.java | 3 +++ 1 file changed, 3 insertions(+) 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()); -- 2.39.5