]> git.mxchange.org Git - jphone-core.git/commitdiff
Renamed package smsprovider -> mobileprovider. They don't only provide SMS but also...
authorRoland Haeder <roland@mxchange.org>
Tue, 12 Apr 2016 18:24:52 +0000 (20:24 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 12 Apr 2016 18:24:52 +0000 (20:24 +0200)
src/org/mxchange/jphone/phonenumbers/cellphone/CellphoneNumber.java
src/org/mxchange/jphone/phonenumbers/cellphone/DialableCellphoneNumber.java
src/org/mxchange/jphone/phonenumbers/mobileprovider/CellphoneProvider.java [new file with mode: 0644]
src/org/mxchange/jphone/phonenumbers/mobileprovider/MobileProvider.java [new file with mode: 0644]
src/org/mxchange/jphone/phonenumbers/smsprovider/CellphoneProvider.java [deleted file]
src/org/mxchange/jphone/phonenumbers/smsprovider/MobileProvider.java [deleted file]

index 4c4e524919e20fdeb458ceaf43fe4565a84a529d..ce74ed55440a57df2cb034173057df8842b2dc4e 100644 (file)
@@ -31,8 +31,8 @@ import javax.persistence.Table;
 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.MobileProvider;
+import org.mxchange.jphone.phonenumbers.mobileprovider.CellphoneProvider;
+import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 
 /**
  * A POJO for dialable cellphone numbers
index 8a52e4bc20fc680eee7f329e02c22af18a7afd51..ce9021ece760208cbdede1242406bb8b2c055b75 100644 (file)
@@ -17,7 +17,7 @@
 package org.mxchange.jphone.phonenumbers.cellphone;
 
 import org.mxchange.jphone.phonenumbers.DialableNumber;
-import org.mxchange.jphone.phonenumbers.smsprovider.MobileProvider;
+import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
 
 /**
  * A POJO for dialable cellphone numbers with carriers.
diff --git a/src/org/mxchange/jphone/phonenumbers/mobileprovider/CellphoneProvider.java b/src/org/mxchange/jphone/phonenumbers/mobileprovider/CellphoneProvider.java
new file mode 100644 (file)
index 0000000..6f469d3
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+ * 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.mobileprovider;
+
+import java.util.Calendar;
+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.NamedQueries;
+import javax.persistence.NamedQuery;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import org.mxchange.jcountry.data.Country;
+import org.mxchange.jcountry.data.CountryData;
+
+/**
+ * A POJO for cellphone providers
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Entity (name = "cellphone_provider")
+@Table (name = "cellphone_provider")
+@NamedQueries (
+               @NamedQuery (name = "AllMobileProvider", query = "SELECT p FROM cellphone_provider AS p ORDER BY p.providerId ASC")
+)
+public class CellphoneProvider implements MobileProvider {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 185_878_567_810_590L;
+
+       /**
+        * Country instance ('s dial data)
+        */
+       @JoinColumn (name = "provider_country_id", nullable = false)
+       @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false)
+       private Country providerCountry;
+
+       /**
+        * Provider dial prefix (example: 0177 for German E+)
+        */
+       @Basic (optional = false)
+       @Column (name = "provider_dial_prefix", length = 10, nullable = false)
+       private Long providerDialPrefix;
+
+       /**
+        * Timestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "provider_entry_created", nullable = false, updatable = false)
+       private Calendar providerEntryCreated;
+
+       /**
+        * Id number
+        */
+       @Id
+       @GeneratedValue (strategy = GenerationType.IDENTITY)
+       @Column (name = "provider_id", nullable = false, updatable = false)
+       private Long providerId;
+
+       /**
+        * Regular expression for mail gateway
+        */
+       @Column (name = "provider_mail_regex", length = 30)
+       private String providerMailRegex;
+
+       /**
+        * Name of the provider
+        */
+       @Basic (optional = false)
+       @Column (name = "provider_name", length = 30, nullable = false)
+       private String providerName;
+
+       /**
+        * Constructor with all required data
+        * <p>
+        * @param providerDialPrefix Dial prefix
+        * @param providerName       Name
+        * @param providerCountry    Country
+        */
+       public CellphoneProvider (final Long providerDialPrefix, final String providerName, final Country providerCountry) {
+               // Call default constructor
+               this();
+
+               // Set all values
+               this.providerDialPrefix = providerDialPrefix;
+               this.providerName = providerName;
+               this.providerCountry = providerCountry;
+       }
+
+       /**
+        * Default constructor
+        */
+       public CellphoneProvider () {
+       }
+
+       @Override
+       public boolean equals (final Object object) {
+               if (null == object) {
+                       return false;
+               } else if (this.getClass() != object.getClass()) {
+                       return false;
+               }
+
+               final MobileProvider other = (MobileProvider) object;
+
+               if (!Objects.equals(this.getProviderDialPrefix(), other.getProviderDialPrefix())) {
+                       return false;
+               } else if (!Objects.equals(this.getProviderName(), other.getProviderName())) {
+                       return false;
+               } else if (!Objects.equals(this.getProviderCountry(), other.getProviderCountry())) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       @Override
+       public int hashCode () {
+               int hash = 7;
+               hash = 19 * hash + Objects.hashCode(this.getProviderDialPrefix());
+               hash = 19 * hash + Objects.hashCode(this.getProviderName());
+               hash = 19 * hash + Objects.hashCode(this.getProviderCountry());
+               return hash;
+       }
+
+       @Override
+       public Country getProviderCountry () {
+               return this.providerCountry;
+       }
+
+       @Override
+       public void setProviderCountry (final Country providerCountry) {
+               this.providerCountry = providerCountry;
+       }
+
+       @Override
+       public Long getProviderDialPrefix () {
+               return this.providerDialPrefix;
+       }
+
+       @Override
+       public void setProviderDialPrefix (final Long providerDialPrefix) {
+               this.providerDialPrefix = providerDialPrefix;
+       }
+
+       @Override
+       public Calendar getProviderEntryCreated () {
+               return this.providerEntryCreated;
+       }
+
+       @Override
+       public void setProviderEntryCreated (final Calendar providerEntryCreated) {
+               this.providerEntryCreated = providerEntryCreated;
+       }
+
+       @Override
+       public Long getProviderId () {
+               return this.providerId;
+       }
+
+       @Override
+       public void setProviderId (final Long providerId) {
+               this.providerId = providerId;
+       }
+
+       @Override
+       public String getProviderName () {
+               return this.providerName;
+       }
+
+       @Override
+       public void setProviderName (final String providerName) {
+               this.providerName = providerName;
+       }
+
+       @Override
+       public String getProviderMailRegex () {
+               return this.providerMailRegex;
+       }
+
+       @Override
+       public void setProviderMailRegex (final String providerMailRegex) {
+               this.providerMailRegex = providerMailRegex;
+       }
+
+}
diff --git a/src/org/mxchange/jphone/phonenumbers/mobileprovider/MobileProvider.java b/src/org/mxchange/jphone/phonenumbers/mobileprovider/MobileProvider.java
new file mode 100644 (file)
index 0000000..2594c3a
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+ * 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.mobileprovider;
+
+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 ();
+
+}
diff --git a/src/org/mxchange/jphone/phonenumbers/smsprovider/CellphoneProvider.java b/src/org/mxchange/jphone/phonenumbers/smsprovider/CellphoneProvider.java
deleted file mode 100644 (file)
index 16f6b72..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * 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.util.Calendar;
-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.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import org.mxchange.jcountry.data.Country;
-import org.mxchange.jcountry.data.CountryData;
-
-/**
- * A POJO for cellphone providers
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Entity (name = "cellphone_provider")
-@Table (name = "cellphone_provider")
-@NamedQueries (
-               @NamedQuery (name = "AllMobileProvider", query = "SELECT p FROM cellphone_provider AS p ORDER BY p.providerId ASC")
-)
-public class CellphoneProvider implements MobileProvider {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 185_878_567_810_590L;
-
-       /**
-        * Country instance ('s dial data)
-        */
-       @JoinColumn (name = "provider_country_id", nullable = false)
-       @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.REFRESH, optional = false)
-       private Country providerCountry;
-
-       /**
-        * Provider dial prefix (example: 0177 for German E+)
-        */
-       @Basic (optional = false)
-       @Column (name = "provider_dial_prefix", length = 10, nullable = false)
-       private Long providerDialPrefix;
-
-       /**
-        * Timestamp when this entry has been created
-        */
-       @Basic (optional = false)
-       @Temporal (TemporalType.TIMESTAMP)
-       @Column (name = "provider_entry_created", nullable = false, updatable = false)
-       private Calendar providerEntryCreated;
-
-       /**
-        * Id number
-        */
-       @Id
-       @GeneratedValue (strategy = GenerationType.IDENTITY)
-       @Column (name = "provider_id", nullable = false, updatable = false)
-       private Long providerId;
-
-       /**
-        * Regular expression for mail gateway
-        */
-       @Column (name = "provider_mail_regex", length = 30)
-       private String providerMailRegex;
-
-       /**
-        * Name of the provider
-        */
-       @Basic (optional = false)
-       @Column (name = "provider_name", length = 30, nullable = false)
-       private String providerName;
-
-       /**
-        * Constructor with all required data
-        * <p>
-        * @param providerDialPrefix Dial prefix
-        * @param providerName       Name
-        * @param providerCountry    Country
-        */
-       public CellphoneProvider (final Long providerDialPrefix, final String providerName, final Country providerCountry) {
-               // Call default constructor
-               this();
-
-               // Set all values
-               this.providerDialPrefix = providerDialPrefix;
-               this.providerName = providerName;
-               this.providerCountry = providerCountry;
-       }
-
-       /**
-        * Default constructor
-        */
-       public CellphoneProvider () {
-       }
-
-       @Override
-       public boolean equals (final Object object) {
-               if (null == object) {
-                       return false;
-               } else if (this.getClass() != object.getClass()) {
-                       return false;
-               }
-
-               final MobileProvider other = (MobileProvider) object;
-
-               if (!Objects.equals(this.getProviderDialPrefix(), other.getProviderDialPrefix())) {
-                       return false;
-               } else if (!Objects.equals(this.getProviderName(), other.getProviderName())) {
-                       return false;
-               } else if (!Objects.equals(this.getProviderCountry(), other.getProviderCountry())) {
-                       return false;
-               }
-
-               return true;
-       }
-
-       @Override
-       public int hashCode () {
-               int hash = 7;
-               hash = 19 * hash + Objects.hashCode(this.getProviderDialPrefix());
-               hash = 19 * hash + Objects.hashCode(this.getProviderName());
-               hash = 19 * hash + Objects.hashCode(this.getProviderCountry());
-               return hash;
-       }
-
-       @Override
-       public Country getProviderCountry () {
-               return this.providerCountry;
-       }
-
-       @Override
-       public void setProviderCountry (final Country providerCountry) {
-               this.providerCountry = providerCountry;
-       }
-
-       @Override
-       public Long getProviderDialPrefix () {
-               return this.providerDialPrefix;
-       }
-
-       @Override
-       public void setProviderDialPrefix (final Long providerDialPrefix) {
-               this.providerDialPrefix = providerDialPrefix;
-       }
-
-       @Override
-       public Calendar getProviderEntryCreated () {
-               return this.providerEntryCreated;
-       }
-
-       @Override
-       public void setProviderEntryCreated (final Calendar providerEntryCreated) {
-               this.providerEntryCreated = providerEntryCreated;
-       }
-
-       @Override
-       public Long getProviderId () {
-               return this.providerId;
-       }
-
-       @Override
-       public void setProviderId (final Long providerId) {
-               this.providerId = providerId;
-       }
-
-       @Override
-       public String getProviderName () {
-               return this.providerName;
-       }
-
-       @Override
-       public void setProviderName (final String providerName) {
-               this.providerName = providerName;
-       }
-
-       @Override
-       public String getProviderMailRegex () {
-               return this.providerMailRegex;
-       }
-
-       @Override
-       public void setProviderMailRegex (final String providerMailRegex) {
-               this.providerMailRegex = providerMailRegex;
-       }
-
-}
diff --git a/src/org/mxchange/jphone/phonenumbers/smsprovider/MobileProvider.java b/src/org/mxchange/jphone/phonenumbers/smsprovider/MobileProvider.java
deleted file mode 100644 (file)
index a3b35a8..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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 ();
-
-}