import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.apache.commons.lang3.StringUtils;
-import org.mxchange.jcontactsbusiness.model.employee.BusinessEmployee;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontacts.model.contact.UserContact;
import org.mxchange.jcontactsbusiness.model.opening_time.BusinessOpeningTime;
import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
import org.mxchange.jcoreutils.Comparables;
/**
* Reference to contact person
*/
- @JoinColumn (name = "headquarter_contact_employee_id", referencedColumnName = "employee_id")
- @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.REFRESH)
- private Employable headquarterContactEmployee;
+ @JoinColumn (name = "headquarter_contact_employee_id", referencedColumnName = "contact_id")
+ @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.REFRESH)
+ private Contact headquarterContactEmployee;
/**
* Headquarter's country code
return false;
} else if (!Objects.equals(this.getHeadquarterCompanyName(), headquarter.getHeadquarterCompanyName())) {
return false;
+ } else if (!Objects.equals(this.getHeadquarterContactEmployee(), headquarter.getHeadquarterContactEmployee())) {
+ return false;
} else if (!Objects.equals(this.getHeadquarterCountry(), headquarter.getHeadquarterCountry())) {
return false;
} else if (!Objects.equals(this.getHeadquarterEmailAddress(), headquarter.getHeadquarterEmailAddress())) {
}
@Override
- public Employable getHeadquarterContactEmployee () {
+ public Contact getHeadquarterContactEmployee () {
return this.headquarterContactEmployee;
}
@Override
- public void setHeadquarterContactEmployee (final Employable headquarterContactEmployee) {
+ public void setHeadquarterContactEmployee (final Contact headquarterContactEmployee) {
this.headquarterContactEmployee = headquarterContactEmployee;
}
hash = 47 * hash + Objects.hashCode(this.getHeadquarterCity());
hash = 47 * hash + Objects.hashCode(this.getHeadquarterCompanyName());
+ hash = 47 * hash + Objects.hashCode(this.getHeadquarterContactEmployee());
hash = 47 * hash + Objects.hashCode(this.getHeadquarterCountry());
hash = 47 * hash + Objects.hashCode(this.getHeadquarterEmailAddress());
hash = 47 * hash + Objects.hashCode(this.getHeadquarterFaxNumber());
import java.io.Serializable;
import java.util.Date;
import java.util.List;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
+import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
import org.mxchange.jcountry.model.data.Country;
import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
void setHeadquarterUserOwner (final User headquarterUserOwner);
/**
- * Getter for branch office owning employee
+ * Getter for branch office owning contact
* <p>
- * @return Owning employee
+ * @return Owning contact
*/
- Employable getHeadquarterContactEmployee ();
+ Contact getHeadquarterContactEmployee ();
/**
* Setter for branch office contact person
* <p>
* @param branchContactEmployee Contact person
*/
- void setHeadquarterContactEmployee (final Employable branchContactEmployee);
+ void setHeadquarterContactEmployee (final Contact branchContactEmployee);
/**
* Getter for opening times for this branch office