]> git.mxchange.org Git - jcontacts-business-core.git/blobdiff - src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java
removed double unique key
[jcontacts-business-core.git] / src / org / mxchange / jcontactsbusiness / department / CompanyDepartment.java
index 1af6de527843580c069f655e94fe44c420e571da..e49a2ced355777401bd56a67b313dabbfcc11993 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Häder
+ * Copyright (C) 2016, 2017 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -32,16 +32,16 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import javax.persistence.Transient;
-import org.mxchange.jcontactsbusiness.BusinessContact;
-import org.mxchange.jcontactsbusiness.CompanyContact;
-import org.mxchange.jcontactsbusiness.branch.BranchOffice;
-import org.mxchange.jcontactsbusiness.branch.CompanyBranchOffice;
+import org.mxchange.jcontactsbusiness.basicdata.CompanyBasicData;
+import org.mxchange.jcontactsbusiness.branchoffice.BranchOffice;
+import org.mxchange.jcontactsbusiness.branchoffice.CompanyBranchOffice;
 import org.mxchange.jcontactsbusiness.employee.CompanyEmployee;
 import org.mxchange.jcontactsbusiness.employee.Employee;
-import org.mxchange.jcontactsbusiness.headquarters.CompanyHeadQuartersData;
-import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
+import org.mxchange.jcontactsbusiness.headquarters.CompanyHeadquartersData;
 import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData;
+import org.mxchange.jcontactsbusiness.headquarters.HeadquartersData;
 
 /**
  * A POJO for company departments
@@ -63,8 +63,8 @@ public class CompanyDepartment implements Department {
         * Where this department is located
         */
        @JoinColumn (name = "department_headquarters_id")
-       @OneToOne (targetEntity = CompanyHeadQuartersData.class, cascade = CascadeType.ALL)
-       private HeadQuartersData departentHeadquarters;
+       @OneToOne (targetEntity = CompanyHeadquartersData.class, cascade = CascadeType.ALL)
+       private HeadquartersData departentHeadquarters;
 
        /**
         * Where this department is located
@@ -77,8 +77,8 @@ public class CompanyDepartment implements Department {
         * Connection to company contact
         */
        @JoinColumn (name = "department_company_id", nullable = false, updatable = false)
-       @ManyToOne (targetEntity = CompanyContact.class, cascade = CascadeType.ALL, optional = false)
-       private BusinessContact departmentCompany;
+       @ManyToOne (targetEntity = CompanyBasicData.class, cascade = CascadeType.ALL, optional = false)
+       private BusinessBasicData departmentCompany;
 
        /**
         * Timestamp when this entry has been created
@@ -139,12 +139,12 @@ public class CompanyDepartment implements Department {
        }
 
        @Override
-       public HeadQuartersData getDepartentHeadquarters () {
+       public HeadquartersData getDepartentHeadquarters () {
                return this.departentHeadquarters;
        }
 
        @Override
-       public void setDepartentHeadquarters (final HeadQuartersData departentHeadquarters) {
+       public void setDepartentHeadquarters (final HeadquartersData departentHeadquarters) {
                this.departentHeadquarters = departentHeadquarters;
        }
 
@@ -159,12 +159,12 @@ public class CompanyDepartment implements Department {
        }
 
        @Override
-       public BusinessContact getDepartmentCompany () {
+       public BusinessBasicData getDepartmentCompany () {
                return this.departmentCompany;
        }
 
        @Override
-       public void setDepartmentCompany (final BusinessContact departmentCompany) {
+       public void setDepartmentCompany (final BusinessBasicData departmentCompany) {
                this.departmentCompany = departmentCompany;
        }