From ec03d47169d0fd4808610947d879d3186656231a Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 20 Feb 2016 20:00:24 +0100 Subject: [PATCH] resorted members --- .../mxchange/jcountry/data/CountryData.java | 133 +++++++++--------- 1 file changed, 67 insertions(+), 66 deletions(-) diff --git a/src/org/mxchange/jcountry/data/CountryData.java b/src/org/mxchange/jcountry/data/CountryData.java index 3c7a86d..34ae8f7 100644 --- a/src/org/mxchange/jcountry/data/CountryData.java +++ b/src/org/mxchange/jcountry/data/CountryData.java @@ -48,12 +48,12 @@ public class CountryData implements Country, Comparable { private static final long serialVersionUID = 14_853_982_718_509L; /** - * Id number + * Dial prefix to be dialed before an abroad number is being dialed. In + * Germany this is "+" or 00. */ - @Id - @GeneratedValue (strategy = GenerationType.IDENTITY) - @Column (name = "country_id", length = 20, nullable = false, updatable = false) - private Long countryId; + @Basic (optional = false) + @Column (name = "country_abroad_dial_prefix", length = 10) + private String countryAbroadDialPrefix; /** * 2-characters country code, all upper-case (example: DE for Germany, PH @@ -64,20 +64,12 @@ public class CountryData implements Country, Comparable { private String countryCode; /** - * Dial prefix to be dialed before the area/city number is dialed locally. - * In Germany, this is 0. - */ - @Basic (optional = false) - @Column (name = "country_local_dial_prefix", length = 10) - private String countryLocalDialPrefix; - - /** - * Dial prefix to be dialed before an abroad number is being dialed. In - * Germany this is "+" or 00. + * TImestamp when this entry has been created */ @Basic (optional = false) - @Column (name = "country_abroad_dial_prefix", length = 10) - private String countryAbroadDialPrefix; + @Temporal (TemporalType.TIMESTAMP) + @Column (name = "country_entry_created", nullable = false, updatable = false) + private Calendar countryEntryCreated; /** * Key to i18n key (to have translated country names) @@ -87,12 +79,12 @@ public class CountryData implements Country, Comparable { private String countryI18nkey; /** - * 2-digit country's phone code (example: 49 for Germany, 63 for - * Philippines) + * Id number */ - @Basic (optional = false) - @Column (name = "country_phone_code", length = 2, nullable = false, updatable = false) - private Short countryPhoneCode; + @Id + @GeneratedValue (strategy = GenerationType.IDENTITY) + @Column (name = "country_id", length = 20, nullable = false, updatable = false) + private Long countryId; /** * Is the local dialing prefix required or optional for calling numbers in @@ -103,12 +95,25 @@ public class CountryData implements Country, Comparable { private Boolean countryIsLocalPrefixRequired; /** - * TImestamp when this entry has been created + * Dial prefix to be dialed before the area/city number is dialed locally. + * In Germany, this is 0. */ @Basic (optional = false) - @Temporal (TemporalType.TIMESTAMP) - @Column (name = "country_entry_created", nullable = false, updatable = false) - private Calendar countryEntryCreated; + @Column (name = "country_local_dial_prefix", length = 10) + private String countryLocalDialPrefix; + + /** + * 2-digit country's phone code (example: 49 for Germany, 63 for + * Philippines) + */ + @Basic (optional = false) + @Column (name = "country_phone_code", length = 2, nullable = false, updatable = false) + private Short countryPhoneCode; + + @Override + public int compareTo (final Country country) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } @Override public boolean equals (final Object object) { @@ -124,94 +129,90 @@ public class CountryData implements Country, Comparable { } @Override - public Calendar getCountryEntryCreated () { - return this.countryEntryCreated; + public int hashCode () { + int hash = 5; + hash = 37 * hash + Objects.hashCode(this.getCountryCode()); + return hash; } @Override - public void setCountryEntryCreated (final Calendar countryEntryCreated) { - this.countryEntryCreated = countryEntryCreated; + public String getCountryAbroadDialPrefix () { + return this.countryAbroadDialPrefix; } @Override - public Short getCountryPhoneCode () { - return this.countryPhoneCode; + public void setCountryAbroadDialPrefix (final String countryAbroadDialPrefix) { + this.countryAbroadDialPrefix = countryAbroadDialPrefix; } @Override - public void setCountryPhoneCode (final Short countryPhoneCode) { - this.countryPhoneCode = countryPhoneCode; + public String getCountryCode () { + return this.countryCode; } @Override - public int compareTo (final Country country) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + public void setCountryCode (final String countryCode) { + this.countryCode = countryCode; } @Override - public Long getCountryId () { - return this.countryId; + public Calendar getCountryEntryCreated () { + return this.countryEntryCreated; } @Override - public void setCountryId (final Long countryId) { - this.countryId = countryId; + public void setCountryEntryCreated (final Calendar countryEntryCreated) { + this.countryEntryCreated = countryEntryCreated; } @Override - public String getCountryCode () { - return this.countryCode; + public String getCountryI18nkey () { + return this.countryI18nkey; } @Override - public void setCountryCode (final String countryCode) { - this.countryCode = countryCode; + public void setCountryI18nkey (final String countryI18nkey) { + this.countryI18nkey = countryI18nkey; } @Override - public String getCountryLocalDialPrefix () { - return this.countryLocalDialPrefix; + public Long getCountryId () { + return this.countryId; } @Override - public void setCountryLocalDialPrefix (final String countryLocalDialPrefix) { - this.countryLocalDialPrefix = countryLocalDialPrefix; + public void setCountryId (final Long countryId) { + this.countryId = countryId; } @Override - public String getCountryAbroadDialPrefix () { - return this.countryAbroadDialPrefix; + public Boolean getCountryIsLocalPrefixRequired () { + return this.countryIsLocalPrefixRequired; } @Override - public void setCountryAbroadDialPrefix (final String countryAbroadDialPrefix) { - this.countryAbroadDialPrefix = countryAbroadDialPrefix; + public void setCountryIsLocalPrefixRequired (final Boolean countryIsLocalPrefixRequired) { + this.countryIsLocalPrefixRequired = countryIsLocalPrefixRequired; } @Override - public String getCountryI18nkey () { - return this.countryI18nkey; + public String getCountryLocalDialPrefix () { + return this.countryLocalDialPrefix; } @Override - public void setCountryI18nkey (final String countryI18nkey) { - this.countryI18nkey = countryI18nkey; + public void setCountryLocalDialPrefix (final String countryLocalDialPrefix) { + this.countryLocalDialPrefix = countryLocalDialPrefix; } @Override - public Boolean getCountryIsLocalPrefixRequired () { - return this.countryIsLocalPrefixRequired; + public Short getCountryPhoneCode () { + return this.countryPhoneCode; } @Override - public void setCountryIsLocalPrefixRequired (final Boolean countryIsLocalPrefixRequired) { - this.countryIsLocalPrefixRequired = countryIsLocalPrefixRequired; + public void setCountryPhoneCode (final Short countryPhoneCode) { + this.countryPhoneCode = countryPhoneCode; } - @Override - public int hashCode () { - int hash = 5; - hash = 37 * hash + Objects.hashCode(this.getCountryCode()); - return hash; - } } -- 2.39.5