From a72c9ae69cb62b98260b43a2243d7c921640c869 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 28 Apr 2016 11:47:45 +0200 Subject: [PATCH] added field for last-locked reason --- .../model/customer/PizzaCustomer.java | 31 +++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java b/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java index d87fdd1..95f0b3c 100644 --- a/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java +++ b/src/org/mxchange/pizzaaplication/model/customer/PizzaCustomer.java @@ -29,6 +29,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Index; import javax.persistence.JoinColumn; +import javax.persistence.Lob; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToOne; @@ -103,7 +104,14 @@ public class PizzaCustomer implements Customer { */ @Column (name = "customer_last_locked") @Temporal (TemporalType.TIMESTAMP) - private Calendar customerLocked; + private Calendar customerLastLocked; + + /** + * Last locked reason + */ + @Lob + @Column (name = "customer_last_locked_reason") + private String customerLastLockedReason; /** * Customer number @@ -150,7 +158,8 @@ public class PizzaCustomer implements Customer { this.setCustomerContact(customer.getCustomerContact()); this.setCustomerCreated(customer.getCustomerCreated()); this.setCustomerId(customer.getCustomerId()); - this.setCustomerLocked(customer.getCustomerLocked()); + this.setCustomerLastLocked(customer.getCustomerLastLocked()); + this.setCustomerLastLockedReason(customer.getCustomerLastLockedReason()); this.setCustomerNumber(customer.getCustomerNumber()); } @@ -239,13 +248,23 @@ public class PizzaCustomer implements Customer { } @Override - public Calendar getCustomerLocked () { - return this.customerLocked; + public Calendar getCustomerLastLocked () { + return this.customerLastLocked; + } + + @Override + public void setCustomerLastLocked (final Calendar customerLastLocked) { + this.customerLastLocked = customerLastLocked; + } + + @Override + public String getCustomerLastLockedReason () { + return this.customerLastLockedReason; } @Override - public void setCustomerLocked (final Calendar customerLocked) { - this.customerLocked = customerLocked; + public void setCustomerLastLockedReason (final String customerLastLockedReason) { + this.customerLastLockedReason = customerLastLockedReason; } @Override -- 2.39.5