← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21229: minor, add timestamp to TEAVA

 

------------------------------------------------------------
revno: 21229
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-11-30 07:40:40 +0700
message:
  minor, add timestamp to TEAVA
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueAudit.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueAudit.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueAudit.java	2015-11-30 00:34:24 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueAudit.java	2015-11-30 00:40:40 +0000
@@ -37,6 +37,7 @@
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 
 import java.io.Serializable;
+import java.util.Date;
 import java.util.Objects;
 
 /**
@@ -52,6 +53,8 @@
 
     private TrackedEntityInstance entityInstance;
 
+    private Date timestamp;
+
     private String value;
 
     private String modifiedBy;
@@ -71,7 +74,7 @@
     @Override
     public int hashCode()
     {
-        return Objects.hash( attribute, entityInstance, value, modifiedBy, auditType );
+        return Objects.hash( id, attribute, entityInstance, timestamp, value, modifiedBy, auditType );
     }
 
     @Override
@@ -89,13 +92,25 @@
 
         final TrackedEntityAttributeValueAudit other = (TrackedEntityAttributeValueAudit) obj;
 
-        return Objects.equals( this.attribute, other.attribute )
+        return Objects.equals( this.id, other.id )
+            && Objects.equals( this.attribute, other.attribute )
             && Objects.equals( this.entityInstance, other.entityInstance )
+            && Objects.equals( this.timestamp, other.timestamp )
             && Objects.equals( this.value, other.value )
             && Objects.equals( this.modifiedBy, other.modifiedBy )
             && Objects.equals( this.auditType, other.auditType );
     }
 
+    public int getId()
+    {
+        return id;
+    }
+
+    public void setId( int id )
+    {
+        this.id = id;
+    }
+
     @JsonProperty( "trackedEntityAttribute" )
     @JacksonXmlProperty( localName = "trackedEntityAttribute", namespace = DxfNamespaces.DXF_2_0 )
     public TrackedEntityAttribute getAttribute()