From: Roland Häder Date: Tue, 14 Apr 2020 02:34:49 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=28c9b7b6538cfa536b38697c273d8efda28e1cac;p=jcontacts-business-core.git Continued: - renamed companyCreated to companyEntryCreated - added new field companyEntryUpdated Signed-off-by: Roland Häder --- 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