From 4dfda8279b0e911f1463c8fa47831d9650452702 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 5 Nov 2017 16:06:29 +0100 Subject: [PATCH] Continued: - added house number extension for branch office and headquarter address MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../model/branchoffice/BranchOffice.java | 14 ++++++++++++++ .../model/branchoffice/BranchOffices.java | 3 +++ .../model/branchoffice/BusinessBranchOffice.java | 16 ++++++++++++++++ .../model/headquarter/BusinessHeadquarter.java | 16 ++++++++++++++++ .../model/headquarter/Headquarter.java | 14 ++++++++++++++ .../model/headquarter/Headquarters.java | 3 +++ 6 files changed, 66 insertions(+) diff --git a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffice.java b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffice.java index 77a3ae8..40b2466 100644 --- a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffice.java +++ b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffice.java @@ -90,6 +90,20 @@ public interface BranchOffice extends Serializable { */ void setBranchHouseNumber (final Short branchHouseNumber); + /** + * Getter for house number's extension + *

+ * @return House number's extension + */ + String getBranchHouseNumberExtension (); + + /** + * Setter for house number's extension + *

+ * @param branchHouseNumberExtension House number's extension + */ + void setBranchHouseNumberExtension (final String branchHouseNumberExtension); + /** * Getter for branch office's last house number *

diff --git a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffices.java b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffices.java index 3706785..4255145 100644 --- a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffices.java +++ b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffices.java @@ -74,6 +74,9 @@ public class BranchOffices implements Serializable { } else if (!Objects.equals(branchOffice1.getBranchHouseNumber(), branchOffice2.getBranchHouseNumber())) { // Not the same isSameAddress = false; + } else if (!Objects.equals(branchOffice1.getBranchHouseNumberExtension(), branchOffice2.getBranchHouseNumberExtension())) { + // Not the same + isSameAddress = false; } else if (!Objects.equals(branchOffice1.getBranchStore(), branchOffice2.getBranchStore())) { // Not the same isSameAddress = false; diff --git a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java index 604355f..d52625a 100644 --- a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java +++ b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java @@ -129,6 +129,12 @@ public class BusinessBranchOffice implements BranchOffice { @Column (name = "branch_house_number", nullable = false) private Short branchHouseNumber; + /** + * House number's extension + */ + @Column (name = "branch_house_number_extension") + private String branchHouseNumberExtension; + /** * Id number */ @@ -395,6 +401,16 @@ public class BusinessBranchOffice implements BranchOffice { this.branchHouseNumber = branchHouseNumber; } + @Override + public String getBranchHouseNumberExtension () { + return this.branchHouseNumberExtension; + } + + @Override + public void setBranchHouseNumberExtension (final String branchHouseNumberExtension) { + this.branchHouseNumberExtension = branchHouseNumberExtension; + } + @Override public Long getBranchId () { return this.branchId; diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarter/BusinessHeadquarter.java b/src/org/mxchange/jcontactsbusiness/model/headquarter/BusinessHeadquarter.java index 9cfe846..2189b2b 100644 --- a/src/org/mxchange/jcontactsbusiness/model/headquarter/BusinessHeadquarter.java +++ b/src/org/mxchange/jcontactsbusiness/model/headquarter/BusinessHeadquarter.java @@ -120,6 +120,12 @@ public class BusinessHeadquarter implements Headquarter { @Column (name = "headquarter_house_number", length = 4, nullable = false) private Short headquarterHouseNumber; + /** + * House number's extension + */ + @Column (name = "headquarter_house_number_extension") + private String headquarterHouseNumberExtension; + /** * Id number */ @@ -349,6 +355,16 @@ public class BusinessHeadquarter implements Headquarter { this.headquarterHouseNumber = headquarterHouseNumber; } + @Override + public String getHeadquarterHouseNumberExtension () { + return this.headquarterHouseNumberExtension; + } + + @Override + public void setHeadquarterHouseNumberExtension (final String headquarterHouseNumberExtension) { + this.headquarterHouseNumberExtension = headquarterHouseNumberExtension; + } + @Override public Long getHeadquarterId () { return this.headquarterId; diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarter.java b/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarter.java index 4db8fa5..9d12d60 100644 --- a/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarter.java +++ b/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarter.java @@ -75,6 +75,20 @@ public interface Headquarter extends Serializable { */ void setHeadquarterHouseNumber (final Short headquarterHouseNumber); + /** + * Getter for house number's extension + *

+ * @return House number's extension + */ + String getHeadquarterHouseNumberExtension (); + + /** + * Setter for house number's extension + *

+ * @param headquarterHouseNumberExtension House number's extension + */ + void setHeadquarterHouseNumberExtension (final String headquarterHouseNumberExtension); + /** * Getter for headquarter's last house number *

diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java b/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java index 9598374..e9ade40 100644 --- a/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java +++ b/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java @@ -71,6 +71,9 @@ public class Headquarters implements Serializable { } else if (!Objects.equals(headquarter1.getHeadquarterHouseNumber(), headquarter2.getHeadquarterHouseNumber())) { // Not the same isSameAddress = false; + } else if (!Objects.equals(headquarter1.getHeadquarterHouseNumberExtension(), headquarter2.getHeadquarterHouseNumberExtension())) { + // Not the same + isSameAddress = false; } else if (!Objects.equals(headquarter1.getHeadquarterStore(), headquarter2.getHeadquarterStore())) { // Not the same isSameAddress = false; -- 2.39.5