mirror of https://github.com/sismics/docs.git
172 lines
3.0 KiB
Java
172 lines
3.0 KiB
Java
package com.sismics.docs.core.model.jpa;
|
|
|
|
import java.util.Date;
|
|
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Table;
|
|
|
|
import com.google.common.base.Objects;
|
|
|
|
/**
|
|
* Document entity.
|
|
*
|
|
* @author bgamard
|
|
*/
|
|
@Entity
|
|
@Table(name = "T_DOCUMENT")
|
|
public class Document {
|
|
/**
|
|
* Document ID.
|
|
*/
|
|
@Id
|
|
@Column(name = "DOC_ID_C", length = 36)
|
|
private String id;
|
|
|
|
/**
|
|
* User ID.
|
|
*/
|
|
@Column(name = "DOC_IDUSER_C", nullable = false, length = 36)
|
|
private String userId;
|
|
|
|
/**
|
|
* Title.
|
|
*/
|
|
@Column(name = "DOC_TITLE_C", length = 100)
|
|
private String title;
|
|
|
|
/**
|
|
* Description.
|
|
*/
|
|
@Column(name = "DOC_DESCRIPTION_C", length = 4000)
|
|
private String description;
|
|
|
|
/**
|
|
* Creation date.
|
|
*/
|
|
@Column(name = "DOC_CREATEDATE_D", nullable = false)
|
|
private Date createDate;
|
|
|
|
/**
|
|
* Deletion date.
|
|
*/
|
|
@Column(name = "DOC_DELETEDATE_D")
|
|
private Date deleteDate;
|
|
|
|
/**
|
|
* Getter of id.
|
|
*
|
|
* @return the id
|
|
*/
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
/**
|
|
* Setter of id.
|
|
*
|
|
* @param id id
|
|
*/
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
/**
|
|
* Getter of userId.
|
|
*
|
|
* @return the userId
|
|
*/
|
|
public String getUserId() {
|
|
return userId;
|
|
}
|
|
|
|
/**
|
|
* Setter of userId.
|
|
*
|
|
* @param userId userId
|
|
*/
|
|
public void setUserId(String userId) {
|
|
this.userId = userId;
|
|
}
|
|
|
|
/**
|
|
* Getter of title.
|
|
*
|
|
* @return the title
|
|
*/
|
|
public String getTitle() {
|
|
return title;
|
|
}
|
|
|
|
/**
|
|
* Setter of title.
|
|
*
|
|
* @param title title
|
|
*/
|
|
public void setTitle(String title) {
|
|
this.title = title;
|
|
}
|
|
|
|
/**
|
|
* Getter of description.
|
|
*
|
|
* @return the description
|
|
*/
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
/**
|
|
* Setter of description.
|
|
*
|
|
* @param description description
|
|
*/
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
/**
|
|
* Getter of createDate.
|
|
*
|
|
* @return the createDate
|
|
*/
|
|
public Date getCreateDate() {
|
|
return createDate;
|
|
}
|
|
|
|
/**
|
|
* Setter of createDate.
|
|
*
|
|
* @param createDate createDate
|
|
*/
|
|
public void setCreateDate(Date createDate) {
|
|
this.createDate = createDate;
|
|
}
|
|
|
|
/**
|
|
* Getter of deleteDate.
|
|
*
|
|
* @return the deleteDate
|
|
*/
|
|
public Date getDeleteDate() {
|
|
return deleteDate;
|
|
}
|
|
|
|
/**
|
|
* Setter of deleteDate.
|
|
*
|
|
* @param deleteDate deleteDate
|
|
*/
|
|
public void setDeleteDate(Date deleteDate) {
|
|
this.deleteDate = deleteDate;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return Objects.toStringHelper(this)
|
|
.add("id", id)
|
|
.toString();
|
|
}
|
|
}
|