From 28c9b7b6538cfa536b38697c273d8efda28e1cac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 14 Apr 2020 04:34:49 +0200 Subject: [PATCH] Continued: - renamed companyCreated to companyEntryCreated - added new field companyEntryUpdated MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../model/basicdata/BasicData.java | 18 +++++++- .../model/basicdata/BusinessBasicData.java | 46 +++++++++++++------ 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/src/org/mxchange/jcontactsbusiness/model/basicdata/BasicData.java b/src/org/mxchange/jcontactsbusiness/model/basicdata/BasicData.java index 1b20a7d..1550aa7 100644 --- a/src/org/mxchange/jcontactsbusiness/model/basicdata/BasicData.java +++ b/src/org/mxchange/jcontactsbusiness/model/basicdata/BasicData.java @@ -123,14 +123,28 @@ public interface BasicData extends Comparable, Serializable { *

* @return Timestamp when this entry has been created */ - Date getCompanyCreated (); + Date getCompanyEntryCreated (); /** * Setter for timestamp when this entry has been created *

* @param contactCreated Timestamp when this entry has been created */ - void setCompanyCreated (final Date contactCreated); + void setCompanyEntryCreated (final Date contactCreated); + + /** + * Getter for timestamp when this entry has been updated + *

+ * @return Timestamp when this entry has been updated + */ + Date getCompanyEntryUpdated (); + + /** + * Setter for timestamp when this entry has been updated + *

+ * @param contactUpdated Timestamp when this entry has been updated + */ + void setCompanyEntryUpdated (final Date contactUpdated); /** * Getter for comments diff --git a/src/org/mxchange/jcontactsbusiness/model/basicdata/BusinessBasicData.java b/src/org/mxchange/jcontactsbusiness/model/basicdata/BusinessBasicData.java index 775a4b8..cef481b 100644 --- a/src/org/mxchange/jcontactsbusiness/model/basicdata/BusinessBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/model/basicdata/BusinessBasicData.java @@ -61,8 +61,7 @@ import org.mxchange.jusercore.model.user.User; @Table (name = "company_basic_data") @NamedQueries ( { - @NamedQuery (name = "AllBusinessData", query = "SELECT b FROM company_basic_data AS b ORDER BY b.basicDataId"), - } + @NamedQuery (name = "AllBusinessData", query = "SELECT b FROM company_basic_data AS b ORDER BY b.basicDataId"),} ) @SuppressWarnings ("PersistenceUnitPresent") public class BusinessBasicData implements BasicData { @@ -101,19 +100,26 @@ public class BusinessBasicData implements BasicData { @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.REFRESH) private Employable companyContactEmployee; + /** + * Company's main email address (example: info@company.com) + */ + @Column (name = "company_email_address", length = 100) + private String companyEmailAddress; + /** * Timestamp when this entry has been created */ @Basic (optional = false) @Temporal (TemporalType.TIMESTAMP) @Column (name = "company_entry_created", nullable = false, updatable = false) - private Date companyCreated; + private Date companyEntryCreated; /** - * Company's main email address (example: info@company.com) + * Timestamp when this entry has been updated */ - @Column (name = "company_email_address", length = 100) - private String companyEmailAddress; + @Temporal (TemporalType.TIMESTAMP) + @Column (name = "company_entry_updated", nullable = false, updatable = false) + private Date companyEntryUpdated; /** * Company's main fax numbers: +ccxxxxxxxxxx @@ -302,26 +308,38 @@ public class BusinessBasicData implements BasicData { this.companyContactEmployee = companyContactEmployee; } + @Override + public String getCompanyEmailAddress () { + return this.companyEmailAddress; + } + + @Override + public void setCompanyEmailAddress (final String companyEmailAddress) { + this.companyEmailAddress = companyEmailAddress; + } + @Override @SuppressWarnings ("ReturnOfDateField") - public Date getCompanyCreated () { - return this.companyCreated; + public Date getCompanyEntryCreated () { + return this.companyEntryCreated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setCompanyCreated (final Date companyCreated) { - this.companyCreated = companyCreated; + public void setCompanyEntryCreated (final Date companyEntryCreated) { + this.companyEntryCreated = companyEntryCreated; } @Override - public String getCompanyEmailAddress () { - return this.companyEmailAddress; + @SuppressWarnings ("ReturnOfDateField") + public Date getCompanyEntryUpdated () { + return this.companyEntryUpdated; } @Override - public void setCompanyEmailAddress (final String companyEmailAddress) { - this.companyEmailAddress = companyEmailAddress; + @SuppressWarnings ("AssignmentToDateFieldFromParameter") + public void setCompanyEntryUpdated (final Date companyEntryUpdated) { + this.companyEntryUpdated = companyEntryUpdated; } @Override -- 2.39.5