+++ /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.jphone.exceptions;
-
-import java.text.MessageFormat;
-import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
-
-/**
- * An exception thrown when the mobile provider is already added. This should be
- * found out by checking dial prefix and country id in combination.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class MobileProviderAlreadyAddedException extends Exception {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 16_857_128_756_894_186L;
-
- /**
- * Constructor with mobile provider instance
- * <p>
- * @param mobileProvider Mobile provider instance
- */
- public MobileProviderAlreadyAddedException (final MobileProvider mobileProvider) {
- // Create message an call super constructor
- super(MessageFormat.format("Mobile provider {0} with dial prefix {1} and country {2} has already been added.", mobileProvider.getProviderName(), mobileProvider.getProviderDialPrefix(), mobileProvider.getProviderCountry().getCountryCode())); //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.jphone.exceptions;
-
-import java.text.MessageFormat;
-
-/**
- * An exception thrown when a phone entity is not found.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class PhoneEntityNotFoundException extends Exception {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 18_964_581_681_985_597L;
-
- /**
- * Counstructor with id number and causing exception
- * <p>
- * @param phoneId Id number that has no corresponding entity
- * @param cause Causing exception
- */
- public PhoneEntityNotFoundException (final Long phoneId, final Throwable cause) {
- // Construct message and call super constructor
- super(MessageFormat.format("Phone entity with id {0} not found.", phoneId), 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.jphone.exceptions;
-
-import java.text.MessageFormat;
-import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
-
-/**
- * An exception thrown when a fax, land-line or mobile number is not linked but
- * should be.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class PhoneNumberAlreadyLinkedException extends Exception {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 18_964_581_681_985_598L;
-
- /**
- * Counstructor with fax number
- * <p>
- * @param faxNumber Fax number
- */
- public PhoneNumberAlreadyLinkedException (final DialableFaxNumber faxNumber) {
- // Call super constructor with message
- super(MessageFormat.format("faxNumber={0} with phoneId={1} cannot be linked, link target has already fax number linked.", faxNumber, faxNumber.getPhoneId())); //NOI18N
- }
-
- /**
- * Counstructor with landLine number
- * <p>
- * @param landLineNumber Land-line number
- */
- public PhoneNumberAlreadyLinkedException (final DialableLandLineNumber landLineNumber) {
- // Call super constructor with message
- super(MessageFormat.format("landLineNumber={0} with phoneId={1} cannot be linked, link target has already land-line number linked.", landLineNumber, landLineNumber.getPhoneId())); //NOI18N
- }
-
- /**
- * Counstructor with mobile number
- * <p>
- * @param mobileNumber Mobile number
- */
- public PhoneNumberAlreadyLinkedException (final DialableMobileNumber mobileNumber) {
- // Call super constructor with message
- super(MessageFormat.format("mobileNumber={0} with phoneId={1} cannot be linked, link target has already mobile number linked.", mobileNumber, mobileNumber.getPhoneId())); //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.jphone.exceptions;
-
-import java.text.MessageFormat;
-import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
-import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
-import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
-
-/**
- * An exception thrown when a fax, land-line or mobile number is not linked but
- * should be.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class PhoneNumberNotLinkedException extends Exception {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 18_964_581_681_985_599L;
-
- /**
- * Counstructor with fax number
- * <p>
- * @param faxNumber Fax number
- */
- public PhoneNumberNotLinkedException (final DialableFaxNumber faxNumber) {
- // Call super constructor with message
- super(MessageFormat.format("faxNumber={0} with phoneId={1} is not linked.", faxNumber, faxNumber.getPhoneId())); //NOI18N
- }
-
- /**
- * Counstructor with landLine number
- * <p>
- * @param landLineNumber Land-line number
- */
- public PhoneNumberNotLinkedException (final DialableLandLineNumber landLineNumber) {
- // Call super constructor with message
- super(MessageFormat.format("landLineNumber={0} with phoneId={1} is not linked.", landLineNumber, landLineNumber.getPhoneId())); //NOI18N
- }
-
- /**
- * Counstructor with mobile number
- * <p>
- * @param mobileNumber Mobile number
- */
- public PhoneNumberNotLinkedException (final DialableMobileNumber mobileNumber) {
- // Call super constructor with message
- super(MessageFormat.format("mobileNumber={0} with phoneId={1} is not linked.", mobileNumber, mobileNumber.getPhoneId())); //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.jphone.exceptions.mobileprovider;
+
+import java.text.MessageFormat;
+import org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider;
+
+/**
+ * An exception thrown when the mobile provider is already added. This should be
+ * found out by checking dial prefix and country id in combination.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class MobileProviderAlreadyAddedException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 16_857_128_756_894_186L;
+
+ /**
+ * Constructor with mobile provider instance
+ * <p>
+ * @param mobileProvider Mobile provider instance
+ */
+ public MobileProviderAlreadyAddedException (final MobileProvider mobileProvider) {
+ // Create message an call super constructor
+ super(MessageFormat.format("Mobile provider {0} with dial prefix {1} and country {2} has already been added.", mobileProvider.getProviderName(), mobileProvider.getProviderDialPrefix(), mobileProvider.getProviderCountry().getCountryCode())); //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.jphone.exceptions.mobileprovider;
+
+import java.text.MessageFormat;
+
+/**
+ * An exception thrown when the mobile provider was not found.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class MobileProviderNotFoundException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 16_857_128_756_894_187L;
+
+ /**
+ * Constructor with primary key
+ * <p>
+ * @param mobileProviderId Primary key
+ */
+ public MobileProviderNotFoundException (final Long mobileProviderId) {
+ // Create message an call super constructor
+ super(MessageFormat.format("Mobile provider with id={0} was not found.", mobileProviderId)); //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.jphone.exceptions.phone;
+
+import java.text.MessageFormat;
+
+/**
+ * An exception thrown when a phone entity is not found.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class PhoneEntityNotFoundException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 18_964_581_681_985_597L;
+
+ /**
+ * Constructor with id number and causing exception
+ * <p>
+ * @param phoneId Id number that has no corresponding entity
+ * @param cause Causing exception
+ */
+ public PhoneEntityNotFoundException (final Long phoneId, final Throwable cause) {
+ // Construct message and call super constructor
+ super(MessageFormat.format("Phone entity with id {0} not found.", phoneId), cause); //NOI18N
+ }
+
+ /**
+ * Constructor with id number
+ * <p>
+ * @param phoneId Id number that has no corresponding entity
+ */
+ public PhoneEntityNotFoundException (final Long phoneId) {
+ // Construct message and call super constructor
+ super(MessageFormat.format("Phone entity with id {0} not found.", phoneId)); //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.jphone.exceptions.phone;
+
+import java.text.MessageFormat;
+import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
+
+/**
+ * An exception thrown when a fax, land-line or mobile number is not linked but
+ * should be.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class PhoneNumberAlreadyLinkedException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 18_964_581_681_985_598L;
+
+ /**
+ * Counstructor with fax number
+ * <p>
+ * @param faxNumber Fax number
+ */
+ public PhoneNumberAlreadyLinkedException (final DialableFaxNumber faxNumber) {
+ // Call super constructor with message
+ super(MessageFormat.format("faxNumber={0} with phoneId={1} cannot be linked, link target has already fax number linked.", faxNumber, faxNumber.getPhoneId())); //NOI18N
+ }
+
+ /**
+ * Counstructor with landLine number
+ * <p>
+ * @param landLineNumber Land-line number
+ */
+ public PhoneNumberAlreadyLinkedException (final DialableLandLineNumber landLineNumber) {
+ // Call super constructor with message
+ super(MessageFormat.format("landLineNumber={0} with phoneId={1} cannot be linked, link target has already land-line number linked.", landLineNumber, landLineNumber.getPhoneId())); //NOI18N
+ }
+
+ /**
+ * Counstructor with mobile number
+ * <p>
+ * @param mobileNumber Mobile number
+ */
+ public PhoneNumberAlreadyLinkedException (final DialableMobileNumber mobileNumber) {
+ // Call super constructor with message
+ super(MessageFormat.format("mobileNumber={0} with phoneId={1} cannot be linked, link target has already mobile number linked.", mobileNumber, mobileNumber.getPhoneId())); //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.jphone.exceptions.phone;
+
+import java.text.MessageFormat;
+import org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber;
+import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
+import org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber;
+
+/**
+ * An exception thrown when a fax, land-line or mobile number is not linked but
+ * should be.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class PhoneNumberNotLinkedException extends Exception {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 18_964_581_681_985_599L;
+
+ /**
+ * Counstructor with fax number
+ * <p>
+ * @param faxNumber Fax number
+ */
+ public PhoneNumberNotLinkedException (final DialableFaxNumber faxNumber) {
+ // Call super constructor with message
+ super(MessageFormat.format("faxNumber={0} with phoneId={1} is not linked.", faxNumber, faxNumber.getPhoneId())); //NOI18N
+ }
+
+ /**
+ * Counstructor with landLine number
+ * <p>
+ * @param landLineNumber Land-line number
+ */
+ public PhoneNumberNotLinkedException (final DialableLandLineNumber landLineNumber) {
+ // Call super constructor with message
+ super(MessageFormat.format("landLineNumber={0} with phoneId={1} is not linked.", landLineNumber, landLineNumber.getPhoneId())); //NOI18N
+ }
+
+ /**
+ * Counstructor with mobile number
+ * <p>
+ * @param mobileNumber Mobile number
+ */
+ public PhoneNumberNotLinkedException (final DialableMobileNumber mobileNumber) {
+ // Call super constructor with message
+ super(MessageFormat.format("mobileNumber={0} with phoneId={1} is not linked.", mobileNumber, mobileNumber.getPhoneId())); //NOI18N
+ }
+
+}