package net.sourceforge.stripes.examples.bugzooky.biz;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
/**
* Represents a bug in the bug database.
*
* @author Tim Fennell
*/
public class Bug {
private Integer id;
private Date openDate;
private String shortDescription;
private String longDescription;
private Component component;
private Priority priority;
private Status status;
private Person owner;
private Date dueDate;
private Float percentComplete;
private List<Attachment> attachments;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Date getOpenDate() {
return openDate;
}
public void setOpenDate(Date openDate) {
this.openDate = openDate;
}
public String getShortDescription() {
return shortDescription;
}
public void setShortDescription(String shortDescription) {
this.shortDescription = shortDescription;
}
public String getLongDescription() {
return longDescription;
}
public void setLongDescription(String longDescription) {
this.longDescription = longDescription;
}
public Component getComponent() {
return component;
}
public void setComponent(Component component) {
this.component = component;
}
public Priority getPriority() {
return priority;
}
public void setPriority(Priority priority) {
this.priority = priority;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public Person getOwner() {
return owner;
}
public void setOwner(Person owner) {
this.owner = owner;
}
public Date getDueDate() {
return dueDate;
}
public void setDueDate(Date dueDate) {
this.dueDate = dueDate;
}
public Float getPercentComplete() {
return percentComplete;
}
public void setPercentComplete(Float percentComplete) {
this.percentComplete = percentComplete;
}
public List<Attachment> getAttachments() {
return attachments;
}
public void setAttachments(List<Attachment> attachments) {
this.attachments = attachments;
}
public void addAttachment(Attachment attachment) {
if (this.attachments == null) {
this.attachments = new ArrayList<Attachment>();
}
this.attachments.add(attachment);
}
}