From: Roland Häder Date: Wed, 1 Nov 2017 20:56:26 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=99089e437342feb93f1dcc9d1b92b33ef49e7679;p=jcontacts-business-core.git Continued: - renamed headquartersPhoneNumber to headquartersLandLineNumber as common on many other places, too Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquarters.java b/src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquarters.java index 663ce23..ba12af3 100644 --- a/src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquarters.java +++ b/src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquarters.java @@ -115,18 +115,18 @@ public class BusinessHeadquarters implements Headquarters { private Long headquartersId; /** - * Opening times for this branch office + * Headquarters' land-line number */ - @JoinTable (name = "headquarters_opening_times", joinColumns = @JoinColumn (name = "headquarters_opening_id", referencedColumnName = "branch_id"), inverseJoinColumns = @JoinColumn (name = "opening_headquarters_id", referencedColumnName = "opening_times_id")) - @ManyToMany (targetEntity = BusinessOpeningTime.class, cascade = CascadeType.ALL) - private List headquartersOpeningTimes; + @JoinColumn (name = "headquarters_landline_number_id") + @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL) + private DialableLandLineNumber headquartersLandLineNumber; /** - * Headquarters' phone number + * Opening times for this branch office */ - @JoinColumn (name = "headquarters_phone_number_id") - @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL) - private DialableLandLineNumber headquartersPhoneNumber; + @JoinTable (name = "headquarters_opening_times", joinColumns =@JoinColumn (name = "headquarters_opening_id", referencedColumnName = "branch_id"), inverseJoinColumns = @JoinColumn (name = "opening_headquarters_id", referencedColumnName = "opening_times_id")) + @ManyToMany (targetEntity = BusinessOpeningTime.class, cascade = CascadeType.ALL) + private List headquartersOpeningTimes; /** * Headquarters' store number (multi-store building only) @@ -265,25 +265,25 @@ public class BusinessHeadquarters implements Headquarters { } @Override - @SuppressWarnings ("ReturnOfCollectionOrArrayField") - public List getHeadquartersOpeningTimes () { - return this.headquartersOpeningTimes; + public DialableLandLineNumber getHeadquartersLandLineNumber () { + return this.headquartersLandLineNumber; } @Override - @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter") - public void setHeadquartersOpeningTimes (final List headquartersOpeningTimes) { - this.headquartersOpeningTimes = headquartersOpeningTimes; + public void setHeadquartersLandLineNumber (final DialableLandLineNumber headquartersLandLineNumber) { + this.headquartersLandLineNumber = headquartersLandLineNumber; } @Override - public DialableLandLineNumber getHeadquartersPhoneNumber () { - return this.headquartersPhoneNumber; + @SuppressWarnings ("ReturnOfCollectionOrArrayField") + public List getHeadquartersOpeningTimes () { + return this.headquartersOpeningTimes; } @Override - public void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber) { - this.headquartersPhoneNumber = headquartersPhoneNumber; + @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter") + public void setHeadquartersOpeningTimes (final List headquartersOpeningTimes) { + this.headquartersOpeningTimes = headquartersOpeningTimes; } @Override diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarters/Headquarters.java b/src/org/mxchange/jcontactsbusiness/model/headquarters/Headquarters.java index 6e14f3d..1178198 100644 --- a/src/org/mxchange/jcontactsbusiness/model/headquarters/Headquarters.java +++ b/src/org/mxchange/jcontactsbusiness/model/headquarters/Headquarters.java @@ -146,18 +146,18 @@ public interface Headquarters extends Serializable { void setHeadquartersZipCode (final Integer headquartersZipCode); /** - * Getter for headquarters' phone number + * Getter for headquarters' land-line number *

- * @return Headquarters' phone number + * @return Headquarters' land-line number */ - DialableLandLineNumber getHeadquartersPhoneNumber (); + DialableLandLineNumber getHeadquartersLandLineNumber (); /** - * Setter for headquarters' phone number + * Setter for headquarters' land-line number *

- * @param headquartersPhoneNumber Headquarters' phone number + * @param headquartersLandLineNumber Headquarters' land-line number */ - void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber); + void setHeadquartersLandLineNumber (final DialableLandLineNumber headquartersLandLineNumber); /** * Getter for headquarters' fax number @@ -234,4 +234,5 @@ public interface Headquarters extends Serializable { @Override int hashCode (); + }