From: Roland Häder Date: Thu, 23 Apr 2020 19:49:49 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=eeda02632ea0260f9806ae53cf4fa24d1abaacd4;p=jbonuscard-core.git Continued: - sorted members 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 c3a6e06..478aded 100644 --- a/src/org/mxchange/jbonuscard/model/bonus_card/RoyalityCard.java +++ b/src/org/mxchange/jbonuscard/model/bonus_card/RoyalityCard.java @@ -75,6 +75,13 @@ public class RoyalityCard implements BonusCard { @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.REFRESH, optional = false) private Contact bonusCardContact; + /** + * Bonus card customer id + */ + @JoinColumn (name = "bonus_card_customer_id", referencedColumnName = "customer_id") + @OneToOne (targetEntity = ContactCustomer.class, cascade = CascadeType.REFRESH) + private Customer bonusCardCustomer; + /** * When this entry has been created */ @@ -90,13 +97,6 @@ public class RoyalityCard implements BonusCard { @Temporal (TemporalType.TIMESTAMP) private Date bonusCardEntryUpdated; - /** - * Bonus card customer id - */ - @JoinColumn (name = "bonus_card_customer_id", referencedColumnName = "customer_id") - @OneToOne (targetEntity = ContactCustomer.class, cascade = CascadeType.REFRESH) - private Customer bonusCardCustomer; - /** * Id number */ @@ -252,25 +252,25 @@ public class RoyalityCard implements BonusCard { } @Override - @SuppressWarnings ("ReturnOfDateField") - public Date getBonusCardEntryCreated () { - return this.bonusCardEntryCreated; + public Customer getBonusCardCustomer () { + return this.bonusCardCustomer; } @Override - @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setBonusCardEntryCreated (final Date bonusCardEntryCreated) { - this.bonusCardEntryCreated = bonusCardEntryCreated; + public void setBonusCardCustomer (final Customer bonusCardCustomer) { + this.bonusCardCustomer = bonusCardCustomer; } @Override - public Customer getBonusCardCustomer () { - return this.bonusCardCustomer; + @SuppressWarnings ("ReturnOfDateField") + public Date getBonusCardEntryCreated () { + return this.bonusCardEntryCreated; } @Override - public void setBonusCardCustomer (final Customer bonusCardCustomer) { - this.bonusCardCustomer = bonusCardCustomer; + @SuppressWarnings ("AssignmentToDateFieldFromParameter") + public void setBonusCardEntryCreated (final Date bonusCardEntryCreated) { + this.bonusCardEntryCreated = bonusCardEntryCreated; } @Override