PublisherAction.java
1.98 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
package org.legrog.entities;
import javax.persistence.*;
import java.sql.Timestamp;
/**
* Classe des actions sur des (versions d') éditeurs.
*/
@Entity
public class PublisherAction {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int publisherActionId;
@ManyToOne
private UserAction userAction;
@ManyToOne
private User publisherActionAuthor;
@ManyToOne
private PublisherVersion publisherVersion;
private Timestamp publisherActionDatetime;
// Accessible par publisherVersion, demande spécifique de la MOE
@ManyToOne
private Publisher publisher;
public void setPublisherActionAuthor(User publisherActionAuthor) {
this.publisherActionAuthor = publisherActionAuthor;
}
public void setPublisherActionDatetime(Timestamp publisherActionDatetime) {
this.publisherActionDatetime = publisherActionDatetime;
}
public void setUserAction(UserAction userAction) {
this.userAction = userAction;
}
public void setPublisherVersion(PublisherVersion publisherVersion) {
this.publisherVersion = publisherVersion;
}
public void setPublisher(Publisher publisher) {
this.publisher = publisher;
}
public UserAction getUserAction() {
return userAction;
}
public User getPublisherActionAuthor() {
return publisherActionAuthor;
}
public PublisherVersion getPublisherVersion() {
return publisherVersion;
}
public Timestamp getPublisherActionDatetime() {
return publisherActionDatetime;
}
public Publisher getPublisher() {
return publisher;
}
@Override
public String toString() {
return "publisherActionId = " + publisherActionId + ", userAction = " + userAction +
", publisherActionAuthor = " + publisherActionAuthor + ", publisherVersion = " + publisherVersion +
", publisherActionDatetime = " + publisherActionDatetime + ", publisher = " + publisher;
}
}