From cb4c673b52401a78f218243097242867922857cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 19 Dec 2018 20:07:52 +0100 Subject: [PATCH] Continued: - added categoryUpdated property MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../jproduct/model/category/Category.java | 14 ++++++++++++++ .../model/category/ProductCategory.java | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/src/org/mxchange/jproduct/model/category/Category.java b/src/org/mxchange/jproduct/model/category/Category.java index 9b916ba..4af172e 100644 --- a/src/org/mxchange/jproduct/model/category/Category.java +++ b/src/org/mxchange/jproduct/model/category/Category.java @@ -97,6 +97,20 @@ public interface Category extends Comparable, Serializable { */ void setCategoryI18nKey (final String title); + /** + * Getter for updated timestamp + *

+ * @return Updated timestamp + */ + Date getCategoryUpdated (); + + /** + * Setter for updated timestamp + *

+ * @param categoryUpdated Updated timestamp + */ + void setCategoryUpdated (final Date categoryUpdated); + @Override boolean equals (final Object object); diff --git a/src/org/mxchange/jproduct/model/category/ProductCategory.java b/src/org/mxchange/jproduct/model/category/ProductCategory.java index 195bdc6..0151345 100644 --- a/src/org/mxchange/jproduct/model/category/ProductCategory.java +++ b/src/org/mxchange/jproduct/model/category/ProductCategory.java @@ -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; -- 2.39.5