import javax.persistence.TemporalType;
import org.mxchange.jcountry.data.Country;
import org.mxchange.jphone.phonenumbers.smsprovider.CellphoneProvider;
-import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider;
+import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider;
/**
* A POJO for dialable cellphone numbers
*/
@JoinColumn (name = "cellphone_provider_id", nullable = false)
@OneToOne (targetEntity = CellphoneProvider.class, cascade = CascadeType.REFRESH, optional = false)
- private SmsProvider cellphoneProvider;
+ private MobileProvider cellphoneProvider;
/**
* Timestamp when this entry has been created
* @param cellphoneProvider Cellphone provider instance
* @param cellphoneNumber Cellphone number
*/
- public CellphoneNumber (final SmsProvider cellphoneProvider, final Long cellphoneNumber) {
+ public CellphoneNumber (final MobileProvider cellphoneProvider, final Long cellphoneNumber) {
// Call default constructor
this();
}
@Override
- public SmsProvider getCellphoneProvider () {
+ public MobileProvider getCellphoneProvider () {
return this.cellphoneProvider;
}
@Override
- public void setCellphoneProvider (final SmsProvider cellphoneProvider) {
+ public void setCellphoneProvider (final MobileProvider cellphoneProvider) {
this.cellphoneProvider = cellphoneProvider;
}
@Override
@Deprecated
public Country getPhoneCountry () {
- throw new UnsupportedOperationException("The country code is provided by SmsProvider."); //To change body of generated methods, choose Tools | Templates.
+ throw new UnsupportedOperationException("The country code is provided by MobileProvider."); //To change body of generated methods, choose Tools | Templates.
}
@Override
@Deprecated
public void setPhoneCountry (final Country country) {
- throw new UnsupportedOperationException("The country code is provided by SmsProvider."); //To change body of generated methods, choose Tools | Templates.
+ throw new UnsupportedOperationException("The country code is provided by MobileProvider."); //To change body of generated methods, choose Tools | Templates.
}
@Override
package org.mxchange.jphone.phonenumbers.cellphone;
import org.mxchange.jphone.phonenumbers.DialableNumber;
-import org.mxchange.jphone.phonenumbers.smsprovider.SmsProvider;
+import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider;
/**
* A POJO for dialable cellphone numbers with carriers.
* <p>
* @return SMS provider instance
*/
- SmsProvider getCellphoneProvider ();
+ MobileProvider getCellphoneProvider ();
/**
* Setter for SMS provider instance
* <p>
* @param cellphoneProvider SMS provider instance
*/
- void setCellphoneProvider (final SmsProvider cellphoneProvider);
+ void setCellphoneProvider (final MobileProvider cellphoneProvider);
/**
* Copy all fields from source object to this
@Entity (name = "cellphone_provider")
@Table (name = "cellphone_provider")
@NamedQueries (
- @NamedQuery (name = "AllSmsProvider", query = "SELECT p FROM cellphone_provider AS p ORDER BY p.providerId ASC")
+ @NamedQuery (name = "AllMobileProvider", query = "SELECT p FROM cellphone_provider AS p ORDER BY p.providerId ASC")
)
-public class CellphoneProvider implements SmsProvider {
+public class CellphoneProvider implements MobileProvider {
/**
* Serial number
return false;
}
- final SmsProvider other = (SmsProvider) object;
+ final MobileProvider other = (MobileProvider) object;
if (!Objects.equals(this.getProviderDialPrefix(), other.getProviderDialPrefix())) {
return false;
--- /dev/null
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * 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.phonenumbers.smsprovider;
+
+import java.io.Serializable;
+import java.util.Calendar;
+import org.mxchange.jcountry.data.Country;
+
+/**
+ * A POJI for mobile providers
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface MobileProvider extends Serializable {
+
+ /**
+ * Getter for id number
+ * <p>
+ * @return Id number
+ */
+ Long getProviderId ();
+
+ /**
+ * Setter for id number
+ * <p>
+ * @param providerId Id number
+ */
+ void setProviderId (final Long providerId);
+
+ /**
+ * Getter for provider dial prefix
+ * <p>
+ * @return Provider dial prefix
+ */
+ Long getProviderDialPrefix ();
+
+ /**
+ * Setter for provider dial prefix
+ * <p>
+ * @param providerDialPrefix Provider dial prefix
+ */
+ void setProviderDialPrefix (final Long providerDialPrefix);
+
+ /**
+ * Getter for provider name
+ * <p>
+ * @return Provider name
+ */
+ String getProviderName ();
+
+ /**
+ * Setter for provider name
+ * <p>
+ * @param providerName Provider name
+ */
+ void setProviderName (final String providerName);
+
+ /**
+ * Getter for country instance ('s dial data)
+ * <p>
+ * @return Country instance
+ */
+ Country getProviderCountry ();
+
+ /**
+ * Setter for country instance ('s dial data)
+ * <p>
+ * @param country Country instance
+ */
+ void setProviderCountry (final Country country);
+
+ /**
+ * Getter for timestamp when this entry has been created
+ * <p>
+ * @return Timestamp when this entry has been created
+ */
+ Calendar getProviderEntryCreated ();
+
+ /**
+ * Setter for timestamp when this entry has been created
+ * <p>
+ * @param providerEntryCreated Timestamp when this entry has been created
+ */
+ void setProviderEntryCreated (final Calendar providerEntryCreated);
+
+ /**
+ * Getter for regular expression for mail gateway
+ * <p>
+ * @return Regular expression for mail gateway
+ */
+ String getProviderMailRegex ();
+
+ /**
+ * Setter for regular expression for mail gateway
+ * <p>
+ * @param providerMailRegex Regular expression for mail gateway
+ */
+ void setProviderMailRegex (final String providerMailRegex);
+
+ @Override
+ boolean equals (final Object object);
+
+ @Override
+ int hashCode ();
+
+}
+++ /dev/null
-/*
- * Copyright (C) 2016 Roland Haeder
- *
- * 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.phonenumbers.smsprovider;
-
-import java.io.Serializable;
-import java.util.Calendar;
-import org.mxchange.jcountry.data.Country;
-
-/**
- * A POJO for SMS provider
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface SmsProvider extends Serializable {
-
- /**
- * Getter for id number
- * <p>
- * @return Id number
- */
- Long getProviderId ();
-
- /**
- * Setter for id number
- * <p>
- * @param providerId Id number
- */
- void setProviderId (final Long providerId);
-
- /**
- * Getter for provider dial prefix
- * <p>
- * @return Provider dial prefix
- */
- Long getProviderDialPrefix ();
-
- /**
- * Setter for provider dial prefix
- * <p>
- * @param providerDialPrefix Provider dial prefix
- */
- void setProviderDialPrefix (final Long providerDialPrefix);
-
- /**
- * Getter for provider name
- * <p>
- * @return Provider name
- */
- String getProviderName ();
-
- /**
- * Setter for provider name
- * <p>
- * @param providerName Provider name
- */
- void setProviderName (final String providerName);
-
- /**
- * Getter for country instance ('s dial data)
- * <p>
- * @return Country instance
- */
- Country getProviderCountry ();
-
- /**
- * Setter for country instance ('s dial data)
- * <p>
- * @param country Country instance
- */
- void setProviderCountry (final Country country);
-
- /**
- * Getter for timestamp when this entry has been created
- * <p>
- * @return Timestamp when this entry has been created
- */
- Calendar getProviderEntryCreated ();
-
- /**
- * Setter for timestamp when this entry has been created
- * <p>
- * @param providerEntryCreated Timestamp when this entry has been created
- */
- void setProviderEntryCreated (final Calendar providerEntryCreated);
-
- /**
- * Getter for regular expression for mail gateway
- * <p>
- * @return Regular expression for mail gateway
- */
- String getProviderMailRegex ();
-
- /**
- * Setter for regular expression for mail gateway
- * <p>
- * @param providerMailRegex Regular expression for mail gateway
- */
- void setProviderMailRegex (final String providerMailRegex);
-
- @Override
- boolean equals (final Object object);
-
- @Override
- int hashCode ();
-
-}