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.fax.FaxNumber;
+import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
/**
* A POJO for company headquarts data
* Headquarter's country code
*/
@JoinColumn (name = "headquarters_country_id", nullable = false)
- @OneToOne(targetEntity = CountryData.class, cascade = CascadeType.ALL, optional = false)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.ALL, optional = false)
private Country headquartersCountry;
/**
@Column (name = "headquarters_zip_code", length = 6, nullable = false)
private Integer headquartersZipCode;
+ /**
+ * Headquarters' phone number
+ */
+ @JoinColumn (name = "headquarters_phone_number_id")
+ @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
+ private DialableLandLineNumber headquartersPhoneNumber;
+
+ /**
+ * Headquarters' fax number
+ */
+ @JoinColumn (name = "headquarters_fax_number_id")
+ @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
+ private DialableFaxNumber headquartersFaxNumber;
+
@Override
public int compareTo (final HeadQuartersData headQuartersData) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
public void setHeadquartersZipCode (final Integer headquartersZipCode) {
this.headquartersZipCode = headquartersZipCode;
}
+
+ @Override
+ public DialableLandLineNumber getHeadquartersPhoneNumber () {
+ return this.headquartersPhoneNumber;
+ }
+
+ @Override
+ public void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber) {
+ this.headquartersPhoneNumber = headquartersPhoneNumber;
+ }
+
+ @Override
+ public DialableFaxNumber getHeadquartersFaxNumber () {
+ return this.headquartersFaxNumber;
+ }
+
+ @Override
+ public void setHeadquartersFaxNumber (final DialableFaxNumber headquartersFaxNumber) {
+ this.headquartersFaxNumber = headquartersFaxNumber;
+ }
}
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 headquarters data
* @param headquartersZipCode Headquarters' ZIP code
*/
public void setHeadquartersZipCode (final Integer headquartersZipCode);
+
+ /**
+ * Getter for headquarters' phone number
+ * <p>
+ * @return Headquarters' phone number
+ */
+ public DialableLandLineNumber getHeadquartersPhoneNumber ();
+
+ /**
+ * Setter for headquarters' phone number
+ * <p>
+ * @param headquartersPhoneNumber Headquarters' phone number
+ */
+ public void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber);
+
+ /**
+ * Getter for headquarters' fax number
+ * <p>
+ * @return Headquarters' fax number
+ */
+ public DialableFaxNumber getHeadquartersFaxNumber ();
+
+ /**
+ * Setter for headquarters' fax number
+ * <p>
+ * @param headquartersFaxNumber Headquarters' fax number
+ */
+ public void setHeadquartersFaxNumber (final DialableFaxNumber headquartersFaxNumber);
}