From 3301270dace7024b6e596193c8849455f3337913 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 10 Oct 2015 22:28:19 +0200 Subject: [PATCH] The country code is now handled by jcountry-core --- .../branch/BranchOffice.java | 5 ++-- .../branch/CompanyBranchOffice.java | 19 ++++++++------ .../headquarters/CompanyHeadQuartersData.java | 25 +++++++++++-------- .../headquarters/HeadQuartersData.java | 5 ++-- 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/org/mxchange/jcontactsbusiness/branch/BranchOffice.java b/src/org/mxchange/jcontactsbusiness/branch/BranchOffice.java index d531669..b7cde6e 100644 --- a/src/org/mxchange/jcontactsbusiness/branch/BranchOffice.java +++ b/src/org/mxchange/jcontactsbusiness/branch/BranchOffice.java @@ -17,6 +17,7 @@ package org.mxchange.jcontactsbusiness.branch; import java.io.Serializable; +import org.mxchange.jcountry.data.Country; /** * A POJI for branch offices @@ -170,12 +171,12 @@ public interface BranchOffice extends Serializable { *

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

* @param branchCountryCode Branch office's country code */ - public void setBranchCountryCode (final String branchCountryCode); + public void setBranchCountry (final Country branchCountryCode); } diff --git a/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java b/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java index 09628bd..3dc4584 100644 --- a/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java +++ b/src/org/mxchange/jcontactsbusiness/branch/CompanyBranchOffice.java @@ -17,12 +17,17 @@ package org.mxchange.jcontactsbusiness.branch; import javax.persistence.Basic; +import javax.persistence.CascadeType; 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.jcountry.data.Country; +import org.mxchange.jcountry.data.CountryData; /** * A POJO for company branch offices @@ -89,9 +94,9 @@ public class CompanyBranchOffice implements BranchOffice, Comparable * @author Roland Haeder */ -@Entity (name = "headquarters") -@Table (name = "headquarters") +@Entity (name = "company_headquarters") +@Table (name = "company_headquarters") public class CompanyHeadQuartersData implements HeadQuartersData, Comparable { /** @@ -48,9 +53,9 @@ public class CompanyHeadQuartersData implements HeadQuartersData, Comparable * @return Headquarters' country code */ - public String getHeadquartersCountryCode (); + public Country getHeadquartersCountry (); /** * Setter for headquarters' country code *

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