KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > za > org > coefficient > modules > category > CategoryDisplayData


1 /*
2  * Coefficient - facilitates project based collaboration
3  * Copyright (C) 2003, Dylan Etkin, CSIR icomtek
4  * PO Box 395
5  * Pretoria 0001, RSA
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19
20 package za.org.coefficient.modules.category;
21
22 import za.org.coefficient.core.Category;
23
24 import java.util.ArrayList JavaDoc;
25 import java.util.List JavaDoc;
26
27 /**
28  * used for displaying information only - not persisted at all
29  */

30 public class CategoryDisplayData implements java.io.Serializable JavaDoc {
31     //~ Instance fields ========================================================
32

33     List JavaDoc children;
34     Long JavaDoc id;
35     Long JavaDoc parentId;
36     String JavaDoc description;
37     String JavaDoc name;
38     boolean open;
39     int projectCount;
40
41     //~ Constructors ===========================================================
42

43     public CategoryDisplayData() {
44         children = new ArrayList JavaDoc();
45     }
46
47     //~ Methods ================================================================
48

49     public void setChildren(List JavaDoc argChildren) {
50         children = argChildren;
51     }
52
53     public List JavaDoc getChildren() {
54         return children;
55     }
56
57     public boolean isClosed() {
58         return !open;
59     }
60
61     public void setDescription(String JavaDoc argDescription) {
62         description = argDescription;
63     }
64
65     public String JavaDoc getDescription() {
66         return description;
67     }
68
69     public void setId(Long JavaDoc argId) {
70         id = argId;
71     }
72
73     public Long JavaDoc getId() {
74         return id;
75     }
76
77     public void setName(String JavaDoc argName) {
78         name = argName;
79     }
80
81     public String JavaDoc getName() {
82         return name;
83     }
84
85     public void setOpen(boolean o) {
86         open = o;
87     }
88
89     public boolean getOpen() {
90         return open;
91     }
92
93     public boolean isOpen() {
94         return open;
95     }
96
97     public void setParentId(Long JavaDoc argId) {
98         parentId = argId;
99     }
100
101     public Long JavaDoc getParentId() {
102         return parentId;
103     }
104
105     public void setProjectCount(int cnt) {
106         projectCount = cnt;
107     }
108
109     public int getProjectCount() {
110         return projectCount;
111     }
112
113     public void addChild(Category child) {
114         children.add(child);
115     }
116
117     public boolean areThereChildren() {
118         return !children.isEmpty();
119     }
120 }
121
Popular Tags