]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
resorted members + added this.
authorRoland Haeder <roland@mxchange.org>
Sat, 20 Feb 2016 19:08:24 +0000 (20:08 +0100)
committerRoland Haeder <roland@mxchange.org>
Sat, 20 Feb 2016 19:08:24 +0000 (20:08 +0100)
src/org/mxchange/jcontactsbusiness/CompanyContact.java
src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java
src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java
src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java
src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java
src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java
src/org/mxchange/jcontactsbusiness/jobposition/EmployeePosition.java
src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java

index 2319949cf9f19a6eddbecbcee6744c8fa81e0b0d..4da8d33e3631ef30af32f47158f6da9609b50330 100644 (file)
@@ -54,7 +54,7 @@ public class CompanyContact implements BusinessContact, Comparable<BusinessConta
        /**
         * Serial number
         */
-       private static final long serialVersionUID = 478_378_178_748_691L;
+       private static final long serialVersionUID = 470_375_172_748_691L;
 
        /**
         * Reference to basic data
index 8fcfe0fa2ba420be879d4ddc6b9cec3e4120b911..bf6171547a161e78a444f25db8e3a4bf4298c31e 100644 (file)
@@ -55,6 +55,20 @@ public class CompanyBasicData implements BusinessBasicData, Comparable<BusinessB
         */
        private static final long serialVersionUID = 486_895_878_178_761L;
 
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "company_entry_created", nullable = false, updatable = false)
+       private Calendar basicCreated;
+       /**
+        * User owner instance
+        */
+       @JoinColumn (name = "company_user_id", nullable = false, updatable = false)
+       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
+       private User basicUserOwner;
+
        /**
         * Id number
         */
@@ -123,20 +137,60 @@ public class CompanyBasicData implements BusinessBasicData, Comparable<BusinessB
        @Column (name = "company_website_url")
        private String companyWebsiteUrl;
 
-       /**
-        * User owner instance
-        */
-       @JoinColumn (name = "company_user_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
-       private User basicUserOwner;
+       @Override
+       public int compareTo (final BusinessBasicData businessData) {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
 
-       /**
-        * Timestamp when this entry has been created
-        */
-       @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "company_entry_created", nullable = false, updatable = false)
-       private Calendar basicCreated;
+       @Override
+       public boolean equals (final Object object) {
+               if (object == null) {
+                       return false;
+               } else if (this.getClass() != object.getClass()) {
+                       return false;
+               }
+
+               final BusinessBasicData other = (BusinessBasicData) object;
+
+               if (!Objects.equals(this.getCompanyLegalStatus(), other.getCompanyLegalStatus())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyName(), other.getCompanyName())) {
+                       return false;
+               } else if (!Objects.equals(this.getCompanyTaxNumber(), other.getCompanyTaxNumber())) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       @Override
+       public int hashCode () {
+               int hash = 5;
+               hash = 53 * hash + Objects.hashCode(this.getCompanyLegalStatus());
+               hash = 53 * hash + Objects.hashCode(this.getCompanyName());
+               hash = 53 * hash + Objects.hashCode(this.getCompanyTaxNumber());
+               return hash;
+       }
+
+       @Override
+       public Calendar getBasicCreated () {
+               return this.basicCreated;
+       }
+
+       @Override
+       public void setBasicCreated (final Calendar basicCreated) {
+               this.basicCreated = basicCreated;
+       }
+
+       @Override
+       public User getBasicUserOwner () {
+               return this.basicUserOwner;
+       }
+
+       @Override
+       public void setBasicUserOwner (final User basicUserOwner) {
+               this.basicUserOwner = basicUserOwner;
+       }
 
        @Override
        public Long getCompanyBasicId () {
@@ -238,58 +292,4 @@ public class CompanyBasicData implements BusinessBasicData, Comparable<BusinessB
                this.companyWebsiteUrl = companyWebsiteUrl;
        }
 
-       @Override
-       public Calendar getBasicCreated () {
-               return this.basicCreated;
-       }
-
-       @Override
-       public void setBasicCreated (final Calendar basicCreated) {
-               this.basicCreated = basicCreated;
-       }
-
-       @Override
-       public User getBasicUserOwner () {
-               return this.basicUserOwner;
-       }
-
-       @Override
-       public void setBasicUserOwner (final User basicUserOwner) {
-               this.basicUserOwner = basicUserOwner;
-       }
-
-       @Override
-       public int compareTo (final BusinessBasicData businessData) {
-               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
-       }
-
-       @Override
-       public boolean equals (final Object object) {
-               if (object == null) {
-                       return false;
-               } else if (getClass() != object.getClass()) {
-                       return false;
-               }
-
-               final BusinessBasicData other = (BusinessBasicData) object;
-
-               if (!Objects.equals(this.getCompanyLegalStatus(), other.getCompanyLegalStatus())) {
-                       return false;
-               } else if (!Objects.equals(this.getCompanyName(), other.getCompanyName())) {
-                       return false;
-               } else if (!Objects.equals(this.getCompanyTaxNumber(), other.getCompanyTaxNumber())) {
-                       return false;
-               }
-
-               return true;
-       }
-
-       @Override
-       public int hashCode () {
-               int hash = 5;
-               hash = 53 * hash + Objects.hashCode(this.getCompanyLegalStatus());
-               hash = 53 * hash + Objects.hashCode(this.getCompanyName());
-               hash = 53 * hash + Objects.hashCode(this.getCompanyTaxNumber());
-               return hash;
-       }
 }
index 0918967d2d168653a10d6b26d7b212f67a45f29f..21dbeafaeedc71ae75da2f455dd91f36c296d534 100644 (file)
@@ -76,6 +76,14 @@ public class CompanyBranchOffice implements BranchOffice, Comparable<BranchOffic
        @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
        private Country branchCountry;
 
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "branch_entry_created", nullable = false, updatable = false)
+       private Calendar branchCreated;
+
        /**
         * Branch office's main email address (example: branch-name@company.com)
         */
@@ -130,13 +138,6 @@ public class CompanyBranchOffice implements BranchOffice, Comparable<BranchOffic
        @Column (name = "branch_suite_number", length = 4)
        private Short branchSuiteNumber;
 
-       /**
-        * Branch office's ZIP code
-        */
-       @Basic (optional = false)
-       @Column (name = "branch_zip_code", length = 6, nullable = false)
-       private Integer branchZipCode;
-
        /**
         * User owner instance
         */
@@ -145,12 +146,58 @@ public class CompanyBranchOffice implements BranchOffice, Comparable<BranchOffic
        private User branchUserOwner;
 
        /**
-        * Timestamp when this entry has been created
+        * Branch office's ZIP code
         */
        @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "branch_entry_created", nullable = false, updatable = false)
-       private Calendar branchCreated;
+       @Column (name = "branch_zip_code", length = 6, nullable = false)
+       private Integer branchZipCode;
+
+       @Override
+       public int compareTo (final BranchOffice branchOffice) {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
+
+       @Override
+       public boolean equals (final Object object) {
+               if (object == null) {
+                       return false;
+               } else if (this.getClass() != object.getClass()) {
+                       return false;
+               }
+
+               final BranchOffice other = (BranchOffice) object;
+
+               if (!Objects.equals(this.getBranchCity(), other.getBranchCity())) {
+                       return false;
+               } else if (!Objects.equals(this.getBranchCountry(), other.getBranchCountry())) {
+                       return false;
+               } else if (!Objects.equals(this.getBranchHouseNumber(), other.getBranchHouseNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getBranchStore(), other.getBranchStore())) {
+                       return false;
+               } else if (!Objects.equals(this.getBranchStreet(), other.getBranchStreet())) {
+                       return false;
+               } else if (!Objects.equals(this.getBranchSuiteNumber(), other.getBranchSuiteNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getBranchZipCode(), other.getBranchZipCode())) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       @Override
+       public int hashCode () {
+               int hash = 7;
+               hash = 53 * hash + Objects.hashCode(this.getBranchCity());
+               hash = 53 * hash + Objects.hashCode(this.getBranchCountry());
+               hash = 53 * hash + Objects.hashCode(this.getBranchHouseNumber());
+               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.getBranchZipCode());
+               return hash;
+       }
 
        @Override
        public String getBranchCity () {
@@ -182,6 +229,16 @@ public class CompanyBranchOffice implements BranchOffice, Comparable<BranchOffic
                this.branchCountry = branchCountry;
        }
 
+       @Override
+       public Calendar getBranchCreated () {
+               return this.branchCreated;
+       }
+
+       @Override
+       public void setBranchCreated (final Calendar branchCreated) {
+               this.branchCreated = branchCreated;
+       }
+
        @Override
        public String getBranchEmailAddress () {
                return this.branchEmailAddress;
@@ -262,26 +319,6 @@ public class CompanyBranchOffice implements BranchOffice, Comparable<BranchOffic
                this.branchSuiteNumber = branchSuiteNumber;
        }
 
-       @Override
-       public Integer getBranchZipCode () {
-               return this.branchZipCode;
-       }
-
-       @Override
-       public void setBranchZipCode (final Integer branchZipCode) {
-               this.branchZipCode = branchZipCode;
-       }
-
-       @Override
-       public Calendar getBranchCreated () {
-               return this.branchCreated;
-       }
-
-       @Override
-       public void setBranchCreated (final Calendar branchCreated) {
-               this.branchCreated = branchCreated;
-       }
-
        @Override
        public User getBranchUserOwner () {
                return this.branchUserOwner;
@@ -293,49 +330,13 @@ public class CompanyBranchOffice implements BranchOffice, Comparable<BranchOffic
        }
 
        @Override
-       public int compareTo (final BranchOffice branchOffice) {
-               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       public Integer getBranchZipCode () {
+               return this.branchZipCode;
        }
 
        @Override
-       public boolean equals (final Object object) {
-               if (object == null) {
-                       return false;
-               } else if (getClass() != object.getClass()) {
-                       return false;
-               }
-
-               final BranchOffice other = (BranchOffice) object;
-
-               if (!Objects.equals(this.getBranchCity(), other.getBranchCity())) {
-                       return false;
-               } else if (!Objects.equals(this.getBranchCountry(), other.getBranchCountry())) {
-                       return false;
-               } else if (!Objects.equals(this.getBranchHouseNumber(), other.getBranchHouseNumber())) {
-                       return false;
-               } else if (!Objects.equals(this.getBranchStore(), other.getBranchStore())) {
-                       return false;
-               } else if (!Objects.equals(this.getBranchStreet(), other.getBranchStreet())) {
-                       return false;
-               } else if (!Objects.equals(this.getBranchSuiteNumber(), other.getBranchSuiteNumber())) {
-                       return false;
-               } else if (!Objects.equals(this.getBranchZipCode(), other.getBranchZipCode())) {
-                       return false;
-               }
-
-               return true;
+       public void setBranchZipCode (final Integer branchZipCode) {
+               this.branchZipCode = branchZipCode;
        }
 
-       @Override
-       public int hashCode () {
-               int hash = 7;
-               hash = 53 * hash + Objects.hashCode(this.getBranchCity());
-               hash = 53 * hash + Objects.hashCode(this.getBranchCountry());
-               hash = 53 * hash + Objects.hashCode(this.getBranchHouseNumber());
-               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.getBranchZipCode());
-               return hash;
-       }
 }
index 6056d097046964c45a951e18afa3da94b646d177..7b97ac5cbd1ec193a6264872b76d21c9c9f5274b 100644 (file)
@@ -58,11 +58,11 @@ public class CompanyDepartment implements Department, Comparable<Department> {
        private static final long serialVersionUID = 94_835_918_958_717_660L;
 
        /**
-        * Connection to company contact
+        * Where this department is located
         */
-       @JoinColumn (name = "department_company_id", nullable = false, updatable = false)
-       @ManyToOne (targetEntity = CompanyContact.class, cascade = CascadeType.ALL, optional = false, fetch = FetchType.EAGER)
-       private BusinessContact departmentCompany;
+       @JoinColumn (name = "department_headquarters_id")
+       @OneToOne (targetEntity = CompanyHeadQuartersData.class, cascade = CascadeType.ALL)
+       private HeadQuartersData departentHeadquarters;
 
        /**
         * Where this department is located
@@ -72,11 +72,19 @@ public class CompanyDepartment implements Department, Comparable<Department> {
        private BranchOffice departmentBranchOffice;
 
        /**
-        * Where this department is located
+        * Connection to company contact
         */
-       @JoinColumn (name = "department_headquarters_id")
-       @OneToOne (targetEntity = CompanyHeadQuartersData.class, cascade = CascadeType.ALL)
-       private HeadQuartersData departentHeadquarters;
+       @JoinColumn (name = "department_company_id", nullable = false, updatable = false)
+       @ManyToOne (targetEntity = CompanyContact.class, cascade = CascadeType.ALL, optional = false, fetch = FetchType.EAGER)
+       private BusinessContact departmentCompany;
+
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "department_entry_created", nullable = false, updatable = false)
+       private Calendar departmentCreated;
 
        /**
         * Id number
@@ -107,13 +115,37 @@ public class CompanyDepartment implements Department, Comparable<Department> {
        @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
        private User departmentUserOwner;
 
-       /**
-        * Timestamp when this entry has been created
-        */
-       @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "department_entry_created", nullable = false, updatable = false)
-       private Calendar departmentCreated;
+       @Override
+       public int compareTo (final Department department) {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
+
+       @Override
+       public boolean equals (final Object object) {
+               if (object == null) {
+                       return false;
+               } else if (this.getClass() != object.getClass()) {
+                       return false;
+               }
+
+               final Department other = (Department) object;
+
+               if (!Objects.equals(this.getDepartmentCompany(), other.getDepartmentCompany())) {
+                       return false;
+               } else if (!Objects.equals(this.getDepartmentName(), other.getDepartmentName())) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       @Override
+       public int hashCode () {
+               int hash = 5;
+               hash = 53 * hash + Objects.hashCode(this.getDepartmentCompany());
+               hash = 53 * hash + Objects.hashCode(this.getDepartmentName());
+               return hash;
+       }
 
        @Override
        public HeadQuartersData getDepartentHeadquarters () {
@@ -145,6 +177,16 @@ public class CompanyDepartment implements Department, Comparable<Department> {
                this.departmentCompany = departmentCompany;
        }
 
+       @Override
+       public Calendar getDepartmentCreated () {
+               return this.departmentCreated;
+       }
+
+       @Override
+       public void setDepartmentCreated (final Calendar departmentCreated) {
+               this.departmentCreated = departmentCreated;
+       }
+
        @Override
        public Long getDepartmentId () {
                return this.departmentId;
@@ -175,16 +217,6 @@ public class CompanyDepartment implements Department, Comparable<Department> {
                this.departmentName = departmentName;
        }
 
-       @Override
-       public Calendar getDepartmentCreated () {
-               return this.departmentCreated;
-       }
-
-       @Override
-       public void setDepartmentCreated (final Calendar departmentCreated) {
-               this.departmentCreated = departmentCreated;
-       }
-
        @Override
        public User getDepartmentUserOwner () {
                return this.departmentUserOwner;
@@ -195,35 +227,4 @@ public class CompanyDepartment implements Department, Comparable<Department> {
                this.departmentUserOwner = departmentUserOwner;
        }
 
-       @Override
-       public int compareTo (final Department department) {
-               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
-       }
-
-       @Override
-       public boolean equals (final Object object) {
-               if (object == null) {
-                       return false;
-               } else if (getClass() != object.getClass()) {
-                       return false;
-               }
-
-               final Department other = (Department) object;
-
-               if (!Objects.equals(this.getDepartmentCompany(), other.getDepartmentCompany())) {
-                       return false;
-               } else if (!Objects.equals(this.getDepartmentName(), other.getDepartmentName())) {
-                       return false;
-               }
-
-               return true;
-       }
-
-       @Override
-       public int hashCode () {
-               int hash = 5;
-               hash = 53 * hash + Objects.hashCode(this.getDepartmentCompany());
-               hash = 53 * hash + Objects.hashCode(this.getDepartmentName());
-               return hash;
-       }
 }
index 34e6fa512fdf2123d869ba29391f8b872397e85b..cf730af3978eba715c5d55e7548398f07dcc66ef 100644 (file)
@@ -178,6 +178,15 @@ public class CompanyEmployee implements Employee, Comparable<Employee> {
                return true;
        }
 
+       @Override
+       public int hashCode () {
+               int hash = 3;
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeCompany());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeeNumber());
+               hash = 97 * hash + Objects.hashCode(this.getEmployeePersonalData());
+               return hash;
+       }
+
        @Override
        public BranchOffice getEmployeeBranchOffice () {
                return this.employeeBranchOffice;
@@ -307,13 +316,4 @@ public class CompanyEmployee implements Employee, Comparable<Employee> {
        public void setEmployeeUserOwner (final User employeeUserOwner) {
                this.employeeUserOwner = employeeUserOwner;
        }
-
-       @Override
-       public int hashCode () {
-               int hash = 3;
-               hash = 97 * hash + Objects.hashCode(this.getEmployeeCompany());
-               hash = 97 * hash + Objects.hashCode(this.getEmployeeNumber());
-               hash = 97 * hash + Objects.hashCode(this.getEmployeePersonalData());
-               return hash;
-       }
 }
index 9eddc111a2e25c5691b17644f46e0dab105df709..18b07db6a5bee216dcc27e5ecab5c784a35352bb 100644 (file)
@@ -68,6 +68,14 @@ public class CompanyHeadQuartersData implements HeadQuartersData, Comparable<Hea
        @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
        private Country headquartersCountry;
 
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "headquarters_entry_created", nullable = false, updatable = false)
+       private Calendar headquartersCreated;
+
        /**
         * Headquarters' fax number
         */
@@ -116,13 +124,6 @@ public class CompanyHeadQuartersData implements HeadQuartersData, Comparable<Hea
        @Column (name = "headquarters_suite_number", length = 4)
        private Short headquartersSuiteNumber;
 
-       /**
-        * Headquarters' ZIP code
-        */
-       @Basic (optional = false)
-       @Column (name = "headquarters_zip_code", length = 6, nullable = false)
-       private Integer headquartersZipCode;
-
        /**
         * User owner instance
         */
@@ -131,12 +132,58 @@ public class CompanyHeadQuartersData implements HeadQuartersData, Comparable<Hea
        private User headquartersUserOwner;
 
        /**
-        * Timestamp when this entry has been created
+        * Headquarters' ZIP code
         */
        @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "headquarters_entry_created", nullable = false, updatable = false)
-       private Calendar headquartersCreated;
+       @Column (name = "headquarters_zip_code", length = 6, nullable = false)
+       private Integer headquartersZipCode;
+
+       @Override
+       public int compareTo (final HeadQuartersData headQuartersData) {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
+
+       @Override
+       public boolean equals (final Object object) {
+               if (object == null) {
+                       return false;
+               } else if (this.getClass() != object.getClass()) {
+                       return false;
+               }
+
+               final HeadQuartersData other = (HeadQuartersData) object;
+
+               if (!Objects.equals(this.getHeadquartersCity(), other.getHeadquartersCity())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersCountry(), other.getHeadquartersCountry())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersHouseNumber(), other.getHeadquartersHouseNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersStore(), other.getHeadquartersStore())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersStreet(), other.getHeadquartersStreet())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersSuiteNumber(), other.getHeadquartersSuiteNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersZipCode(), other.getHeadquartersZipCode())) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       @Override
+       public int hashCode () {
+               int hash = 7;
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCity());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCountry());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersHouseNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStore());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStreet());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersSuiteNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersZipCode());
+               return hash;
+       }
 
        @Override
        public String getHeadquartersCity () {
@@ -158,6 +205,16 @@ public class CompanyHeadQuartersData implements HeadQuartersData, Comparable<Hea
                this.headquartersCountry = headquartersCountry;
        }
 
+       @Override
+       public Calendar getHeadquartersCreated () {
+               return this.headquartersCreated;
+       }
+
+       @Override
+       public void setHeadquartersCreated (final Calendar headquartersCreated) {
+               this.headquartersCreated = headquartersCreated;
+       }
+
        @Override
        public DialableFaxNumber getHeadquartersFaxNumber () {
                return this.headquartersFaxNumber;
@@ -228,25 +285,6 @@ public class CompanyHeadQuartersData implements HeadQuartersData, Comparable<Hea
                this.headquartersSuiteNumber = headquartersSuiteNumber;
        }
 
-       @Override
-       public Integer getHeadquartersZipCode () {
-               return this.headquartersZipCode;
-       }
-
-       @Override
-       public void setHeadquartersZipCode (final Integer headquartersZipCode) {
-               this.headquartersZipCode = headquartersZipCode;
-       }
-
-       @Override
-       public Calendar getHeadquartersCreated () {
-               return this.headquartersCreated;
-       }
-
-       @Override
-       public void setHeadquartersCreated (final Calendar headquartersCreated) {
-               this.headquartersCreated = headquartersCreated;
-       }
 
        @Override
        public User getHeadquartersUserOwner () {
@@ -259,49 +297,13 @@ public class CompanyHeadQuartersData implements HeadQuartersData, Comparable<Hea
        }
 
        @Override
-       public int compareTo (final HeadQuartersData headQuartersData) {
-               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       public Integer getHeadquartersZipCode () {
+               return this.headquartersZipCode;
        }
 
        @Override
-       public boolean equals (final Object object) {
-               if (object == null) {
-                       return false;
-               } else if (getClass() != object.getClass()) {
-                       return false;
-               }
-
-               final HeadQuartersData other = (HeadQuartersData) object;
-
-               if (!Objects.equals(this.getHeadquartersCity(), other.getHeadquartersCity())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersCountry(), other.getHeadquartersCountry())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersHouseNumber(), other.getHeadquartersHouseNumber())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersStore(), other.getHeadquartersStore())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersStreet(), other.getHeadquartersStreet())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersSuiteNumber(), other.getHeadquartersSuiteNumber())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersZipCode(), other.getHeadquartersZipCode())) {
-                       return false;
-               }
-
-               return true;
+       public void setHeadquartersZipCode (final Integer headquartersZipCode) {
+               this.headquartersZipCode = headquartersZipCode;
        }
 
-       @Override
-       public int hashCode () {
-               int hash = 7;
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCity());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCountry());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersHouseNumber());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStore());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStreet());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersSuiteNumber());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersZipCode());
-               return hash;
-       }
 }
index 31884f482516f761ecc98ab49e9decbd67fd9437..2ac54d9b862c40c6fc50964c436c4571e8d91335 100644 (file)
@@ -42,6 +42,14 @@ public class EmployeePosition implements JobPosition, Comparable<JobPosition> {
         */
        private static final long serialVersionUID = 18_427_587_187_609L;
 
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "job_position_created", nullable = false, updatable = false)
+       private Calendar jobPositionCreated;
+
        /**
         * Id number
         */
@@ -57,32 +65,29 @@ public class EmployeePosition implements JobPosition, Comparable<JobPosition> {
        @Column (name = "job_position_name", length = 10, nullable = false, unique = true)
        private String jobPositionName;
 
-       /**
-        * Timestamp when this entry has been created
-        */
-       @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "job_position_created", nullable = false, updatable = false)
-       private Calendar jobPositionCreated;
-
        @Override
-       public Long getJobPositionId () {
-               return this.jobPositionId;
+       public int compareTo (final JobPosition jobPosition) {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        }
 
        @Override
-       public void setJobPositionId (final Long jobPositionId) {
-               this.jobPositionId = jobPositionId;
-       }
+       public boolean equals (final Object object) {
+               if (object == null) {
+                       return false;
+               } else if (this.getClass() != object.getClass()) {
+                       return false;
+               }
 
-       @Override
-       public String getJobPositionName () {
-               return this.jobPositionName;
+               final JobPosition other = (JobPosition) object;
+
+               return Objects.equals(this.getJobPositionName(), other.getJobPositionName());
        }
 
        @Override
-       public void setJobPositionName (final String jobPositionName) {
-               this.jobPositionName = jobPositionName;
+       public int hashCode () {
+               int hash = 7;
+               hash = 37 * hash + Objects.hashCode(this.getJobPositionName());
+               return hash;
        }
 
        @Override
@@ -96,28 +101,23 @@ public class EmployeePosition implements JobPosition, Comparable<JobPosition> {
        }
 
        @Override
-       public int compareTo (final JobPosition jobPosition) {
-               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       public Long getJobPositionId () {
+               return this.jobPositionId;
        }
 
        @Override
-       public boolean equals (final Object object) {
-               if (object == null) {
-                       return false;
-               } else if (getClass() != object.getClass()) {
-                       return false;
-               }
-
-               final JobPosition other = (JobPosition) object;
+       public void setJobPositionId (final Long jobPositionId) {
+               this.jobPositionId = jobPositionId;
+       }
 
-               return Objects.equals(this.getJobPositionName(), other.getJobPositionName());
+       @Override
+       public String getJobPositionName () {
+               return this.jobPositionName;
        }
 
        @Override
-       public int hashCode () {
-               int hash = 7;
-               hash = 37 * hash + Objects.hashCode(this.getJobPositionName());
-               return hash;
+       public void setJobPositionName (final String jobPositionName) {
+               this.jobPositionName = jobPositionName;
        }
 
 }
index c2cd725183b005046eb1e7dd4160f9ad39a44c0b..4175369e38f387864e838ae019c0bd50248fbed7 100644 (file)
@@ -47,6 +47,14 @@ public class CompanyLogo implements BusinessLogo, Comparable<BusinessLogo> {
         */
        private static final long serialVersionUID = 475_871_875_718_751_285L;
 
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "logo_entry_created", nullable = false, updatable = false)
+       private Calendar logoCreated;
+
        /**
         * Local file name of the logo (relative to /resources/logos/)
         */
@@ -69,32 +77,29 @@ public class CompanyLogo implements BusinessLogo, Comparable<BusinessLogo> {
        @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.MERGE, optional = false)
        private User logoUploader;
 
-       /**
-        * Timestamp when this entry has been created
-        */
-       @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "logo_entry_created", nullable = false, updatable = false)
-       private Calendar logoCreated;
-
        @Override
-       public String getLogoFileName () {
-               return this.logoFileName;
+       public int compareTo (final BusinessLogo businessLogo) {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        }
 
        @Override
-       public void setLogoFileName (final String logoFileName) {
-               this.logoFileName = logoFileName;
-       }
+       public boolean equals (final Object object) {
+               if (object == null) {
+                       return false;
+               } else if (this.getClass() != object.getClass()) {
+                       return false;
+               }
 
-       @Override
-       public Long getLogoId () {
-               return this.logoId;
+               final BusinessLogo other = (BusinessLogo) object;
+
+               return Objects.equals(this.getLogoFileName(), other.getLogoFileName());
        }
 
        @Override
-       public void setLogoId (final Long logoId) {
-               this.logoId = logoId;
+       public int hashCode () {
+               int hash = 3;
+               hash = 53 * hash + Objects.hashCode(this.getLogoFileName());
+               return hash;
        }
 
        @Override
@@ -108,37 +113,33 @@ public class CompanyLogo implements BusinessLogo, Comparable<BusinessLogo> {
        }
 
        @Override
-       public User getLogoUploader () {
-               return this.logoUploader;
+       public String getLogoFileName () {
+               return this.logoFileName;
        }
 
        @Override
-       public void setLogoUploader (final User logoUploader) {
-               this.logoUploader = logoUploader;
+       public void setLogoFileName (final String logoFileName) {
+               this.logoFileName = logoFileName;
        }
 
        @Override
-       public int compareTo (final BusinessLogo businessLogo) {
-               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       public Long getLogoId () {
+               return this.logoId;
        }
 
        @Override
-       public boolean equals (final Object object) {
-               if (object == null) {
-                       return false;
-               } else if (getClass() != object.getClass()) {
-                       return false;
-               }
-
-               final BusinessLogo other = (BusinessLogo) object;
+       public void setLogoId (final Long logoId) {
+               this.logoId = logoId;
+       }
 
-               return Objects.equals(this.getLogoFileName(), other.getLogoFileName());
+       @Override
+       public User getLogoUploader () {
+               return this.logoUploader;
        }
 
        @Override
-       public int hashCode () {
-               int hash = 3;
-               hash = 53 * hash + Objects.hashCode(this.getLogoFileName());
-               return hash;
+       public void setLogoUploader (final User logoUploader) {
+               this.logoUploader = logoUploader;
        }
+
 }