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;
private static final long serialVersionUID = 48_959_819_859_812_076L;
/**
- * Branch office the employee works at
+ * Branch office (if the employee works there)
*/
@JoinColumn (name = "employee_branch_id")
@OneToOne (targetEntity = CompanyBranchOffice.class, cascade = CascadeType.ALL)
private BranchOffice employeeBranchOffice;
+ /**
+ * Head quarters id number (if the employee works there)
+ */
+ @JoinColumn (name = "employee_branch_id")
+ @OneToOne (targetEntity = CompanyHeadQuartersData.class, cascade = CascadeType.ALL)
+ private HeadQuartersData employeeHeadquarter;
+
/**
* Company the employee is working at
*/
this.employeeEmailAddress = employeeEmailAddress;
}
+ @Override
+ public HeadQuartersData getEmployeeHeadquarter () {
+ return this.employeeHeadquarter;
+ }
+
+ @Override
+ public void setEmployeeHeadquarter (final HeadQuartersData employeeHeadquarter) {
+ this.employeeHeadquarter = employeeHeadquarter;
+ }
+
@Override
public Long getEmployeeId () {
return this.employeeId;
import org.mxchange.jcontactsbusiness.BusinessContact;
import org.mxchange.jcontactsbusiness.branch.BranchOffice;
import org.mxchange.jcontactsbusiness.department.Department;
+import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData;
import org.mxchange.jcontactsbusiness.jobposition.JobPosition;
import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
*/
void setEmployeeDepartment (final Department employeeDepartment);
+ /**
+ * Getter for employee's head quarters
+ * <p>
+ * @return Employee's head quarters
+ */
+ HeadQuartersData getEmployeeHeadquarter ();
+
+ /**
+ * Getter for employee's head quarters
+ * <p>
+ * @param employeeHeadquarter Employee's head quarters
+ */
+ void setEmployeeHeadquarter (final HeadQuartersData employeeHeadquarter);
+
/**
* Getter for employee's email address
* <p>
void setEmployeePosition (final JobPosition employeePosition);
@Override
- boolean equals (final Object object);
+ boolean equals (final Object object);
@Override
- int hashCode ();
+ int hashCode ();
}