Project

General

Profile

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
	
28
	//@JoinColumn(name = "user_email",columnDefinition = "text default 'portal::ac6219edefc92a45b233f83e975102ec'")
29
	@JoinColumn(name = "user_email")
30
	private User user;
31
	
32
	@OneToOne
33
	@JoinColumn(name = "template")
34
	private Commenttemplate template;
35

    
36
	@OneToMany(mappedBy = "comment",cascade=CascadeType.ALL)
37
	private List<BudgetComment> budgetComment = new ArrayList<>();
38
	
39
	@OneToMany(mappedBy = "comment",cascade=CascadeType.ALL)
40
	private List<RequestComment> requestComment = new ArrayList<>();
41
	
42
	public Comment() {
43
	}
44

    
45
	public String getComment() {
46
		return this.comment;
47
	}
48

    
49
	public void setComment(String comment) {
50
		this.comment = comment;
51
	}
52

    
53
	public Timestamp getDate() {
54
		return this.date;
55
	}
56

    
57
	public void setDate(Timestamp date) {
58
		this.date = date;
59
	}
60

    
61
	public String getId() {
62
		return this.id;
63
	}
64

    
65
	public void setId(String id) {
66
		this.id = id;
67
	}
68

    
69
	public User getPerson() {
70
		return this.user;
71
	}
72

    
73
	public void setPerson(User user) {
74
		this.user = user;
75
	}
76

    
77
	public Commenttemplate getTemplate() {
78
		return this.template;
79
	}
80

    
81
	public void setTemplate(Commenttemplate template) {
82
		this.template = template;
83
	}
84

    
85
}
(7-7/37)