From: Roland Häder Date: Sat, 7 Oct 2017 20:48:12 +0000 (+0200) Subject: Continued a bit: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=010042cc947f35549fe880b473be6bfa7aec1a40;p=jcontacts-business-core.git Continued a bit: - added timestamp when opening time has been created (the timestamp should be classically set in in EJB) Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontactsbusiness/model/opening_times/BusinessOpeningTimes.java b/src/org/mxchange/jcontactsbusiness/model/opening_times/BusinessOpeningTimes.java index 81af03c..241e817 100644 --- a/src/org/mxchange/jcontactsbusiness/model/opening_times/BusinessOpeningTimes.java +++ b/src/org/mxchange/jcontactsbusiness/model/opening_times/BusinessOpeningTimes.java @@ -56,10 +56,19 @@ public class BusinessOpeningTimes implements OpeningTimes { @Transient private static final long serialVersionUID = 19_578_871_756_871L; + /** + * When this opening time was created + */ + @Basic(optional = false) + @Column(name = "opening_times_created", nullable = false, updatable = false) + @Temporal (TemporalType.TIMESTAMP) + private Date openingCreated; + /** * Ending day of opening hours (if applyable) */ - @Column (name = "opening_times_end_day") + @Basic (optional = false) + @Column (name = "opening_times_end_day", nullable = false) @Enumerated (EnumType.STRING) private DayOfTheWeek openingEndDay; @@ -161,6 +170,18 @@ public class BusinessOpeningTimes implements OpeningTimes { return true; } + @Override + @SuppressWarnings ("ReturnOfDateField") + public Date getOpeningCreated () { + return this.openingCreated; + } + + @Override + @SuppressWarnings ("AssignmentToDateFieldFromParameter") + public void setOpeningCreated (final Date openingCreated) { + this.openingCreated = openingCreated; + } + @Override public DayOfTheWeek getOpeningEndDay () { return this.openingEndDay; diff --git a/src/org/mxchange/jcontactsbusiness/model/opening_times/OpeningTimes.java b/src/org/mxchange/jcontactsbusiness/model/opening_times/OpeningTimes.java index 3278c9e..42c9f80 100644 --- a/src/org/mxchange/jcontactsbusiness/model/opening_times/OpeningTimes.java +++ b/src/org/mxchange/jcontactsbusiness/model/opening_times/OpeningTimes.java @@ -27,6 +27,20 @@ import org.mxchange.jcontactsbusiness.model.opening_times.dayofweek.DayOfTheWeek */ public interface OpeningTimes extends Serializable { + /** + * Getter for opening time created timestamp + *

+ * @return Opening time created timestamp + */ + Date getOpeningCreated (); + + /** + * Setter for opening time created timestamp + *

+ * @param openingCreated Opening time created timestamp + */ + void setOpeningCreated (final Date openingCreated); + /** * Getter for id number *