package it.digione.dg1cloud.model;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
|
import javax.persistence.*;
|
|
/**
|
* The persistent class for the reg_classification database table.
|
*
|
*/
|
@Entity
|
@Table(name="reg_document")
|
@Cacheable(false)
|
@SequenceGenerator(name="reg_document_seq", sequenceName="reg_document_seq", allocationSize=1 )
|
public class RegDocument implements Serializable {
|
|
private static final long serialVersionUID = -3682129109212204091L;
|
|
@Id
|
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="reg_document_seq")
|
@Column(name="document_id")
|
private Long documentId;
|
|
@Temporal(TemporalType.TIMESTAMP)
|
private Date created;
|
|
@Column(name="createdby")
|
private String createdBy;
|
|
@Temporal(TemporalType.TIMESTAMP)
|
private Date modified;
|
|
@Column(name="modifiedby")
|
private String modifiedBy;
|
|
@Column(name="file_hash")
|
private String fileHash;
|
|
@Column(name="file_name")
|
private String fileName;
|
|
@Column(name="file_path")
|
private String filePath;
|
|
@Column(name="file_size")
|
private Long fileSize;
|
|
@Temporal(TemporalType.TIMESTAMP)
|
@Column(name="due_date")
|
private Date dueDate;
|
|
@Column(name="secret_key")
|
private String secretKey;
|
|
public RegDocument() {
|
}
|
|
@PrePersist
|
public void prePersist() {
|
Date now = new Date();
|
if(created == null) //We set default value in case if the value is not set yet.
|
created = now;
|
if(modified == null) //We set default value in case if the value is not set yet.
|
modified = now;
|
}
|
|
public Long getDocumentId() {
|
return documentId;
|
}
|
|
public void setDocumentId(Long documentId) {
|
this.documentId = documentId;
|
}
|
|
public Date getCreated() {
|
return created;
|
}
|
|
public void setCreated(Date created) {
|
this.created = created;
|
}
|
|
public String getCreatedBy() {
|
return createdBy;
|
}
|
|
public void setCreatedBy(String createdBy) {
|
this.createdBy = createdBy;
|
}
|
|
public Date getModified() {
|
return modified;
|
}
|
|
public void setModified(Date modified) {
|
this.modified = modified;
|
}
|
|
public String getModifiedBy() {
|
return modifiedBy;
|
}
|
|
public void setModifiedBy(String modifiedBy) {
|
this.modifiedBy = modifiedBy;
|
}
|
|
public String getFileHash() {
|
return fileHash;
|
}
|
|
public void setFileHash(String fileHash) {
|
this.fileHash = fileHash;
|
}
|
|
public String getFileName() {
|
return fileName;
|
}
|
|
public void setFileName(String fileName) {
|
this.fileName = fileName;
|
}
|
|
public String getFilePath() {
|
return filePath;
|
}
|
|
public void setFilePath(String filePath) {
|
this.filePath = filePath;
|
}
|
|
public Long getFileSize() {
|
return fileSize;
|
}
|
|
public void setFileSize(Long fileSize) {
|
this.fileSize = fileSize;
|
}
|
|
public Date getDueDate() {
|
return dueDate;
|
}
|
|
public void setDueDate(Date dueDate) {
|
this.dueDate = dueDate;
|
}
|
|
public String getSecretKey() {
|
return secretKey;
|
}
|
|
public void setSecretKey(String secretKey) {
|
this.secretKey = secretKey;
|
}
|
|
@Override
|
public String toString() {
|
return "RegDocument [documentId=" + documentId + ", created=" + created + ", createdBy=" + createdBy
|
+ ", modified=" + modified + ", modifiedBy=" + modifiedBy + ", fileHash=" + fileHash + ", filePath="
|
+ filePath + ", fileSize=" + fileSize + ", dueDate=" + dueDate + "]";
|
}
|
|
}
|