From 5ab87abe1b2277ebc0eb148fe26120334ba8a256 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 12 Apr 2016 20:03:17 +0200 Subject: [PATCH] Changed interface (POJI) name SmsProvider to MobileProvider --- .../phonenumbers/cellphone/CellphoneNumber.java | 14 +++++++------- .../cellphone/DialableCellphoneNumber.java | 6 +++--- .../smsprovider/CellphoneProvider.java | 6 +++--- .../{SmsProvider.java => MobileProvider.java} | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) rename src/org/mxchange/jphone/phonenumbers/smsprovider/{SmsProvider.java => MobileProvider.java} (96%) diff --git a/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java b/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java index 882fd9b..4c4e524 100644 --- a/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java @@ -32,7 +32,7 @@ import javax.persistence.Temporal; 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 @@ -53,7 +53,7 @@ public class CellphoneNumber implements DialableCellphoneNumber { */ @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 @@ -90,7 +90,7 @@ public class CellphoneNumber implements DialableCellphoneNumber { * @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(); @@ -136,12 +136,12 @@ public class CellphoneNumber implements DialableCellphoneNumber { } @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; } @@ -160,13 +160,13 @@ public class CellphoneNumber implements DialableCellphoneNumber { @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 diff --git a/src/org/mxchange/jphone/phonenumbers/cellphone/DialableCellphoneNumber.java b/src/org/mxchange/jphone/phonenumbers/cellphone/DialableCellphoneNumber.java index 8776426..8a52e4b 100644 --- a/src/org/mxchange/jphone/phonenumbers/cellphone/DialableCellphoneNumber.java +++ b/src/org/mxchange/jphone/phonenumbers/cellphone/DialableCellphoneNumber.java @@ -17,7 +17,7 @@ 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. @@ -31,14 +31,14 @@ public interface DialableCellphoneNumber extends DialableNumber { *

* @return SMS provider instance */ - SmsProvider getCellphoneProvider (); + MobileProvider getCellphoneProvider (); /** * Setter for SMS provider instance *

* @param cellphoneProvider SMS provider instance */ - void setCellphoneProvider (final SmsProvider cellphoneProvider); + void setCellphoneProvider (final MobileProvider cellphoneProvider); /** * Copy all fields from source object to this diff --git a/src/org/mxchange/jphone/phonenumbers/smsprovider/CellphoneProvider.java b/src/org/mxchange/jphone/phonenumbers/smsprovider/CellphoneProvider.java index a41afe5..16f6b72 100644 --- a/src/org/mxchange/jphone/phonenumbers/smsprovider/CellphoneProvider.java +++ b/src/org/mxchange/jphone/phonenumbers/smsprovider/CellphoneProvider.java @@ -43,9 +43,9 @@ import org.mxchange.jcountry.data.CountryData; @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 @@ -126,7 +126,7 @@ public class CellphoneProvider implements SmsProvider { return false; } - final SmsProvider other = (SmsProvider) object; + final MobileProvider other = (MobileProvider) object; if (!Objects.equals(this.getProviderDialPrefix(), other.getProviderDialPrefix())) { return false; diff --git a/src/org/mxchange/jphone/phonenumbers/smsprovider/SmsProvider.java b/src/org/mxchange/jphone/phonenumbers/smsprovider/MobileProvider.java similarity index 96% rename from src/org/mxchange/jphone/phonenumbers/smsprovider/SmsProvider.java rename to src/org/mxchange/jphone/phonenumbers/smsprovider/MobileProvider.java index 18de431..a3b35a8 100644 --- a/src/org/mxchange/jphone/phonenumbers/smsprovider/SmsProvider.java +++ b/src/org/mxchange/jphone/phonenumbers/smsprovider/MobileProvider.java @@ -21,11 +21,11 @@ import java.util.Calendar; import org.mxchange.jcountry.data.Country; /** - * A POJO for SMS provider + * A POJI for mobile providers *

* @author Roland Haeder */ -public interface SmsProvider extends Serializable { +public interface MobileProvider extends Serializable { /** * Getter for id number -- 2.39.5