@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
*/
@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
*/
}
@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