KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > za > org > coefficient > modules > fileUpload > ProjectEntity


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.fileUpload;
21
22
23 /**
24  * Title: Project Engine
25  * Description:
26  * Copyright: Copyright (c) 2003
27  * Company: icomtek CSIR
28  * @author Krishendran Rangappa
29  * @version 1.0
30  */

31 /**
32  * Base class for project fileupload entities - like folders and folder items, etc
33  */

34 import za.org.coefficient.authentication.CoefficientUser;
35 import za.org.coefficient.authentication.Role;
36
37 /**
38  * @hibernate.class
39  * table="COEFFICIENT_FILE_UPLOAD_ENTITY"
40  */

41 public abstract class ProjectEntity implements java.io.Serializable JavaDoc {
42     //~ Instance fields ========================================================
43

44     protected CoefficientUser coefficientUser; // the user responsible for creating the entity
45
protected Long JavaDoc ID;
46     protected ProjectFolder parentFolder;
47     protected Role maxReadRole;
48     protected Role maxWriteRole;
49     protected String JavaDoc name;
50     protected String JavaDoc userComment;
51     protected long version;
52
53     //~ Constructors ===========================================================
54

55     public ProjectEntity() {
56     }
57
58     //~ Methods ================================================================
59

60     public void setID(Long JavaDoc ID) {
61         this.ID = ID;
62     }
63
64     /**
65      * @hibernate.id
66      * generator-class="native"
67      */

68     public Long JavaDoc getID() {
69         return ID;
70     }
71
72     public void setMaxReadRole(Role maxReadRole) {
73         this.maxReadRole = maxReadRole;
74     }
75
76     /**
77      * @hibernate.many-to-one
78      * cascade="none"
79      * column="MAX_READ_ROLE"
80      */

81     public Role getMaxReadRole() {
82         return maxReadRole;
83     }
84
85     public void setMaxWriteRole(Role maxWriteRole) {
86         this.maxWriteRole = maxWriteRole;
87     }
88
89     /**
90      * @hibernate.many-to-one
91      * cascade="none"
92      * column="MAX_WRITE_ROLE"
93      */

94     public Role getMaxWriteRole() {
95         return maxWriteRole;
96     }
97
98     public void setName(String JavaDoc name) {
99         this.name = name;
100     }
101
102     /**
103      * @hibernate.property
104      * column="NAME"
105      */

106     public String JavaDoc getName() {
107         return name;
108     }
109
110     public void setParentFolder(ProjectFolder parentFolder) {
111         this.parentFolder = parentFolder;
112     }
113
114     /**
115      * @hibernate.many-to-one
116      * cascade="none"
117      * column="PARENT_FOLDER_ID"
118      */

119     public ProjectFolder getParentFolder() {
120         return parentFolder;
121     }
122
123     public void setCoefficientUser(CoefficientUser coefficientUser) {
124         this.coefficientUser = coefficientUser;
125     }
126
127     /**
128      * @hibernate.many-to-one
129      * cascade="none"
130      * colum="COEFFICIENT_USER_ID"
131      */

132     public CoefficientUser getCoefficientUser() {
133         return coefficientUser;
134     }
135
136     public void setUserComment(String JavaDoc userComment) {
137         this.userComment = userComment;
138     }
139
140     /**
141      * @hibernate.property
142      * length="3999"
143      * column="USER_COMMENT"
144      */

145     public String JavaDoc getUserComment() {
146         return userComment;
147     }
148
149     public void setVersion(long version) {
150         this.version = version;
151     }
152
153     /**
154      * @hibernate.version
155      * column="VERSION"
156      * type="long"
157      */

158     public long getVersion() {
159         return this.version;
160     }
161 }
162
Popular Tags