]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 16 Apr 2020 17:47:53 +0000 (19:47 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 16 Apr 2020 17:48:30 +0000 (19:48 +0200)
- renamed field employeeCreated to employeeEntryCreated
- added field employeeEntryUpdated

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/model/employee/BusinessEmployee.java
src/org/mxchange/jcontactsbusiness/model/employee/Employable.java

index 467454c1368a5fd113043f6c54d6756052ed188e..59e1c1241280880f67e6c8d9fee9b7fc79f079c8 100644 (file)
@@ -91,14 +91,6 @@ public class BusinessEmployee implements Employable {
        @OneToOne (targetEntity = BusinessBranchOffice.class, cascade = CascadeType.REFRESH)
        private BranchOffice employeeBranchOffice;
 
-       /**
-        * Timestamp when this entry has been created
-        */
-       @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "employee_entry_created", nullable = false, updatable = false)
-       private Date employeeCreated;
-
        /**
         * Department the employee works at
         */
@@ -112,6 +104,21 @@ public class BusinessEmployee implements Employable {
        @Column (name = "employee_email_address", length = 30)
        private String employeeEmailAddress;
 
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "employee_entry_created", nullable = false, updatable = false)
+       private Date employeeEntryCreated;
+
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "employee_entry_updated", insertable = false)
+       private Date employeeEntryUpdated;
+
        /**
         * Head quarters id number (if the employee works there)
         */
@@ -230,8 +237,7 @@ public class BusinessEmployee implements Employable {
                        // ... branch office
                        BranchOffices.compare(this.getEmployeeBranchOffice(), employable.getEmployeeBranchOffice()),
                        // ... next headquarters
-                       Headquarters.compare(this.getEmployeeHeadquarter(), employable.getEmployeeHeadquarter()),
-               };
+                       Headquarters.compare(this.getEmployeeHeadquarter(), employable.getEmployeeHeadquarter()),};
 
                // Check all values
                final int comparison = Comparables.checkAll(comparators);
@@ -283,18 +289,6 @@ public class BusinessEmployee implements Employable {
                this.employeeBranchOffice = employeeBranchOffice;
        }
 
-       @Override
-       @SuppressWarnings ("ReturnOfDateField")
-       public Date getEmployeeCreated () {
-               return this.employeeCreated;
-       }
-
-       @Override
-       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setEmployeeCreated (final Date employeeCreated) {
-               this.employeeCreated = employeeCreated;
-       }
-
        @Override
        public Department getEmployeeDepartment () {
                return this.employeeDepartment;
@@ -315,6 +309,30 @@ public class BusinessEmployee implements Employable {
                this.employeeEmailAddress = employeeEmailAddress;
        }
 
+       @Override
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getEmployeeEntryCreated () {
+               return this.employeeEntryCreated;
+       }
+
+       @Override
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setEmployeeEntryCreated (final Date employeeEntryCreated) {
+               this.employeeEntryCreated = employeeEntryCreated;
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getEmployeeEntryUpdated () {
+               return this.employeeEntryUpdated;
+       }
+
+       @Override
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setEmployeeEntryUpdated (final Date employeeEntryUpdated) {
+               this.employeeEntryUpdated = employeeEntryUpdated;
+       }
+
        @Override
        public Headquarter getEmployeeHeadquarter () {
                return this.employeeHeadquarter;
index 4d4d3574582983e41f614a40a3d413880ef563dc..2e9f33c9bd4ee7d88937a7def3c06a55e65e2213 100644 (file)
@@ -207,14 +207,28 @@ public interface Employable extends Comparable<Employable>, Serializable {
         * <p>
         * @return Timestamp when this entry has been created
         */
-       Date getEmployeeCreated ();
+       Date getEmployeeEntryCreated ();
 
        /**
         * Setter for timestamp when this entry has been created
         * <p>
         * @param employeeCreated Timestamp when this entry has been created
         */
-       void setEmployeeCreated (final Date employeeCreated);
+       void setEmployeeEntryCreated (final Date employeeCreated);
+
+       /**
+        * Getter for timestamp when this entry has been updated
+        * <p>
+        * @return Timestamp when this entry has been updated
+        */
+       Date getEmployeeEntryUpdated ();
+
+       /**
+        * Setter for timestamp when this entry has been updated
+        * <p>
+        * @param employeeUpdated Timestamp when this entry has been updated
+        */
+       void setEmployeeEntryUpdated (final Date employeeUpdated);
 
        @Override
        boolean equals (final Object object);