]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
No, was not working ... :-(
authorRoland Häder <roland@mxchange.org>
Mon, 9 May 2016 10:01:25 +0000 (12:01 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 9 May 2016 10:16:32 +0000 (12:16 +0200)
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/logo/CompanyLogo.java

index ca28ec52330670a69e048b2c0240c7fe4a99de29..b542c40060afbf809b58f574cc58726670e4c9c8 100644 (file)
@@ -37,7 +37,9 @@ import org.mxchange.jcontactsbusiness.basicdata.CompanyBasicData;
 import org.mxchange.jcontactsbusiness.branch.BranchOffice;
 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.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -102,14 +104,14 @@ public class CompanyContact implements BusinessContact {
         * User owner instance
         */
        @JoinColumn (name = "company_user_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = User.class, cascade = CascadeType.REFRESH, optional = false)
+       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false)
        private User contactUserOwner;
 
        /**
         * Reference to headquarters data
         */
        @JoinColumn (name = "company_headquarters_data_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = HeadQuartersData.class, cascade = CascadeType.ALL, optional = false)
+       @OneToOne (targetEntity = CompanyHeadQuartersData.class, cascade = CascadeType.ALL, optional = false)
        private HeadQuartersData headQuartersData;
 
        @Override
index bc2aa3eaa57319569b2e3bde01384dbdaedda7a9..38cced0fd2290a2d364f5e47eae32cdd37939add 100644 (file)
@@ -32,8 +32,12 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import org.mxchange.jcontactsbusiness.logo.BusinessLogo;
+import org.mxchange.jcontactsbusiness.logo.CompanyLogo;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
+import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -63,7 +67,7 @@ public class CompanyBasicData implements BusinessBasicData {
         * User owner instance
         */
        @JoinColumn (name = "company_user_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = User.class, cascade = CascadeType.REFRESH, optional = false)
+       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false)
        private User basicUserOwner;
 
        /**
@@ -91,7 +95,7 @@ public class CompanyBasicData implements BusinessBasicData {
         * Company's main fax numbers: +ccxxxxxxxxxx
         */
        @JoinColumn (name = "company_fax_number_id")
-       @OneToOne (targetEntity = DialableFaxNumber.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
        private DialableFaxNumber companyFaxNumber;
 
        /**
@@ -105,7 +109,7 @@ public class CompanyBasicData implements BusinessBasicData {
         * Id number of company logo
         */
        @JoinColumn (name = "company_logo_id")
-       @OneToOne (targetEntity = BusinessLogo.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = CompanyLogo.class, cascade = CascadeType.ALL)
        private BusinessLogo companyLogo;
 
        /**
@@ -119,7 +123,7 @@ public class CompanyBasicData implements BusinessBasicData {
         * Company's main phone number: +ccxxxxxxxxxx
         */
        @JoinColumn (name = "company_phone_number_id")
-       @OneToOne (targetEntity = DialableLandLineNumber.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
        private DialableLandLineNumber companyPhoneNumber;
 
        /**
index 9e1af178414f2f8bd8c151da15b863173667119a..13845d83e81dad0114bdd28a8878408726bc264f 100644 (file)
@@ -31,9 +31,14 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import org.mxchange.jcontactsbusiness.BusinessContact;
+import org.mxchange.jcontactsbusiness.CompanyContact;
 import org.mxchange.jcountry.data.Country;
+import org.mxchange.jcountry.data.CountryData;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
+import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -62,14 +67,14 @@ public class CompanyBranchOffice implements BranchOffice {
         * Company that has this branch office
         */
        @JoinColumn (name = "branch_company_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = BusinessContact.class, optional = false, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = CompanyContact.class, optional = false, cascade = CascadeType.ALL)
        private BusinessContact branchCompanyContact;
 
        /**
         * Branch office's country code
         */
        @JoinColumn (name = "branch_country_id", nullable = false)
-       @OneToOne (targetEntity = Country.class, cascade = CascadeType.REFRESH, optional = false)
+       @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false)
        private Country branchCountry;
 
        /**
@@ -90,7 +95,7 @@ public class CompanyBranchOffice implements BranchOffice {
         * Branch office's main fax number: +ccxxxxxxxxxx
         */
        @JoinColumn (name = "branch_fax_number_id")
-       @OneToOne (targetEntity = DialableFaxNumber.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
        private DialableFaxNumber branchFaxNumber;
 
        /**
@@ -112,7 +117,7 @@ public class CompanyBranchOffice implements BranchOffice {
         * Branch office's main phone number: +ccxxxxxxxxxx
         */
        @JoinColumn (name = "branch_phone_number_id")
-       @OneToOne (targetEntity = DialableLandLineNumber.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
        private DialableLandLineNumber branchPhoneNumber;
 
        /**
@@ -138,7 +143,7 @@ public class CompanyBranchOffice implements BranchOffice {
         * User owner instance
         */
        @JoinColumn (name = "branch_user_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = User.class, cascade = CascadeType.REFRESH, optional = false)
+       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false)
        private User branchUserOwner;
 
        /**
index 2e928bfe8ea80bb19c876c025efaae35f1b73af3..6d6ed4f702d180d7b122ba849e32c03f4d0484c2 100644 (file)
@@ -32,9 +32,13 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 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.employee.CompanyEmployee;
 import org.mxchange.jcontactsbusiness.employee.Employee;
 import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
+import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -63,14 +67,14 @@ public class CompanyDepartment implements Department {
         * Where this department is located
         */
        @JoinColumn (name = "department_branch_id")
-       @ManyToOne (targetEntity = BranchOffice.class, cascade = CascadeType.ALL)
+       @ManyToOne (targetEntity = CompanyBranchOffice.class, cascade = CascadeType.ALL)
        private BranchOffice departmentBranchOffice;
 
        /**
         * Connection to company contact
         */
        @JoinColumn (name = "department_company_id", nullable = false, updatable = false)
-       @ManyToOne (targetEntity = BusinessContact.class, cascade = CascadeType.ALL, optional = false)
+       @ManyToOne (targetEntity = CompanyContact.class, cascade = CascadeType.ALL, optional = false)
        private BusinessContact departmentCompany;
 
        /**
@@ -93,7 +97,7 @@ public class CompanyDepartment implements Department {
         * Department lead employee
         */
        @JoinColumn (name = "department_lead_id", nullable = false)
-       @OneToOne (targetEntity = Employee.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = CompanyEmployee.class, cascade = CascadeType.ALL)
        private Employee departmentLead;
 
        /**
@@ -107,7 +111,7 @@ public class CompanyDepartment implements Department {
         * User owner instance
         */
        @JoinColumn (name = "department_user_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = User.class, cascade = CascadeType.REFRESH, optional = false)
+       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false)
        private User departmentUserOwner;
 
        @Override
index bc296bbb489137aef6056ae67071c761b97b7924..2a7ed336186ff40c50a709879394f7306cd6e9d8 100644 (file)
@@ -31,12 +31,20 @@ import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcontacts.contact.UserContact;
 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.department.CompanyDepartment;
 import org.mxchange.jcontactsbusiness.department.Department;
+import org.mxchange.jcontactsbusiness.headquarters.CompanyHeadQuartersData;
 import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
+import org.mxchange.jcontactsbusiness.jobposition.EmployeePosition;
 import org.mxchange.jcontactsbusiness.jobposition.JobPosition;
+import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
+import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -58,14 +66,14 @@ public class CompanyEmployee implements Employee {
         * Branch office (if the employee works there)
         */
        @JoinColumn (name = "employee_branch_id")
-       @OneToOne (targetEntity = BranchOffice.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = CompanyBranchOffice.class, cascade = CascadeType.ALL)
        private BranchOffice employeeBranchOffice;
 
        /**
         * Company the employee is working at
         */
        @JoinColumn (name = "employee_company_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = BusinessContact.class, cascade = CascadeType.ALL, optional = false)
+       @OneToOne (targetEntity = CompanyContact.class, cascade = CascadeType.ALL, optional = false)
        private BusinessContact employeeCompany;
 
        /**
@@ -80,7 +88,7 @@ public class CompanyEmployee implements Employee {
         * Department the employee works at
         */
        @JoinColumn (name = "employee_department_id")
-       @OneToOne (targetEntity = Department.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = CompanyDepartment.class, cascade = CascadeType.ALL)
        private Department employeeDepartment;
 
        /**
@@ -93,7 +101,7 @@ public class CompanyEmployee implements Employee {
         * Head quarters id number (if the employee works there)
         */
        @JoinColumn (name = "employee_headquarters_id")
-       @OneToOne (targetEntity = HeadQuartersData.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = CompanyHeadQuartersData.class, cascade = CascadeType.ALL)
        private HeadQuartersData employeeHeadquarter;
 
        /**
@@ -108,7 +116,7 @@ public class CompanyEmployee implements Employee {
         * Employee's business mobile number
         */
        @JoinColumn (name = "employee_mobile_number_id")
-       @OneToOne (targetEntity = DialableCellphoneNumber.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = CellphoneNumber.class, cascade = CascadeType.ALL)
        private DialableCellphoneNumber employeeMobileNumber;
 
        /**
@@ -121,7 +129,7 @@ public class CompanyEmployee implements Employee {
         * Employee's personal data
         */
        @JoinColumn (name = "employee_personal_data_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = Contact.class, cascade = CascadeType.ALL, optional = false)
+       @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.ALL, optional = false)
        private Contact employeePersonalData;
 
        /**
@@ -134,14 +142,14 @@ public class CompanyEmployee implements Employee {
         * Employee's position (example: CEO)
         */
        @JoinColumn (name = "employee_position_id")
-       @OneToOne (targetEntity = JobPosition.class, cascade = CascadeType.REFRESH)
+       @OneToOne (targetEntity = EmployeePosition.class, cascade = CascadeType.REFRESH)
        private JobPosition employeePosition;
 
        /**
         * User owner instance
         */
        @JoinColumn (name = "employee_user_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = User.class, cascade = CascadeType.REFRESH, optional = false)
+       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false)
        private User employeeUserOwner;
 
        @Override
index 8b88acf59e6f6dff47763aee0900fd9eca7c8ba5..5c5753ba1dbfec1f10948bb86fafce731576421a 100644 (file)
@@ -33,7 +33,10 @@ import javax.persistence.TemporalType;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jcountry.data.CountryData;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
+import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -77,7 +80,7 @@ public class CompanyHeadQuartersData implements HeadQuartersData {
         * Headquarters' fax number
         */
        @JoinColumn (name = "headquarters_fax_number_id")
-       @OneToOne (targetEntity = DialableFaxNumber.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
        private DialableFaxNumber headquartersFaxNumber;
 
        /**
@@ -99,7 +102,7 @@ public class CompanyHeadQuartersData implements HeadQuartersData {
         * Headquarters' phone number
         */
        @JoinColumn (name = "headquarters_phone_number_id")
-       @OneToOne (targetEntity = DialableLandLineNumber.class, cascade = CascadeType.ALL)
+       @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
        private DialableLandLineNumber headquartersPhoneNumber;
 
        /**
@@ -125,7 +128,7 @@ public class CompanyHeadQuartersData implements HeadQuartersData {
         * User owner instance
         */
        @JoinColumn (name = "headquarters_user_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = User.class, cascade = CascadeType.REFRESH, optional = false)
+       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false)
        private User headquartersUserOwner;
 
        /**
index 65407dfe1e512273786a3d8e95538618696d671a..439f9f9b74f464d24709bb4908806c5e68126050 100644 (file)
@@ -30,6 +30,7 @@ import javax.persistence.OneToOne;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
+import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
 
 /**
@@ -74,7 +75,7 @@ public class CompanyLogo implements BusinessLogo {
         * Logo uploader user instance
         */
        @JoinColumn (name = "logo_uploader_id", nullable = false, updatable = false)
-       @OneToOne (targetEntity = User.class, cascade = CascadeType.REFRESH, optional = false)
+       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH, optional = false)
        private User logoUploader;
 
        @Override