package com.k_int.aggr2.mimsy.data;

public class DescriptionDTO implements java.io.Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String description;
	private String type;
	private boolean prior;
	private String date;
	private String source;
	
	public DescriptionDTO(String description,String type, boolean prior)
	{
		this.description=description;
		this.type=type;
		this.prior=prior;
	}
	
	public String getDescription()
	{
		return description;
	}
	
	public String getType()
	{
		return type;
	}
	
	public String getSource()
	{
		return source;
	}
	
	public void setSource(String source)
	{
		this.source=source;
	}
	
	public String getDate()
	{
		return date;
	}
	
	
	public void setDate(String date)
	{
		this.date=date;
	}
	
	public boolean getPrior()
	{
		return prior;
	}
	
	public int hashCode()
	{
		return toString().hashCode();
	}
	
	public boolean equals(Object o)
	{
	  boolean retval=false;
	  if(o instanceof DescriptionDTO)
	  {
		  retval = (o.toString()).equals(this.toString());
	  }
			  
	  return retval;  
	}
	
	
	public String toString()
	{
		StringBuilder builder = new StringBuilder();
		if(description!=null)
			builder.append(description);
		
		if(type!=null)
			builder.append(type);
		
		if(source!=null)
			builder.append(source);
		
		if(date!=null)
			builder.append(date);
		
		builder.append(Boolean.toString(prior));
		
		return builder.toString();				
	}
}
