]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 26 Apr 2020 17:15:41 +0000 (19:15 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 26 Apr 2020 17:15:41 +0000 (19:15 +0200)
- need to compare all entity properties in equals()/hashCode()
- renamed some fields from fooCreated to fooEntryCreated
- added some missing fooEntryUpdated fields

Signed-off-by: Roland Häder <roland@mxchange.org>
12 files changed:
src/org/mxchange/jcontactsbusiness/model/basicdata/BusinessBasicData.java
src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java
src/org/mxchange/jcontactsbusiness/model/department/BusinessDepartment.java
src/org/mxchange/jcontactsbusiness/model/department/Department.java
src/org/mxchange/jcontactsbusiness/model/employee/BusinessEmployee.java
src/org/mxchange/jcontactsbusiness/model/headquarter/BusinessHeadquarter.java
src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarter.java
src/org/mxchange/jcontactsbusiness/model/jobposition/EmployeePosition.java
src/org/mxchange/jcontactsbusiness/model/jobposition/HireableJobPosition.java
src/org/mxchange/jcontactsbusiness/model/logo/BusinessLogo.java
src/org/mxchange/jcontactsbusiness/model/logo/Logo.java
src/org/mxchange/jcontactsbusiness/model/opening_time/BusinessOpeningTime.java

index f7d26e53904169f3480e1dd637b9379fa3e1dddf..bad14b204e233a3f3001e0e4984c06b8b753e15e 100644 (file)
@@ -263,10 +263,34 @@ public class BusinessBasicData implements BasicData {
 
                if (!Objects.equals(this.getBasicDataId(), other.getBasicDataId())) {
                        return false;
-               } else if (!Objects.equals(this.getCompanyShortName(), other.getCompanyShortName())) {
+               } else if (!Objects.equals(this.getCompanyComments(), other.getCompanyComments())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyContactEmployee(), other.getCompanyContactEmployee())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyEmailAddress(), other.getCompanyEmailAddress())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyFaxNumber(), other.getCompanyFaxNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyFounder(), other.getCompanyFounder())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyHeadquarterData(), other.getCompanyHeadquarterData())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyLandLineNumber(), other.getCompanyLandLineNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyLogo(), other.getCompanyLogo())) {
                        return false;
                } else if (!Objects.equals(this.getCompanyName(), other.getCompanyName())) {
                        return false;
+               } else if (!Objects.equals(this.getCompanyRoadNumber(), other.getCompanyRoadNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyShortName(), other.getCompanyShortName())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyTaxNumber(), other.getCompanyTaxNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyUserOwner(), other.getCompanyUserOwner())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyWebsiteUrl(), other.getCompanyWebsiteUrl())) {
+                       return false;
                }
 
                return true;
@@ -463,8 +487,20 @@ public class BusinessBasicData implements BasicData {
                int hash = 3;
 
                hash = 37 * hash + Objects.hashCode(this.getBasicDataId());
-               hash = 37 * hash + Objects.hashCode(this.getCompanyShortName());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyComments());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyContactEmployee());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyEmailAddress());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyFaxNumber());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyFounder());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyHeadquarterData());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyLandLineNumber());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyLogo());
                hash = 37 * hash + Objects.hashCode(this.getCompanyName());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyRoadNumber());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyShortName());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyTaxNumber());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyUserOwner());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyWebsiteUrl());
 
                return hash;
        }
index e175dbec8d2c712ac187348d99f743f4ff57eb06..32ee4c9f8a615e01f360859c1d510241d4cee964 100644 (file)
@@ -369,22 +369,38 @@ public class BusinessBranchOffice implements BranchOffice {
 
                if (!Objects.equals(this.getBranchCity(), branchOffice.getBranchCity())) {
                        return false;
+               } else if (!Objects.equals(this.getBranchCompany(), branchOffice.getBranchCompany())) {
+                       return false;
+               } else if (!Objects.equals(this.getBranchContactEmployee(), branchOffice.getBranchContactEmployee())) {
+                       return false;
                } else if (!Objects.equals(this.getBranchCountry(), branchOffice.getBranchCountry())) {
                        return false;
+               } else if (!Objects.equals(this.getBranchEmailAddress(), branchOffice.getBranchEmailAddress())) {
+                       return false;
                } else if (!Objects.equals(this.getBranchHouseNumber(), branchOffice.getBranchHouseNumber())) {
                        return false;
                } else if (!Objects.equals(this.getBranchHouseNumberExtension(), branchOffice.getBranchHouseNumberExtension())) {
                        return false;
+               } else if (!Objects.equals(this.getBranchId(), branchOffice.getBranchId())) {
+                       return false;
+               } else if (!Objects.equals(this.getBranchLandLineNumber(), branchOffice.getBranchLandLineNumber())) {
+                       return false;
                } else if (!Objects.equals(this.getBranchLastHouseNumber(), branchOffice.getBranchLastHouseNumber())) {
                        return false;
                } else if (!Objects.equals(this.getBranchNumber(), branchOffice.getBranchNumber())) {
                        return false;
+               } else if (!Objects.equals(this.getBranchOpeningTimes(), branchOffice.getBranchOpeningTimes())) {
+                       return false;
+               } else if (!Objects.equals(this.getBranchOwnerEmployee(), branchOffice.getBranchOwnerEmployee())) {
+                       return false;
                } else if (!Objects.equals(this.getBranchStore(), branchOffice.getBranchStore())) {
                        return false;
                } else if (!Objects.equals(this.getBranchStreet(), branchOffice.getBranchStreet())) {
                        return false;
                } else if (!Objects.equals(this.getBranchSuiteNumber(), branchOffice.getBranchSuiteNumber())) {
                        return false;
+               } else if (!Objects.equals(this.getBranchUserOwner(), branchOffice.getBranchUserOwner())) {
+                       return false;
                } else if (!Objects.equals(this.getBranchZipCode(), branchOffice.getBranchZipCode())) {
                        return false;
                }
@@ -613,14 +629,23 @@ public class BusinessBranchOffice implements BranchOffice {
                int hash = 7;
 
                hash = 53 * hash + Objects.hashCode(this.getBranchCity());
+               hash = 53 * hash + Objects.hashCode(this.getBranchCompany());
+               hash = 53 * hash + Objects.hashCode(this.getBranchContactEmployee());
                hash = 53 * hash + Objects.hashCode(this.getBranchCountry());
-               hash = 53 * hash + Objects.hashCode(this.getBranchNumber());
+               hash = 53 * hash + Objects.hashCode(this.getBranchEmailAddress());
+               hash = 53 * hash + Objects.hashCode(this.getBranchFaxNumber());
                hash = 53 * hash + Objects.hashCode(this.getBranchHouseNumber());
                hash = 53 * hash + Objects.hashCode(this.getBranchHouseNumberExtension());
+               hash = 53 * hash + Objects.hashCode(this.getBranchId());
+               hash = 53 * hash + Objects.hashCode(this.getBranchLandLineNumber());
                hash = 53 * hash + Objects.hashCode(this.getBranchLastHouseNumber());
+               hash = 53 * hash + Objects.hashCode(this.getBranchNumber());
+               hash = 53 * hash + Objects.hashCode(this.getBranchOpeningTimes());
+               hash = 53 * hash + Objects.hashCode(this.getBranchOwnerEmployee());
                hash = 53 * hash + Objects.hashCode(this.getBranchStore());
                hash = 53 * hash + Objects.hashCode(this.getBranchStreet());
                hash = 53 * hash + Objects.hashCode(this.getBranchSuiteNumber());
+               hash = 53 * hash + Objects.hashCode(this.getBranchUserOwner());
                hash = 53 * hash + Objects.hashCode(this.getBranchZipCode());
 
                return hash;
index f8e0dc574405df432f766920e28535776fd24ca5..7c9092459786e8096d6a2236990c3614b3954e49 100644 (file)
@@ -88,8 +88,15 @@ public class BusinessDepartment implements Department {
         */
        @Basic (optional = false)
        @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "department_created", nullable = false, updatable = false)
-       private Date departmentCreated;
+       @Column (name = "department_entry_created", updatable = false, nullable = false)
+       private Date departmentEntryCreated;
+
+       /**
+        * Timestamp when this entry has been updated
+        */
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "department_entry_updated", insertable = false, nullable = false)
+       private Date departmentEntryUpdated;
 
        /**
         * Where this department is located
@@ -200,7 +207,7 @@ public class BusinessDepartment implements Department {
 
                final Department other = (Department) object;
 
-               if (!Objects.equals(this.getDepartmentId(), other.getDepartmentId())) {
+               if (!Objects.equals(this.getDepartmentBranchOffice(), other.getDepartmentBranchOffice())) {
                        return false;
                } else if (!Objects.equals(this.getDepartmentCompany(), other.getDepartmentCompany())) {
                        return false;
@@ -233,14 +240,26 @@ public class BusinessDepartment implements Department {
 
        @Override
        @SuppressWarnings ("ReturnOfDateField")
-       public Date getDepartmentCreated () {
-               return this.departmentCreated;
+       public Date getDepartmentEntryCreated () {
+               return this.departmentEntryCreated;
+       }
+
+       @Override
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setDepartmentEntryCreated (final Date departmentEntryCreated) {
+               this.departmentEntryCreated = departmentEntryCreated;
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getDepartmentEntryUpdated () {
+               return this.departmentEntryUpdated;
        }
 
        @Override
        @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setDepartmentCreated (final Date departmentCreated) {
-               this.departmentCreated = departmentCreated;
+       public void setDepartmentEntryUpdated (Date departmentEntryUpdated) {
+               this.departmentEntryUpdated = departmentEntryUpdated;
        }
 
        @Override
index 6c44c3554126a97d7696a8e223c9c64b42b88dd2..dcfa260f244ec78b208933357c8a8122af847a02 100644 (file)
@@ -134,14 +134,28 @@ public interface Department extends Comparable<Department>, Serializable {
         * <p>
         * @return Timestamp when this entry has been created
         */
-       Date getDepartmentCreated ();
+       Date getDepartmentEntryCreated ();
 
        /**
         * Setter for timestamp when this entry has been created
         * <p>
-        * @param departmentCreated Timestamp when this entry has been created
+        * @param departmentEntryCreated Timestamp when this entry has been created
         */
-       void setDepartmentCreated (final Date departmentCreated);
+       void setDepartmentEntryCreated (final Date departmentEntryCreated);
+
+       /**
+        * Getter for timestamp when this entry has been updated
+        * <p>
+        * @return Timestamp when this entry has been updated
+        */
+       Date getDepartmentEntryUpdated ();
+
+       /**
+        * Setter for timestamp when this entry has been updated
+        * <p>
+        * @param departmentEntryUpdated Timestamp when this entry has been updated
+        */
+       void setDepartmentEntryUpdated (final Date departmentEntryUpdated);
 
        @Override
        boolean equals (final Object object);
index 59e1c1241280880f67e6c8d9fee9b7fc79f079c8..38386dd8a90f1fffa74780106bba68762826b774 100644 (file)
@@ -220,9 +220,6 @@ public class BusinessEmployee implements Employable {
 
                // Init comparisons
                final int[] comparators = {
-                       // First employee's number
-                       // First employee's number
-                       // First employee's number
                        // First employee's number
                        StringUtils.compareIgnoreCase(this.getEmployeeNumber(), employable.getEmployeeNumber()),
                        // ... finally contact data
@@ -256,14 +253,30 @@ public class BusinessEmployee implements Employable {
 
                final Employable employee = (Employable) object;
 
-               if (!Objects.equals(this.getEmployeeId(), employee.getEmployeeId())) {
+               if (!Objects.equals(this.getEmployeeBasicData(), employee.getEmployeeBasicData())) {
+                       return false;
+               } else if (!Objects.equals(this.getEmployeeBranchOffice(), employee.getEmployeeBranchOffice())) {
+                       return false;
+               } else if (!Objects.equals(this.getEmployeeDepartment(), employee.getEmployeeDepartment())) {
+                       return false;
+               } else if (!Objects.equals(this.getEmployeeEmailAddress(), employee.getEmployeeEmailAddress())) {
+                       return false;
+               } else if (!Objects.equals(this.getEmployeeHeadquarter(), employee.getEmployeeHeadquarter())) {
                        return false;
-               } else if (!Objects.equals(this.getEmployeeBasicData(), employee.getEmployeeBasicData())) {
+               } else if (!Objects.equals(this.getEmployeeId(), employee.getEmployeeId())) {
+                       return false;
+               } else if (!Objects.equals(this.getEmployeeJobPosition(), employee.getEmployeeJobPosition())) {
+                       return false;
+               } else if (!Objects.equals(this.getEmployeeMobileNumber(), employee.getEmployeeMobileNumber())) {
                        return false;
                } else if (!Objects.equals(this.getEmployeeNumber(), employee.getEmployeeNumber())) {
                        return false;
                } else if (!Objects.equals(this.getEmployeePersonalData(), employee.getEmployeePersonalData())) {
                        return false;
+               } else if (!Objects.equals(this.getEmployeePhoneExtension(), employee.getEmployeePhoneExtension())) {
+                       return false;
+               } else if (!Objects.equals(this.getEmployeeUserOwner(), employee.getEmployeeUserOwner())) {
+                       return false;
                }
 
                return true;
@@ -417,10 +430,18 @@ public class BusinessEmployee implements Employable {
        public int hashCode () {
                int hash = 3;
 
-               hash = 97 * hash + Objects.hashCode(this.getEmployeeId());
                hash = 97 * hash + Objects.hashCode(this.getEmployeeBasicData());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeBranchOffice());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeDepartment());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeEmailAddress());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeHeadquarter());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeId());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeJobPosition());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeMobileNumber());
                hash = 97 * hash + Objects.hashCode(this.getEmployeeNumber());
                hash = 97 * hash + Objects.hashCode(this.getEmployeePersonalData());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeePhoneExtension());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeUserOwner());
 
                return hash;
        }
index 738d0d6c1d2ea9e68827948b3d4098caeed0b66a..f26e0af7ae3754a7b1f993cd6e2a15c4da83ef03 100644 (file)
@@ -102,19 +102,27 @@ public class BusinessHeadquarter implements Headquarter {
        @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false)
        private Country headquarterCountry;
 
+       /**
+        * Email address of headquarter
+        */
+       @Column (name = "headquarter_email_address")
+       private String headquarterEmailAddress;
+
        /**
         * Timestamp when this entry has been created
         */
        @Basic (optional = false)
        @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "headquarter_entry_created", nullable = false, updatable = false)
-       private Date headquarterCreated;
+       @Column (name = "headquarter_entry_created", updatable = false, nullable = false)
+       private Date headquarterEntryCreated;
 
        /**
-        * Email address of headquarter
+        * Timestamp when this entry has been updated
         */
-       @Column (name = "headquarter_email_address")
-       private String headquarterEmailAddress;
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "headquarter_entry_updated", insertable = false, nullable = false)
+       private Date headquarterEntryUpdated;
 
        /**
         * Headquarter' fax number
@@ -334,22 +342,36 @@ public class BusinessHeadquarter implements Headquarter {
 
                final Headquarter headquarter = (Headquarter) object;
 
-               if (!Objects.equals(this.getHeadquarterId(), headquarter.getHeadquarterId())) {
+               if (!Objects.equals(this.getHeadquarterCity(), headquarter.getHeadquarterCity())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquarterCompanyName(), headquarter.getHeadquarterCompanyName())) {
                        return false;
-               } else if (!Objects.equals(this.getHeadquarterCity(), headquarter.getHeadquarterCity())) {
+               } else if (!Objects.equals(this.getHeadquarterContactEmployee(), headquarter.getHeadquarterContactEmployee())) {
                        return false;
                } else if (!Objects.equals(this.getHeadquarterCountry(), headquarter.getHeadquarterCountry())) {
                        return false;
+               } else if (!Objects.equals(this.getHeadquarterEmailAddress(), headquarter.getHeadquarterEmailAddress())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquarterFaxNumber(), headquarter.getHeadquarterFaxNumber())) {
+                       return false;
                } else if (!Objects.equals(this.getHeadquarterHouseNumber(), headquarter.getHeadquarterHouseNumber())) {
                        return false;
+               } else if (!Objects.equals(this.getHeadquarterId(), headquarter.getHeadquarterId())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquarterLandLineNumber(), headquarter.getHeadquarterLandLineNumber())) {
+                       return false;
                } else if (!Objects.equals(this.getHeadquarterLastHouseNumber(), headquarter.getHeadquarterLastHouseNumber())) {
                        return false;
+               } else if (!Objects.equals(this.getHeadquarterOpeningTimes(), headquarter.getHeadquarterOpeningTimes())) {
+                       return false;
                } else if (!Objects.equals(this.getHeadquarterStore(), headquarter.getHeadquarterStore())) {
                        return false;
                } else if (!Objects.equals(this.getHeadquarterStreet(), headquarter.getHeadquarterStreet())) {
                        return false;
                } else if (!Objects.equals(this.getHeadquarterSuiteNumber(), headquarter.getHeadquarterSuiteNumber())) {
                        return false;
+               } else if (!Objects.equals(this.getHeadquarterUserOwner(), headquarter.getHeadquarterUserOwner())) {
+                       return false;
                } else if (!Objects.equals(this.getHeadquarterZipCode(), headquarter.getHeadquarterZipCode())) {
                        return false;
                }
@@ -397,26 +419,38 @@ public class BusinessHeadquarter implements Headquarter {
                this.headquarterCountry = headquarterCountry;
        }
 
+       @Override
+       public String getHeadquarterEmailAddress () {
+               return this.headquarterEmailAddress;
+       }
+
+       @Override
+       public void setHeadquarterEmailAddress (final String headquarterEmailAddress) {
+               this.headquarterEmailAddress = headquarterEmailAddress;
+       }
+
        @Override
        @SuppressWarnings ("ReturnOfDateField")
-       public Date getHeadquarterCreated () {
-               return this.headquarterCreated;
+       public Date getHeadquarterEntryCreated () {
+               return this.headquarterEntryCreated;
        }
 
        @Override
        @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setHeadquarterCreated (final Date headquarterCreated) {
-               this.headquarterCreated = headquarterCreated;
+       public void setHeadquarterEntryCreated (final Date headquarterEntryCreated) {
+               this.headquarterEntryCreated = headquarterEntryCreated;
        }
 
        @Override
-       public String getHeadquarterEmailAddress () {
-               return this.headquarterEmailAddress;
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getHeadquarterEntryUpdated () {
+               return this.headquarterEntryUpdated;
        }
 
        @Override
-       public void setHeadquarterEmailAddress (final String headquarterEmailAddress) {
-               this.headquarterEmailAddress = headquarterEmailAddress;
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setHeadquarterEntryUpdated (final Date headquarterEntryUpdated) {
+               this.headquarterEntryUpdated = headquarterEntryUpdated;
        }
 
        @Override
@@ -545,14 +579,22 @@ public class BusinessHeadquarter implements Headquarter {
        public int hashCode () {
                int hash = 7;
 
-               hash = 47 * hash + Objects.hashCode(this.getHeadquarterId());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterCity());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterCompanyName());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterContactEmployee());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterCountry());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterEmailAddress());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterFaxNumber());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterHouseNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterHouseNumberExtension());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterId());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterLandLineNumber());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterLastHouseNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterOpeningTimes());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterStore());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterStreet());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterSuiteNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquarterUserOwner());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterZipCode());
 
                return hash;
index f938fa86489ecb732305ac1aa454886d3ef26826..c9eff4ee29fc8a6caec9992b33a11bed6a15900d 100644 (file)
@@ -276,14 +276,28 @@ public interface Headquarter extends Comparable<Headquarter>, Serializable {
         * <p>
         * @return Timestamp when this entry has been created
         */
-       Date getHeadquarterCreated ();
+       Date getHeadquarterEntryCreated ();
 
        /**
         * Setter for timestamp when this entry has been created
         * <p>
-        * @param headquarterCreated Timestamp when this entry has been created
+        * @param headquarterEntryCreated Timestamp when this entry has been created
         */
-       void setHeadquarterCreated (final Date headquarterCreated);
+       void setHeadquarterEntryCreated (final Date headquarterEntryCreated);
+
+       /**
+        * Getter for timestamp when this entry has been updated
+        * <p>
+        * @return Timestamp when this entry has been updated
+        */
+       Date getHeadquarterEntryUpdated ();
+
+       /**
+        * Setter for timestamp when this entry has been updated
+        * <p>
+        * @param headquarterEntryUpdated Timestamp when this entry has been updated
+        */
+       void setHeadquarterEntryUpdated (final Date headquarterEntryUpdated);
 
        @Override
        boolean equals (final Object object);
index 12420a43d022d35ffc21942148e2e9212bd58b23..88de0ce9db3c28edd25fec15937296fd2b067471 100644 (file)
@@ -68,22 +68,29 @@ public class EmployeePosition implements HireableJobPosition {
         */
        @Basic (optional = false)
        @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "job_position_created", nullable = false, updatable = false)
-       private Date jobPositionCreated;
+       @Column (name = "job_position_entry_created", nullable = false, updatable = false)
+       private Date jobPositionEntryCreated;
 
        /**
         * When this job position (offer) was deleted
         */
-       @Column (name = "job_position_deleted")
+       @Column (name = "job_position_entry_deleted")
        @Temporal (TemporalType.TIMESTAMP)
-       private Date jobPositionDeleted;
+       private Date jobPositionEntryDeleted;
 
        /**
         * When this job position (offer) has expired
         */
-       @Column (name = "job_position_expired")
+       @Column (name = "job_position_entry_expired")
        @Temporal (TemporalType.TIMESTAMP)
-       private Date jobPositionExpired;
+       private Date jobPositionEntryExpired;
+
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "job_position_entry_updated", insertable = false)
+       private Date jobPositionEntryUpdated;
 
        /**
         * When a new employed was hired for this job position
@@ -123,13 +130,6 @@ public class EmployeePosition implements HireableJobPosition {
        @Enumerated (EnumType.STRING)
        private JobPositionStatus jobPositionStatus;
 
-       /**
-        * Timestamp when this entry has been created
-        */
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "job_position_updated", insertable = false)
-       private Date jobPositionUpdated;
-
        @Override
        public int compareTo (final HireableJobPosition jobPosition) {
                // Check parameter on null-reference and equality to this
@@ -168,11 +168,13 @@ public class EmployeePosition implements HireableJobPosition {
 
                final HireableJobPosition other = (HireableJobPosition) object;
 
-               if (!Objects.equals(this.getJobPositionId(), other.getJobPositionId())) {
+               if (!Objects.equals(this.getJobPositionAddedUser(), other.getJobPositionAddedUser())) {
+                       return false;
+               } else if (!Objects.equals(this.getJobPositionId(), other.getJobPositionId())) {
                        return false;
                } else if (!Objects.equals(this.getJobPositionName(), other.getJobPositionName())) {
                        return false;
-               } else if (!Objects.equals(this.getJobPositionAddedUser(), other.getJobPositionAddedUser())) {
+               } else if (!Objects.equals(this.getJobPositionStatus(), other.getJobPositionStatus())) {
                        return false;
                }
 
@@ -191,82 +193,82 @@ public class EmployeePosition implements HireableJobPosition {
 
        @Override
        @SuppressWarnings ("ReturnOfDateField")
-       public Date getJobPositionCreated () {
-               return this.jobPositionCreated;
+       public Date getJobPositionEntryCreated () {
+               return this.jobPositionEntryCreated;
        }
 
        @Override
        @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setJobPositionCreated (final Date jobPositionCreated) {
-               this.jobPositionCreated = jobPositionCreated;
+       public void setJobPositionEntryCreated (final Date jobPositionEntryCreated) {
+               this.jobPositionEntryCreated = jobPositionEntryCreated;
        }
 
        @Override
-       public Long getJobPositionId () {
-               return this.jobPositionId;
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getJobPositionEntryDeleted () {
+               return this.jobPositionEntryDeleted;
        }
 
        @Override
-       public void setJobPositionId (final Long jobPositionId) {
-               this.jobPositionId = jobPositionId;
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setJobPositionEntryDeleted (final Date jobPositionEntryDeleted) {
+               this.jobPositionEntryDeleted = jobPositionEntryDeleted;
        }
 
        @Override
-       public String getJobPositionName () {
-               return this.jobPositionName;
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getJobPositionEntryExpired () {
+               return this.jobPositionEntryExpired;
        }
 
        @Override
-       public void setJobPositionName (final String jobPositionName) {
-               this.jobPositionName = jobPositionName;
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setJobPositionEntryExpired (final Date jobPositionEntryExpired) {
+               this.jobPositionEntryExpired = jobPositionEntryExpired;
        }
 
        @Override
        @SuppressWarnings ("ReturnOfDateField")
-       public Date getJobPositionUpdated () {
-               return this.jobPositionUpdated;
+       public Date getJobPositionEntryUpdated () {
+               return this.jobPositionEntryUpdated;
        }
 
        @Override
        @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setJobPositionUpdated (final Date jobPositionUpdated) {
-               this.jobPositionUpdated = jobPositionUpdated;
+       public void setJobPositionEntryUpdated (final Date jobPositionEntryUpdated) {
+               this.jobPositionEntryUpdated = jobPositionEntryUpdated;
        }
 
        @Override
        @SuppressWarnings ("ReturnOfDateField")
-       public Date getJobPositionDeleted () {
-               return this.jobPositionDeleted;
+       public Date getJobPositionHired () {
+               return this.jobPositionHired;
        }
 
        @Override
        @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setJobPositionDeleted (final Date jobPositionDeleted) {
-               this.jobPositionDeleted = jobPositionDeleted;
+       public void setJobPositionHired (final Date jobPositionHired) {
+               this.jobPositionHired = jobPositionHired;
        }
 
        @Override
-       @SuppressWarnings ("ReturnOfDateField")
-       public Date getJobPositionExpired () {
-               return this.jobPositionExpired;
+       public Long getJobPositionId () {
+               return this.jobPositionId;
        }
 
        @Override
-       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setJobPositionExpired (final Date jobPositionExpired) {
-               this.jobPositionExpired = jobPositionExpired;
+       public void setJobPositionId (final Long jobPositionId) {
+               this.jobPositionId = jobPositionId;
        }
 
        @Override
-       @SuppressWarnings ("ReturnOfDateField")
-       public Date getJobPositionHired () {
-               return this.jobPositionHired;
+       public String getJobPositionName () {
+               return this.jobPositionName;
        }
 
        @Override
-       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setJobPositionHired (final Date jobPositionHired) {
-               this.jobPositionHired = jobPositionHired;
+       public void setJobPositionName (final String jobPositionName) {
+               this.jobPositionName = jobPositionName;
        }
 
        @Override
@@ -295,9 +297,10 @@ public class EmployeePosition implements HireableJobPosition {
        public int hashCode () {
                int hash = 7;
 
+               hash = 37 * hash + Objects.hashCode(this.getJobPositionAddedUser());
                hash = 37 * hash + Objects.hashCode(this.getJobPositionId());
                hash = 37 * hash + Objects.hashCode(this.getJobPositionName());
-               hash = 37 * hash + Objects.hashCode(this.getJobPositionAddedUser());
+               hash = 37 * hash + Objects.hashCode(this.getJobPositionStatus());
 
                return hash;
        }
index 1346cb3dbbbf05772813a39731446d96d78bdb19..d6b36e0ccf86c5de41625e1d15b01acccbeb9b5b 100644 (file)
@@ -61,28 +61,28 @@ public interface HireableJobPosition extends Comparable<HireableJobPosition>, Se
         * <p>
         * @return Timestamp when this entry has been created
         */
-       Date getJobPositionCreated ();
+       Date getJobPositionEntryCreated ();
 
        /**
         * Setter for timestamp when this entry has been created
         * <p>
-        * @param jobPositionCreated Timestamp when this entry has been created
+        * @param jobPositionEntryCreated Timestamp when this entry has been created
         */
-       void setJobPositionCreated (final Date jobPositionCreated);
+       void setJobPositionEntryCreated (final Date jobPositionEntryCreated);
 
        /**
         * Getter for timestamp when this entry has been updated
         * <p>
         * @return Timestamp when this entry has been updated
         */
-       Date getJobPositionUpdated ();
+       Date getJobPositionEntryUpdated ();
 
        /**
         * Setter for timestamp when this entry has been updated
         * <p>
-        * @param jobPositionUpdated Timestamp when this entry has been updated
+        * @param jobPositionEntryUpdated Timestamp when this entry has been updated
         */
-       void setJobPositionUpdated (final Date jobPositionUpdated);
+       void setJobPositionEntryUpdated (final Date jobPositionEntryUpdated);
 
        /**
         * Getter for job position start
@@ -117,28 +117,28 @@ public interface HireableJobPosition extends Comparable<HireableJobPosition>, Se
         * <p>
         * @return When this job position was deleted by user
         */
-       Date getJobPositionDeleted ();
+       Date getJobPositionEntryDeleted ();
 
        /**
         * Setter for when this job position was deleted by user
         * <p>
-        * @param jobPositionDeleted When this job position was deleted by user
+        * @param jobPositionEntryDeleted When this job position was deleted by user
         */
-       void setJobPositionDeleted (final Date jobPositionDeleted);
+       void setJobPositionEntryDeleted (final Date jobPositionEntryDeleted);
 
        /**
         * Getter for when this job position has expired
         * <p>
         * @return When this job position has expired
         */
-       Date getJobPositionExpired ();
+       Date getJobPositionEntryExpired ();
 
        /**
         * Setter for when this job position has expired
         * <p>
-        * @param jobPositionExpired When this job position has expired
+        * @param jobPositionEntryExpired When this job position has expired
         */
-       void setJobPositionExpired (final Date jobPositionExpired);
+       void setJobPositionEntryExpired (final Date jobPositionEntryExpired);
 
        /**
         * Getter for when employee was hired for this job position
index fd505a38933fccdd92fd8b651700ac6739210271..f35910fd3a974c6457e4f184bdce0063d4c300b9 100644 (file)
@@ -56,8 +56,15 @@ public class BusinessLogo implements Logo {
         */
        @Basic (optional = false)
        @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "logo_entry_created", nullable = false, updatable = false)
-       private Date logoCreated;
+       @Column (name = "logo_entry_created", updatable = false, nullable = false)
+       private Date logoEntryCreated;
+
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "logo_entry_updated", insertable = false, nullable = false)
+       private Date logoEntryUpdated;
 
        /**
         * Local file name of the logo (relative to /resources/logos/)
@@ -130,14 +137,26 @@ public class BusinessLogo implements Logo {
 
        @Override
        @SuppressWarnings ("ReturnOfDateField")
-       public Date getLogoCreated () {
-               return this.logoCreated;
+       public Date getLogoEntryCreated () {
+               return this.logoEntryCreated;
+       }
+
+       @Override
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setLogoEntryCreated (final Date logoEntryCreated) {
+               this.logoEntryCreated = logoEntryCreated;
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getLogoEntryUpdated () {
+               return this.logoEntryUpdated;
        }
 
        @Override
        @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setLogoCreated (final Date logoCreated) {
-               this.logoCreated = logoCreated;
+       public void setLogoEntryUpdated (final Date logoEntryUpdated) {
+               this.logoEntryUpdated = logoEntryUpdated;
        }
 
        @Override
index 884926ae1e51fc8c4a39b8d8d4f358b03c4fd17f..ddfc9e37eb382da98b4c86c415f7b9fa0af5bec5 100644 (file)
@@ -74,14 +74,28 @@ public interface Logo extends Comparable<Logo>, Serializable {
         * <p>
         * @return Timestamp when this entry has been created
         */
-       Date getLogoCreated ();
+       Date getLogoEntryCreated ();
 
        /**
         * Setter for timestamp when this entry has been created
         * <p>
-        * @param logoCreated Timestamp when this entry has been created
+        * @param logoEntryCreated Timestamp when this entry has been created
         */
-       void setLogoCreated (final Date logoCreated);
+       void setLogoEntryCreated (final Date logoEntryCreated);
+
+       /**
+        * Getter for timestamp when this entry has been updated
+        * <p>
+        * @return Timestamp when this entry has been updated
+        */
+       Date getLogoEntryUpdated ();
+
+       /**
+        * Setter for timestamp when this entry has been updated
+        * <p>
+        * @param logoEntryUpdated Timestamp when this entry has been updated
+        */
+       void setLogoEntryUpdated (final Date logoEntryUpdated);
 
        @Override
        boolean equals (final Object object);
index 8cd9b137b8ef7ec70cfd3672754d4af9a1b0a8ce..258f41e60decb0af9204f74328b93a1e70d9dd77 100644 (file)
@@ -168,7 +168,11 @@ public class BusinessOpeningTime implements OpeningTime {
                        // First starting day of the week
                        this.getOpeningStartDay().compareTo(openingTime.getOpeningStartDay()),
                        // ... and end day of the week
-                       this.getOpeningEndDay().compareTo(openingTime.getOpeningEndDay())
+                       this.getOpeningEndDay().compareTo(openingTime.getOpeningEndDay()),
+                       // ... and start time of the week
+                       this.getOpeningStartTime().compareTo(openingTime.getOpeningStartTime()),
+                       // ... and end time of the week
+                       this.getOpeningEndTime().compareTo(openingTime.getOpeningEndTime())
                };
 
                // Check all values