package org.mxchange.jcontactsbusiness.basicdata;
import java.io.Serializable;
-import java.util.List;
import org.mxchange.jcontactsbusiness.logo.BusinessLogo;
import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
* <p>
* @return Fax numbers
*/
- List<DialableFaxNumber> getCompanyFaxNumberList ();
+ DialableFaxNumber getCompanyFaxNumber ();
/**
* Setter for list of fax number
* <p>
* @param companyFaxNumber Fax numbers
*/
- void setCompanyFaxNumberList (final List<DialableFaxNumber> companyFaxNumber);
+ void setCompanyFaxNumber (final DialableFaxNumber companyFaxNumber);
/**
* Getter for legal status
* <p>
* @return Phone numbers
*/
- List<DialableLandLineNumber> getCompanyPhoneNumber ();
+ DialableLandLineNumber getCompanyPhoneNumber ();
/**
* Setter for list of phone number
* <p>
* @param companyPhoneNumber Phone numbers
*/
- void setCompanyPhoneNumber (final List<DialableLandLineNumber> companyPhoneNumber);
+ void setCompanyPhoneNumber (final DialableLandLineNumber companyPhoneNumber);
/**
* Getter for tax number
void setCompanyWebsiteUrl (final String companyWebsiteUrl);
@Override
- boolean equals (final Object object);
+ boolean equals (final Object object);
@Override
- int hashCode ();
+ int hashCode ();
}
*/
package org.mxchange.jcontactsbusiness.basicdata;
-import java.util.List;
import java.util.Objects;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
-import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import org.mxchange.jcontactsbusiness.logo.BusinessLogo;
* Company's main fax numbers: +ccxxxxxxxxxx
*/
@JoinColumn (name = "company_fax_number_id")
- @OneToMany (targetEntity = FaxNumber.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
- private List<DialableFaxNumber> companyFaxNumberList;
+ @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
+ private DialableFaxNumber companyFaxNumber;
/**
* Legal status of company (example: "Inc.", "GmbH")
* Company's main phone number: +ccxxxxxxxxxx
*/
@JoinColumn (name = "company_phone_number")
- @OneToMany (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
- private List<DialableLandLineNumber> companyPhoneNumber;
+ @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
+ private DialableLandLineNumber companyPhoneNumber;
/**
* Tax number
}
@Override
- public List<DialableFaxNumber> getCompanyFaxNumberList () {
- return this.companyFaxNumberList;
+ public DialableFaxNumber getCompanyFaxNumber () {
+ return this.companyFaxNumber;
}
@Override
- public void setCompanyFaxNumberList (final List<DialableFaxNumber> companyFaxNumberList) {
- this.companyFaxNumberList = companyFaxNumberList;
+ public void setCompanyFaxNumber (final DialableFaxNumber companyFaxNumber) {
+ this.companyFaxNumber = companyFaxNumber;
}
@Override
}
@Override
- public List<DialableLandLineNumber> getCompanyPhoneNumber () {
+ public DialableLandLineNumber getCompanyPhoneNumber () {
return this.companyPhoneNumber;
}
@Override
- public void setCompanyPhoneNumber (final List<DialableLandLineNumber> companyPhoneNumber) {
+ public void setCompanyPhoneNumber (final DialableLandLineNumber companyPhoneNumber) {
this.companyPhoneNumber = companyPhoneNumber;
}