2 * Copyright 2009 Electronic Business Systems Ltd.
4 * This file is part of GSS.
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.
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.
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/>.
19 package gr.ebs.gss.server.domain;
21 import java.io.Serializable;
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;
38 @Table(uniqueConstraints = @UniqueConstraint(columnNames = {"owner_id", "filename"}))
39 public class FileUploadStatus implements Serializable{
42 * The persistence ID of the object.
44 @SuppressWarnings("unused")
50 * The owner of this file.
52 @ManyToOne(optional=false)
53 @JoinColumn(name="owner_id", nullable=false)
56 @Column(name="filename", nullable=false)
57 private String filename;
59 private Long bytesUploaded;
61 private Long fileSize;
77 * @param id the id to set
79 public void setId(Long id) {
89 public User getOwner() {
97 * @param owner the owner to set
99 public void setOwner(User owner) {
105 * Retrieve the filename.
107 * @return the filename
109 public String getFilename() {
115 * Modify the filename.
117 * @param filename the filename to set
119 public void setFilename(String filename) {
120 this.filename = filename;
125 * Retrieve the bytesUploaded.
127 * @return the bytesUploaded
129 public Long getBytesUploaded() {
130 return bytesUploaded;
135 * Modify the bytesUploaded.
137 * @param bytesUploaded the bytesUploaded to set
139 public void setBytesUploaded(Long bytesUploaded) {
140 this.bytesUploaded = bytesUploaded;
145 * Retrieve the fileSize.
147 * @return the fileSize
149 public Long getFileSize() {
155 * Modify the fileSize.
157 * @param fileSize the fileSize to set
159 public void setFileSize(Long fileSize) {
160 this.fileSize = fileSize;