]> git.mxchange.org Git - jbonuscard-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 26 Apr 2020 16:25:57 +0000 (18:25 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 26 Apr 2020 16:25:57 +0000 (18:25 +0200)
- let's also compare primary keys

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jbonuscard/model/bonus_card/RoyalityCard.java

index 478adeddc8141441c4c8d623ca9831915856af5b..2f9a1cef1b2b10315685b74141243310537ef77e 100644 (file)
@@ -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());