import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontacts.model.contact.UserContact;
import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffices;
import org.mxchange.jcontactsbusiness.model.branchoffice.BusinessBranchOffice;
-import org.mxchange.jcontactsbusiness.model.employee.BusinessEmployee;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
import org.mxchange.jcontactsbusiness.model.headquarter.BusinessHeadquarter;
import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter;
import org.mxchange.jcontactsbusiness.model.headquarter.Headquarters;
private Long departmentId;
/**
- * Department lead employee
+ * Department lead contact data
*/
@JoinColumn (name = "department_lead_id")
- @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.REFRESH)
- private Employable departmentLead;
+ @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.REFRESH)
+ private Contact departmentLead;
/**
* User owner instance
return false;
} else if (!Objects.equals(this.getDepartmentId(), department.getDepartmentId())) {
return false;
+ } else if (!Objects.equals(this.getDepartmentLead(), department.getDepartmentLead())) {
+ return false;
} else if (!Objects.equals(this.getDepartmentUserOwner(), department.getDepartmentUserOwner())) {
return false;
}
}
@Override
- public Employable getDepartmentLead () {
+ public Contact getDepartmentLead () {
return this.departmentLead;
}
@Override
- public void setDepartmentLead (final Employable departmentLead) {
+ public void setDepartmentLead (final Contact departmentLead) {
this.departmentLead = departmentLead;
}
hash = 53 * hash + Objects.hashCode(this.getDepartmentHeadquarter());
hash = 53 * hash + Objects.hashCode(this.getDepartmentId());
hash = 53 * hash + Objects.hashCode(this.getDepartmentI18nKey());
+ hash = 53 * hash + Objects.hashCode(this.getDepartmentLead());
hash = 53 * hash + Objects.hashCode(this.getDepartmentUserOwner());
return hash;
import java.io.Serializable;
import java.util.Date;
+import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter;
import org.mxchange.jusercore.model.user.User;
void setDepartmentId (final Long departmentId);
/**
- * Getter for department lead employee
+ * Getter for department lead contact
* <p>
- * @return Department lead employee
+ * @return Department lead contact
*/
- Employable getDepartmentLead ();
+ Contact getDepartmentLead ();
/**
- * Setter for department lead employee
+ * Setter for department lead contact
* <p>
- * @param departmentLead Department lead employee
+ * @param departmentLead Department lead contact
*/
- void setDepartmentLead (final Employable departmentLead);
+ void setDepartmentLead (final Contact departmentLead);
/**
* Getter for department i18n key