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;
/**
* 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
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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
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;
/**
* 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;
/**
* 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;
/**
* 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
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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
* 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
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;
/**
* 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;
/**
* 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;
/**
* 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;
/**
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;
/**
* 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