package co.touchlab.researchstack.common.result;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;

public class Result implements Serializable
{

    private String                  identifier;
    private Date                    startDate;
    private Date                    endDate;
    private HashMap<String, Object> userInfo; //TODO Implement
    private boolean                 saveable; //TODO Implement

    public Result(String identifier)
    {
        this.identifier = identifier;
        this.startDate = new Date();
        this.endDate = new Date();
    }

    public String getIdentifier()
    {
        return identifier;
    }

    public Date getStartDate()
    {
        return startDate;
    }

    public void setStartDate(Date startDate)
    {
        this.startDate = startDate;
    }

    public Date getEndDate()
    {
        return endDate;
    }

    public void setEndDate(Date endDate)
    {
        this.endDate = endDate;
    }

    public HashMap<String, Object> getUserInfo()
    {
        return userInfo;
    }

    public void setUserInfo(HashMap<String, Object> userInfo)
    {
        this.userInfo = userInfo;
    }

    public boolean isSaveable()
    {
        return saveable;
    }

    @Override
    public boolean equals(Object o)
    {
        if(o instanceof Result)
        {
            Result result = (Result) o;
            return identifier.equals(result.getIdentifier()) &&
                    startDate.equals(result.getStartDate()) &&
                    endDate.equals(result.getEndDate());
        }
        return false;
    }
}

@@ -212,24 +212,87 @@
  identifier;
+%0A%0A    //TODO: these should probably go?  Steps don't need this.
 %0A    private
@@ -368,24 +368,25 @@
    endDate;%0A
+%0A
     private 
@@ -585,80 +585,8 @@
 er;%0A
-        this.startDate = new Date();%0A        this.endDate = new Date();%0A
     
@@ -1204,32 +1204,32 @@
 aveable()%0A    %7B%0A
+
         return s
@@ -1246,368 +1246,7 @@
    %7D
-%0A%0A    @Override%0A    public boolean equals(Object o)%0A    %7B%0A        if(o instanceof Result)%0A        %7B%0A            Result result = (Result) o;%0A            return identifier.equals(result.getIdentifier()) &&%0A                    startDate.equals(result.getStartDate()) &&%0A                    endDate.equals(result.getEndDate());%0A        %7D%0A        return false;%0A    %7D
 %0A%7D%0A

Remove start/end date initializers