]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
updated jar(s)
authorRoland Haeder <roland@mxchange.org>
Thu, 13 Apr 2017 19:22:39 +0000 (21:22 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 13 Apr 2017 19:22:39 +0000 (21:22 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/BusinessContact.java
src/org/mxchange/jcontactsbusiness/CompanyContact.java

index 1e055150a74381bb2419a099986156e44e43c5bd..5a6b6c04d149773e0ad72d65d0ae80b0bd107789 100644 (file)
@@ -79,14 +79,14 @@ public interface BusinessContact extends Serializable {
         * <p>
         * @return Basic company data
         */
-       Long getCompanyContactId ();
+       Long getCompanyId ();
 
        /**
         * Setter for basic company data
         * <p>
         * @param companyContactId Basic company data
         */
-       void setCompanyContactId (final Long companyContactId);
+       void setCompanyId (final Long companyContactId);
 
        /**
         * Getter for company founder
index 595cd905a01ab9d9c7698b16945a786e6732aa38..6735990d96a7e653fb2ffe8a1f6f094a26175279 100644 (file)
@@ -66,7 +66,7 @@ public class CompanyContact implements BusinessContact {
        private BusinessBasicData basicBusinessData;
 
        /**
-        * Reference to company branch offfices
+        * Reference to company branch offices
         */
        @Transient
        private List<BranchOffice> brancheOffices;
@@ -78,14 +78,6 @@ public class CompanyContact implements BusinessContact {
        @OneToOne (targetEntity = CompanyEmployee.class, cascade = CascadeType.ALL)
        private Employee companyContact;
 
-       /**
-        * Id number
-        */
-       @Id
-       @Column (name = "company_id", nullable = false, updatable = false)
-       @GeneratedValue (strategy = GenerationType.IDENTITY)
-       private Long companyContactId;
-
        /**
         * Reference to CEO "employee"
         */
@@ -93,6 +85,14 @@ public class CompanyContact implements BusinessContact {
        @OneToOne (targetEntity = CompanyEmployee.class, cascade = CascadeType.ALL)
        private Employee companyFounder;
 
+       /**
+        * Id number
+        */
+       @Id
+       @Column (name = "company_id", nullable = false, updatable = false)
+       @GeneratedValue (strategy = GenerationType.IDENTITY)
+       private Long companyId;
+
        /**
         * Timestamp when this entry has been created
         */
@@ -125,7 +125,7 @@ public class CompanyContact implements BusinessContact {
 
                final BusinessContact other = (BusinessContact) object;
 
-               if (!Objects.equals(this.getCompanyContactId(), other.getCompanyContactId())) {
+               if (!Objects.equals(this.getCompanyId(), other.getCompanyId())) {
                        return false;
                } else if (!Objects.equals(this.getCompanyContact(), other.getCompanyContact())) {
                        return false;
@@ -173,23 +173,23 @@ public class CompanyContact implements BusinessContact {
        }
 
        @Override
-       public Long getCompanyContactId () {
-               return this.companyContactId;
+       public Employee getCompanyFounder () {
+               return this.companyFounder;
        }
 
        @Override
-       public void setCompanyContactId (final Long companyContactId) {
-               this.companyContactId = companyContactId;
+       public void setCompanyFounder (final Employee companyFounder) {
+               this.companyFounder = companyFounder;
        }
 
        @Override
-       public Employee getCompanyFounder () {
-               return this.companyFounder;
+       public Long getCompanyId () {
+               return this.companyId;
        }
 
        @Override
-       public void setCompanyFounder (final Employee companyFounder) {
-               this.companyFounder = companyFounder;
+       public void setCompanyId (final Long companyId) {
+               this.companyId = companyId;
        }
 
        @Override
@@ -228,7 +228,7 @@ public class CompanyContact implements BusinessContact {
        public int hashCode () {
                int hash = 3;
 
-               hash = 37 * hash + Objects.hashCode(this.getCompanyContactId());
+               hash = 37 * hash + Objects.hashCode(this.getCompanyId());
                hash = 37 * hash + Objects.hashCode(this.getCompanyContact());
                hash = 37 * hash + Objects.hashCode(this.getCompanyFounder());
                hash = 37 * hash + Objects.hashCode(this.getBasicBusinessData());