package org.mxchange.jcontactsbusiness.exceptions.headquarters;
import java.text.MessageFormat;
-import org.mxchange.jcontactsbusiness.model.headquarters.Headquarters;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
/**
* An exception thrown when a headquarters (entity) was already added.
/**
* Constructor with a headquarters instance
* <p>
- * @param headquarters Headquarters that is already found
+ * @param headquarters Headquarter that is already found
*/
- public HeadquartersAlreadyAddedException (final Headquarters headquarters) {
+ public HeadquartersAlreadyAddedException (final Headquarter headquarters) {
super(MessageFormat.format("Headquarters office with headquartersStreet={0},headquartersHouseNumber={1},headquartersZipCode={2},headquartersCity={3} already created.", headquarters.getHeadquartersStreet(), headquarters.getHeadquartersHouseNumber(), headquarters.getHeadquartersZipCode(), headquarters.getHeadquartersCity()));
}
import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
import org.mxchange.jusercore.model.user.User;
import org.mxchange.jcontactsbusiness.model.logo.Logo;
-import org.mxchange.jcontactsbusiness.model.headquarters.Headquarters;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
/**
* A POJI for business contact classes
/**
* Getter for headquarters data
* <p>
- * @return Headquarters data
+ * @return Headquarter data
*/
- Headquarters getCompanyHeadQuartersData ();
+ Headquarter getCompanyHeadQuartersData ();
/**
* Setter for headquarters data
* <p>
- * @param headQuartersData Headquarters data
+ * @param headQuartersData Headquarter data
*/
- void setCompanyHeadQuartersData (final Headquarters headQuartersData);
+ void setCompanyHeadQuartersData (final Headquarter headQuartersData);
/**
* Getter for user owner instance
import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
import org.mxchange.jusercore.model.user.LoginUser;
import org.mxchange.jusercore.model.user.User;
-import org.mxchange.jcontactsbusiness.model.headquarters.Headquarters;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
/**
* A POJO for business basic data
*/
@JoinColumn (name = "company_headquarters_data_id")
@OneToOne (targetEntity = BusinessHeadquarters.class, cascade = CascadeType.ALL)
- private Headquarters companyHeadQuartersData;
+ private Headquarter companyHeadQuartersData;
/**
* Company's main phone number: +ccxxxxxxxxxx
}
@Override
- public Headquarters getCompanyHeadQuartersData () {
+ public Headquarter getCompanyHeadQuartersData () {
return this.companyHeadQuartersData;
}
@Override
- public void setCompanyHeadQuartersData (final Headquarters companyHeadQuartersData) {
+ public void setCompanyHeadQuartersData (final Headquarter companyHeadQuartersData) {
this.companyHeadQuartersData = companyHeadQuartersData;
}
import org.mxchange.jusercore.model.user.User;
import org.mxchange.jcontactsbusiness.model.employee.Employable;
import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
-import org.mxchange.jcontactsbusiness.model.headquarters.Headquarters;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
/**
* A POJO for company departments
*/
@JoinColumn (name = "department_headquarters_id")
@OneToOne (targetEntity = BusinessHeadquarters.class, cascade = CascadeType.REFRESH)
- private Headquarters departmentHeadquarters;
+ private Headquarter departmentHeadquarters;
/**
* Department i18n key
}
@Override
- public Headquarters getDepartmentHeadquarters () {
+ public Headquarter getDepartmentHeadquarters () {
return this.departmentHeadquarters;
}
@Override
- public void setDepartmentHeadquarters (final Headquarters departmentHeadquarters) {
+ public void setDepartmentHeadquarters (final Headquarter departmentHeadquarters) {
this.departmentHeadquarters = departmentHeadquarters;
}
import org.mxchange.jusercore.model.user.User;
import org.mxchange.jcontactsbusiness.model.employee.Employable;
import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
-import org.mxchange.jcontactsbusiness.model.headquarters.Headquarters;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
/**
* A POJI for company departments
* <p>
* @return Connection to company headquarters
*/
- Headquarters getDepartmentHeadquarters ();
+ Headquarter getDepartmentHeadquarters ();
/**
* Setter for connection to company headquarters
* <p>
* @param departmentHeadquarters Connection to company headquarters
*/
- void setDepartmentHeadquarters (final Headquarters departmentHeadquarters);
+ void setDepartmentHeadquarters (final Headquarter departmentHeadquarters);
/**
* Getter for connection to company branch office
import org.mxchange.jusercore.model.user.LoginUser;
import org.mxchange.jusercore.model.user.User;
import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
-import org.mxchange.jcontactsbusiness.model.headquarters.Headquarters;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
/**
* A POJO for company employees (including CEO)
*/
@JoinColumn (name = "employee_headquarters_id")
@OneToOne (targetEntity = BusinessHeadquarters.class, cascade = CascadeType.REFRESH)
- private Headquarters employeeHeadquarter;
+ private Headquarter employeeHeadquarter;
/**
* Id number
}
@Override
- public Headquarters getEmployeeHeadquarter () {
+ public Headquarter getEmployeeHeadquarter () {
return this.employeeHeadquarter;
}
@Override
- public void setEmployeeHeadquarter (final Headquarters employeeHeadquarter) {
+ public void setEmployeeHeadquarter (final Headquarter employeeHeadquarter) {
this.employeeHeadquarter = employeeHeadquarter;
}
import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jusercore.model.user.User;
import org.mxchange.jcontactsbusiness.model.basicdata.BasicData;
-import org.mxchange.jcontactsbusiness.model.headquarters.Headquarters;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarter;
/**
* A POJI for employees
* <p>
* @return Employable's head quarters
*/
- Headquarters getEmployeeHeadquarter ();
+ Headquarter getEmployeeHeadquarter ();
/**
* Getter for employee's head quarters
* <p>
* @param employeeHeadquarter Employable's head quarters
*/
- void setEmployeeHeadquarter (final Headquarters employeeHeadquarter);
+ void setEmployeeHeadquarter (final Headquarter employeeHeadquarter);
/**
* Getter for employee's email address
@Entity (name = "company_headquarters")
@Table (name = "company_headquarters")
@SuppressWarnings ("PersistenceUnitPresent")
-public class BusinessHeadquarters implements Headquarters {
+public class BusinessHeadquarters implements Headquarter {
/**
* Serial number
private static final long serialVersionUID = 385_752_948_781_761L;
/**
- * Headquarters' city name
+ * Headquarter' city name
*/
@Basic (optional = false)
@Column (name = "headquarters_city", length = 100, nullable = false)
private Date headquartersCreated;
/**
- * Headquarters' fax number
+ * Headquarter' fax number
*/
@JoinColumn (name = "headquarters_fax_number_id")
@OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
private DialableFaxNumber headquartersFaxNumber;
/**
- * Headquarters' house number
+ * Headquarter' house number
*/
@Basic (optional = false)
@Column (name = "headquarters_house_number", length = 4, nullable = false)
private Long headquartersId;
/**
- * Headquarters' land-line number
+ * Headquarter' land-line number
*/
@JoinColumn (name = "headquarters_landline_number_id")
@OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
private List<OpeningTime> headquartersOpeningTimes;
/**
- * Headquarters' store number (multi-store building only)
+ * Headquarter' store number (multi-store building only)
*/
@Column (name = "headquarters_store", length = 3)
private Short headquartersStore;
/**
- * Headquarters' street name
+ * Headquarter' street name
*/
@Basic (optional = false)
@Column (name = "headquarters_street", length = 100, nullable = false)
private String headquartersStreet;
/**
- * Headquarters' suite number
+ * Headquarter' suite number
*/
@Column (name = "headquarters_suite_number", length = 4)
private Short headquartersSuiteNumber;
private User headquartersUserOwner;
/**
- * Headquarters' ZIP code
+ * Headquarter' ZIP code
*/
@Basic (optional = false)
@Column (name = "headquarters_zip_code", length = 6, nullable = false)
return false;
}
- final Headquarters other = (Headquarters) object;
+ final Headquarter other = (Headquarter) object;
if (!Objects.equals(this.getHeadquartersId(), other.getHeadquartersId())) {
return false;
--- /dev/null
+/*
+ * Copyright (C) 2016, 2017 Roland Häder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.model.headquarters;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+import org.mxchange.jcontactsbusiness.model.employee.Employable;
+import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
+import org.mxchange.jcountry.model.data.Country;
+import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A POJI for headquarters data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface Headquarter extends Serializable {
+
+ /**
+ * Getter for headquarters' city name
+ * <p>
+ * @return Headquarter' city name
+ */
+ String getHeadquartersCity ();
+
+ /**
+ * Setter for headquarters' city name
+ * <p>
+ * @param headquartersCity Headquarter' city name
+ */
+ void setHeadquartersCity (final String headquartersCity);
+
+ /**
+ * Getter for headquarters' country code
+ * <p>
+ * @return Headquarter' country code
+ */
+ Country getHeadquartersCountry ();
+
+ /**
+ * Setter for headquarters' country code
+ * <p>
+ * @param headquartersCountryCode Headquarter' country code
+ */
+ void setHeadquartersCountry (final Country headquartersCountryCode);
+
+ /**
+ * Getter for headquarters' house number
+ * <p>
+ * @return Headquarter' house number
+ */
+ Short getHeadquartersHouseNumber ();
+
+ /**
+ * Setter for headquarters' house number
+ * <p>
+ * @param headquartersHouseNumber Headquarter' house number
+ */
+ void setHeadquartersHouseNumber (final Short headquartersHouseNumber);
+
+ /**
+ * Getter for headquarters' id number
+ * <p>
+ * @return Headquarter' id number
+ */
+ Long getHeadquartersId ();
+
+ /**
+ * Setter for headquarters' id number
+ * <p>
+ * @param headquartersId Headquarter' id number
+ */
+ void setHeadquartersId (final Long headquartersId);
+
+ /**
+ * Getter for headquarters' store number
+ * <p>
+ * @return Headquarter' store number
+ */
+ Short getHeadquartersStore ();
+
+ /**
+ * Setter for headquarters' store number
+ * <p>
+ * @param headquartersStore Headquarter' store number
+ */
+ void setHeadquartersStore (final Short headquartersStore);
+
+ /**
+ * Getter for headquarters' street name
+ * <p>
+ * @return Headquarter' street name
+ */
+ String getHeadquartersStreet ();
+
+ /**
+ * Setter for headquarters' street name
+ * <p>
+ * @param headquartersStreet Headquarter' street name
+ */
+ void setHeadquartersStreet (final String headquartersStreet);
+
+ /**
+ * Getter for headquarters' suite number
+ * <p>
+ * @return Headquarter' suite number
+ */
+ Short getHeadquartersSuiteNumber ();
+
+ /**
+ * Setter for headquarters' suite number
+ * <p>
+ * @param headquartersSuiteNumber Headquarter' suite number
+ */
+ void setHeadquartersSuiteNumber (final Short headquartersSuiteNumber);
+
+ /**
+ * Getter for headquarters' ZIP code
+ * <p>
+ * @return Headquarter' ZIP code
+ */
+ Integer getHeadquartersZipCode ();
+
+ /**
+ * Setter for headquarters' ZIP code
+ * <p>
+ * @param headquartersZipCode Headquarter' ZIP code
+ */
+ void setHeadquartersZipCode (final Integer headquartersZipCode);
+
+ /**
+ * Getter for headquarters' land-line number
+ * <p>
+ * @return Headquarter' land-line number
+ */
+ DialableLandLineNumber getHeadquartersLandLineNumber ();
+
+ /**
+ * Setter for headquarters' land-line number
+ * <p>
+ * @param headquartersLandLineNumber Headquarter' land-line number
+ */
+ void setHeadquartersLandLineNumber (final DialableLandLineNumber headquartersLandLineNumber);
+
+ /**
+ * Getter for headquarters' fax number
+ * <p>
+ * @return Headquarter' fax number
+ */
+ DialableFaxNumber getHeadquartersFaxNumber ();
+
+ /**
+ * Setter for headquarters' fax number
+ * <p>
+ * @param headquartersFaxNumber Headquarter' fax number
+ */
+ void setHeadquartersFaxNumber (final DialableFaxNumber headquartersFaxNumber);
+
+ /**
+ * Getter for user owner instance
+ * <p>
+ * @return User owner instance
+ */
+ User getHeadquartersUserOwner ();
+
+ /**
+ * Setter for user owner instance
+ * <p>
+ * @param headquartersUserOwner User owner instance
+ */
+ void setHeadquartersUserOwner (final User headquartersUserOwner);
+
+ /**
+ * Getter for branch office owning employee
+ * <p>
+ * @return Owning employee
+ */
+ Employable getHeadquartersContactEmployee ();
+
+ /**
+ * Setter for branch office contact person
+ * <p>
+ * @param branchContactEmployee Contact person
+ */
+ void setHeadquartersContactEmployee (final Employable branchContactEmployee);
+
+ /**
+ * Getter for opening times for this branch office
+ * <p>
+ * @return Opening times
+ */
+ List<OpeningTime> getHeadquartersOpeningTimes ();
+
+ /**
+ * Setter for opening times for this branch office
+ * <p>
+ * @param branchOpeningTimes Opening times
+ */
+ void setHeadquartersOpeningTimes (final List<OpeningTime> branchOpeningTimes);
+
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Date getHeadquartersCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param headquartersCreated Timestamp when this entry has been created
+ */
+ void setHeadquartersCreated (final Date headquartersCreated);
+
+ @Override
+ boolean equals (final Object object);
+
+ @Override
+ int hashCode ();
+
+}
+++ /dev/null
-/*
- * Copyright (C) 2016, 2017 Roland Häder
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontactsbusiness.model.headquarters;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
-import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
-import org.mxchange.jcountry.model.data.Country;
-import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * A POJI for headquarters data
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface Headquarters extends Serializable {
-
- /**
- * Getter for headquarters' city name
- * <p>
- * @return Headquarters' city name
- */
- String getHeadquartersCity ();
-
- /**
- * Setter for headquarters' city name
- * <p>
- * @param headquartersCity Headquarters' city name
- */
- void setHeadquartersCity (final String headquartersCity);
-
- /**
- * Getter for headquarters' country code
- * <p>
- * @return Headquarters' country code
- */
- Country getHeadquartersCountry ();
-
- /**
- * Setter for headquarters' country code
- * <p>
- * @param headquartersCountryCode Headquarters' country code
- */
- void setHeadquartersCountry (final Country headquartersCountryCode);
-
- /**
- * Getter for headquarters' house number
- * <p>
- * @return Headquarters' house number
- */
- Short getHeadquartersHouseNumber ();
-
- /**
- * Setter for headquarters' house number
- * <p>
- * @param headquartersHouseNumber Headquarters' house number
- */
- void setHeadquartersHouseNumber (final Short headquartersHouseNumber);
-
- /**
- * Getter for headquarters' id number
- * <p>
- * @return Headquarters' id number
- */
- Long getHeadquartersId ();
-
- /**
- * Setter for headquarters' id number
- * <p>
- * @param headquartersId Headquarters' id number
- */
- void setHeadquartersId (final Long headquartersId);
-
- /**
- * Getter for headquarters' store number
- * <p>
- * @return Headquarters' store number
- */
- Short getHeadquartersStore ();
-
- /**
- * Setter for headquarters' store number
- * <p>
- * @param headquartersStore Headquarters' store number
- */
- void setHeadquartersStore (final Short headquartersStore);
-
- /**
- * Getter for headquarters' street name
- * <p>
- * @return Headquarters' street name
- */
- String getHeadquartersStreet ();
-
- /**
- * Setter for headquarters' street name
- * <p>
- * @param headquartersStreet Headquarters' street name
- */
- void setHeadquartersStreet (final String headquartersStreet);
-
- /**
- * Getter for headquarters' suite number
- * <p>
- * @return Headquarters' suite number
- */
- Short getHeadquartersSuiteNumber ();
-
- /**
- * Setter for headquarters' suite number
- * <p>
- * @param headquartersSuiteNumber Headquarters' suite number
- */
- void setHeadquartersSuiteNumber (final Short headquartersSuiteNumber);
-
- /**
- * Getter for headquarters' ZIP code
- * <p>
- * @return Headquarters' ZIP code
- */
- Integer getHeadquartersZipCode ();
-
- /**
- * Setter for headquarters' ZIP code
- * <p>
- * @param headquartersZipCode Headquarters' ZIP code
- */
- void setHeadquartersZipCode (final Integer headquartersZipCode);
-
- /**
- * Getter for headquarters' land-line number
- * <p>
- * @return Headquarters' land-line number
- */
- DialableLandLineNumber getHeadquartersLandLineNumber ();
-
- /**
- * Setter for headquarters' land-line number
- * <p>
- * @param headquartersLandLineNumber Headquarters' land-line number
- */
- void setHeadquartersLandLineNumber (final DialableLandLineNumber headquartersLandLineNumber);
-
- /**
- * Getter for headquarters' fax number
- * <p>
- * @return Headquarters' fax number
- */
- DialableFaxNumber getHeadquartersFaxNumber ();
-
- /**
- * Setter for headquarters' fax number
- * <p>
- * @param headquartersFaxNumber Headquarters' fax number
- */
- void setHeadquartersFaxNumber (final DialableFaxNumber headquartersFaxNumber);
-
- /**
- * Getter for user owner instance
- * <p>
- * @return User owner instance
- */
- User getHeadquartersUserOwner ();
-
- /**
- * Setter for user owner instance
- * <p>
- * @param headquartersUserOwner User owner instance
- */
- void setHeadquartersUserOwner (final User headquartersUserOwner);
-
- /**
- * Getter for branch office owning employee
- * <p>
- * @return Owning employee
- */
- Employable getHeadquartersContactEmployee ();
-
- /**
- * Setter for branch office contact person
- * <p>
- * @param branchContactEmployee Contact person
- */
- void setHeadquartersContactEmployee (final Employable branchContactEmployee);
-
- /**
- * Getter for opening times for this branch office
- * <p>
- * @return Opening times
- */
- List<OpeningTime> getHeadquartersOpeningTimes ();
-
- /**
- * Setter for opening times for this branch office
- * <p>
- * @param branchOpeningTimes Opening times
- */
- void setHeadquartersOpeningTimes (final List<OpeningTime> branchOpeningTimes);
-
- /**
- * Getter for timestamp when this entry has been created
- * <p>
- * @return Timestamp when this entry has been created
- */
- Date getHeadquartersCreated ();
-
- /**
- * Setter for timestamp when this entry has been created
- * <p>
- * @param headquartersCreated Timestamp when this entry has been created
- */
- void setHeadquartersCreated (final Date headquartersCreated);
-
- @Override
- boolean equals (final Object object);
-
- @Override
- int hashCode ();
-
-}