import java.io.Serializable;
import org.mxchange.jcountry.data.Country;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
/**
* A POJI for branch offices
* <p>
* @return Branch office's fax number
*/
- public String getBranchFaxNumber ();
+ public DialableFaxNumber getBranchFaxNumber ();
/**
* Setter for branch office's fax number
* <p>
* @param branchFaxNumber Branch office's fax number
*/
- public void setBranchFaxNumber (String branchFaxNumber);
+ public void setBranchFaxNumber (final DialableFaxNumber branchFaxNumber);
/**
* Getter for branch office's house number
* <p>
* @return Branch office's phone number
*/
- public String getBranchPhoneNumber ();
+ public DialableLandLineNumber getBranchPhoneNumber ();
/**
* Setter for branch office's phone number
* <p>
* @param branchPhoneNumber Branch office's phone number
*/
- public void setBranchPhoneNumber (final String branchPhoneNumber);
+ public void setBranchPhoneNumber (final DialableLandLineNumber branchPhoneNumber);
/**
* Getter for branch office's store
import javax.persistence.Table;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jcountry.data.CountryData;
+import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
/**
* A POJO for company branch offices
* Branch office's country code
*/
@JoinColumn (name = "branch_country_id", nullable = false)
- @OneToOne(targetEntity = CountryData.class, cascade = CascadeType.ALL, optional = false)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.ALL, optional = false)
private Country branchCountry;
/**
* Branch office's main phone number: +ccxxxxxxxxxx
*/
- @Column (name = "branch_phone_number", length = 20)
- private String branchPhoneNumber;
+ @JoinColumn (name = "branch_phone_number_id")
+ @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
+ private DialableLandLineNumber branchPhoneNumber;
/**
* Branch office's main fax number: +ccxxxxxxxxxx
*/
- @Column (name = "branch_fax_number", length = 20)
- private String branchFaxNumber;
+ @JoinColumn (name = "branch_fax_number_id")
+ @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
+ private DialableFaxNumber branchFaxNumber;
/**
* Branch office's main email address (example: branch-name@company.com)
}
@Override
- public String getBranchFaxNumber () {
+ public DialableFaxNumber getBranchFaxNumber () {
return this.branchFaxNumber;
}
@Override
- public void setBranchFaxNumber (String branchFaxNumber) {
+ public void setBranchFaxNumber (final DialableFaxNumber branchFaxNumber) {
this.branchFaxNumber = branchFaxNumber;
}
}
@Override
- public String getBranchPhoneNumber () {
+ public DialableLandLineNumber getBranchPhoneNumber () {
return this.branchPhoneNumber;
}
@Override
- public void setBranchPhoneNumber (final String branchPhoneNumber) {
+ public void setBranchPhoneNumber (final DialableLandLineNumber branchPhoneNumber) {
this.branchPhoneNumber = branchPhoneNumber;
}
package org.mxchange.jcontactsbusiness.employee;
import javax.persistence.Basic;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import org.mxchange.jcontactsbusiness.branch.CompanyBranchOffice;
import org.mxchange.jcontactsbusiness.department.CompanyDepartment;
import org.mxchange.jcontactsbusiness.department.Department;
+import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber;
+import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
/**
* A POJO for company employees (including CEO)
/**
* Employee's business mobile number
*/
- @Column (name = "employee_mobile_number", length = 20)
- private String employeeMobileNumber;
+ @JoinColumn (name = "employee_mobile_number_id")
+ @OneToOne(targetEntity = CellphoneNumber.class, cascade = CascadeType.ALL)
+ private DialableCellphoneNumber employeeMobileNumber;
/**
* Employee's number
/**
* Employee's phone extension (or number if different)
*/
- @Column (name = "employee_phone_extension", length = 20)
- private String employeePhoneExtension;
+ @Column (name = "employee_phone_extension", length = 10)
+ private Integer employeePhoneExtension;
/**
* Employee's position (example: CEO)
}
@Override
- public String getEmployeeMobileNumber () {
+ public DialableCellphoneNumber getEmployeeMobileNumber () {
return this.employeeMobileNumber;
}
@Override
- public void setEmployeeMobileNumber (final String employeeMobileNumber) {
+ public void setEmployeeMobileNumber (final DialableCellphoneNumber employeeMobileNumber) {
this.employeeMobileNumber = employeeMobileNumber;
}
}
@Override
- public String getEmployeePhoneExtension () {
+ public Integer getEmployeePhoneExtension () {
return this.employeePhoneExtension;
}
@Override
- public void setEmployeePhoneExtension (final String employeePhoneExtension) {
+ public void setEmployeePhoneExtension (final Integer employeePhoneExtension) {
this.employeePhoneExtension = employeePhoneExtension;
}
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcontactsbusiness.branch.BranchOffice;
import org.mxchange.jcontactsbusiness.department.Department;
+import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
/**
* A POJI for employees
* <p>
* @return Employee's mobile number
*/
- public String getEmployeeMobileNumber ();
+ public DialableCellphoneNumber getEmployeeMobileNumber ();
/**
* Setter for employee's mobile number
* <p>
* @param employeeMobileNumber Employee's mobile number
*/
- public void setEmployeeMobileNumber (final String employeeMobileNumber);
+ public void setEmployeeMobileNumber (final DialableCellphoneNumber employeeMobileNumber);
/**
* Getter for employee's number
* <p>
* @return Employee's phone number/extension
*/
- public String getEmployeePhoneExtension ();
+ public Integer getEmployeePhoneExtension ();
/**
* Setter for employee's phone number/extension
* <p>
* @param employeePhoneExtension Employee's phone number/extension
*/
- public void setEmployeePhoneExtension (final String employeePhoneExtension);
+ public void setEmployeePhoneExtension (final Integer employeePhoneExtension);
/**
* Getter for employee's position