From: Roland Haeder Date: Sat, 10 Oct 2015 20:02:39 +0000 (+0200) Subject: Rewrite: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=821c6bd2e5d4e67533bf1162b7d7d069bb8942d8;p=jcontacts-business-core.git Rewrite: - introduced jcountry-core which is a library for handling country-related data, e.g. dial prefix, country code ... - introduced jphone-core which is a library for handling phone, fax and cell phone numbers - these both new libraries required a rewrite of many parts --- diff --git a/.gitignore b/.gitignore index 315ea15..0383bcc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ -/dist/ +/nbproject/private/ +/nbproject/*~ +/manifest.mf /build/ -/nbproject/private/ \ No newline at end of file +/dist/ +/data/* +/*.properties diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar index 98ca617..855385d 100644 Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ diff --git a/lib/jcountry-core.jar b/lib/jcountry-core.jar new file mode 100644 index 0000000..ed08999 Binary files /dev/null and b/lib/jcountry-core.jar differ diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar new file mode 100644 index 0000000..480f9f8 Binary files /dev/null and b/lib/jphone-core.jar differ diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index d484d51..07687a8 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -18,1421 +18,1421 @@ is divided into following sections: - applet - cleanup ---> + --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - Must select one file in the IDE or set profile.class - This target only works when run from inside the NetBeans IDE. - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - Must select some files in the IDE or set test.includes - - - - - Must select one file in the IDE or set run.class - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - Must select some files in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - Must select one file in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/project.properties b/nbproject/project.properties index f3912e3..4a7545d 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -31,12 +31,16 @@ dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes= file.reference.jcontacts-core.jar=lib/jcontacts-core.jar +file.reference.jcountry-core.jar=lib/jcountry-core.jar +file.reference.jphone-core.jar=lib/jphone-core.jar includes=** jar.archive.disabled=${jnlp.enabled} jar.compress=false jar.index=${jnlp.enabled} javac.classpath=\ ${file.reference.jcontacts-core.jar}:\ + ${file.reference.jcountry-core.jar}:\ + ${file.reference.jphone-core.jar}:\ ${libs.jpa20-persistence.classpath} # Space-separated list of extra javac options javac.compilerargs=-Xlint:unchecked -Xlint:deprecation @@ -90,5 +94,7 @@ run.test.classpath=\ ${build.test.classes.dir} source.encoding=UTF-8 source.reference.jcontacts-core.jar=../jcontacts-core/src/ +source.reference.jcountry-core.jar=../jcountry-code/src/ +source.reference.jphone-core.jar=../jphone-core/src/ src.dir=src test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml index 9f0dd7e..e4f71b9 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -1,18 +1,18 @@ - org.netbeans.modules.java.j2seproject - - - jcontacts-business-core - - - - - - - - - .\lib\nblibraries.properties - - + org.netbeans.modules.java.j2seproject + + + jcontacts-business-core + + + + + + + + + .\lib\nblibraries.properties + + diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java index d0c2ff6..8964563 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java @@ -17,7 +17,10 @@ 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; /** * A POJI for basic business data @@ -69,18 +72,18 @@ public interface BusinessBasicData extends Serializable { public void setCompanyEmailAddress (final String companyEmailAddress); /** - * Getter for fax number + * Getter for list of fax number *

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

- * @param companyFaxNumber Fax number + * @param companyFaxNumber Fax numbers */ - public void setCompanyFaxNumber (final String companyFaxNumber); + public void setCompanyFaxNumberList (final List companyFaxNumber); /** * Getter for legal status @@ -125,18 +128,18 @@ public interface BusinessBasicData extends Serializable { public void setCompanyName (final String companyName); /** - * Getter for phone number + * Getter for list of phone number *

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

- * @param companyPhoneNumber Phone number + * @param companyPhoneNumber Phone numbers */ - public void setCompanyPhoneNumber (final String companyPhoneNumber); + public void setCompanyPhoneNumber (final List companyPhoneNumber); /** * Getter for tax number diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java index 5d0d8b9..a816142 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java @@ -16,6 +16,7 @@ */ package org.mxchange.jcontactsbusiness.basicdata; +import java.util.List; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; @@ -24,10 +25,15 @@ 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; import org.mxchange.jcontactsbusiness.logo.CompanyLogo; +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 basic company data @@ -59,7 +65,7 @@ public class CompanyBasicData implements BusinessBasicData, Comparable companyPhoneNumber; /** - * Company's main fax number: +ccxxxxxxxxxx + * Company's main fax numbers: +ccxxxxxxxxxx */ - @Column (name = "company_fax_number", length = 20) - private String companyFaxNumber; + @JoinColumn (name = "company_fax_number_id") + @OneToMany(targetEntity = FaxNumber.class) + private List companyFaxNumberList; /** * Company's main email address (example: info@company.com) @@ -146,13 +154,13 @@ public class CompanyBasicData implements BusinessBasicData, Comparable getCompanyFaxNumberList () { + return this.companyFaxNumberList; } @Override - public void setCompanyFaxNumber (final String companyFaxNumber) { - this.companyFaxNumber = companyFaxNumber; + public void setCompanyFaxNumberList (final List companyFaxNumberList) { + this.companyFaxNumberList = companyFaxNumberList; } @Override @@ -186,12 +194,12 @@ public class CompanyBasicData implements BusinessBasicData, Comparable getCompanyPhoneNumber () { return this.companyPhoneNumber; } @Override - public void setCompanyPhoneNumber (final String companyPhoneNumber) { + public void setCompanyPhoneNumber (final List companyPhoneNumber) { this.companyPhoneNumber = companyPhoneNumber; } diff --git a/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java index 86d83d8..b1fe993 100644 --- a/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java +++ b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java @@ -90,8 +90,8 @@ public class CompanyEmployee implements Employee, Comparable { /** * Employee's personal data */ - @JoinColumn (name = "employee_personal_id", nullable = false, updatable = false) - @OneToOne (optional = false, targetEntity = UserContact.class) + @JoinColumn (name = "employee_personal_data_id", nullable = false, updatable = false) + @OneToOne (targetEntity = UserContact.class, optional = false) private Contact employeePersonalData; /**