Subversion Repositories SmartDukaan

Rev

Rev 21602 | Rev 21924 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21720 ashik.ali 1
package com.spice.profitmandi.dao.entity.dtr;
21545 ashik.ali 2
 
3
import java.time.LocalDateTime;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Convert;
7
import javax.persistence.Entity;
8
import javax.persistence.EnumType;
9
import javax.persistence.Enumerated;
10
import javax.persistence.GeneratedValue;
11
import javax.persistence.GenerationType;
12
import javax.persistence.Id;
13
import javax.persistence.Table;
14
 
15
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
21720 ashik.ali 16
import com.spice.profitmandi.dao.enumuration.dtr.ContentType;
21545 ashik.ali 17
 
18
 
19
@Entity
21596 ashik.ali 20
@Table(name="dtr.document", schema = "dtr")
21545 ashik.ali 21
public class Document{
22
 
23
	@Id
24
	@Column(name="id", unique=true, updatable=false)
25
	@GeneratedValue(strategy = GenerationType.IDENTITY)
26
	private int id;
27
 
28
	@Column(name="name", unique = true)
29
	private String name;
30
 
31
	@Column(name = "path")
32
	private String path;
33
 
34
	@Column(name = "content_type")
35
	@Enumerated(EnumType.STRING)
36
	private ContentType contentType;
37
 
38
	private long size;
39
 
40
	@Convert(converter = LocalDateTimeAttributeConverter.class)
41
	private LocalDateTime createTimestamp;
42
 
43
	@Convert(converter = LocalDateTimeAttributeConverter.class)
44
	private LocalDateTime updateTimestamp;
45
 
46
	@Column(columnDefinition="tinyint(1) default 0")
47
	private boolean persisted;
48
 
49
	public int getId() {
50
		return id;
51
	}
52
 
53
	public void setId(int id) {
54
		this.id = id;
55
	}
56
 
57
	public String getName() {
58
		return name;
59
	}
60
 
61
	public void setName(String name) {
62
		this.name = name;
63
	}
64
 
65
	public String getPath() {
66
		return path;
67
	}
68
 
69
	public void setPath(String path) {
70
		this.path = path;
71
	}
72
 
73
	public ContentType getContentType() {
74
		return contentType;
75
	}
76
 
77
	public void setContentType(ContentType contentType) {
78
		this.contentType = contentType;
79
	}
80
 
81
	public long getSize() {
82
		return size;
83
	}
84
 
85
	public void setSize(long size) {
86
		this.size = size;
87
	}
88
 
89
	public LocalDateTime getCreateTimestamp() {
90
		return createTimestamp;
91
	}
92
 
93
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
94
		this.createTimestamp = createTimestamp;
95
	}
96
 
97
	public LocalDateTime getUpdateTimestamp() {
98
		return updateTimestamp;
99
	}
100
 
101
	public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
102
		this.updateTimestamp = updateTimestamp;
103
	}
104
 
105
 
106
	public boolean isPersisted() {
107
		return persisted;
108
	}
109
 
110
	public void setPersisted(boolean persisted) {
111
		this.persisted = persisted;
112
	}
113
 
21602 ashik.ali 114
	@Override
115
	public String toString() {
116
		return "Document [id=" + id + ", name=" + name + ", path=" + path + ", contentType=" + contentType + ", size="
117
				+ size + ", createTimestamp=" + createTimestamp + ", updateTimestamp=" + updateTimestamp
118
				+ ", persisted=" + persisted + "]";
119
	}
120
 
121
 
122
 
21545 ashik.ali 123
}