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<OpeningTime> 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<OpeningTime> headquartersOpeningTimes;
/**
* Headquarters' store number (multi-store building only)
}
@Override
- @SuppressWarnings ("ReturnOfCollectionOrArrayField")
- public List<OpeningTime> getHeadquartersOpeningTimes () {
- return this.headquartersOpeningTimes;
+ public DialableLandLineNumber getHeadquartersLandLineNumber () {
+ return this.headquartersLandLineNumber;
}
@Override
- @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
- public void setHeadquartersOpeningTimes (final List<OpeningTime> headquartersOpeningTimes) {
- this.headquartersOpeningTimes = headquartersOpeningTimes;
+ public void setHeadquartersLandLineNumber (final DialableLandLineNumber headquartersLandLineNumber) {
+ this.headquartersLandLineNumber = headquartersLandLineNumber;
}
@Override
- public DialableLandLineNumber getHeadquartersPhoneNumber () {
- return this.headquartersPhoneNumber;
+ @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+ public List<OpeningTime> getHeadquartersOpeningTimes () {
+ return this.headquartersOpeningTimes;
}
@Override
- public void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber) {
- this.headquartersPhoneNumber = headquartersPhoneNumber;
+ @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
+ public void setHeadquartersOpeningTimes (final List<OpeningTime> headquartersOpeningTimes) {
+ this.headquartersOpeningTimes = headquartersOpeningTimes;
}
@Override
void setHeadquartersZipCode (final Integer headquartersZipCode);
/**
- * Getter for headquarters' phone number
+ * Getter for headquarters' land-line number
* <p>
- * @return Headquarters' phone number
+ * @return Headquarters' land-line number
*/
- DialableLandLineNumber getHeadquartersPhoneNumber ();
+ DialableLandLineNumber getHeadquartersLandLineNumber ();
/**
- * Setter for headquarters' phone number
+ * Setter for headquarters' land-line number
* <p>
- * @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
@Override
int hashCode ();
+
}