]> git.mxchange.org Git - jcountry-core.git/commitdiff
added timestamp when the entry has been created (administrative data)
authorRoland Haeder <roland@mxchange.org>
Thu, 22 Oct 2015 08:10:03 +0000 (10:10 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 22 Oct 2015 08:10:03 +0000 (10:10 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcountry/data/Country.java
src/org/mxchange/jcountry/data/CountryData.java

index 249b0e27d2b92035fa8719255006fe8ad4256479..3aee8f29c84630cc902a786a96b5f20086dd9b98 100644 (file)
@@ -17,6 +17,7 @@
 package org.mxchange.jcountry.data;
 
 import java.io.Serializable;
+import java.util.Calendar;
 
 /**
  * A POJI for country data such as dial prefixes
@@ -124,9 +125,23 @@ public interface Country extends Serializable {
         */
        void setCountryIsLocalPrefixRequired (final Boolean countryIsLocalPrefixRequired);
 
+       /**
+        * Getter for country entry created timestamp
+        * <p>
+        * @return Country entry created timestamp
+        */
+       Calendar getCountryEntryCreated ();
+
+       /**
+        * Setter for country entry created timestamp
+        * <p>
+        * @param countryEntryCreated Country entry created timestamp
+        */
+       void setCountryEntryCreated (final Calendar countryEntryCreated);
+
        @Override
-        boolean equals (final Object object);
+       boolean equals (final Object object);
 
        @Override
-        int hashCode ();
+       int hashCode ();
 }
index b286d7135bb9c47f5a100f70198705f1ef55a625..f69c6472d20a4afc2b9aacdea4ded3a6836936cf 100644 (file)
@@ -16,6 +16,7 @@
  */
 package org.mxchange.jcountry.data;
 
+import java.util.Calendar;
 import java.util.Objects;
 import javax.persistence.Basic;
 import javax.persistence.Column;
@@ -26,6 +27,8 @@ import javax.persistence.Id;
 import javax.persistence.NamedQueries;
 import javax.persistence.NamedQuery;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 
 /**
  * A POJO for country data
@@ -99,6 +102,14 @@ public class CountryData implements Country, Comparable<Country> {
        @Column (name = "country_is_local_prefix_required", nullable = false)
        private Boolean countryIsLocalPrefixRequired;
 
+       /**
+        * TImestamp when this entry has been created
+        */
+       @Basic (optional = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       @Column (name = "country_entry_created", nullable = false, updatable = false)
+       private Calendar countryEntryCreated;
+
        @Override
        public boolean equals (final Object object) {
                if (object == null) {
@@ -112,6 +123,16 @@ public class CountryData implements Country, Comparable<Country> {
                return Objects.equals(this.getCountryCode(), other.getCountryCode());
        }
 
+       @Override
+       public Calendar getCountryEntryCreated () {
+               return this.countryEntryCreated;
+       }
+
+       @Override
+       public void setCountryEntryCreated (final Calendar countryEntryCreated) {
+               this.countryEntryCreated = countryEntryCreated;
+       }
+
        @Override
        public Short getCountryPhoneCode () {
                return this.countryPhoneCode;