package de.thomasjacob.improve.logic.issue;

import de.thomasjacob.improve.logic.user.User;
import de.thomasjacob.webcore.logic.Model;

import java.util.Date;


/**
 * FIXME: Document this type.
 * 
 * @author Thomas
 */
public class HistoryEntry extends Model
{
	private String comment = "";

	private Date date = new Date();

	private User editor = null;

	private int status = 0;

	public String getComment()
	{
		return this.comment;
	}

	public Date getDate()
	{
		return this.date;
	}

	public User getEditor()
	{
		return this.editor;
	}

	public int getStatus()
	{
		return this.status;
	}

	public String getStatusName()
	{
		return Issue.getStatusName(status);
	}

	public void setComment(String comment)
	{
		if (comment == null)
		{
			comment = "";
		}

		this.comment = comment;
	}

	public void setDate(Date date)
	{
		this.date = date;
	}

	public void setEditor(User editor)
	{
		this.editor = editor;
	}

	public void setStatus(int status)
	{
		this.status = status;
	}

}