1
|
package eu.dnetlib.goldoa.domain;
|
2
|
|
3
|
import java.io.Serializable;
|
4
|
import javax.persistence.*;
|
5
|
import java.sql.Timestamp;
|
6
|
import java.util.ArrayList;
|
7
|
import java.util.List;
|
8
|
|
9
|
|
10
|
/**
|
11
|
* The persistent class for the comment database table.
|
12
|
*
|
13
|
*/
|
14
|
@Entity
|
15
|
public class Comment implements Serializable {
|
16
|
private static final long serialVersionUID = 1L;
|
17
|
|
18
|
//@Column(columnDefinition = "text")
|
19
|
private String comment;
|
20
|
|
21
|
private Timestamp date;
|
22
|
@Id
|
23
|
//@Column(columnDefinition = "text")
|
24
|
private String id;
|
25
|
|
26
|
@OneToOne
|
27
|
//@JoinColumn(name = "user",columnDefinition = "text default 'portal::ac6219edefc92a45b233f83e975102ec'")
|
28
|
@JoinColumn(name = "\"user\"")
|
29
|
private User user;
|
30
|
|
31
|
@OneToOne
|
32
|
@JoinColumn(name = "template")
|
33
|
private CommentTemplate template;
|
34
|
|
35
|
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "comments")
|
36
|
private List<Budget> budgets = new ArrayList<>();
|
37
|
|
38
|
@OneToMany(mappedBy = "comment",cascade=CascadeType.ALL)
|
39
|
private List<RequestComment> requestComment = new ArrayList<>();
|
40
|
|
41
|
public Comment() {
|
42
|
}
|
43
|
|
44
|
public String getComment() {
|
45
|
return this.comment;
|
46
|
}
|
47
|
|
48
|
public void setComment(String comment) {
|
49
|
this.comment = comment;
|
50
|
}
|
51
|
|
52
|
public Timestamp getDate() {
|
53
|
return this.date;
|
54
|
}
|
55
|
|
56
|
public void setDate(Timestamp date) {
|
57
|
this.date = date;
|
58
|
}
|
59
|
|
60
|
public String getId() {
|
61
|
return this.id;
|
62
|
}
|
63
|
|
64
|
public void setId(String id) {
|
65
|
this.id = id;
|
66
|
}
|
67
|
|
68
|
public User getPerson() {
|
69
|
return this.user;
|
70
|
}
|
71
|
|
72
|
public void setPerson(User user) {
|
73
|
this.user = user;
|
74
|
}
|
75
|
|
76
|
public CommentTemplate getTemplate() {
|
77
|
return this.template;
|
78
|
}
|
79
|
|
80
|
public void setTemplate(CommentTemplate template) {
|
81
|
this.template = template;
|
82
|
}
|
83
|
|
84
|
}
|