]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued a bit:
authorRoland Häder <roland@mxchange.org>
Sat, 7 Oct 2017 20:48:12 +0000 (22:48 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 7 Oct 2017 20:48:12 +0000 (22:48 +0200)
- added timestamp when opening time has been created (the timestamp should be
  classically set in in EJB)

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/model/opening_times/BusinessOpeningTimes.java
src/org/mxchange/jcontactsbusiness/model/opening_times/OpeningTimes.java

index 81af03c06b2cc37ee8c01d0f52811e86a2520428..241e817a748cedf890995fa4de578a829389522b 100644 (file)
@@ -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;
index 3278c9e7bb6be825e3d7fb588f59253b4daecf25..42c9f80df0071114e46a355c80f1661ee3fc6c83 100644 (file)
@@ -27,6 +27,20 @@ import org.mxchange.jcontactsbusiness.model.opening_times.dayofweek.DayOfTheWeek
  */
 public interface OpeningTimes extends Serializable {
 
+       /**
+        * Getter for opening time created timestamp
+        * <p>
+        * @return Opening time created timestamp
+        */
+       Date getOpeningCreated ();
+
+       /**
+        * Setter for opening time created timestamp
+        * <p>
+        * @param openingCreated Opening time created timestamp
+        */
+       void setOpeningCreated (final Date openingCreated);
+
        /**
         * Getter for id number
         * <p>