*/
private static final long serialVersionUID = 13_859_879_482_106L;
- /**
- * Id number
- */
- @Id
- @GeneratedValue (strategy = GenerationType.IDENTITY)
- @Column (name = "cellphone_id", length = 20, updatable = false, nullable = false)
- private Long phoneId;
-
/**
* Connection to table "cellphone_provider" (for dial prefix and more data)
*/
@OneToOne (targetEntity = CellphoneProvider.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
private SmsProvider cellphoneProvider;
- /**
- * Number without prefix to dial
- */
- @Basic (optional = false)
- @Column (name = "cellphone_number", length = 20, nullable = false)
- private Long phoneNumber;
-
/**
* Timestamp when this entry has been created
*/
@Column (name = "cellphone_entry_created", nullable = false, updatable = false)
private Calendar phoneEntryCreated;
+ /**
+ * Id number
+ */
+ @Id
+ @GeneratedValue (strategy = GenerationType.IDENTITY)
+ @Column (name = "cellphone_id", length = 20, updatable = false, nullable = false)
+ private Long phoneId;
+
+ /**
+ * Number without prefix to dial
+ */
+ @Basic (optional = false)
+ @Column (name = "cellphone_number", length = 20, nullable = false)
+ private Long phoneNumber;
+
/**
* Contructor with cellphone carrier and number
* <p>
protected CellphoneNumber () {
}
+ @Override
+ public int compareTo (final DialableCellphoneNumber dialableCellphoneNumber) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ }
+
@Override
public boolean equals (final Object object) {
if (object == null) {
return true;
}
+ @Override
+ public int hashCode () {
+ int hash = 5;
+ hash = 97 * hash + Objects.hashCode(this.getCellphoneProvider());
+ hash = 97 * hash + Objects.hashCode(this.getPhoneNumber());
+ return hash;
+ }
+
+ @Override
+ public SmsProvider getCellphoneProvider () {
+ return this.cellphoneProvider;
+ }
+
+ @Override
+ public void setCellphoneProvider (final SmsProvider cellphoneProvider) {
+ this.cellphoneProvider = cellphoneProvider;
+ }
+
+ @Override
+ @Deprecated
+ public Integer getPhoneAreaCode () {
+ throw new UnsupportedOperationException("Cellphone numbers don't have area codes. Please fix your code."); //NOI18N
+ }
+
+ @Override
+ @Deprecated
+ public void setPhoneAreaCode (final Integer phoneAreaCode) {
+ throw new UnsupportedOperationException("Cellphone numbers don't have area codes. Please fix your code."); //NOI18N
+ }
+
@Override
@Deprecated
public Country getPhoneCountry () {
this.phoneId = phoneId;
}
- @Override
- public SmsProvider getCellphoneProvider () {
- return this.cellphoneProvider;
- }
-
- @Override
- public void setCellphoneProvider (final SmsProvider cellphoneProvider) {
- this.cellphoneProvider = cellphoneProvider;
- }
-
@Override
public Long getPhoneNumber () {
return this.phoneNumber;
this.phoneNumber = phoneNumber;
}
- @Override
- @Deprecated
- public Integer getPhoneAreaCode () {
- throw new UnsupportedOperationException("Cellphone numbers don't have area codes. Please fix your code."); //NOI18N
- }
-
- @Override
- @Deprecated
- public void setPhoneAreaCode (final Integer phoneAreaCode) {
- throw new UnsupportedOperationException("Cellphone numbers don't have area codes. Please fix your code."); //NOI18N
- }
-
- @Override
- public int compareTo (final DialableCellphoneNumber dialableCellphoneNumber) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- @Override
- public int hashCode () {
- int hash = 5;
- hash = 97 * hash + Objects.hashCode(this.getCellphoneProvider());
- hash = 97 * hash + Objects.hashCode(this.getPhoneNumber());
- return hash;
- }
}
*/
private static final long serialVersionUID = 17_687_687_191_375L;
+ /**
+ * Area code (example: 2151 for Krefeld)
+ */
+ @Basic (optional = false)
+ @Column (name = "fax_area_code", length = 10, nullable = false)
+ private Integer faxAreaCode;
+
+ /**
+ * Country instance ('s dial data)
+ */
+ @JoinColumn (name = "fax_country_id", nullable = false)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
+ private Country faxCountry;
+
/**
* Timestamp when this entry has been created
*/
@Column (name = "fax_number", length = 20, nullable = false)
private Long phoneNumber;
- /**
- * Area code (example: 2151 for Krefeld)
- */
- @Basic (optional = false)
- @Column (name = "fax_area_code", length = 10, nullable = false)
- private Integer faxAreaCode;
-
- /**
- * Country instance ('s dial data)
- */
- @JoinColumn (name = "fax_country_id", nullable = false)
- @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
- private Country faxCountry;
-
/**
* Contructor with country, area code and number
* <p>
}
@Override
- public Long getPhoneId () {
- return this.phoneId;
+ public int compareTo (final DialableFaxNumber dialableFaxNumber) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
- public void setPhoneId (final Long phoneId) {
- this.phoneId = phoneId;
- }
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (this.getClass() != object.getClass()) {
+ return false;
+ }
- @Override
- public Long getPhoneNumber () {
- return this.phoneNumber;
+ final DialableFaxNumber other = (DialableFaxNumber) object;
+
+ if (!Objects.equals(this.getPhoneNumber(), other.getPhoneNumber())) {
+ return false;
+ } else if (!Objects.equals(this.getPhoneAreaCode(), other.getPhoneAreaCode())) {
+ return false;
+ } else if (!Objects.equals(this.getPhoneCountry(), other.getPhoneCountry())) {
+ return false;
+ }
+
+ return true;
}
@Override
- public void setPhoneNumber (final Long phoneNumber) {
- this.phoneNumber = phoneNumber;
+ public int hashCode () {
+ int hash = 3;
+ hash = 23 * hash + Objects.hashCode(this.getPhoneNumber());
+ hash = 23 * hash + Objects.hashCode(this.getPhoneAreaCode());
+ hash = 23 * hash + Objects.hashCode(this.getPhoneCountry());
+ return hash;
}
@Override
}
@Override
- public int compareTo (final DialableFaxNumber dialableFaxNumber) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ public Long getPhoneId () {
+ return this.phoneId;
}
@Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (this.getClass() != object.getClass()) {
- return false;
- }
-
- final DialableFaxNumber other = (DialableFaxNumber) object;
-
- if (!Objects.equals(this.getPhoneNumber(), other.getPhoneNumber())) {
- return false;
- } else if (!Objects.equals(this.getPhoneAreaCode(), other.getPhoneAreaCode())) {
- return false;
- } else if (!Objects.equals(this.getPhoneCountry(), other.getPhoneCountry())) {
- return false;
- }
+ public void setPhoneId (final Long phoneId) {
+ this.phoneId = phoneId;
+ }
- return true;
+ @Override
+ public Long getPhoneNumber () {
+ return this.phoneNumber;
}
@Override
- public int hashCode () {
- int hash = 3;
- hash = 23 * hash + Objects.hashCode(this.getPhoneNumber());
- hash = 23 * hash + Objects.hashCode(this.getPhoneAreaCode());
- hash = 23 * hash + Objects.hashCode(this.getPhoneCountry());
- return hash;
+ public void setPhoneNumber (final Long phoneNumber) {
+ this.phoneNumber = phoneNumber;
}
}
private static final long serialVersionUID = 185_878_567_810_590L;
/**
- * Id number
+ * Country instance ('s dial data)
*/
- @Id
- @GeneratedValue (strategy = GenerationType.IDENTITY)
- @Column (name = "provider_id", length = 20, nullable = false, updatable = false)
- private Long providerId;
+ @JoinColumn (name = "provider_country_id", nullable = false)
+ @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
+ private Country providerCountry;
/**
* Provider dial prefix (example: 0177 for German E+)
@Column (name = "provider_dial_prefix", length = 10, nullable = false)
private Long providerDialPrefix;
- /**
- * Name of the provider
- */
- @Basic (optional = false)
- @Column (name = "provider_name", length = 30, nullable = false)
- private String providerName;
-
- /**
- * Country instance ('s dial data)
- */
- @JoinColumn (name = "provider_country_id", nullable = false)
- @OneToOne (targetEntity = CountryData.class, cascade = CascadeType.MERGE, optional = false, fetch = FetchType.EAGER)
- private Country providerCountry;
-
/**
* Timestamp when this entry has been created
*/
private Calendar providerEntryCreated;
/**
- * Protected constructor for JPA
+ * Id number
*/
- protected CellphoneProvider () {
- }
+ @Id
+ @GeneratedValue (strategy = GenerationType.IDENTITY)
+ @Column (name = "provider_id", length = 20, nullable = false, updatable = false)
+ private Long providerId;
+
+ /**
+ * Name of the provider
+ */
+ @Basic (optional = false)
+ @Column (name = "provider_name", length = 30, nullable = false)
+ private String providerName;
/**
* Constructor with all required data
this.providerEntryCreated = providerEntryCreated;
}
- @Override
- public Long getProviderId () {
- return this.providerId;
+ /**
+ * Protected constructor for JPA
+ */
+ protected CellphoneProvider () {
}
@Override
- public void setProviderId (final Long providerId) {
- this.providerId = providerId;
+ public int compareTo (final SmsProvider provider) {
+ throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
- public Long getProviderDialPrefix () {
- return this.providerDialPrefix;
- }
+ public boolean equals (final Object object) {
+ if (object == null) {
+ return false;
+ } else if (this.getClass() != object.getClass()) {
+ return false;
+ }
- @Override
- public void setProviderDialPrefix (final Long providerDialPrefix) {
- this.providerDialPrefix = providerDialPrefix;
- }
+ final SmsProvider other = (SmsProvider) object;
- @Override
- public String getProviderName () {
- return this.providerName;
+ 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 void setProviderName (final String providerName) {
- this.providerName = providerName;
+ 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
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 int compareTo (final SmsProvider provider) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+ public Long getProviderId () {
+ return this.providerId;
}
@Override
- public boolean equals (final Object object) {
- if (object == null) {
- return false;
- } else if (this.getClass() != object.getClass()) {
- return false;
- }
-
- final SmsProvider other = (SmsProvider) 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;
- }
+ public void setProviderId (final Long providerId) {
+ this.providerId = providerId;
+ }
- return true;
+ @Override
+ public String getProviderName () {
+ return this.providerName;
}
@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;
+ public void setProviderName (final String providerName) {
+ this.providerName = providerName;
}
}