Remove the redundant gss top-level directory.
[pithos] / src / gr / ebs / gss / server / domain / FileUploadStatus.java
1 /*
2  * Copyright 2009 Electronic Business Systems Ltd.
3  *
4  * This file is part of GSS.
5  *
6  * GSS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * GSS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GSS.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 package gr.ebs.gss.server.domain;
20
21 import java.io.Serializable;
22
23 import javax.persistence.Column;
24 import javax.persistence.Entity;
25 import javax.persistence.GeneratedValue;
26 import javax.persistence.Id;
27 import javax.persistence.JoinColumn;
28 import javax.persistence.ManyToOne;
29 import javax.persistence.Table;
30 import javax.persistence.UniqueConstraint;
31
32
33 /**
34  * @author kman
35  *
36  */
37 @Entity
38 @Table(uniqueConstraints = @UniqueConstraint(columnNames = {"owner_id", "filename"}))
39 public class FileUploadStatus implements Serializable{
40
41         /**
42          * The persistence ID of the object.
43          */
44         @SuppressWarnings("unused")
45         @Id
46         @GeneratedValue
47         private Long id;
48
49         /**
50          * The owner of this file.
51          */
52         @ManyToOne(optional=false)
53         @JoinColumn(name="owner_id", nullable=false)
54         private User owner;
55
56         @Column(name="filename", nullable=false)
57         private String filename;
58
59         private Long bytesUploaded;
60
61         private Long fileSize;
62
63
64         /**
65          * Retrieve the id.
66          *
67          * @return the id
68          */
69         public Long getId() {
70                 return id;
71         }
72
73
74         /**
75          * Modify the id.
76          *
77          * @param id the id to set
78          */
79         public void setId(Long id) {
80                 this.id = id;
81         }
82
83
84         /**
85          * Retrieve the owner.
86          *
87          * @return the owner
88          */
89         public User getOwner() {
90                 return owner;
91         }
92
93
94         /**
95          * Modify the owner.
96          *
97          * @param owner the owner to set
98          */
99         public void setOwner(User owner) {
100                 this.owner = owner;
101         }
102
103
104         /**
105          * Retrieve the filename.
106          *
107          * @return the filename
108          */
109         public String getFilename() {
110                 return filename;
111         }
112
113
114         /**
115          * Modify the filename.
116          *
117          * @param filename the filename to set
118          */
119         public void setFilename(String filename) {
120                 this.filename = filename;
121         }
122
123
124         /**
125          * Retrieve the bytesUploaded.
126          *
127          * @return the bytesUploaded
128          */
129         public Long getBytesUploaded() {
130                 return bytesUploaded;
131         }
132
133
134         /**
135          * Modify the bytesUploaded.
136          *
137          * @param bytesUploaded the bytesUploaded to set
138          */
139         public void setBytesUploaded(Long bytesUploaded) {
140                 this.bytesUploaded = bytesUploaded;
141         }
142
143
144         /**
145          * Retrieve the fileSize.
146          *
147          * @return the fileSize
148          */
149         public Long getFileSize() {
150                 return fileSize;
151         }
152
153
154         /**
155          * Modify the fileSize.
156          *
157          * @param fileSize the fileSize to set
158          */
159         public void setFileSize(Long fileSize) {
160                 this.fileSize = fileSize;
161         }
162
163
164
165 }