From: Roland Haeder Date: Fri, 2 Oct 2015 09:57:55 +0000 (+0200) Subject: project initialization X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f7e87e6aeb63071626f648f5050cab694b2dbe54;p=jcontacts-business-core.git project initialization Signed-off-by:Roland Häder --- f7e87e6aeb63071626f648f5050cab694b2dbe54 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..315ea15 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/dist/ +/build/ +/nbproject/private/ \ No newline at end of file diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..bbba8c1 --- /dev/null +++ b/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project jcontacts-business-core. + + + diff --git a/dist.sh b/dist.sh new file mode 100644 index 0000000..0e3b4c6 --- /dev/null +++ b/dist.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +NAME="jcontacts-business-core" +LIST=`find ../*/lib/${NAME}.jar` +LIST="${LIST} `find ../*/*-ejb/lib/${NAME}.jar`" + +for entry in ${LIST}; +do + cp -v dist/${NAME}.jar ${entry} +done diff --git a/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar new file mode 100644 index 0000000..eaf6790 Binary files /dev/null and b/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar differ diff --git a/lib/jpa20-persistence/javax.persistence-2.1.0-doc.zip b/lib/jpa20-persistence/javax.persistence-2.1.0-doc.zip new file mode 100644 index 0000000..fd55e6e Binary files /dev/null and b/lib/jpa20-persistence/javax.persistence-2.1.0-doc.zip differ diff --git a/lib/jpa20-persistence/javax.persistence_2.1.0.v201304241213.jar b/lib/jpa20-persistence/javax.persistence_2.1.0.v201304241213.jar new file mode 100644 index 0000000..841d2e1 Binary files /dev/null and b/lib/jpa20-persistence/javax.persistence_2.1.0.v201304241213.jar differ diff --git a/lib/nblibraries.properties b/lib/nblibraries.properties new file mode 100644 index 0000000..7ee5412 --- /dev/null +++ b/lib/nblibraries.properties @@ -0,0 +1,10 @@ +libs.CopyLibs.classpath=\ + ${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar +libs.CopyLibs.displayName=CopyLibs Task +libs.CopyLibs.prop-version=2.0 +libs.jpa20-persistence.classpath=\ + ${base}/jpa20-persistence/javax.persistence_2.1.0.v201304241213.jar +libs.jpa20-persistence.displayName=Persistence (JPA 2.1) +libs.jpa20-persistence.javadoc=\ + ${base}/jpa20-persistence/javax.persistence-2.1.0-doc.zip +libs.jpa20-persistence.prop-maven-dependencies=org.eclipse.persistence:javax.persistence:2.1.0:jar diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..07687a8 --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..62f2791 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=e5807033 +build.xml.script.CRC32=42a002d3 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=e5807033 +nbproject/build-impl.xml.script.CRC32=11f86c9b +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..670d0c9 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,74 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=jcontacts-business-core +application.vendor=KLC +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/jcontacts-business-core.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +includes=** +jar.compress=false +javac.classpath=\ + ${libs.jpa20-persistence.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=true +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..e4f71b9 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,18 @@ + + + org.netbeans.modules.java.j2seproject + + + jcontacts-business-core + + + + + + + + + .\lib\nblibraries.properties + + + diff --git a/src/org/mxchange/jcontactsbusiness/BusinessContact.java b/src/org/mxchange/jcontactsbusiness/BusinessContact.java new file mode 100644 index 0000000..2362ba4 --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/BusinessContact.java @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness; + +import java.io.Serializable; +import java.util.List; +import org.mxchange.jcontactsbusiness.basicdata.BasicBusinessData; +import org.mxchange.jcontactsbusiness.employee.Employee; +import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData; + +/** + * A POJI for business contact classes + *

+ * @author Roland Haeder + */ +public interface BusinessContact extends Serializable { + + /** + * Getter for basic company data + *

+ * @return Basic company data + */ + public BasicBusinessData getBasicBusinessData (); + + /** + * Setter for basic company data + *

+ * @param basicBusinessData Basic company data + */ + public void setBasicBusinessData (final BasicBusinessData basicBusinessData); + + /** + * Getter for basic company data + *

+ * @return Basic company data + */ + public Long getCompanyContactId (); + + public void setCompanyContactId (final Long companyContactId); + + /** + * Getter for company founder + *

+ * @return Company founder + */ + public Employee getCompanyFounder (); + + /** + * Setter for company founder + *

+ * @param companyFounder Company founder + */ + public void setCompanyFounder (final Employee companyFounder); + + /** + * Getter for list of employees + *

+ * @return List of employees + */ + public List getEmployees (); + + /** + * Setter for list of employees + *

+ * @param employees List of employees + */ + public void setEmployees (final List employees); + + /** + * Getter for headquarters data + *

+ * @return Headquarters data + */ + public HeadQuartersData getHeadQuartersData (); + + /** + * Setter for headquarters data + *

+ * @param headQuartersData Headquarters data + */ + public void setHeadQuartersData (final HeadQuartersData headQuartersData); +} diff --git a/src/org/mxchange/jcontactsbusiness/CompanyContact.java b/src/org/mxchange/jcontactsbusiness/CompanyContact.java new file mode 100644 index 0000000..1a049a2 --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/CompanyContact.java @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness; + +import java.util.List; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; +import javax.persistence.OneToOne; +import javax.persistence.Table; +import org.mxchange.jcontactsbusiness.basicdata.BasicBusinessData; +import org.mxchange.jcontactsbusiness.basicdata.CompanyBasicData; +import org.mxchange.jcontactsbusiness.employee.CompanyEmployee; +import org.mxchange.jcontactsbusiness.employee.Employee; +import org.mxchange.jcontactsbusiness.headquarters.CompanyHeadQuartersData; +import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData; + +/** + * A POJO for business contacts + *

+ * @author Roland Haeder + */ +@Entity (name = "company_contacts") +@Table (name = "company_contacts") +public class CompanyContact implements BusinessContact, Comparable { + + /** + * Serial number + */ + private static final long serialVersionUID = 478_378_178_748_691L; + + /** + * Id number + */ + @Id + @Column (name = "company_contact_id", length = 20, nullable = false, unique = true, updatable = false) + @GeneratedValue (strategy = GenerationType.IDENTITY) + private Long companyContactId; + + /** + * Reference to basic data + */ + @JoinColumn (name = "basic_data_id", nullable = false, updatable = false, unique = true) + @OneToOne (targetEntity = CompanyBasicData.class, optional = false) + private BasicBusinessData basicBusinessData; + + /** + * Reference to headquarters data + */ + @JoinColumn (name = "headquarters_data_id", nullable = false, updatable = false, unique = true) + @OneToOne (targetEntity = CompanyHeadQuartersData.class, optional = false) + private HeadQuartersData headQuartersData; + + /** + * Reference to CEO "employee" + */ + @JoinColumn(name = "company_founder_id", nullable = false, updatable = false) + @OneToOne(targetEntity = CompanyEmployee.class, optional = false) + private Employee companyFounder; + + /** + * Reference to employee list + */ + @JoinColumn (name = "employees_id", nullable = false, updatable = false, unique = true) + @OneToMany(targetEntity = CompanyEmployee.class) + private List employees; + + @Override + public int compareTo (final BusinessContact businessContact) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public BasicBusinessData getBasicBusinessData () { + return this.basicBusinessData; + } + + @Override + public void setBasicBusinessData (final BasicBusinessData basicBusinessData) { + this.basicBusinessData = basicBusinessData; + } + + @Override + public Long getCompanyContactId () { + return this.companyContactId; + } + + @Override + public void setCompanyContactId (final Long companyContactId) { + this.companyContactId = companyContactId; + } + + @Override + public Employee getCompanyFounder () { + return this.companyFounder; + } + + @Override + public void setCompanyFounder (final Employee companyFounder) { + this.companyFounder = companyFounder; + } + + @Override + public List getEmployees () { + return this.employees; + } + + @Override + public void setEmployees (final List employees) { + this.employees = employees; + } + + @Override + public HeadQuartersData getHeadQuartersData () { + return this.headQuartersData; + } + + @Override + public void setHeadQuartersData (final HeadQuartersData headQuartersData) { + this.headQuartersData = headQuartersData; + } +} diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/BasicBusinessData.java b/src/org/mxchange/jcontactsbusiness/basicdata/BasicBusinessData.java new file mode 100644 index 0000000..dad32ca --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/basicdata/BasicBusinessData.java @@ -0,0 +1,168 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.basicdata; + +import java.io.Serializable; +import org.mxchange.jcontactsbusiness.logo.BusinessLogo; + +/** + * A POJI for basic business data + *

+ * @author Roland Haeder + */ +public interface BasicBusinessData extends Serializable { + + /** + * Getter for id number + *

+ * @return Id number + */ + public Long getCompanyBasicId (); + + /** + * Setter for id number + *

+ * @param companyBasicId Id number + */ + public void setCompanyBasicId (final Long companyBasicId); + + /** + * Getter for comments + *

+ * @return Comments + */ + public String getCompanyComments (); + + /** + * Setter for comments + *

+ * @param companyComments Comments + */ + public void setCompanyComments (final String companyComments); + + /** + * Getter for email address + *

+ * @return Email address + */ + public String getCompanyEmailAddress (); + + /** + * Setter for email address + *

+ * @param companyEmailAddress Email address + */ + public void setCompanyEmailAddress (final String companyEmailAddress); + + /** + * Getter for fax number + *

+ * @return Fax number + */ + public String getCompanyFaxNumber (); + + /** + * Setter for fax number + *

+ * @param companyFaxNumber Fax number + */ + public void setCompanyFaxNumber (final String companyFaxNumber); + + /** + * Getter for legal status + *

+ * @return Legal status + */ + public String getCompanyLegalStatus (); + + /** + * Setter for legal status + *

+ * @param companyLegalStatus Legal status + */ + public void setCompanyLegalStatus (final String companyLegalStatus); + + /** + * Getter for company logo + *

+ * @return Company logo + */ + public BusinessLogo getCompanyLogo (); + + /** + * Setter for company logo + *

+ * @param companyLogo Company logo + */ + public void setCompanyLogo (final BusinessLogo companyLogo); + + /** + * Getter for company name + *

+ * @return Company name + */ + public String getCompanyName (); + + /** + * Setter for company name + *

+ * @param companyName Company name + */ + public void setCompanyName (final String companyName); + + /** + * Getter for phone number + *

+ * @return Phone number + */ + public String getCompanyPhoneNumber (); + + /** + * Setter for phone number + *

+ * @param companyPhoneNumber Phone number + */ + public void setCompanyPhoneNumber (final String companyPhoneNumber); + + /** + * Getter for tax number + *

+ * @return Tax number + */ + public String getCompanyTaxNumber (); + + /** + * Setter for tax number + *

+ * @param companyTaxNumber Tax number + */ + public void setCompanyTaxNumber (final String companyTaxNumber); + + /** + * Getter for website URL + *

+ * @return Website URL + */ + public String getCompanyWebsiteUrl (); + + /** + * Setter for website URL + *

+ * @param companyWebsiteUrl Website URL + */ + public void setCompanyWebsiteUrl (final String companyWebsiteUrl); +} diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java new file mode 100644 index 0000000..690602d --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java @@ -0,0 +1,221 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.basicdata; + +import javax.persistence.Basic; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.Lob; +import javax.persistence.OneToOne; +import javax.persistence.Table; +import org.mxchange.jcontactsbusiness.logo.BusinessLogo; +import org.mxchange.jcontactsbusiness.logo.CompanyLogo; + +/** + * A POJO for basic company data + *

+ * @author Roland Haeder + */ +@Entity (name = "company_basic_data") +@Table (name = "company_basic_data") +public class CompanyBasicData implements BasicBusinessData, Comparable { + + /** + * Serial number + */ + private static final long serialVersionUID = 486_895_878_178_761L; + + public static long getSerialVersionUID () { + return serialVersionUID; + } + + /** + * Id number + */ + @Id + @Column (name = "company_basic_id", length = 20, nullable = false, unique = true, updatable = false) + @GeneratedValue (strategy = GenerationType.IDENTITY) + private Long companyBasicId; + + /** + * Company name + */ + @Basic (optional = false) + @Column (name = "company_name", length = 100, nullable = false, unique = true) + private String companyName; + + /** + * Legal status of company (e.g. "Inc.", "GmbH") + */ + @Basic (optional = false) + @Column (name = "company_legal_status", length = 20, nullable = false) + private String companyLegalStatus; + + /** + * Id number of company logo + */ + @JoinColumn (name = "company_logo_id") + @OneToOne (targetEntity = CompanyLogo.class, orphanRemoval = true) + private BusinessLogo companyLogo; + + /** + * Tax number + */ + @Basic (optional = false) + @Column (name = "company_tax_number", length = 30) + private String companyTaxNumber; + + /** + * URL for company website + */ + @Column (name = "company_website_url") + private String companyWebsiteUrl; + + /** + * Company's main phone number: +ccxxxxxxxxxx + */ + @Column (name = "company_phone_number", length = 20) + private String companyPhoneNumber; + + /** + * Company's main fax number: +ccxxxxxxxxxx + */ + @Column (name = "company_fax_number", length = 20) + private String companyFaxNumber; + + /** + * Company's main email address (example: info@company.com) + */ + @Column (name = "company_email_address", length = 100) + private String companyEmailAddress; + + /** + * Comments (any) + */ + @Lob + @Column (name = "company_comments") + private String companyComments; + + @Override + public int compareTo (final BasicBusinessData businessData) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public Long getCompanyBasicId () { + return this.companyBasicId; + } + + @Override + public void setCompanyBasicId (final Long companyBasicId) { + this.companyBasicId = companyBasicId; + } + + @Override + public String getCompanyComments () { + return this.companyComments; + } + + @Override + public void setCompanyComments (final String companyComments) { + this.companyComments = companyComments; + } + + @Override + public String getCompanyEmailAddress () { + return this.companyEmailAddress; + } + + @Override + public void setCompanyEmailAddress (final String companyEmailAddress) { + this.companyEmailAddress = companyEmailAddress; + } + + @Override + public String getCompanyFaxNumber () { + return this.companyFaxNumber; + } + + @Override + public void setCompanyFaxNumber (final String companyFaxNumber) { + this.companyFaxNumber = companyFaxNumber; + } + + @Override + public String getCompanyLegalStatus () { + return this.companyLegalStatus; + } + + @Override + public void setCompanyLegalStatus (final String companyLegalStatus) { + this.companyLegalStatus = companyLegalStatus; + } + + @Override + public BusinessLogo getCompanyLogo () { + return this.companyLogo; + } + + @Override + public void setCompanyLogo (final BusinessLogo companyLogoId) { + this.companyLogo = companyLogoId; + } + + @Override + public String getCompanyName () { + return this.companyName; + } + + @Override + public void setCompanyName (final String companyName) { + this.companyName = companyName; + } + + @Override + public String getCompanyPhoneNumber () { + return this.companyPhoneNumber; + } + + @Override + public void setCompanyPhoneNumber (final String companyPhoneNumber) { + this.companyPhoneNumber = companyPhoneNumber; + } + + @Override + public String getCompanyTaxNumber () { + return this.companyTaxNumber; + } + + @Override + public void setCompanyTaxNumber (final String companyTaxNumber) { + this.companyTaxNumber = companyTaxNumber; + } + + @Override + public String getCompanyWebsiteUrl () { + return this.companyWebsiteUrl; + } + + @Override + public void setCompanyWebsiteUrl (final String companyWebsiteUrl) { + this.companyWebsiteUrl = companyWebsiteUrl; + } +} diff --git a/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java new file mode 100644 index 0000000..9036f6d --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.employee; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +/** + * A POJO for company employees (including CEO) + *

+ * @author Roland Haeder + */ +@Entity(name = "company_employees") +@Table(name = "company_employees") +public class CompanyEmployee implements Employee, Comparable { + + /** + * Serial number + */ + private static final long serialVersionUID = 48_959_819_859_812_076L; + + /** + * Id number + */ + @Id + @Column(name = "company_employee_id", length = 20, nullable = false, unique = true, updatable = false) + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long companyEmployeeId; + + @Override + public int compareTo (final Employee employee) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } +} diff --git a/src/org/mxchange/jcontactsbusiness/employee/Employee.java b/src/org/mxchange/jcontactsbusiness/employee/Employee.java new file mode 100644 index 0000000..61ed021 --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/employee/Employee.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.employee; + +import java.io.Serializable; + +/** + * A POJI for employees + *

+ * @author Roland Haeder + */ +public interface Employee extends Serializable { + +} diff --git a/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java b/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java new file mode 100644 index 0000000..5cc445b --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2015 KLC + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.headquarters; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +/** + * A POJO for company headquarts data + *

+ * @author Roland Haeder + */ +@Entity (name = "company_headquarters") +@Table (name = "company_headquarters") +public class CompanyHeadQuartersData implements HeadQuartersData, Comparable { + + /** + * Serial number + */ + private static final long serialVersionUID = 385_752_948_781_761L; + + /** + * Id number + */ + @Id + @Column (name = "headquarters_id", length = 20, nullable = false, unique = true, updatable = false) + @GeneratedValue (strategy = GenerationType.IDENTITY) + private Long headquartersId; + + @Override + public int compareTo (final HeadQuartersData headQuartersData) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } +} diff --git a/src/org/mxchange/jcontactsbusiness/headquarters/HeadQuartersData.java b/src/org/mxchange/jcontactsbusiness/headquarters/HeadQuartersData.java new file mode 100644 index 0000000..0b641fa --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/headquarters/HeadQuartersData.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.headquarters; + +import java.io.Serializable; + +/** + * A POJI for headquarters data + *

+ * @author Roland Haeder + */ +public interface HeadQuartersData extends Serializable { + +} diff --git a/src/org/mxchange/jcontactsbusiness/logo/BusinessLogo.java b/src/org/mxchange/jcontactsbusiness/logo/BusinessLogo.java new file mode 100644 index 0000000..7900aca --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/logo/BusinessLogo.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.logo; + +import java.io.Serializable; + +/** + * A POJI for business logos + *

+ * @author Roland Haeder + */ +public interface BusinessLogo extends Serializable { + +} diff --git a/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java b/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java new file mode 100644 index 0000000..7dbe2fb --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2015 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jcontactsbusiness.logo; + +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * A POJO for company logos + *

+ * @author Roland Haeder + */ +@Entity (name = "company_logos") +@Table (name = "company_logos") +public class CompanyLogo implements BusinessLogo, Comparable { + + /** + * Serial number + */ + private static final long serialVersionUID = 475_871_875_718_751_285L; + + @Override + public int compareTo (final BusinessLogo businessLogo) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +}