package org.pegadi.model; import java.io.Serializable; public class DispSection implements Serializable { private int id; private boolean isActive; private String sectionName; public DispSection(int id, boolean active, String sectionName) { this.id = id; isActive = active; this.sectionName = sectionName; } public DispSection() { } public int getId() { return id; } public void setId(int id) { this.id = id; } public boolean isActive() { return isActive; } public void setActive(boolean active) { isActive = active; } public String getSectionName() { return sectionName; } public void setSectionName(String sectionName) { this.sectionName = sectionName; } @Override protected Object clone(){ return new DispSection(id, isActive, sectionName); } @Override public String toString() { return sectionName; } /* the equals function is needed for the dropdown-box to see if a page's section match one in the dropdown box, and thus preselect it. Neat. */ @Override public boolean equals(Object obj) { if(!(obj instanceof DispSection)) return false; return ((DispSection)obj).getId() == id; } }