From e9bf959acbd00f0d6b72dc0b93804ccb3a1a65bf Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 2 Oct 2015 15:16:22 +0200 Subject: [PATCH] =?utf8?q?Continued:=20-=20POJOs=20and=20POJIs=20should=20?= =?utf8?q?be=20"basicly=20finished"=20now=20-=20maybe=20still=20some=20pro?= =?utf8?q?perties=20are=20missing=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/jcontacts-core.jar | Bin 0 -> 18633 bytes nbproject/project.properties | 36 ++- .../jcontactsbusiness/BusinessContact.java | 26 +- .../jcontactsbusiness/CompanyContact.java | 59 +++-- ...sinessData.java => BusinessBasicData.java} | 2 +- .../basicdata/CompanyBasicData.java | 8 +- .../branch/BranchOffice.java | 181 ++++++++++++++ .../branch/CompanyBranchOffice.java | 228 ++++++++++++++++++ .../department/CompanyDepartment.java | 119 +++++++++ .../department/Department.java | 85 +++++++ .../employee/CompanyEmployee.java | 162 ++++++++++++- .../jcontactsbusiness/employee/Employee.java | 128 ++++++++++ .../headquarters/CompanyHeadQuartersData.java | 132 +++++++++- .../headquarters/HeadQuartersData.java | 111 +++++++++ .../jcontactsbusiness/logo/BusinessLogo.java | 13 + .../jcontactsbusiness/logo/CompanyLogo.java | 22 ++ 16 files changed, 1267 insertions(+), 45 deletions(-) create mode 100644 lib/jcontacts-core.jar rename src/org/mxchange/jcontactsbusiness/basicdata/{BasicBusinessData.java => BusinessBasicData.java} (98%) create mode 100644 src/org/mxchange/jcontactsbusiness/branch/BranchOffice.java create mode 100644 src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java create mode 100644 src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java create mode 100644 src/org/mxchange/jcontactsbusiness/department/Department.java diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar new file mode 100644 index 0000000000000000000000000000000000000000..13b4e24e5a041c79b10267ea5e1a15bb5b6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>v@^L-(FiOFBX3-UUur%eDpepv&~YCfl=Y}gjzX5;crtjR=S%#e2tP;3*6JKz9ha=IF(4A965te z7(j@hM;P<5tgHT-=|z6e_FE>A3v_zA$}M75b|j3S?c**b2v~Vvb{yGeHJ@|fL;6e(3-L0UNSkCZm7=0MDl?hDmWfEhT$TuLu(tW}| zRu;HK1y{n45`64G$BY3{1~_VP%pV3pEy_Lx(;IBu2u}*d@oG?kX+{2zGtY)pbe`)Ao%+;h1=;b zVk+jw^(udny=Y{+tivW&VU)~e@#euN8~!vJ&g^LHGFbN|T67Scd!X@?d;RUJR=%Hl z8dq)F6{rT$DTQ0cIcf$)glmS6wt@AOpQD_-z1K=T7=)(}+j68t{^)_z0+Z3mcED542{RDe|5ps*G+!vq0o1<{578c6IW zkSQOCRUg#28R}!Q$GaHCn7FYjW(Q(ec}vOv9FhkN+G)@(ctg;>U!r*a$j%2A%{sRg z>M*im%T$#$vX*DHtBkBQvgiVmMpgkub7A{($=vY`4c8yRu7Q6&NRWrjIX)8aRy?IM zhVObN&UEssp0R4UnBArztu$y=F_gQSFSUGG!{*U-A&dZ+MXxca4nqbjz*T;IMoT{U zv3rUgY-C}dk}r&tX^zv8k6m4*R@gA`LfD-mS~;uwnmM)4Rs%uT>NK^dqUkBU&hEt; zx3M3wjjRBIi{u zOf3b5E{t2j=vNFM6ut^S8kXm;lyJRlB6+Hl@0mYDqW)${HmlcPE#VCO@BTX*am{3P z{0)=2DrcLE`p1=j1|pC3xpHuSsDGT}yAX5Uj=8c{**RrPmtdjD$(sE`8gmuGi@N&9 z_4nm3#D0zDDvXz}Y+-lJUzlRub1G=9U8HQ~=kk~7n1S6G-G9EsF7p064UGCcTC*Fh z=MA-=|cbjjr<*x=m tSxEV6Z|PZyn^t5i`N6)tl{h+6>wgZCF?_IqSs~`O5?YK`@P1}5^c(sL&N%=8 literal 0 HcmV?d00001 diff --git a/nbproject/project.properties b/nbproject/project.properties index 670d0c9..f3912e3 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,10 +1,11 @@ annotation.processing.enabled=true -annotation.processing.enabled.in.editor=false +annotation.processing.enabled.in.editor=true 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 +application.vendor=Roland Haeder +auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: @@ -29,13 +30,17 @@ dist.jar=${dist.dir}/jcontacts-business-core.jar dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes= +file.reference.jcontacts-core.jar=lib/jcontacts-core.jar includes=** +jar.archive.disabled=${jnlp.enabled} jar.compress=false +jar.index=${jnlp.enabled} javac.classpath=\ + ${file.reference.jcontacts-core.jar}:\ ${libs.jpa20-persistence.classpath} # Space-separated list of extra javac options -javac.compilerargs= -javac.deprecation=false +javac.compilerargs=-Xlint:unchecked -Xlint:deprecation +javac.deprecation=true javac.processorpath=\ ${javac.classpath} javac.source=1.7 @@ -46,19 +51,33 @@ javac.test.classpath=\ javac.test.processorpath=\ ${javac.test.classpath} javadoc.additionalparam= -javadoc.author=false +javadoc.author=true javadoc.encoding=${source.encoding} javadoc.noindex=false javadoc.nonavbar=false javadoc.notree=false -javadoc.private=false +javadoc.private=true javadoc.splitindex=true javadoc.use=true -javadoc.version=false -javadoc.windowtitle= +javadoc.version=true +javadoc.windowtitle=Business Contacts Library +jnlp.codebase.type=no.codebase +jnlp.descriptor=application +jnlp.enabled=false +jnlp.mixed.code=default +jnlp.offline-allowed=false +jnlp.signed=false +jnlp.signing= +jnlp.signing.alias= +jnlp.signing.keystore= +# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed +manifest.custom.codebase= +# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions) +manifest.custom.permissions= meta.inf.dir=${src.dir}/META-INF mkdist.disabled=true platform.active=default_platform +project.license=gpl30 run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} @@ -70,5 +89,6 @@ run.test.classpath=\ ${javac.test.classpath}:\ ${build.test.classes.dir} source.encoding=UTF-8 +source.reference.jcontacts-core.jar=../jcontacts-core/src/ src.dir=src test.src.dir=test diff --git a/src/org/mxchange/jcontactsbusiness/BusinessContact.java b/src/org/mxchange/jcontactsbusiness/BusinessContact.java index 2362ba4..2728073 100644 --- a/src/org/mxchange/jcontactsbusiness/BusinessContact.java +++ b/src/org/mxchange/jcontactsbusiness/BusinessContact.java @@ -18,7 +18,8 @@ package org.mxchange.jcontactsbusiness; import java.io.Serializable; import java.util.List; -import org.mxchange.jcontactsbusiness.basicdata.BasicBusinessData; +import org.mxchange.jcontactsbusiness.basicdata.BusinessBasicData; +import org.mxchange.jcontactsbusiness.branch.BranchOffice; import org.mxchange.jcontactsbusiness.employee.Employee; import org.mxchange.jcontactsbusiness.headquarters.HeadQuartersData; @@ -34,14 +35,28 @@ public interface BusinessContact extends Serializable { *

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

* @param basicBusinessData Basic company data */ - public void setBasicBusinessData (final BasicBusinessData basicBusinessData); + public void setBasicBusinessData (final BusinessBasicData basicBusinessData); + + /** + * Getter for branches list + *

+ * @return Branches list + */ + public List getBranches (); + + /** + * Setter for branches list + *

+ * @param branches Branches list + */ + public void setBranches (final List branches); /** * Getter for basic company data @@ -50,6 +65,11 @@ public interface BusinessContact extends Serializable { */ public Long getCompanyContactId (); + /** + * Setter for basic company data + *

+ * @param companyContactId Basic company data + */ public void setCompanyContactId (final Long companyContactId); /** diff --git a/src/org/mxchange/jcontactsbusiness/CompanyContact.java b/src/org/mxchange/jcontactsbusiness/CompanyContact.java index 1a049a2..781fd46 100644 --- a/src/org/mxchange/jcontactsbusiness/CompanyContact.java +++ b/src/org/mxchange/jcontactsbusiness/CompanyContact.java @@ -26,8 +26,10 @@ 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.BusinessBasicData; import org.mxchange.jcontactsbusiness.basicdata.CompanyBasicData; +import org.mxchange.jcontactsbusiness.branch.BranchOffice; +import org.mxchange.jcontactsbusiness.branch.CompanyBranchOffice; import org.mxchange.jcontactsbusiness.employee.CompanyEmployee; import org.mxchange.jcontactsbusiness.employee.Employee; import org.mxchange.jcontactsbusiness.headquarters.CompanyHeadQuartersData; @@ -48,56 +50,73 @@ public class CompanyContact implements BusinessContact, Comparable branches; /** - * Reference to headquarters data + * Id number */ - @JoinColumn (name = "headquarters_data_id", nullable = false, updatable = false, unique = true) - @OneToOne (targetEntity = CompanyHeadQuartersData.class, optional = false) - private HeadQuartersData headQuartersData; + @Id + @Column (name = "company_contact_id", length = 20, nullable = false, unique = true, updatable = false) + @GeneratedValue (strategy = GenerationType.IDENTITY) + private Long companyContactId; /** * Reference to CEO "employee" */ - @JoinColumn(name = "company_founder_id", nullable = false, updatable = false) - @OneToOne(targetEntity = CompanyEmployee.class, optional = false) + @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) + @JoinColumn (name = "company_employees_id", nullable = false, updatable = false, unique = true) + @OneToMany (targetEntity = CompanyEmployee.class) private List employees; + /** + * Reference to headquarters data + */ + @JoinColumn (name = "company_headquarters_data_id", nullable = false, updatable = false, unique = true) + @OneToOne (targetEntity = CompanyHeadQuartersData.class, optional = false) + private HeadQuartersData headQuartersData; + @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 () { + public BusinessBasicData getBasicBusinessData () { return this.basicBusinessData; } @Override - public void setBasicBusinessData (final BasicBusinessData basicBusinessData) { + public void setBasicBusinessData (final BusinessBasicData basicBusinessData) { this.basicBusinessData = basicBusinessData; } + @Override + public List getBranches () { + return this.branches; + } + + @Override + public void setBranches (final List branches) { + this.branches = branches; + } + @Override public Long getCompanyContactId () { return this.companyContactId; diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/BasicBusinessData.java b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java similarity index 98% rename from src/org/mxchange/jcontactsbusiness/basicdata/BasicBusinessData.java rename to src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java index dad32ca..d0c2ff6 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/BasicBusinessData.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/BusinessBasicData.java @@ -24,7 +24,7 @@ import org.mxchange.jcontactsbusiness.logo.BusinessLogo; *

* @author Roland Haeder */ -public interface BasicBusinessData extends Serializable { +public interface BusinessBasicData extends Serializable { /** * Getter for id number diff --git a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java index 690602d..a632344 100644 --- a/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java +++ b/src/org/mxchange/jcontactsbusiness/basicdata/CompanyBasicData.java @@ -36,17 +36,13 @@ import org.mxchange.jcontactsbusiness.logo.CompanyLogo; */ @Entity (name = "company_basic_data") @Table (name = "company_basic_data") -public class CompanyBasicData implements BasicBusinessData, Comparable { +public class CompanyBasicData implements BusinessBasicData, Comparable { /** * Serial number */ private static final long serialVersionUID = 486_895_878_178_761L; - public static long getSerialVersionUID () { - return serialVersionUID; - } - /** * Id number */ @@ -115,7 +111,7 @@ public class CompanyBasicData implements BasicBusinessData, Comparable. + */ +package org.mxchange.jcontactsbusiness.branch; + +import java.io.Serializable; + +/** + * A POJI for branch offices + *

+ * @author Roland Haeder + */ +public interface BranchOffice extends Serializable { + + /** + * Getter for branch office's city name + *

+ * @return Branch office's city name + */ + public String getBranchCity (); + + /** + * Setter for branch office's city name + *

+ * @param branchCity Branch office's city name + */ + public void setBranchCity (final String branchCity); + + /** + * Getter for branch office's email address + *

+ * @return Branch office's email address + */ + public String getBranchEmailAddress (); + + /** + * Setter for branch office's email address + *

+ * @param branchEmailAddress Branch office's email address + */ + public void setBranchEmailAddress (final String branchEmailAddress); + + /** + * Getter for branch office's fax number + *

+ * @return Branch office's fax number + */ + public String getBranchFaxNumber (); + + /** + * Setter for branch office's fax number + *

+ * @param branchFaxNumber Branch office's fax number + */ + public void setBranchFaxNumber (String branchFaxNumber); + + /** + * Getter for branch office's house number + *

+ * @return Branch office's house number + */ + public Short getBranchHouseNumber (); + + /** + * Setter for branch office's house number + *

+ * @param branchHouseNumber Branch office's house number + */ + public void setBranchHouseNumber (final Short branchHouseNumber); + + /** + * Getter for branch office's phone number + *

+ * @return Branch office's phone number + */ + public String getBranchPhoneNumber (); + + /** + * Setter for branch office's phone number + *

+ * @param branchPhoneNumber Branch office's phone number + */ + public void setBranchPhoneNumber (final String branchPhoneNumber); + + /** + * Getter for branch office's store + *

+ * @return Branch office's store + */ + public Short getBranchStore (); + + /** + * Setter for branch office's store + *

+ * @param branchStore Branch office's store + */ + public void setBranchStore (final Short branchStore); + + /** + * Getter for branch office's street name + *

+ * @return Branch office's street name + */ + public String getBranchStreet (); + + /** + * Setter for branch office's street name + *

+ * @param branchStreet Branch office's street name + */ + public void setBranchStreet (final String branchStreet); + + /** + * Getter for branch office's suite number + *

+ * @return Branch office's suite number + */ + public Short getBranchSuiteNumber (); + + /** + * Setter for branch office's suite number + *

+ * @param branchSuiteNumber Branch office's suite number + */ + public void setBranchSuiteNumber (final Short branchSuiteNumber); + + /** + * Getter for branch office's ZIP code + *

+ * @return Branch office's ZIP code + */ + public Integer getBranchZipCode (); + + /** + * Setter for branch office's ZIP code + *

+ * @param branchZipCode Branch office's ZIP code + */ + public void setBranchZipCode (final Integer branchZipCode); + + /** + * Getter for branch office's id number + *

+ * @return Branch office's id number + */ + public Long getBranchId (); + + /** + * Setter for branch office's id number + *

+ * @param branchId Branch office's id number + */ + public void setBranchId (final Long branchId); + + /** + * Getter for branch office's country code + *

+ * @return Branch office's country code + */ + public String getBranchCountryCode (); + + /** + * Setter for branch office's country code + *

+ * @param branchCountryCode Branch office's country code + */ + public void setBranchCountryCode (final String branchCountryCode); +} diff --git a/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java b/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java new file mode 100644 index 0000000..c0d0c9e --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java @@ -0,0 +1,228 @@ +/* + * 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.branch; + +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.Table; + +/** + * A POJO for company branch offices + *

+ * @author Roland Haeder + */ +@Entity (name = "company_branches") +@Table (name = "company_branches") +public class CompanyBranchOffice implements BranchOffice, Comparable { + + /** + * Serial number + */ + private static final long serialVersionUID = 47_957_817_276_871_852L; + + /** + * Id number + */ + @Id + @GeneratedValue (strategy = GenerationType.IDENTITY) + @Column (name = "branch_id", length = 20, nullable = false, unique = true, updatable = false) + private Long branchId; + + /** + * Branch office's street name + */ + @Basic (optional = false) + @Column (name = "branch_street", length = 100, nullable = false) + private String branchStreet; + + /** + * Branch office's house number + */ + @Basic(optional = false) + @Column(name = "branch_house_number", length = 3, nullable = false) + private Short branchHouseNumber; + + /** + * Branch office's store (if multiple-store building) + */ + @Column(name = "branch_store", length = 3) + private Short branchStore; + + /** + * Branch office's suite number (if applyable) + */ + @Column(name = "branch_suite_number", length = 4) + private Short branchSuiteNumber; + + /** + * Branch office's ZIP code + */ + @Basic(optional = false) + @Column(name = "branch_zip_code", length = 6, nullable = false) + private Integer branchZipCode; + + /** + * Branch office's city name + */ + @Basic(optional = false) + @Column(name = "branch_city", length = 100, nullable = false) + private String branchCity; + + /** + * Branch office's country code + */ + @Basic(optional = false) + @Column(name = "branch_country_code", length = 100, nullable = false) + private String branchCountryCode; + + /** + * Branch office's main phone number: +ccxxxxxxxxxx + */ + @Column (name = "branch_phone_number", length = 20) + private String branchPhoneNumber; + + /** + * Branch office's main fax number: +ccxxxxxxxxxx + */ + @Column (name = "branch_fax_number", length = 20) + private String branchFaxNumber; + + /** + * Branch office's main email address (example: branch-name@company.com) + */ + @Column (name = "branch_email_address", length = 100) + private String branchEmailAddress; + + @Override + public int compareTo (final BranchOffice branchOffice) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public String getBranchCity () { + return this.branchCity; + } + + @Override + public void setBranchCity (final String branchCity) { + this.branchCity = branchCity; + } + + @Override + public String getBranchCountryCode () { + return this.branchCountryCode; + } + + @Override + public void setBranchCountryCode (final String branchCountryCode) { + this.branchCountryCode = branchCountryCode; + } + + @Override + public String getBranchEmailAddress () { + return this.branchEmailAddress; + } + + @Override + public void setBranchEmailAddress (final String branchEmailAddress) { + this.branchEmailAddress = branchEmailAddress; + } + + @Override + public String getBranchFaxNumber () { + return this.branchFaxNumber; + } + + @Override + public void setBranchFaxNumber (String branchFaxNumber) { + this.branchFaxNumber = branchFaxNumber; + } + + @Override + public Short getBranchHouseNumber () { + return this.branchHouseNumber; + } + + @Override + public void setBranchHouseNumber (final Short branchHouseNumber) { + this.branchHouseNumber = branchHouseNumber; + } + + @Override + public String getBranchPhoneNumber () { + return this.branchPhoneNumber; + } + + @Override + public void setBranchPhoneNumber (final String branchPhoneNumber) { + this.branchPhoneNumber = branchPhoneNumber; + } + + @Override + public Short getBranchStore () { + return this.branchStore; + } + + @Override + public void setBranchStore (final Short branchStore) { + this.branchStore = branchStore; + } + + @Override + public String getBranchStreet () { + return this.branchStreet; + } + + @Override + public void setBranchStreet (final String branchStreet) { + this.branchStreet = branchStreet; + } + + @Override + public Short getBranchSuiteNumber () { + return this.branchSuiteNumber; + } + + @Override + public void setBranchSuiteNumber (final Short branchSuiteNumber) { + this.branchSuiteNumber = branchSuiteNumber; + } + + @Override + public Integer getBranchZipCode () { + return this.branchZipCode; + } + + @Override + public void setBranchZipCode (final Integer branchZipCode) { + this.branchZipCode = branchZipCode; + } + + @Override + public Long getBranchId () { + return this.branchId; + } + + @Override + public void setBranchId (final Long branchId) { + this.branchId = branchId; + } +} diff --git a/src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java b/src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java new file mode 100644 index 0000000..4cc7195 --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/department/CompanyDepartment.java @@ -0,0 +1,119 @@ +/* + * 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.department; + +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.ManyToOne; +import javax.persistence.Table; +import org.mxchange.jcontactsbusiness.BusinessContact; +import org.mxchange.jcontactsbusiness.CompanyContact; +import org.mxchange.jcontactsbusiness.employee.Employee; + +/** + * A POJO for company departments + *

+ * @author Roland Haeder + */ +@Entity (name = "company_departments") +@Table (name = "company_departments") +public class CompanyDepartment implements Department, Comparable { + + /** + * Serial number + */ + private static final long serialVersionUID = 94_835_918_958_717_660L; + + /** + * Connection to company contact + */ + @JoinColumn (name = "department_company_id", nullable = false, updatable = false) + @ManyToOne (targetEntity = CompanyContact.class, optional = false) + private BusinessContact departmentCompany; + + /** + * Id number + */ + @Id + @GeneratedValue (strategy = GenerationType.IDENTITY) + @Column (name = "department_id", length = 20, nullable = false, unique = true, updatable = false) + private Long departmentId; + + /** + * Department lead employee + */ + @Basic (optional = false) + @JoinColumn (name = "department_lead_id", nullable = false) + private Employee departmentLead; + + /** + * Department name + */ + @Basic (optional = false) + @Column (name = "department_name", length = 100, nullable = false) + private String departmentName; + + @Override + public int compareTo (final Department department) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public BusinessContact getDepartmentCompany () { + return this.departmentCompany; + } + + @Override + public void setDepartmentCompany (final BusinessContact departmentCompany) { + this.departmentCompany = departmentCompany; + } + + @Override + public Long getDepartmentId () { + return this.departmentId; + } + + @Override + public void setDepartmentId (final Long departmentId) { + this.departmentId = departmentId; + } + + @Override + public Employee getDepartmentLead () { + return this.departmentLead; + } + + @Override + public void setDepartmentLead (final Employee departmentLead) { + this.departmentLead = departmentLead; + } + + @Override + public String getDepartmentName () { + return this.departmentName; + } + + @Override + public void setDepartmentName (final String departmentName) { + this.departmentName = departmentName; + } +} diff --git a/src/org/mxchange/jcontactsbusiness/department/Department.java b/src/org/mxchange/jcontactsbusiness/department/Department.java new file mode 100644 index 0000000..6eca9b8 --- /dev/null +++ b/src/org/mxchange/jcontactsbusiness/department/Department.java @@ -0,0 +1,85 @@ +/* + * 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.department; + +import java.io.Serializable; +import org.mxchange.jcontactsbusiness.BusinessContact; +import org.mxchange.jcontactsbusiness.employee.Employee; + +/** + * A POJI for company departments + *

+ * @author Roland Haeder + */ +public interface Department extends Serializable { + + /** + * Getter for connection to company contact + *

+ * @return Connection to company contact + */ + public BusinessContact getDepartmentCompany (); + + /** + * Setter for connection to company contact + *

+ * @param departmentCompany Connection to company contact + */ + public void setDepartmentCompany (final BusinessContact departmentCompany); + + /** + * Getter for department id + *

+ * @return Department id + */ + public Long getDepartmentId (); + + /** + * Setter for department id + *

+ * @param departmentId Department id + */ + public void setDepartmentId (final Long departmentId); + + /** + * Getter for department lead employee + *

+ * @return Department lead employee + */ + public Employee getDepartmentLead (); + + /** + * Setter for department lead employee + *

+ * @param departmentLead Department lead employee + */ + public void setDepartmentLead (final Employee departmentLead); + + /** + * Getter for department name + *

+ * @return Department name + */ + public String getDepartmentName (); + + /** + * Setter for department name + *

+ * @param departmentName Department name + */ + public void setDepartmentName (final String departmentName); +} diff --git a/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java index 9036f6d..1b96e1f 100644 --- a/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java +++ b/src/org/mxchange/jcontactsbusiness/employee/CompanyEmployee.java @@ -16,20 +16,29 @@ */ package org.mxchange.jcontactsbusiness.employee; +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.OneToOne; import javax.persistence.Table; +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jcontacts.contact.UserContact; +import org.mxchange.jcontactsbusiness.branch.BranchOffice; +import org.mxchange.jcontactsbusiness.branch.CompanyBranchOffice; +import org.mxchange.jcontactsbusiness.department.CompanyDepartment; +import org.mxchange.jcontactsbusiness.department.Department; /** * A POJO for company employees (including CEO) *

* @author Roland Haeder */ -@Entity(name = "company_employees") -@Table(name = "company_employees") +@Entity (name = "employees") +@Table (name = "employees") public class CompanyEmployee implements Employee, Comparable { /** @@ -41,12 +50,155 @@ public class CompanyEmployee implements Employee, Comparable { * Id number */ @Id - @Column(name = "company_employee_id", length = 20, nullable = false, unique = true, updatable = false) - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long companyEmployeeId; + @Column (name = "employee_id", length = 20, nullable = false, unique = true, updatable = false) + @GeneratedValue (strategy = GenerationType.IDENTITY) + private Long employeeId; + + /** + * Branch office the employee works at + */ + @JoinColumn (name = "employee_branch_id") + @OneToOne (targetEntity = CompanyBranchOffice.class, orphanRemoval = true) + private BranchOffice employeeBranchOffice; + + /** + * Department the employee works at + */ + @JoinColumn (name = "employee_department_id", nullable = false) + @OneToOne (targetEntity = CompanyDepartment.class, optional = false) + private Department employeeDepartment; + + /** + * Employee's email address + */ + @Column (name = "employee_email_address", length = 30) + private String employeeEmailAddress; + + /** + * Employee's business mobile number + */ + @Column (name = "employee_mobile_number", length = 20) + private String employeeMobileNumber; + + /** + * Employee's number + */ + @Basic (optional = false) + @Column (name = "employee_number", length = 20, nullable = false) + private String employeeNumber; + + /** + * Employee's personal data + */ + @JoinColumn (name = "employee_personal_id", nullable = false, unique = true, updatable = false) + @OneToOne (optional = false, targetEntity = UserContact.class) + private Contact employeePersonalData; + + /** + * Employee's phone extension (or number if different) + */ + @Column (name = "employee_phone_extension", length = 20) + private String employeePhoneExtension; + + /** + * Employee's position (example: CEO) + */ + @Basic (optional = false) + @Column (name = "employee_status", length = 50, nullable = false) + private String employeePosition; @Override public int compareTo (final Employee employee) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } + + @Override + public BranchOffice getEmployeeBranchOffice () { + return this.employeeBranchOffice; + } + + @Override + public void setEmployeeBranchOffice (final BranchOffice employeeBranchOffice) { + this.employeeBranchOffice = employeeBranchOffice; + } + + @Override + public Department getEmployeeDepartment () { + return this.employeeDepartment; + } + + @Override + public void setEmployeeDepartment (final Department employeeDepartment) { + this.employeeDepartment = employeeDepartment; + } + + @Override + public String getEmployeeEmailAddress () { + return this.employeeEmailAddress; + } + + @Override + public void setEmployeeEmailAddress (final String employeeEmailAddress) { + this.employeeEmailAddress = employeeEmailAddress; + } + + @Override + public Long getEmployeeId () { + return this.employeeId; + } + + @Override + public void setEmployeeId (final Long employeeId) { + this.employeeId = employeeId; + } + + @Override + public String getEmployeeMobileNumber () { + return this.employeeMobileNumber; + } + + @Override + public void setEmployeeMobileNumber (final String employeeMobileNumber) { + this.employeeMobileNumber = employeeMobileNumber; + } + + @Override + public String getEmployeeNumber () { + return this.employeeNumber; + } + + @Override + public void setEmployeeNumber (final String employeeNumber) { + this.employeeNumber = employeeNumber; + } + + @Override + public Contact getEmployeePersonalData () { + return this.employeePersonalData; + } + + @Override + public void setEmployeePersonalData (final Contact employeePersonalData) { + this.employeePersonalData = employeePersonalData; + } + + @Override + public String getEmployeePhoneExtension () { + return this.employeePhoneExtension; + } + + @Override + public void setEmployeePhoneExtension (final String employeePhoneExtension) { + this.employeePhoneExtension = employeePhoneExtension; + } + + @Override + public String getEmployeePosition () { + return this.employeePosition; + } + + @Override + public void setEmployeePosition (final String employeePosition) { + this.employeePosition = employeePosition; + } } diff --git a/src/org/mxchange/jcontactsbusiness/employee/Employee.java b/src/org/mxchange/jcontactsbusiness/employee/Employee.java index 61ed021..04f0aa8 100644 --- a/src/org/mxchange/jcontactsbusiness/employee/Employee.java +++ b/src/org/mxchange/jcontactsbusiness/employee/Employee.java @@ -17,6 +17,9 @@ package org.mxchange.jcontactsbusiness.employee; import java.io.Serializable; +import org.mxchange.jcontacts.contact.Contact; +import org.mxchange.jcontactsbusiness.branch.BranchOffice; +import org.mxchange.jcontactsbusiness.department.Department; /** * A POJI for employees @@ -25,4 +28,129 @@ import java.io.Serializable; */ public interface Employee extends Serializable { + /** + * Getter for employee's branch office + *

+ * @return Employee's branch office + */ + public BranchOffice getEmployeeBranchOffice (); + + /** + * Setter for employee's branch office + *

+ * @param employeeBranchOffice Employee's branch office + */ + public void setEmployeeBranchOffice (final BranchOffice employeeBranchOffice); + + /** + * Getter for employee's department + *

+ * @return Employee's department + */ + public Department getEmployeeDepartment (); + + /** + * Setter for employee's department + *

+ * @param employeeDepartment Employee's department + */ + public void setEmployeeDepartment (final Department employeeDepartment); + + /** + * Getter for employee's email address + *

+ * @return Employee's email address + */ + public String getEmployeeEmailAddress (); + + /** + * Setter for employee's email address + *

+ * @param employeeEmailAddress Employee's email address + */ + public void setEmployeeEmailAddress (final String employeeEmailAddress); + + /** + * Getter for employee's id number + *

+ * @return Employee's id number + */ + public Long getEmployeeId (); + + /** + * Setter for employee's id number + *

+ * @param employeeId Employee's id number + */ + public void setEmployeeId (final Long employeeId); + + /** + * Getter for employee's mobile number + *

+ * @return Employee's mobile number + */ + public String getEmployeeMobileNumber (); + + /** + * Setter for employee's mobile number + *

+ * @param employeeMobileNumber Employee's mobile number + */ + public void setEmployeeMobileNumber (final String employeeMobileNumber); + + /** + * Getter for employee's number + *

+ * @return Employee's number + */ + public String getEmployeeNumber (); + + /** + * Setter for employee's number + *

+ * @param employeeNumber Employee's number + */ + public void setEmployeeNumber (final String employeeNumber); + + /** + * Getter for employee's personal data + *

+ * @return Employee's personal data + */ + public Contact getEmployeePersonalData (); + + /** + * Setter for employee's personal data + *

+ * @param employeePersonalData Employee's personal data + */ + public void setEmployeePersonalData (final Contact employeePersonalData); + + /** + * Getter for employee's phone number/extension + *

+ * @return Employee's phone number/extension + */ + public String getEmployeePhoneExtension (); + + /** + * Setter for employee's phone number/extension + *

+ * @param employeePhoneExtension Employee's phone number/extension + */ + public void setEmployeePhoneExtension (final String employeePhoneExtension); + + /** + * Getter for employee's position + *

+ * @return Employee's position + */ + public String getEmployeePosition (); + + /** + * Setter for employee's position + *

+ * @param employeePosition Employee's position + */ + public void setEmployeePosition (final String employeePosition); } diff --git a/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java b/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java index 5cc445b..445ea3a 100644 --- a/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java +++ b/src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java @@ -16,6 +16,7 @@ */ package org.mxchange.jcontactsbusiness.headquarters; +import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; @@ -28,8 +29,8 @@ import javax.persistence.Table; *

* @author Roland Haeder */ -@Entity (name = "company_headquarters") -@Table (name = "company_headquarters") +@Entity (name = "headquarters") +@Table (name = "headquarters") public class CompanyHeadQuartersData implements HeadQuartersData, Comparable { /** @@ -37,6 +38,27 @@ public class CompanyHeadQuartersData implements HeadQuartersData, Comparable + * @return Headquarters' city name + */ + public String getHeadquartersCity (); + + /** + * Setter for headquarters' city name + *

+ * @param headquartersCity Headquarters' city name + */ + public void setHeadquartersCity (final String headquartersCity); + + /** + * Getter for headquarters' country code + *

+ * @return Headquarters' country code + */ + public String getHeadquartersCountryCode (); + + /** + * Setter for headquarters' country code + *

+ * @param headquartersCountryCode Headquarters' country code + */ + public void setHeadquartersCountryCode (final String headquartersCountryCode); + + /** + * Getter for headquarters' house number + *

+ * @return Headquarters' house number + */ + public Short getHeadquartersHouseNumber (); + + /** + * Setter for headquarters' house number + *

+ * @param headquartersHouseNumber Headquarters' house number + */ + public void setHeadquartersHouseNumber (final Short headquartersHouseNumber); + + /** + * Getter for headquarters' id number + *

+ * @return Headquarters' id number + */ + public Long getHeadquartersId (); + + /** + * Setter for headquarters' id number + *

+ * @param headquartersId Headquarters' id number + */ + public void setHeadquartersId (final Long headquartersId); + + /** + * Getter for headquarters' store number + *

+ * @return Headquarters' store number + */ + public Short getHeadquartersStore (); + + /** + * Setter for headquarters' store number + *

+ * @param headquartersStore Headquarters' store number + */ + public void setHeadquartersStore (final Short headquartersStore); + + /** + * Getter for headquarters' street name + *

+ * @return Headquarters' street name + */ + public String getHeadquartersStreet (); + + /** + * Setter for headquarters' street name + *

+ * @param headquartersStreet Headquarters' street name + */ + public void setHeadquartersStreet (final String headquartersStreet); + + /** + * Getter for headquarters' suite number + *

+ * @return Headquarters' suite number + */ + public Short getHeadquartersSuiteNumber (); + + /** + * Setter for headquarters' suite number + *

+ * @param headquartersSuiteNumber Headquarters' suite number + */ + public void setHeadquartersSuiteNumber (final Short headquartersSuiteNumber); + + /** + * Getter for headquarters' ZIP code + *

+ * @return Headquarters' ZIP code + */ + public Integer getHeadquartersZipCode (); + + /** + * Setter for headquarters' ZIP code + *

+ * @param headquartersZipCode Headquarters' ZIP code + */ + public void setHeadquartersZipCode (final Integer headquartersZipCode); } diff --git a/src/org/mxchange/jcontactsbusiness/logo/BusinessLogo.java b/src/org/mxchange/jcontactsbusiness/logo/BusinessLogo.java index 7900aca..3304ff7 100644 --- a/src/org/mxchange/jcontactsbusiness/logo/BusinessLogo.java +++ b/src/org/mxchange/jcontactsbusiness/logo/BusinessLogo.java @@ -25,4 +25,17 @@ import java.io.Serializable; */ public interface BusinessLogo extends Serializable { + /** + * Getter for logo's id number + *

+ * @return Logo's id number + */ + public Long getLogoId (); + + /** + * Setter for logo's id number + *

+ * @param logoId Logo's id number + */ + public void setLogoId (final Long logoId); } diff --git a/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java b/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java index 7dbe2fb..77c32e5 100644 --- a/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java +++ b/src/org/mxchange/jcontactsbusiness/logo/CompanyLogo.java @@ -16,7 +16,11 @@ */ package org.mxchange.jcontactsbusiness.logo; +import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; import javax.persistence.Table; /** @@ -33,9 +37,27 @@ public class CompanyLogo implements BusinessLogo, Comparable { */ private static final long serialVersionUID = 475_871_875_718_751_285L; + /** + * Id number + */ + @Id + @GeneratedValue (strategy = GenerationType.IDENTITY) + @Column (name = "logo_id", length = 20, nullable = false, unique = true, updatable = false) + private Long logoId; + @Override public int compareTo (final BusinessLogo businessLogo) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } + @Override + public Long getLogoId () { + return this.logoId; + } + + @Override + public void setLogoId (final Long logoId) { + this.logoId = logoId; + } + } -- 2.39.5