]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
No more list for multiple company main numbers, only one is fine
authorRoland Haeder <roland@mxchange.org>
Wed, 21 Oct 2015 08:56:13 +0000 (10:56 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 21 Oct 2015 09:01:35 +0000 (11:01 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jphone-core.jar
src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java
src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java

index a6242e313134c45ad52f4d3c69d2552097c7f611..a5d222b5e458841311e097be654fba5408b3bc86 100644 (file)
Binary files a/lib/jphone-core.jar and b/lib/jphone-core.jar differ
index 7cb16a8cf190e2b698336ae5a8df86278099987b..9286df0c6c807995cb7ac6af8dbac64872ade1c1 100644 (file)
@@ -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 {
         * <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
@@ -132,14 +131,14 @@ public interface BusinessBasicData extends Serializable {
         * <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
@@ -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 ();
 }
index 3444b3e30a0e3eccf3c3186a1860ce9bae7c0a4c..c44743ea5044834fe1832c48441a93c9d5765fe9 100644 (file)
@@ -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<BusinessB
         * 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")
@@ -105,8 +103,8 @@ public class CompanyBasicData implements BusinessBasicData, Comparable<BusinessB
         * 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
@@ -177,13 +175,13 @@ public class CompanyBasicData implements BusinessBasicData, Comparable<BusinessB
        }
 
        @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
@@ -217,12 +215,12 @@ public class CompanyBasicData implements BusinessBasicData, Comparable<BusinessB
        }
 
        @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;
        }