--- /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.exceptions.basicdata;
+
+import java.text.MessageFormat;
+import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
+
+/**
+ * Thrown if the given BusinessBasicData instance is already added
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class BasicCompanyDataAlreadyAddedException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 75_844_851_467L;
+
+ /**
+ * Constructor with a basic data instance
+ * <p>
+ * @param businessContact Business contact that is already added
+ */
+ public BasicCompanyDataAlreadyAddedException (final BusinessBasicData businessContact) {
+ super(MessageFormat.format("Business contact with comanyName={0} already added.", businessContact.getCompanyName())); //NOI18N
+ }
+
+ /**
+ * Default constructor, may be used if no contact instance is available
+ */
+ public BasicCompanyDataAlreadyAddedException () {
+ super("Business contact already added"); //NOI18N
+ }
+
+}
--- /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.exceptions.basicdata;
+
+import java.text.MessageFormat;
+
+/**
+ * An exception thrown when a contact (entity) has not found.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class BasicCompanyDataNotFoundException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 23_759_801_876_416_568L;
+
+ /**
+ * Constructor with business contact id
+ * <p>
+ * @param businessContactId Business contact id
+ */
+ public BasicCompanyDataNotFoundException (final Long businessContactId) {
+ // Call super constructor with message and cause
+ super(MessageFormat.format("Business contact with id {0} was not found.", businessContactId)); //NOI18N
+ }
+
+ /**
+ * Constructor with business contact id and causing exception
+ * <p>
+ * @param businessContactId Business contact id
+ * @param cause Causing exception
+ */
+ public BasicCompanyDataNotFoundException (final Long businessContactId, final Throwable cause) {
+ // Call super constructor with message and cause
+ super(MessageFormat.format("Business contact with id {0} was not found.", businessContactId), cause); //NOI18N
+ }
+
+ /**
+ * Constructor with email address and causing exception
+ * <p>
+ * @param emailAddress Email address
+ * @param cause Causing exception
+ */
+ public BasicCompanyDataNotFoundException (final String emailAddress, final Throwable cause) {
+ // Call super constructor with message and cause
+ super(MessageFormat.format("Business contact with email address {0} was not found.", emailAddress), cause); //NOI18N
+ }
+
+}
+++ /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.exceptions.basicdata;
-
-import java.text.MessageFormat;
-import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
-
-/**
- * Thrown if the given BusinessBasicData instance is already added
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class BusinessDataAlreadyAddedException extends Exception {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 75_844_851_467L;
-
- /**
- * Constructor with a basic data instance
- * <p>
- * @param businessContact Business contact that is already added
- */
- public BusinessDataAlreadyAddedException (final BusinessBasicData businessContact) {
- super(MessageFormat.format("Business contact with comanyName={0} already added.", businessContact.getCompanyName())); //NOI18N
- }
-
- /**
- * Default constructor, may be used if no contact instance is available
- */
- public BusinessDataAlreadyAddedException () {
- super("Business contact already added"); //NOI18N
- }
-
-}
+++ /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.exceptions.basicdata;
-
-import java.text.MessageFormat;
-
-/**
- * An exception thrown when a contact (entity) has not found.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class BusinessDataNotFoundException extends Exception {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 23_759_801_876_416_568L;
-
- /**
- * Constructor with business contact id
- * <p>
- * @param businessContactId Business contact id
- */
- public BusinessDataNotFoundException (final Long businessContactId) {
- // Call super constructor with message and cause
- super(MessageFormat.format("Business contact with id {0} was not found.", businessContactId)); //NOI18N
- }
-
- /**
- * Constructor with business contact id and causing exception
- * <p>
- * @param businessContactId Business contact id
- * @param cause Causing exception
- */
- public BusinessDataNotFoundException (final Long businessContactId, final Throwable cause) {
- // Call super constructor with message and cause
- super(MessageFormat.format("Business contact with id {0} was not found.", businessContactId), cause); //NOI18N
- }
-
- /**
- * Constructor with email address and causing exception
- * <p>
- * @param emailAddress Email address
- * @param cause Causing exception
- */
- public BusinessDataNotFoundException (final String emailAddress, final Throwable cause) {
- // Call super constructor with message and cause
- super(MessageFormat.format("Business contact with email address {0} was not found.", emailAddress), cause); //NOI18N
- }
-
-}
import org.mxchange.jcontactsbusiness.model.employee.Employee;
import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
import org.mxchange.jcontactsbusiness.model.logo.BusinessLogo;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+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.headquarters.HeadquartersData;
import org.mxchange.jcontactsbusiness.model.logo.BusinessLogo;
import org.mxchange.jcontactsbusiness.model.logo.CompanyLogo;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
+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;
import java.util.Calendar;
import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
import org.mxchange.jcontactsbusiness.model.employee.Employee;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+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;
/**
+++ /dev/null
-/*
- * Copyright (C) 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.branchoffice;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-/**
- * An utilities class for branch offices
- *
- * @author Roland Häder<roland@mxchange.org>
- */
-public class BranchOfficeUtils implements Serializable {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 69_537_867_224_651L;
-
- /**
- * Checks if both branch offices have same address. This method will throw
- * an {@code NullPointerException} if one of the instances is null.
- * <p>
- * @param branchOffice1 Branch office 1
- * @param branchOffice2 Branch office 2
- * <p>
- * @return Whether both branch office addresses are the same
- * <p>
- * @throws NullPointerException If one of the instances is null
- */
- public static boolean isSameAddress (final BranchOffice branchOffice1, final BranchOffice branchOffice2) {
- // Check that both parameters are not null
- if (null == branchOffice1) {
- // Throw NPE
- throw new NullPointerException("branchOffice1 is null"); //NOI18N
- } else if (null == branchOffice2) {
- // Throw NPE
- throw new NullPointerException("branchOffice2 is null"); //NOI18N
- }
-
- // Default is the same
- boolean isSameAddress = true;
-
- // Compare both addresses
- if (!Objects.equals(branchOffice1.getBranchCompany(), branchOffice2.getBranchCompany())) {
- // Not the same
- isSameAddress = false;
- } else if (!Objects.equals(branchOffice1.getBranchCountry(), branchOffice2.getBranchCountry())) {
- // Not the same
- isSameAddress = false;
- } else if (!Objects.equals(branchOffice1.getBranchCity(), branchOffice2.getBranchCity())) {
- // Not the same
- isSameAddress = false;
- } else if (!Objects.equals(branchOffice1.getBranchZipCode(), branchOffice2.getBranchZipCode())) {
- // Not the same
- isSameAddress = false;
- } else if (!Objects.equals(branchOffice1.getBranchStreet(), branchOffice2.getBranchStreet())) {
- // Not the same
- isSameAddress = false;
- } else if (!Objects.equals(branchOffice1.getBranchHouseNumber(), branchOffice2.getBranchHouseNumber())) {
- // Not the same
- isSameAddress = false;
- } else if (!Objects.equals(branchOffice1.getBranchStore(), branchOffice2.getBranchStore())) {
- // Not the same
- isSameAddress = false;
- } else if (!Objects.equals(branchOffice1.getBranchSuiteNumber(), branchOffice2.getBranchSuiteNumber())) {
- // Not the same
- isSameAddress = false;
- }
-
- // Return flag
- return isSameAddress;
- }
-
- /**
- * Private default constructor
- */
- private BranchOfficeUtils () {
- // Utilities don't have instances
- }
-
-}
--- /dev/null
+/*
+ * Copyright (C) 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.branchoffice;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ * An utilities class for branch offices
+ *
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class BranchOffices implements Serializable {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 69_537_867_224_651L;
+
+ /**
+ * Checks if both branch offices have same address. This method will throw
+ * an {@code NullPointerException} if one of the instances is null.
+ * <p>
+ * @param branchOffice1 Branch office 1
+ * @param branchOffice2 Branch office 2
+ * <p>
+ * @return Whether both branch office addresses are the same
+ * <p>
+ * @throws NullPointerException If one of the instances is null
+ */
+ public static boolean isSameAddress (final BranchOffice branchOffice1, final BranchOffice branchOffice2) {
+ // Check that both parameters are not null
+ if (null == branchOffice1) {
+ // Throw NPE
+ throw new NullPointerException("branchOffice1 is null"); //NOI18N
+ } else if (null == branchOffice2) {
+ // Throw NPE
+ throw new NullPointerException("branchOffice2 is null"); //NOI18N
+ }
+
+ // Default is the same
+ boolean isSameAddress = true;
+
+ // Compare both addresses
+ if (!Objects.equals(branchOffice1.getBranchCompany(), branchOffice2.getBranchCompany())) {
+ // Not the same
+ isSameAddress = false;
+ } else if (!Objects.equals(branchOffice1.getBranchCountry(), branchOffice2.getBranchCountry())) {
+ // Not the same
+ isSameAddress = false;
+ } else if (!Objects.equals(branchOffice1.getBranchCity(), branchOffice2.getBranchCity())) {
+ // Not the same
+ isSameAddress = false;
+ } else if (!Objects.equals(branchOffice1.getBranchZipCode(), branchOffice2.getBranchZipCode())) {
+ // Not the same
+ isSameAddress = false;
+ } else if (!Objects.equals(branchOffice1.getBranchStreet(), branchOffice2.getBranchStreet())) {
+ // Not the same
+ isSameAddress = false;
+ } else if (!Objects.equals(branchOffice1.getBranchHouseNumber(), branchOffice2.getBranchHouseNumber())) {
+ // Not the same
+ isSameAddress = false;
+ } else if (!Objects.equals(branchOffice1.getBranchStore(), branchOffice2.getBranchStore())) {
+ // Not the same
+ isSameAddress = false;
+ } else if (!Objects.equals(branchOffice1.getBranchSuiteNumber(), branchOffice2.getBranchSuiteNumber())) {
+ // Not the same
+ isSameAddress = false;
+ }
+
+ // Return flag
+ return isSameAddress;
+ }
+
+ /**
+ * Private default constructor
+ */
+ private BranchOffices () {
+ // Utilities don't have instances
+ }
+
+}
import org.mxchange.jcontactsbusiness.model.basicdata.CompanyBasicData;
import org.mxchange.jcontactsbusiness.model.employee.CompanyEmployee;
import org.mxchange.jcontactsbusiness.model.employee.Employee;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jcountry.data.CountryData;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
+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;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.UserContact;
+import org.mxchange.jcontacts.model.contact.Contact;
+import org.mxchange.jcontacts.model.contact.UserContact;
import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
import org.mxchange.jcontactsbusiness.model.basicdata.CompanyBasicData;
import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
import org.mxchange.jcontactsbusiness.model.jobposition.EmployeePosition;
import org.mxchange.jcontactsbusiness.model.jobposition.JobPosition;
-import org.mxchange.jphone.phonenumbers.mobile.DialableMobileNumber;
-import org.mxchange.jphone.phonenumbers.mobile.MobileNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.MobileNumber;
import org.mxchange.jusercore.model.user.LoginUser;
import org.mxchange.jusercore.model.user.User;
import java.io.Serializable;
import java.util.Calendar;
-import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcontacts.model.contact.Contact;
import org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData;
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.phonenumbers.mobile.DialableMobileNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
import org.mxchange.jusercore.model.user.User;
-import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData;
/**
* A POJI for employees
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jcountry.data.CountryData;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
+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;
import java.io.Serializable;
import java.util.Calendar;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
+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;
/**