@Table (name = "company_branch_offices")
@NamedQueries (
{
- @NamedQuery (name = "AllBranchOffices", query = "SELECT bo FROM company_branch_offices AS bo ORDER BY bo.branchId ASC"),
+ @NamedQuery (name = "AllBranchOffices", query = "SELECT bo FROM company_branch_offices AS bo ORDER BY bo.branchId ASC")
}
)
@SuppressWarnings ("PersistenceUnitPresent")
* Branch office's house number
*/
@Basic (optional = false)
- @Column (name = "branch_house_number", length = 3, nullable = false)
+ @Column (name = "branch_house_number", nullable = false)
private Short branchHouseNumber;
/**
@OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
private DialableLandLineNumber branchLandLineNumber;
+ /**
+ * Branch office's last house number
+ */
+ @Column (name = "branch_last_house_number")
+ private Short branchLastHouseNumber;
+
/**
* Numer of this branch office
*/
/**
* Branch office's store (if multiple-store building)
*/
- @Column (name = "branch_store", length = 3)
+ @Column (name = "branch_store")
private Short branchStore;
/**
/**
* Branch office's suite number (if applyable)
*/
- @Column (name = "branch_suite_number", length = 4)
+ @Column (name = "branch_suite_number")
private Short branchSuiteNumber;
/**
* Branch office's ZIP code
*/
@Basic (optional = false)
- @Column (name = "branch_zip_code", length = 6, nullable = false)
+ @Column (name = "branch_zip_code", nullable = false)
private Integer branchZipCode;
/**
this.branchLandLineNumber = branchLandLineNumber;
}
+ @Override
+ public Short getBranchLastHouseNumber () {
+ return this.branchLastHouseNumber;
+ }
+
+ @Override
+ public void setBranchLastHouseNumber (final Short branchLastHouseNumber) {
+ this.branchLastHouseNumber = branchLastHouseNumber;
+ }
+
@Override
public Long getBranchNumber () {
return this.branchNumber;
@OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
private DialableLandLineNumber headquarterLandLineNumber;
+ /**
+ * Headquarter's last house number
+ */
+ @Column (name = "headquarter_last_house_number")
+ private Short headquarterLastHouseNumber;
+
/**
* Opening times for this branch office
*/
public BusinessHeadquarter () {
}
+ /**
+ * Constructor with all required fields
+ * <p>
+ * @param headquarterCity City
+ * @param headquarterCountry Country
+ * @param headquarterStreet Street name
+ * @param headquarterZipCode ZIP code
+ * @param headquarterHouseNumber House number
+ */
public BusinessHeadquarter (final String headquarterCity, final Country headquarterCountry, final String headquarterStreet, final Integer headquarterZipCode, final Short headquarterHouseNumber) {
// Call other constructor first
this();
return false;
} else if (!Objects.equals(this.getHeadquarterHouseNumber(), headquarter.getHeadquarterHouseNumber())) {
return false;
+ } else if (!Objects.equals(this.getHeadquarterLastHouseNumber(), headquarter.getHeadquarterLastHouseNumber())) {
+ return false;
} else if (!Objects.equals(this.getHeadquarterStore(), headquarter.getHeadquarterStore())) {
return false;
} else if (!Objects.equals(this.getHeadquarterStreet(), headquarter.getHeadquarterStreet())) {
this.headquarterLandLineNumber = headquarterLandLineNumber;
}
+ @Override
+ public Short getHeadquarterLastHouseNumber () {
+ return this.headquarterLastHouseNumber;
+ }
+
+ @Override
+ public void setHeadquarterLastHouseNumber (final Short headquarterLastHouseNumber) {
+ this.headquarterLastHouseNumber = headquarterLastHouseNumber;
+ }
+
@Override
@SuppressWarnings ("ReturnOfCollectionOrArrayField")
public List<OpeningTime> getHeadquarterOpeningTimes () {
hash = 47 * hash + Objects.hashCode(this.getHeadquarterCity());
hash = 47 * hash + Objects.hashCode(this.getHeadquarterCountry());
hash = 47 * hash + Objects.hashCode(this.getHeadquarterHouseNumber());
+ hash = 47 * hash + Objects.hashCode(this.getHeadquarterLastHouseNumber());
hash = 47 * hash + Objects.hashCode(this.getHeadquarterStore());
hash = 47 * hash + Objects.hashCode(this.getHeadquarterStreet());
hash = 47 * hash + Objects.hashCode(this.getHeadquarterSuiteNumber());
public interface Headquarter extends Serializable {
/**
- * Getter for headquarter' city name
+ * Getter for headquarter's city name
* <p>
- * @return Headquarter' city name
+ * @return Headquarter's city name
*/
String getHeadquarterCity ();
/**
- * Setter for headquarter' city name
+ * Setter for headquarter's city name
* <p>
- * @param headquarterCity Headquarter' city name
+ * @param headquarterCity Headquarter's city name
*/
void setHeadquarterCity (final String headquarterCity);
/**
- * Getter for headquarter' country code
+ * Getter for headquarter's country code
* <p>
- * @return Headquarter' country code
+ * @return Headquarter's country code
*/
Country getHeadquarterCountry ();
/**
- * Setter for headquarter' country code
+ * Setter for headquarter's country code
* <p>
- * @param headquarterCountryCode Headquarter' country code
+ * @param headquarterCountryCode Headquarter's country code
*/
void setHeadquarterCountry (final Country headquarterCountryCode);
/**
- * Getter for headquarter' house number
+ * Getter for headquarter's house number
* <p>
- * @return Headquarter' house number
+ * @return Headquarter's house number
*/
Short getHeadquarterHouseNumber ();
/**
- * Setter for headquarter' house number
+ * Setter for headquarter's house number
* <p>
- * @param headquarterHouseNumber Headquarter' house number
+ * @param headquarterHouseNumber Headquarter's house number
*/
void setHeadquarterHouseNumber (final Short headquarterHouseNumber);
/**
- * Getter for headquarter' id number
+ * Getter for headquarter's last house number
* <p>
- * @return Headquarter' id number
+ * @return Headquarter's last house number
+ */
+ Short getHeadquarterLastHouseNumber ();
+
+ /**
+ * Setter for headquarter's last house number
+ * <p>
+ * @param headquarterLastHouseNumber Headquarter's last house number
+ */
+ void setHeadquarterLastHouseNumber (final Short headquarterLastHouseNumber);
+
+ /**
+ * Getter for headquarter's id number
+ * <p>
+ * @return Headquarter's id number
*/
Long getHeadquarterId ();
/**
- * Setter for headquarter' id number
+ * Setter for headquarter's id number
* <p>
- * @param headquarterId Headquarter' id number
+ * @param headquarterId Headquarter's id number
*/
void setHeadquarterId (final Long headquarterId);
/**
- * Getter for headquarter' store number
+ * Getter for headquarter's store number
* <p>
- * @return Headquarter' store number
+ * @return Headquarter's store number
*/
Short getHeadquarterStore ();
/**
- * Setter for headquarter' store number
+ * Setter for headquarter's store number
* <p>
- * @param headquarterStore Headquarter' store number
+ * @param headquarterStore Headquarter's store number
*/
void setHeadquarterStore (final Short headquarterStore);
/**
- * Getter for headquarter' street name
+ * Getter for headquarter's street name
* <p>
- * @return Headquarter' street name
+ * @return Headquarter's street name
*/
String getHeadquarterStreet ();
/**
- * Setter for headquarter' street name
+ * Setter for headquarter's street name
* <p>
- * @param headquarterStreet Headquarter' street name
+ * @param headquarterStreet Headquarter's street name
*/
void setHeadquarterStreet (final String headquarterStreet);
/**
- * Getter for headquarter' suite number
+ * Getter for headquarter's suite number
* <p>
- * @return Headquarter' suite number
+ * @return Headquarter's suite number
*/
Short getHeadquarterSuiteNumber ();
/**
- * Setter for headquarter' suite number
+ * Setter for headquarter's suite number
* <p>
- * @param headquarterSuiteNumber Headquarter' suite number
+ * @param headquarterSuiteNumber Headquarter's suite number
*/
void setHeadquarterSuiteNumber (final Short headquarterSuiteNumber);
/**
- * Getter for headquarter' ZIP code
+ * Getter for headquarter's ZIP code
* <p>
- * @return Headquarter' ZIP code
+ * @return Headquarter's ZIP code
*/
Integer getHeadquarterZipCode ();
/**
- * Setter for headquarter' ZIP code
+ * Setter for headquarter's ZIP code
* <p>
- * @param headquarterZipCode Headquarter' ZIP code
+ * @param headquarterZipCode Headquarter's ZIP code
*/
void setHeadquarterZipCode (final Integer headquarterZipCode);
/**
- * Getter for headquarter' land-line number
+ * Getter for headquarter's land-line number
* <p>
- * @return Headquarter' land-line number
+ * @return Headquarter's land-line number
*/
DialableLandLineNumber getHeadquarterLandLineNumber ();
/**
- * Setter for headquarter' land-line number
+ * Setter for headquarter's land-line number
* <p>
- * @param headquarterLandLineNumber Headquarter' land-line number
+ * @param headquarterLandLineNumber Headquarter's land-line number
*/
void setHeadquarterLandLineNumber (final DialableLandLineNumber headquarterLandLineNumber);
/**
- * Getter for headquarter' fax number
+ * Getter for headquarter's fax number
* <p>
- * @return Headquarter' fax number
+ * @return Headquarter's fax number
*/
DialableFaxNumber getHeadquarterFaxNumber ();
/**
- * Setter for headquarter' fax number
+ * Setter for headquarter's fax number
* <p>
- * @param headquarterFaxNumber Headquarter' fax number
+ * @param headquarterFaxNumber Headquarter's fax number
*/
void setHeadquarterFaxNumber (final DialableFaxNumber headquarterFaxNumber);
void setHeadquarterOpeningTimes (final List<OpeningTime> branchOpeningTimes);
/**
- * Getter for headquarter' email address
+ * Getter for headquarter's email address
* <p>
- * @return Headquarter' email address
+ * @return Headquarter's email address
*/
String getHeadquarterEmailAddress ();
/**
- * Setter for headquarter' email address
+ * Setter for headquarter's email address
* <p>
- * @param headquarterEmailAddress Headquarter' email address
+ * @param headquarterEmailAddress Headquarter's email address
*/
void setHeadquarterEmailAddress (final String headquarterEmailAddress);