From 447c81a42a0225b194448d209dcef75e02e7c79e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 20 Sep 2017 21:41:03 +0200 Subject: [PATCH] Continued a bit: - added branch office number which some receipts showed 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 ++++++++++++++ .../branchoffice/CompanyBranchOffice.java | 19 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffice.java b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffice.java index 7d205a5..cc132aa 100644 --- a/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffice.java +++ b/src/org/mxchange/jcontactsbusiness/model/branchoffice/BranchOffice.java @@ -102,6 +102,20 @@ public interface BranchOffice extends Serializable { */ void setBranchLandLineNumber (final DialableLandLineNumber branchPhoneNumber); + /** + * Getter for branch office number + *

+ * @return Branch office number + */ + Long getBranchNumber (); + + /** + * Setter for branch office number + *

+ * @param branchNumber Branch office number + */ + void setBranchNumber (final Long branchNumber); + /** * Getter for branch office's store *

diff --git a/src/org/mxchange/jcontactsbusiness/model/branchoffice/CompanyBranchOffice.java b/src/org/mxchange/jcontactsbusiness/model/branchoffice/CompanyBranchOffice.java index 4a855a8..cfe6909 100644 --- a/src/org/mxchange/jcontactsbusiness/model/branchoffice/CompanyBranchOffice.java +++ b/src/org/mxchange/jcontactsbusiness/model/branchoffice/CompanyBranchOffice.java @@ -140,6 +140,12 @@ public class CompanyBranchOffice implements BranchOffice { @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL) private DialableLandLineNumber branchLandLineNumber; + /** + * Numer of this branch office + */ + @Column(name = "branch_number") + private Long branchNumber; + /** * Branch office's store (if multiple-store building) */ @@ -266,6 +272,8 @@ public class CompanyBranchOffice implements BranchOffice { return false; } else if (!Objects.equals(this.getBranchHouseNumber(), other.getBranchHouseNumber())) { return false; + } else if (!Objects.equals(this.getBranchNumber(), other.getBranchNumber())) { + return false; } else if (!Objects.equals(this.getBranchStore(), other.getBranchStore())) { return false; } else if (!Objects.equals(this.getBranchStreet(), other.getBranchStreet())) { @@ -381,6 +389,16 @@ public class CompanyBranchOffice implements BranchOffice { this.branchLandLineNumber = branchLandLineNumber; } + @Override + public Long getBranchNumber () { + return this.branchNumber; + } + + @Override + public void setBranchNumber (final Long branchNumber) { + this.branchNumber = branchNumber; + } + @Override public Short getBranchStore () { return this.branchStore; @@ -438,6 +456,7 @@ public class CompanyBranchOffice implements BranchOffice { hash = 53 * hash + Objects.hashCode(this.getBranchId()); hash = 53 * hash + Objects.hashCode(this.getBranchCity()); hash = 53 * hash + Objects.hashCode(this.getBranchCountry()); + hash = 53 * hash + Objects.hashCode(this.getBranchNumber()); hash = 53 * hash + Objects.hashCode(this.getBranchHouseNumber()); hash = 53 * hash + Objects.hashCode(this.getBranchStore()); hash = 53 * hash + Objects.hashCode(this.getBranchStreet()); -- 2.39.5