]> git.mxchange.org Git - jproduct-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 19 Dec 2018 19:07:52 +0000 (20:07 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 19 Dec 2018 19:07:52 +0000 (20:07 +0100)
- added categoryUpdated property

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jproduct/model/category/Category.java
src/org/mxchange/jproduct/model/category/ProductCategory.java

index 9b916bad3ce54153436be639e4bb9fa1bd75ca46..4af172e2f1257d0c98ca7c82818db516fdcccf1b 100644 (file)
@@ -97,6 +97,20 @@ public interface Category extends Comparable<Category>, Serializable {
         */
        void setCategoryI18nKey (final String title);
 
+       /**
+        * Getter for updated timestamp
+        * <p>
+        * @return Updated timestamp
+        */
+       Date getCategoryUpdated ();
+
+       /**
+        * Setter for updated timestamp
+        * <p>
+        * @param categoryUpdated Updated timestamp
+        */
+       void setCategoryUpdated (final Date categoryUpdated);
+
        @Override
        boolean equals (final Object object);
 
index 195bdc67036fd2cecf74f69c5450a40f27dd42d1..0151345360f34c9662614e0e9570c50ef7799fd6 100644 (file)
@@ -86,6 +86,13 @@ public class ProductCategory implements Category {
        @Column (name = "category_in_statistics", nullable = false)
        private Boolean categoryShownInStatistics;
 
+       /**
+        * When this entry has been created
+        */
+       @Column (name = "category_updated")
+       @Temporal (TemporalType.TIMESTAMP)
+       private Date categoryUpdated;
+
        /**
         * Parent category
         */
@@ -206,6 +213,18 @@ public class ProductCategory implements Category {
                this.categoryShownInStatistics = categoryShownInStatistics;
        }
 
+       @Override
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getCategoryUpdated () {
+               return this.categoryUpdated;
+       }
+
+       @Override
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setCategoryUpdated (final Date categoryUpdated) {
+               this.categoryUpdated = categoryUpdated;
+       }
+
        @Override
        public Category getParentCategory () {
                return this.parentCategory;