-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSuggestion.java
More file actions
127 lines (107 loc) · 2.35 KB
/
Suggestion.java
File metadata and controls
127 lines (107 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
package model;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.fasterxml.jackson.annotation.JsonManagedReference;
@Entity
@Table
public class Suggestion implements java.io.Serializable {
private int id;
private String title;
private Integer upVote;
private Integer downVote;
private String email;
private String phoneNumber;
private String address;
private long openHour;
private long closeHour;
private String website;
private Set<Comment> comments=new HashSet<Comment>();
@OneToMany(cascade=CascadeType.ALL,fetch = FetchType.LAZY, mappedBy = "suggestion")
@JsonManagedReference
public Set<Comment> getComments() {
return this.comments;
}
public void setComments(Set<Comment> comments) {
this.comments = comments;
}
@Id
@GeneratedValue
@Column(name = "id", unique = true, nullable = false)
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Column
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Column
public Integer getUpVote() {
return upVote;
}
public void setUpVote(Integer upVote) {
this.upVote = upVote;
}
@Column
public Integer getDownVote() {
return downVote;
}
public void setDownVote(Integer downVote) {
this.downVote = downVote;
}
@Column
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Column
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
@Column
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@Column
public long getOpenHour() {
return openHour;
}
public void setOpenHour(long openHour) {
this.openHour = openHour;
}
@Column
public long getCloseHour() {
return closeHour;
}
public void setCloseHour(long closeHour) {
this.closeHour = closeHour;
}
@Column
public String getWebsite() {
return website;
}
public void setWebsite(String website) {
this.website = website;
}
}