package com.intrbiz.bergamot.model.message;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonProperty;
public abstract class NamedObjectMO extends MessageObject implements ParameterisedMO
{
@JsonProperty("id")
protected UUID id;
@JsonProperty("site_id")
protected UUID siteId;
@JsonProperty("name")
protected String name;
@JsonProperty("summary")
protected String summary;
@JsonProperty("description")
protected String description;
@JsonProperty("parameters")
private List<ParameterMO> parameters = new LinkedList<ParameterMO>();
public NamedObjectMO()
{
super();
}
public UUID getId()
{
return id;
}
public void setId(UUID id)
{
this.id = id;
}
public UUID getSiteId()
{
return siteId;
}
public void setSiteId(UUID siteId)
{
this.siteId = siteId;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getSummary()
{
return summary;
}
public void setSummary(String summary)
{
this.summary = summary;
}
public String getDescription()
{
return description;
}
public void setDescription(String description)
{
this.description = description;
}
@Override
public List<ParameterMO> getParameters()
{
return parameters;
}
@Override
public void setParameters(List<ParameterMO> parameters)
{
this.parameters = parameters;
}
@Override
public int hashCode()
{
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj)
{
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
NamedObjectMO other = (NamedObjectMO) obj;
if (id == null)
{
if (other.id != null) return false;
}
else if (!id.equals(other.id)) return false;
return true;
}
}