KickJava   Java API By Example, From Geeks To Geeks.

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


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 import za.org.coefficient.authentication.CoefficientUser;
23
24 import java.util.Locale JavaDoc;
25 import java.sql.Timestamp JavaDoc;
26
27 /**
28  * This is a data class to store peripheral data for the uploaded data
29  *
30  * @hibernate.class
31  * table="COEFFICIENT_FILE_UPLOAD"
32  */

33 public class ProjectUpload implements java.io.Serializable JavaDoc {
34     //~ Instance fields ========================================================
35

36     private CoefficientUser coefficientUser;
37     private Long JavaDoc ID;
38     private ProjectFolderItem folderItem;
39     private String JavaDoc filename;
40     private String JavaDoc mimeType;
41     private String JavaDoc userComment;
42     private Timestamp JavaDoc timestamp;
43     private double version; // format major.minor
44
private int fileSize;
45     private String JavaDoc url;
46     private Locale JavaDoc language;
47     private boolean showUploader;
48
49     //~ Constructors ===========================================================
50

51     public ProjectUpload() {
52         version = 0.1;
53         mimeType = "unknown";
54         timestamp = new Timestamp JavaDoc(System.currentTimeMillis());
55     }
56
57     //~ Methods ================================================================
58

59     public void setFileSize(int fileSize) {
60         this.fileSize = fileSize;
61     }
62
63     /**
64      * @hibernate.property
65      * column="FILE_SIZE"
66      */

67     public int getFileSize() {
68         return fileSize;
69     }
70
71     public void setFilename(String JavaDoc filename) {
72         this.filename = filename;
73     }
74
75     /**
76      * @hibernate.property
77      * column="FILENAME"
78      */

79     public String JavaDoc getFilename() {
80         return filename;
81     }
82
83     public void setFolderItem(ProjectFolderItem folderItem) {
84         this.folderItem = folderItem;
85     }
86
87     /**
88      * @hibernate.many-to-one
89      * cascade="none"
90      * column="FOLDER_ITEM_ID"
91      */

92     public ProjectFolderItem getFolderItem() {
93         return folderItem;
94     }
95
96     public void setID(Long JavaDoc ID) {
97         this.ID = ID;
98     }
99
100     /**
101      * @hibernate.id
102      * generator-class="native"
103      */

104     public Long JavaDoc getID() {
105         return ID;
106     }
107
108     public void setMimeType(String JavaDoc mimeType) {
109         this.mimeType = mimeType;
110     }
111
112     /**
113      * @hibernate.property
114      * column="MIME_TYPE"
115      */

116     public String JavaDoc getMimeType() {
117         return mimeType;
118     }
119
120     public void setCoefficientUser(CoefficientUser user) {
121         this.coefficientUser = user;
122     }
123
124     /**
125      * @hibernate.many-to-one
126      * cascade="none"
127      * column="COEFFICIENT_USER"
128      */

129     public CoefficientUser getCoefficientUser() {
130         return coefficientUser;
131     }
132
133     public void setTimestamp(Timestamp JavaDoc timestamp) {
134         this.timestamp = timestamp;
135     }
136
137     /**
138      * @hibernate.property
139      * column="UPLOAD_TIMESTAMP"
140      */

141     public Timestamp JavaDoc getTimestamp() {
142         return timestamp;
143     }
144
145     public void setUserComment(String JavaDoc userComment) {
146         this.userComment = userComment;
147     }
148
149     /**
150      * @hibernate.property
151      * length="3999"
152      * column="USER_COMMENT"
153      */

154     public String JavaDoc getUserComment() {
155         return userComment;
156     }
157
158     public void setVersion(double version) {
159         this.version = version;
160     }
161
162     /**
163      * @hibernate.property
164      * column="UPLOAD_VERSION"
165      */

166     public double getVersion() {
167         return version;
168     }
169
170     /**
171      * Sets the value of language
172      *
173      * @param argLanguage Value to assign to this.language
174      */

175     public void setLanguage(Locale JavaDoc argLanguage) {
176         this.language = argLanguage;
177     }
178
179     /**
180      * Gets the value of language
181      *
182      * @return the value of language
183      * @hibernate.property
184      * type="locale"
185      * column="LANGUAGE"
186      */

187     public Locale JavaDoc getLanguage() {
188         return this.language;
189     }
190
191
192     /**
193      * Gets the value of url
194      *
195      * @return the value of url
196      * @hibernate.property
197      * column="URL"
198      */

199     public String JavaDoc getUrl() {
200         return this.url;
201     }
202
203     /**
204      * Sets the value of url
205      *
206      * @param argUrl Value to assign to this.url
207      */

208     public void setUrl(String JavaDoc argUrl) {
209         this.url = argUrl;
210     }
211
212     /**
213      * Gets the value of showUploader
214      *
215      * @return the value of showUploader
216      * @hibernate.property
217      * column="SHOW_UPLOADER"
218      */

219     public boolean getShowUploader() {
220         return this.showUploader;
221     }
222
223     /**
224      * Sets the value of showUploader
225      *
226      * @param argShowUploader Value to assign to this.showUploader
227      */

228     public void setShowUploader(boolean argShowUploader) {
229         this.showUploader = argShowUploader;
230     }
231
232 }
233
Popular Tags