View Javadoc

1   package uk.ac.ebi.intenz.webapp.dtos;
2   
3   import org.apache.struts.action.ActionErrors;
4   import org.apache.struts.action.ActionMapping;
5   
6   import javax.servlet.ServletRequest;
7   import java.util.List;
8   
9   /**
10   * @author Michael Darsow
11   * @version $Revision: 1.2 $ $Date: 2008/01/28 12:33:07 $
12   */
13  public class EnzymeSubSubclassDTO extends GhostEntityDTO {
14  
15    private String description;
16    private List entries;
17    private String className;
18    private String classEc;
19    private String subclassName;
20    private String subclassEc;
21  
22    /**
23     * The Validator framework is used to check form parameters.
24     *
25     * @param mapping the Action mapping
26     * @param request
27     * @return
28     */
29    public ActionErrors validate(ActionMapping mapping, ServletRequest request) {
30      ActionErrors errors = super.validate(mapping, request); // use Validator framework
31      if (errors == null) errors = new ActionErrors();
32      if (errors.isEmpty()) return null;
33      return errors;
34    }
35  
36  
37    // ------------------------------- GETTER & SETTER --------------------------------
38  
39    public String getDescription() {
40      return description;
41    }
42  
43    public void setDescription(String description) {
44      this.description = description;
45    }
46  
47    public List getEntries() {
48      return entries;
49    }
50  
51    public void setEntries(List entries) {
52      this.entries = entries;
53    }
54  
55    public GhostEnzymeDTO getRowAt(int index) {
56      return (GhostEnzymeDTO) entries.get(index);
57    }
58  
59    public String getClassName() {
60      return className;
61    }
62  
63    public void setClassName(String className) {
64      this.className = className;
65    }
66  
67    public String getSubclassName() {
68      return subclassName;
69    }
70  
71    public void setSubclassName(String subclassName) {
72      this.subclassName = subclassName;
73    }
74  
75    public String getClassEc() {
76      return classEc;
77    }
78  
79    public void setClassEc(String classEc) {
80      this.classEc = classEc;
81    }
82  
83    public String getSubclassEc() {
84      return subclassEc;
85    }
86  
87    public void setSubclassEc(String subclassEc) {
88      this.subclassEc = subclassEc;
89    }
90  }