import java.io.Serializable;
import java.util.Date;
import java.util.List;
+import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
import org.mxchange.jcountry.model.data.Country;
import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
void setBranchOpeningTimes (final List<OpeningTime> branchOpeningTimes);
/**
- * Getter for branch office owning employee
+ * Getter for branch office owning contact
* <p>
- * @return Owning employee
+ * @return Owning contact
*/
- Employable getBranchOwnerEmployee ();
+ Contact getBranchOwnerEmployee ();
/**
- * Setter for branch office owning employee
+ * Setter for branch office owning contact
* <p>
- * @param branchOwnerEmployee Owning employee
+ * @param branchOwnerEmployee Owning contact
*/
- void setBranchOwnerEmployee (final Employable branchOwnerEmployee);
+ void setBranchOwnerEmployee (final Contact branchOwnerEmployee);
/**
* Getter for branch office's ZIP code
* <p>
* @return Branch office's contact person
*/
- Employable getBranchContactEmployee ();
+ Contact getBranchContactEmployee ();
/**
* Setter branch office's contact person
* <p>
* @param branchEmployee Branch office's contact person
*/
- void setBranchContactEmployee (final Employable branchEmployee);
+ void setBranchContactEmployee (final Contact branchEmployee);
/**
* Getter for user owner instance
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import org.apache.commons.lang3.StringUtils;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontacts.model.contact.Contacts;
+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.employee.BusinessEmployee;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
-import org.mxchange.jcontactsbusiness.model.employee.Employees;
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 = "branch_contact_employee_id", referencedColumnName = "employee_id")
- @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.REFRESH)
- private Employable branchContactEmployee;
+ @JoinColumn (name = "branch_contact_employee_id", referencedColumnName = "contact_id")
+ @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.REFRESH)
+ private Contact branchContactEmployee;
/**
* Branch office's country code
* will have an owning person (here generally referred as "employee") who
* will own one or more branch offices.
*/
- @JoinColumn (name = "branch_owner_employee_id", referencedColumnName = "employee_id")
- @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.REFRESH)
- private Employable branchOwnerEmployee;
+ @JoinColumn (name = "branch_owner_employee_id", referencedColumnName = "contact_id")
+ @OneToOne (targetEntity = UserContact.class, cascade = CascadeType.REFRESH)
+ private Contact branchOwnerEmployee;
/**
* Branch office's store (if multiple-store building)
// ... branch office number
SafeNumberUtils.compare(this.getBranchNumber(), branchOffice.getBranchNumber()),
// ... owner employee
- Employees.compare(this.getBranchOwnerEmployee(), branchOffice.getBranchOwnerEmployee()),
+ Contacts.compare(this.getBranchOwnerEmployee(), branchOffice.getBranchOwnerEmployee()),
// ... contact person
- Employees.compare(this.getBranchContactEmployee(), branchOffice.getBranchContactEmployee()),
+ Contacts.compare(this.getBranchContactEmployee(), branchOffice.getBranchContactEmployee()),
// ... then country
this.getBranchCountry().compareTo(branchOffice.getBranchCountry()),
// ... next city
return false;
} else if (!Objects.equals(this.getBranchCompany(), branchOffice.getBranchCompany())) {
return false;
+ } else if (!Objects.equals(this.getBranchContactEmployee(), branchOffice.getBranchContactEmployee())) {
+ return false;
} else if (!Objects.equals(this.getBranchCountry(), branchOffice.getBranchCountry())) {
return false;
} else if (!Objects.equals(this.getBranchEmailAddress(), branchOffice.getBranchEmailAddress())) {
return false;
} else if (!Objects.equals(this.getBranchNumber(), branchOffice.getBranchNumber())) {
return false;
+ } else if (!Objects.equals(this.getBranchOwnerEmployee(), branchOffice.getBranchOwnerEmployee())) {
+ return false;
} else if (!Objects.equals(this.getBranchStore(), branchOffice.getBranchStore())) {
return false;
} else if (!Objects.equals(this.getBranchStreet(), branchOffice.getBranchStreet())) {
}
@Override
- public Employable getBranchContactEmployee () {
+ public Contact getBranchContactEmployee () {
return this.branchContactEmployee;
}
@Override
- public void setBranchContactEmployee (final Employable branchContactEmployee) {
+ public void setBranchContactEmployee (final Contact branchContactEmployee) {
this.branchContactEmployee = branchContactEmployee;
}
}
@Override
- public Employable getBranchOwnerEmployee () {
+ public Contact getBranchOwnerEmployee () {
return this.branchOwnerEmployee;
}
@Override
- public void setBranchOwnerEmployee (final Employable branchOwnerEmployee) {
+ public void setBranchOwnerEmployee (final Contact branchOwnerEmployee) {
this.branchOwnerEmployee = branchOwnerEmployee;
}
hash = 53 * hash + Objects.hashCode(this.getBranchCity());
hash = 53 * hash + Objects.hashCode(this.getBranchCompany());
+ hash = 53 * hash + Objects.hashCode(this.getBranchContactEmployee());
hash = 53 * hash + Objects.hashCode(this.getBranchCountry());
hash = 53 * hash + Objects.hashCode(this.getBranchEmailAddress());
hash = 53 * hash + Objects.hashCode(this.getBranchFaxNumber());
hash = 53 * hash + Objects.hashCode(this.getBranchLandLineNumber());
hash = 53 * hash + Objects.hashCode(this.getBranchLastHouseNumber());
hash = 53 * hash + Objects.hashCode(this.getBranchNumber());
+ hash = 53 * hash + Objects.hashCode(this.getBranchOwnerEmployee());
hash = 53 * hash + Objects.hashCode(this.getBranchStore());
hash = 53 * hash + Objects.hashCode(this.getBranchStreet());
hash = 53 * hash + Objects.hashCode(this.getBranchSuiteNumber());