From: Roland Häder Date: Sun, 5 Nov 2017 15:06:29 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4dfda8279b0e911f1463c8fa47831d9650452702;p=jcontacts-business-core.git Continued: - added house number extension for branch office and headquarter address Signed-off-by: Roland Häder --- 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;