From: Roland Haeder Date: Wed, 21 Oct 2015 08:56:13 +0000 (+0200) Subject: No more list for multiple company main numbers, only one is fine X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=de57378869c960c648bf72f4d83f52f5663b22c0;p=jcontacts-business-core.git No more list for multiple company main numbers, only one is fine Signed-off-by:Roland Häder --- diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar index a6242e3..a5d222b 100644 Binary files a/lib/jphone-core.jar and b/lib/jphone-core.jar differ diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java index 7cb16a8..9286df0 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java @@ -17,7 +17,6 @@ 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; @@ -76,14 +75,14 @@ public interface BusinessBasicData extends Serializable { *

* @return Fax numbers */ - List getCompanyFaxNumberList (); + DialableFaxNumber getCompanyFaxNumber (); /** * Setter for list of fax number *

* @param companyFaxNumber Fax numbers */ - void setCompanyFaxNumberList (final List companyFaxNumber); + void setCompanyFaxNumber (final DialableFaxNumber companyFaxNumber); /** * Getter for legal status @@ -132,14 +131,14 @@ public interface BusinessBasicData extends Serializable { *

* @return Phone numbers */ - List getCompanyPhoneNumber (); + DialableLandLineNumber getCompanyPhoneNumber (); /** * Setter for list of phone number *

* @param companyPhoneNumber Phone numbers */ - void setCompanyPhoneNumber (final List companyPhoneNumber); + void setCompanyPhoneNumber (final DialableLandLineNumber companyPhoneNumber); /** * Getter for tax number @@ -170,8 +169,8 @@ public interface BusinessBasicData extends Serializable { void setCompanyWebsiteUrl (final String companyWebsiteUrl); @Override - boolean equals (final Object object); + boolean equals (final Object object); @Override - int hashCode (); + int hashCode (); } diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java index 3444b3e..c44743e 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java @@ -16,7 +16,6 @@ */ package org.mxchange.jcontactsbusiness.basicdata; -import java.util.List; import java.util.Objects; import javax.persistence.Basic; import javax.persistence.CascadeType; @@ -28,7 +27,6 @@ import javax.persistence.GenerationType; 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; @@ -77,8 +75,8 @@ public class CompanyBasicData implements BusinessBasicData, Comparable companyFaxNumberList; + @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER) + private DialableFaxNumber companyFaxNumber; /** * Legal status of company (example: "Inc.", "GmbH") @@ -105,8 +103,8 @@ public class CompanyBasicData implements BusinessBasicData, Comparable companyPhoneNumber; + @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER) + private DialableLandLineNumber companyPhoneNumber; /** * Tax number @@ -177,13 +175,13 @@ public class CompanyBasicData implements BusinessBasicData, Comparable getCompanyFaxNumberList () { - return this.companyFaxNumberList; + public DialableFaxNumber getCompanyFaxNumber () { + return this.companyFaxNumber; } @Override - public void setCompanyFaxNumberList (final List companyFaxNumberList) { - this.companyFaxNumberList = companyFaxNumberList; + public void setCompanyFaxNumber (final DialableFaxNumber companyFaxNumber) { + this.companyFaxNumber = companyFaxNumber; } @Override @@ -217,12 +215,12 @@ public class CompanyBasicData implements BusinessBasicData, Comparable getCompanyPhoneNumber () { + public DialableLandLineNumber getCompanyPhoneNumber () { return this.companyPhoneNumber; } @Override - public void setCompanyPhoneNumber (final List companyPhoneNumber) { + public void setCompanyPhoneNumber (final DialableLandLineNumber companyPhoneNumber) { this.companyPhoneNumber = companyPhoneNumber; }