]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 1 Nov 2017 20:21:18 +0000 (21:21 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 1 Nov 2017 20:29:02 +0000 (21:29 +0100)
- removed suffix Data, just Headquarters is okay here, not for basic data
  entity, of course
- renamed exception, only company headquarters will exist
- added checked exception which is being thrown when headquarters with same
  address already exists

Signed-off-by: Roland Häder <roland@mxchange.org>
13 files changed:
src/org/mxchange/jcontactsbusiness/exceptions/headquarters/CompanyHeadquartersNotFoundException.java [deleted file]
src/org/mxchange/jcontactsbusiness/exceptions/headquarters/HeadquartersAlreadyAddedException.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/exceptions/headquarters/HeadquartersNotFoundException.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/model/basicdata/BasicData.java
src/org/mxchange/jcontactsbusiness/model/basicdata/BusinessBasicData.java
src/org/mxchange/jcontactsbusiness/model/department/BusinessDepartment.java
src/org/mxchange/jcontactsbusiness/model/department/Department.java
src/org/mxchange/jcontactsbusiness/model/employee/BusinessEmployee.java
src/org/mxchange/jcontactsbusiness/model/employee/Employable.java
src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquarters.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquartersData.java [deleted file]
src/org/mxchange/jcontactsbusiness/model/headquarters/Headquarters.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/model/headquarters/HeadquartersData.java [deleted file]

diff --git a/src/org/mxchange/jcontactsbusiness/exceptions/headquarters/CompanyHeadquartersNotFoundException.java b/src/org/mxchange/jcontactsbusiness/exceptions/headquarters/CompanyHeadquartersNotFoundException.java
deleted file mode 100644 (file)
index 738dd6e..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.exceptions.headquarters;
-
-import java.text.MessageFormat;
-
-/**
- * An exception thrown when a headquarters (entity) has not found.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class CompanyHeadquartersNotFoundException extends Exception {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 23_759_801_876_416_572L;
-
-       /**
-        * Constructor with company headquarters id
-        * <p>
-        * @param headquartersId Company headquarters id
-        */
-       public CompanyHeadquartersNotFoundException (final Long headquartersId) {
-               // Call super constructor with message and cause
-               super(MessageFormat.format("Company headquarters with id {0} was not found.", headquartersId)); //NOI18N
-       }
-
-       /**
-        * Constructor with company headquarters id and causing exception
-        * <p>
-        * @param headquartersId Company headquarters id
-        * @param cause          Causing exception
-        */
-       public CompanyHeadquartersNotFoundException (final Long headquartersId, final Throwable cause) {
-               // Call super constructor with message and cause
-               super(MessageFormat.format("Company headquarters with id {0} was not found.", headquartersId), cause); //NOI18N
-       }
-
-       /**
-        * Constructor with email address and causing exception
-        * <p>
-        * @param emailAddress Email address
-        * @param cause        Causing exception
-        */
-       public CompanyHeadquartersNotFoundException (final String emailAddress, final Throwable cause) {
-               // Call super constructor with message and cause
-               super(MessageFormat.format("Company headquarters with email address {0} was not found.", emailAddress), cause); //NOI18N
-       }
-
-}
diff --git a/src/org/mxchange/jcontactsbusiness/exceptions/headquarters/HeadquartersAlreadyAddedException.java b/src/org/mxchange/jcontactsbusiness/exceptions/headquarters/HeadquartersAlreadyAddedException.java
new file mode 100644 (file)
index 0000000..d92a414
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * 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.exceptions.headquarters;
+
+import java.text.MessageFormat;
+import org.mxchange.jcontactsbusiness.model.headquarters.Headquarters;
+
+/**
+ * An exception thrown when a headquarters (entity) was already added.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class HeadquartersAlreadyAddedException extends Exception {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 23_759_801_876_416_573L;
+
+       /**
+        * Constructor with a headquarters instance
+        * <p>
+        * @param headquarters Headquarters that is already found
+        */
+       public HeadquartersAlreadyAddedException (final Headquarters 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()));
+       }
+
+}
diff --git a/src/org/mxchange/jcontactsbusiness/exceptions/headquarters/HeadquartersNotFoundException.java b/src/org/mxchange/jcontactsbusiness/exceptions/headquarters/HeadquartersNotFoundException.java
new file mode 100644 (file)
index 0000000..514d1fa
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * 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.exceptions.headquarters;
+
+import java.text.MessageFormat;
+
+/**
+ * An exception thrown when a headquarters (entity) has not found.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class HeadquartersNotFoundException extends Exception {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 23_759_801_876_416_572L;
+
+       /**
+        * Constructor with company headquarters id
+        * <p>
+        * @param headquartersId Company headquarters id
+        */
+       public HeadquartersNotFoundException (final Long headquartersId) {
+               // Call super constructor with message and cause
+               super(MessageFormat.format("Company headquarters with id {0} was not found.", headquartersId)); //NOI18N
+       }
+
+       /**
+        * Constructor with company headquarters id and causing exception
+        * <p>
+        * @param headquartersId Company headquarters id
+        * @param cause          Causing exception
+        */
+       public HeadquartersNotFoundException (final Long headquartersId, final Throwable cause) {
+               // Call super constructor with message and cause
+               super(MessageFormat.format("Company headquarters with id {0} was not found.", headquartersId), cause); //NOI18N
+       }
+
+       /**
+        * Constructor with email address and causing exception
+        * <p>
+        * @param emailAddress Email address
+        * @param cause        Causing exception
+        */
+       public HeadquartersNotFoundException (final String emailAddress, final Throwable cause) {
+               // Call super constructor with message and cause
+               super(MessageFormat.format("Company headquarters with email address {0} was not found.", emailAddress), cause); //NOI18N
+       }
+
+}
index 5bb5a5a140b36992f011004896bc825ae8be327e..1a129ddac1a290063a7fea3cc045ad0a0ad9b716 100644 (file)
@@ -21,11 +21,11 @@ import java.util.Date;
 import java.util.List;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
 import org.mxchange.jcontactsbusiness.model.employee.Employable;
-import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
 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;
 
 /**
  * A POJI for business contact classes
@@ -95,14 +95,14 @@ public interface BasicData extends Serializable {
         * <p>
         * @return Headquarters data
         */
-       HeadquartersData getCompanyHeadQuartersData ();
+       Headquarters getCompanyHeadQuartersData ();
 
        /**
         * Setter for headquarters data
         * <p>
         * @param headQuartersData Headquarters data
         */
-       void setCompanyHeadQuartersData (final HeadquartersData headQuartersData);
+       void setCompanyHeadQuartersData (final Headquarters headQuartersData);
 
        /**
         * Getter for user owner instance
index 0a12a2831015d590522ca24fdfea36e9f7b4f139..5cf2bb1c0a0be5352696446d36abbc15ea397a4c 100644 (file)
@@ -38,8 +38,7 @@ import javax.persistence.Transient;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
 import org.mxchange.jcontactsbusiness.model.employee.BusinessEmployee;
 import org.mxchange.jcontactsbusiness.model.employee.Employable;
-import org.mxchange.jcontactsbusiness.model.headquarters.BusinessHeadquartersData;
-import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
+import org.mxchange.jcontactsbusiness.model.headquarters.BusinessHeadquarters;
 import org.mxchange.jcontactsbusiness.model.logo.BusinessLogo;
 import org.mxchange.jcontactsbusiness.model.logo.Logo;
 import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
@@ -48,6 +47,7 @@ import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
 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;
 
 /**
  * A POJO for business basic data
@@ -131,8 +131,8 @@ public class BusinessBasicData implements BasicData {
         * Reference to headquarters data
         */
        @JoinColumn (name = "company_headquarters_data_id")
-       @OneToOne (targetEntity = BusinessHeadquartersData.class, cascade = CascadeType.ALL)
-       private HeadquartersData companyHeadQuartersData;
+       @OneToOne (targetEntity = BusinessHeadquarters.class, cascade = CascadeType.ALL)
+       private Headquarters companyHeadQuartersData;
 
        /**
         * Company's main phone number: +ccxxxxxxxxxx
@@ -309,12 +309,12 @@ public class BusinessBasicData implements BasicData {
        }
 
        @Override
-       public HeadquartersData getCompanyHeadQuartersData () {
+       public Headquarters getCompanyHeadQuartersData () {
                return this.companyHeadQuartersData;
        }
 
        @Override
-       public void setCompanyHeadQuartersData (final HeadquartersData companyHeadQuartersData) {
+       public void setCompanyHeadQuartersData (final Headquarters companyHeadQuartersData) {
                this.companyHeadQuartersData = companyHeadQuartersData;
        }
 
index cf1081b72695accb7821c2f2b268e1f4b0bd6564..582b922a1f2d01fe649a78a7a4d0af8275c8847e 100644 (file)
@@ -38,12 +38,12 @@ import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BusinessBranchOffice;
 import org.mxchange.jcontactsbusiness.model.employee.BusinessEmployee;
-import org.mxchange.jcontactsbusiness.model.headquarters.BusinessHeadquartersData;
-import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
+import org.mxchange.jcontactsbusiness.model.headquarters.BusinessHeadquarters;
 import org.mxchange.jusercore.model.user.LoginUser;
 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;
 
 /**
  * A POJO for company departments
@@ -92,8 +92,8 @@ public class BusinessDepartment implements Department {
         * Where this department is located
         */
        @JoinColumn (name = "department_headquarters_id")
-       @OneToOne (targetEntity = BusinessHeadquartersData.class, cascade = CascadeType.REFRESH)
-       private HeadquartersData departmentHeadquarters;
+       @OneToOne (targetEntity = BusinessHeadquarters.class, cascade = CascadeType.REFRESH)
+       private Headquarters departmentHeadquarters;
 
        /**
         * Department i18n key
@@ -211,12 +211,12 @@ public class BusinessDepartment implements Department {
        }
 
        @Override
-       public HeadquartersData getDepartmentHeadquarters () {
+       public Headquarters getDepartmentHeadquarters () {
                return this.departmentHeadquarters;
        }
 
        @Override
-       public void setDepartmentHeadquarters (final HeadquartersData departmentHeadquarters) {
+       public void setDepartmentHeadquarters (final Headquarters departmentHeadquarters) {
                this.departmentHeadquarters = departmentHeadquarters;
        }
 
index 7c75dcbdae4293facad5cdc68031125f8c95bc8b..d349513d55440781a2b3b873737834c31019864b 100644 (file)
@@ -19,10 +19,10 @@ package org.mxchange.jcontactsbusiness.model.department;
 import java.io.Serializable;
 import java.util.Date;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
-import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
 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;
 
 /**
  * A POJI for company departments
@@ -50,14 +50,14 @@ public interface Department extends Serializable {
         * <p>
         * @return Connection to company headquarters
         */
-       HeadquartersData getDepartmentHeadquarters ();
+       Headquarters getDepartmentHeadquarters ();
 
        /**
         * Setter for connection to company headquarters
         * <p>
         * @param departmentHeadquarters Connection to company headquarters
         */
-       void setDepartmentHeadquarters (final HeadquartersData departmentHeadquarters);
+       void setDepartmentHeadquarters (final Headquarters departmentHeadquarters);
 
        /**
         * Getter for connection to company branch office
index 21953d581274b5b639967819d3620cef64be6f81..5fbcb64efb5afb8881ac5218e2ed11c180d0480a 100644 (file)
@@ -40,8 +40,7 @@ import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BusinessBranchOffice;
 import org.mxchange.jcontactsbusiness.model.department.BusinessDepartment;
 import org.mxchange.jcontactsbusiness.model.department.Department;
-import org.mxchange.jcontactsbusiness.model.headquarters.BusinessHeadquartersData;
-import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
+import org.mxchange.jcontactsbusiness.model.headquarters.BusinessHeadquarters;
 import org.mxchange.jcontactsbusiness.model.jobposition.EmployeePosition;
 import org.mxchange.jcontactsbusiness.model.jobposition.JobPosition;
 import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
@@ -49,6 +48,7 @@ import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber;
 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;
 
 /**
  * A POJO for company employees (including CEO)
@@ -111,8 +111,8 @@ public class BusinessEmployee implements Employable {
         * Head quarters id number (if the employee works there)
         */
        @JoinColumn (name = "employee_headquarters_id")
-       @OneToOne (targetEntity = BusinessHeadquartersData.class, cascade = CascadeType.REFRESH)
-       private HeadquartersData employeeHeadquarter;
+       @OneToOne (targetEntity = BusinessHeadquarters.class, cascade = CascadeType.REFRESH)
+       private Headquarters employeeHeadquarter;
 
        /**
         * Id number
@@ -263,12 +263,12 @@ public class BusinessEmployee implements Employable {
        }
 
        @Override
-       public HeadquartersData getEmployeeHeadquarter () {
+       public Headquarters getEmployeeHeadquarter () {
                return this.employeeHeadquarter;
        }
 
        @Override
-       public void setEmployeeHeadquarter (final HeadquartersData employeeHeadquarter) {
+       public void setEmployeeHeadquarter (final Headquarters employeeHeadquarter) {
                this.employeeHeadquarter = employeeHeadquarter;
        }
 
index d4eecde03752ec86c8fa21a92cef4c76ba81f729..c724c021bbd021f990cf3dc14d088b016328fb46 100644 (file)
@@ -21,11 +21,11 @@ import java.util.Date;
 import org.mxchange.jcontacts.model.contact.Contact;
 import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
 import org.mxchange.jcontactsbusiness.model.department.Department;
-import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
 import org.mxchange.jcontactsbusiness.model.jobposition.JobPosition;
 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;
 
 /**
  * A POJI for employees
@@ -81,14 +81,14 @@ public interface Employable extends Serializable {
         * <p>
         * @return Employable's head quarters
         */
-       HeadquartersData getEmployeeHeadquarter ();
+       Headquarters getEmployeeHeadquarter ();
 
        /**
         * Getter for employee's head quarters
         * <p>
         * @param employeeHeadquarter Employable's head quarters
         */
-       void setEmployeeHeadquarter (final HeadquartersData employeeHeadquarter);
+       void setEmployeeHeadquarter (final Headquarters employeeHeadquarter);
 
        /**
         * Getter for employee's email address
diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquarters.java b/src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquarters.java
new file mode 100644 (file)
index 0000000..663ce23
--- /dev/null
@@ -0,0 +1,355 @@
+/*
+ * Copyright (C) 2016 KLC
+ *
+ * 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.util.Date;
+import java.util.List;
+import java.util.Objects;
+import javax.persistence.Basic;
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.ManyToMany;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.persistence.Transient;
+import org.mxchange.jcontactsbusiness.model.employee.BusinessEmployee;
+import org.mxchange.jcontactsbusiness.model.employee.Employable;
+import org.mxchange.jcontactsbusiness.model.opening_time.BusinessOpeningTime;
+import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
+import org.mxchange.jcountry.model.data.Country;
+import org.mxchange.jcountry.model.data.CountryData;
+import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber;
+import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
+import org.mxchange.jusercore.model.user.LoginUser;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A POJO for company headquarters data
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Entity (name = "company_headquarters")
+@Table (name = "company_headquarters")
+@SuppressWarnings ("PersistenceUnitPresent")
+public class BusinessHeadquarters implements Headquarters {
+
+       /**
+        * Serial number
+        */
+       @Transient
+       private static final long serialVersionUID = 385_752_948_781_761L;
+
+       /**
+        * Headquarters' city name
+        */
+       @Basic (optional = false)
+       @Column (name = "headquarters_city", length = 100, nullable = false)
+       private String headquartersCity;
+
+       /**
+        * Reference to contact person
+        */
+       @JoinColumn (name = "headquarters_contact_employee_id", referencedColumnName = "employee_id")
+       @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.REFRESH)
+       private Employable headquartersContactEmployee;
+
+       /**
+        * Headquarter's country code
+        */
+       @JoinColumn (name = "headquarters_country_id", nullable = false)
+       @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false)
+       private Country headquartersCountry;
+
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "headquarters_entry_created", nullable = false, updatable = false)
+       private Date headquartersCreated;
+
+       /**
+        * Headquarters' fax number
+        */
+       @JoinColumn (name = "headquarters_fax_number_id")
+       @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
+       private DialableFaxNumber headquartersFaxNumber;
+
+       /**
+        * Headquarters' house number
+        */
+       @Basic (optional = false)
+       @Column (name = "headquarters_house_number", length = 4, nullable = false)
+       private Short headquartersHouseNumber;
+
+       /**
+        * Id number
+        */
+       @Id
+       @GeneratedValue (strategy = GenerationType.IDENTITY)
+       @Column (name = "headquarters_id", nullable = false, updatable = false)
+       private Long headquartersId;
+
+       /**
+        * Opening times for this branch office
+        */
+       @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' phone number
+        */
+       @JoinColumn (name = "headquarters_phone_number_id")
+       @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
+       private DialableLandLineNumber headquartersPhoneNumber;
+
+       /**
+        * Headquarters' store number (multi-store building only)
+        */
+       @Column (name = "headquarters_store", length = 3)
+       private Short headquartersStore;
+
+       /**
+        * Headquarters' street name
+        */
+       @Basic (optional = false)
+       @Column (name = "headquarters_street", length = 100, nullable = false)
+       private String headquartersStreet;
+
+       /**
+        * Headquarters' suite number
+        */
+       @Column (name = "headquarters_suite_number", length = 4)
+       private Short headquartersSuiteNumber;
+
+       /**
+        * User owner instance
+        */
+       @JoinColumn (name = "headquarters_user_id")
+       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH)
+       private User headquartersUserOwner;
+
+       /**
+        * Headquarters' ZIP code
+        */
+       @Basic (optional = false)
+       @Column (name = "headquarters_zip_code", length = 6, nullable = false)
+       private Integer headquartersZipCode;
+
+       @Override
+       public boolean equals (final Object object) {
+               if (null == object) {
+                       return false;
+               } else if (this.getClass() != object.getClass()) {
+                       return false;
+               }
+
+               final Headquarters other = (Headquarters) object;
+
+               if (!Objects.equals(this.getHeadquartersId(), other.getHeadquartersId())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersCity(), other.getHeadquartersCity())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersCountry(), other.getHeadquartersCountry())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersHouseNumber(), other.getHeadquartersHouseNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersStore(), other.getHeadquartersStore())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersStreet(), other.getHeadquartersStreet())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersSuiteNumber(), other.getHeadquartersSuiteNumber())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersZipCode(), other.getHeadquartersZipCode())) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       @Override
+       public String getHeadquartersCity () {
+               return this.headquartersCity;
+       }
+
+       @Override
+       public void setHeadquartersCity (final String headquartersCity) {
+               this.headquartersCity = headquartersCity;
+       }
+
+       @Override
+       public Employable getHeadquartersContactEmployee () {
+               return this.headquartersContactEmployee;
+       }
+
+       @Override
+       public void setHeadquartersContactEmployee (final Employable headquartersContactEmployee) {
+               this.headquartersContactEmployee = headquartersContactEmployee;
+       }
+
+       @Override
+       public Country getHeadquartersCountry () {
+               return this.headquartersCountry;
+       }
+
+       @Override
+       public void setHeadquartersCountry (final Country headquartersCountry) {
+               this.headquartersCountry = headquartersCountry;
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getHeadquartersCreated () {
+               return this.headquartersCreated;
+       }
+
+       @Override
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setHeadquartersCreated (final Date headquartersCreated) {
+               this.headquartersCreated = headquartersCreated;
+       }
+
+       @Override
+       public DialableFaxNumber getHeadquartersFaxNumber () {
+               return this.headquartersFaxNumber;
+       }
+
+       @Override
+       public void setHeadquartersFaxNumber (final DialableFaxNumber headquartersFaxNumber) {
+               this.headquartersFaxNumber = headquartersFaxNumber;
+       }
+
+       @Override
+       public Short getHeadquartersHouseNumber () {
+               return this.headquartersHouseNumber;
+       }
+
+       @Override
+       public void setHeadquartersHouseNumber (final Short headquartersHouseNumber) {
+               this.headquartersHouseNumber = headquartersHouseNumber;
+       }
+
+       @Override
+       public Long getHeadquartersId () {
+               return this.headquartersId;
+       }
+
+       @Override
+       public void setHeadquartersId (final Long headquartersId) {
+               this.headquartersId = headquartersId;
+       }
+
+       @Override
+       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
+       public List<OpeningTime> getHeadquartersOpeningTimes () {
+               return this.headquartersOpeningTimes;
+       }
+
+       @Override
+       @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
+       public void setHeadquartersOpeningTimes (final List<OpeningTime> headquartersOpeningTimes) {
+               this.headquartersOpeningTimes = headquartersOpeningTimes;
+       }
+
+       @Override
+       public DialableLandLineNumber getHeadquartersPhoneNumber () {
+               return this.headquartersPhoneNumber;
+       }
+
+       @Override
+       public void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber) {
+               this.headquartersPhoneNumber = headquartersPhoneNumber;
+       }
+
+       @Override
+       public Short getHeadquartersStore () {
+               return this.headquartersStore;
+       }
+
+       @Override
+       public void setHeadquartersStore (final Short headquartersStore) {
+               this.headquartersStore = headquartersStore;
+       }
+
+       @Override
+       public String getHeadquartersStreet () {
+               return this.headquartersStreet;
+       }
+
+       @Override
+       public void setHeadquartersStreet (final String headquartersStreet) {
+               this.headquartersStreet = headquartersStreet;
+       }
+
+       @Override
+       public Short getHeadquartersSuiteNumber () {
+               return this.headquartersSuiteNumber;
+       }
+
+       @Override
+       public void setHeadquartersSuiteNumber (final Short headquartersSuiteNumber) {
+               this.headquartersSuiteNumber = headquartersSuiteNumber;
+       }
+
+       @Override
+       public User getHeadquartersUserOwner () {
+               return this.headquartersUserOwner;
+       }
+
+       @Override
+       public void setHeadquartersUserOwner (final User headquartersUserOwner) {
+               this.headquartersUserOwner = headquartersUserOwner;
+       }
+
+       @Override
+       public Integer getHeadquartersZipCode () {
+               return this.headquartersZipCode;
+       }
+
+       @Override
+       public void setHeadquartersZipCode (final Integer headquartersZipCode) {
+               this.headquartersZipCode = headquartersZipCode;
+       }
+
+       @Override
+       public int hashCode () {
+               int hash = 7;
+
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersId());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCity());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCountry());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersHouseNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStore());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStreet());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersSuiteNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersZipCode());
+
+               return hash;
+       }
+
+}
diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquartersData.java b/src/org/mxchange/jcontactsbusiness/model/headquarters/BusinessHeadquartersData.java
deleted file mode 100644 (file)
index 1ce6048..0000000
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright (C) 2016 KLC
- *
- * 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.util.Date;
-import java.util.List;
-import java.util.Objects;
-import javax.persistence.Basic;
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.ManyToMany;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-import org.mxchange.jcontactsbusiness.model.employee.BusinessEmployee;
-import org.mxchange.jcontactsbusiness.model.employee.Employable;
-import org.mxchange.jcontactsbusiness.model.opening_time.BusinessOpeningTime;
-import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
-import org.mxchange.jcountry.model.data.Country;
-import org.mxchange.jcountry.model.data.CountryData;
-import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.model.phonenumbers.fax.FaxNumber;
-import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
-import org.mxchange.jusercore.model.user.LoginUser;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * A POJO for company headquarters data
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-@Entity (name = "company_headquarters")
-@Table (name = "company_headquarters")
-@SuppressWarnings ("PersistenceUnitPresent")
-public class BusinessHeadquartersData implements HeadquartersData {
-
-       /**
-        * Serial number
-        */
-       @Transient
-       private static final long serialVersionUID = 385_752_948_781_761L;
-
-       /**
-        * Headquarters' city name
-        */
-       @Basic (optional = false)
-       @Column (name = "headquarters_city", length = 100, nullable = false)
-       private String headquartersCity;
-
-       /**
-        * Reference to contact person
-        */
-       @JoinColumn (name = "headquarters_contact_employee_id", referencedColumnName = "employee_id")
-       @OneToOne (targetEntity = BusinessEmployee.class, cascade = CascadeType.REFRESH)
-       private Employable headquartersContactEmployee;
-
-       /**
-        * Headquarter's country code
-        */
-       @JoinColumn (name = "headquarters_country_id", nullable = false)
-       @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false)
-       private Country headquartersCountry;
-
-       /**
-        * Timestamp when this entry has been created
-        */
-       @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "headquarters_entry_created", nullable = false, updatable = false)
-       private Date headquartersCreated;
-
-       /**
-        * Headquarters' fax number
-        */
-       @JoinColumn (name = "headquarters_fax_number_id")
-       @OneToOne (targetEntity = FaxNumber.class, cascade = CascadeType.ALL)
-       private DialableFaxNumber headquartersFaxNumber;
-
-       /**
-        * Headquarters' house number
-        */
-       @Basic (optional = false)
-       @Column (name = "headquarters_house_number", length = 4, nullable = false)
-       private Short headquartersHouseNumber;
-
-       /**
-        * Id number
-        */
-       @Id
-       @GeneratedValue (strategy = GenerationType.IDENTITY)
-       @Column (name = "headquarters_id", nullable = false, updatable = false)
-       private Long headquartersId;
-
-       /**
-        * Opening times for this branch office
-        */
-       @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' phone number
-        */
-       @JoinColumn (name = "headquarters_phone_number_id")
-       @OneToOne (targetEntity = LandLineNumber.class, cascade = CascadeType.ALL)
-       private DialableLandLineNumber headquartersPhoneNumber;
-
-       /**
-        * Headquarters' store number (multi-store building only)
-        */
-       @Column (name = "headquarters_store", length = 3)
-       private Short headquartersStore;
-
-       /**
-        * Headquarters' street name
-        */
-       @Basic (optional = false)
-       @Column (name = "headquarters_street", length = 100, nullable = false)
-       private String headquartersStreet;
-
-       /**
-        * Headquarters' suite number
-        */
-       @Column (name = "headquarters_suite_number", length = 4)
-       private Short headquartersSuiteNumber;
-
-       /**
-        * User owner instance
-        */
-       @JoinColumn (name = "headquarters_user_id")
-       @OneToOne (targetEntity = LoginUser.class, cascade = CascadeType.REFRESH)
-       private User headquartersUserOwner;
-
-       /**
-        * Headquarters' ZIP code
-        */
-       @Basic (optional = false)
-       @Column (name = "headquarters_zip_code", length = 6, nullable = false)
-       private Integer headquartersZipCode;
-
-       @Override
-       public boolean equals (final Object object) {
-               if (null == object) {
-                       return false;
-               } else if (this.getClass() != object.getClass()) {
-                       return false;
-               }
-
-               final HeadquartersData other = (HeadquartersData) object;
-
-               if (!Objects.equals(this.getHeadquartersId(), other.getHeadquartersId())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersCity(), other.getHeadquartersCity())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersCountry(), other.getHeadquartersCountry())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersHouseNumber(), other.getHeadquartersHouseNumber())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersStore(), other.getHeadquartersStore())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersStreet(), other.getHeadquartersStreet())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersSuiteNumber(), other.getHeadquartersSuiteNumber())) {
-                       return false;
-               } else if (!Objects.equals(this.getHeadquartersZipCode(), other.getHeadquartersZipCode())) {
-                       return false;
-               }
-
-               return true;
-       }
-
-       @Override
-       public String getHeadquartersCity () {
-               return this.headquartersCity;
-       }
-
-       @Override
-       public void setHeadquartersCity (final String headquartersCity) {
-               this.headquartersCity = headquartersCity;
-       }
-
-       @Override
-       public Employable getHeadquartersContactEmployee () {
-               return this.headquartersContactEmployee;
-       }
-
-       @Override
-       public void setHeadquartersContactEmployee (final Employable headquartersContactEmployee) {
-               this.headquartersContactEmployee = headquartersContactEmployee;
-       }
-
-       @Override
-       public Country getHeadquartersCountry () {
-               return this.headquartersCountry;
-       }
-
-       @Override
-       public void setHeadquartersCountry (final Country headquartersCountry) {
-               this.headquartersCountry = headquartersCountry;
-       }
-
-       @Override
-       @SuppressWarnings ("ReturnOfDateField")
-       public Date getHeadquartersCreated () {
-               return this.headquartersCreated;
-       }
-
-       @Override
-       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setHeadquartersCreated (final Date headquartersCreated) {
-               this.headquartersCreated = headquartersCreated;
-       }
-
-       @Override
-       public DialableFaxNumber getHeadquartersFaxNumber () {
-               return this.headquartersFaxNumber;
-       }
-
-       @Override
-       public void setHeadquartersFaxNumber (final DialableFaxNumber headquartersFaxNumber) {
-               this.headquartersFaxNumber = headquartersFaxNumber;
-       }
-
-       @Override
-       public Short getHeadquartersHouseNumber () {
-               return this.headquartersHouseNumber;
-       }
-
-       @Override
-       public void setHeadquartersHouseNumber (final Short headquartersHouseNumber) {
-               this.headquartersHouseNumber = headquartersHouseNumber;
-       }
-
-       @Override
-       public Long getHeadquartersId () {
-               return this.headquartersId;
-       }
-
-       @Override
-       public void setHeadquartersId (final Long headquartersId) {
-               this.headquartersId = headquartersId;
-       }
-
-       @Override
-       @SuppressWarnings ("ReturnOfCollectionOrArrayField")
-       public List<OpeningTime> getHeadquartersOpeningTimes () {
-               return this.headquartersOpeningTimes;
-       }
-
-       @Override
-       @SuppressWarnings ("AssignmentToCollectionOrArrayFieldFromParameter")
-       public void setHeadquartersOpeningTimes (final List<OpeningTime> headquartersOpeningTimes) {
-               this.headquartersOpeningTimes = headquartersOpeningTimes;
-       }
-
-       @Override
-       public DialableLandLineNumber getHeadquartersPhoneNumber () {
-               return this.headquartersPhoneNumber;
-       }
-
-       @Override
-       public void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber) {
-               this.headquartersPhoneNumber = headquartersPhoneNumber;
-       }
-
-       @Override
-       public Short getHeadquartersStore () {
-               return this.headquartersStore;
-       }
-
-       @Override
-       public void setHeadquartersStore (final Short headquartersStore) {
-               this.headquartersStore = headquartersStore;
-       }
-
-       @Override
-       public String getHeadquartersStreet () {
-               return this.headquartersStreet;
-       }
-
-       @Override
-       public void setHeadquartersStreet (final String headquartersStreet) {
-               this.headquartersStreet = headquartersStreet;
-       }
-
-       @Override
-       public Short getHeadquartersSuiteNumber () {
-               return this.headquartersSuiteNumber;
-       }
-
-       @Override
-       public void setHeadquartersSuiteNumber (final Short headquartersSuiteNumber) {
-               this.headquartersSuiteNumber = headquartersSuiteNumber;
-       }
-
-       @Override
-       public User getHeadquartersUserOwner () {
-               return this.headquartersUserOwner;
-       }
-
-       @Override
-       public void setHeadquartersUserOwner (final User headquartersUserOwner) {
-               this.headquartersUserOwner = headquartersUserOwner;
-       }
-
-       @Override
-       public Integer getHeadquartersZipCode () {
-               return this.headquartersZipCode;
-       }
-
-       @Override
-       public void setHeadquartersZipCode (final Integer headquartersZipCode) {
-               this.headquartersZipCode = headquartersZipCode;
-       }
-
-       @Override
-       public int hashCode () {
-               int hash = 7;
-
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersId());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCity());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCountry());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersHouseNumber());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStore());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStreet());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersSuiteNumber());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersZipCode());
-
-               return hash;
-       }
-
-}
diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarters/Headquarters.java b/src/org/mxchange/jcontactsbusiness/model/headquarters/Headquarters.java
new file mode 100644 (file)
index 0000000..6e14f3d
--- /dev/null
@@ -0,0 +1,237 @@
+/*
+ * 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' phone number
+        * <p>
+        * @return Headquarters' phone number
+        */
+       DialableLandLineNumber getHeadquartersPhoneNumber ();
+
+       /**
+        * Setter for headquarters' phone number
+        * <p>
+        * @param headquartersPhoneNumber Headquarters' phone number
+        */
+       void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber);
+
+       /**
+        * 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 ();
+}
diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarters/HeadquartersData.java b/src/org/mxchange/jcontactsbusiness/model/headquarters/HeadquartersData.java
deleted file mode 100644 (file)
index 42fecef..0000000
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * 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 HeadquartersData 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' phone number
-        * <p>
-        * @return Headquarters' phone number
-        */
-       DialableLandLineNumber getHeadquartersPhoneNumber ();
-
-       /**
-        * Setter for headquarters' phone number
-        * <p>
-        * @param headquartersPhoneNumber Headquarters' phone number
-        */
-       void setHeadquartersPhoneNumber (final DialableLandLineNumber headquartersPhoneNumber);
-
-       /**
-        * 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 ();
-}