Publisher.java
1.96 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
package org.legrog.entities;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Set;
@Entity
//@Table(name = "editeur")
public class Publisher /* extends org.roliste.data.DbLinkableEntity */ {
// TODO L'éventuel usage de Linkable reste à confirmer https://tree.taiga.io/project/jr-utily-grog-v3/us/48
// TODO Attention, en v2 Linkable implique Traceable (journalisable) qui devrait aussi être évalué
@Id
@Column(name = "PUBLISHER_ID")
@GeneratedValue(strategy = GenerationType.AUTO)
private int publisherId;
@OneToOne
private PublisherRevision activeRevision;
@OneToOne
private User activeValidator;
private Timestamp validationDateTime;
@OneToMany(mappedBy = "publisher")
private Set<PublisherRevision> revisions;
public int getPublisherId() {
return publisherId;
}
public void setPublisherId(int publisherId) {
this.publisherId = publisherId;
}
public PublisherRevision getActiveRevision() {
return activeRevision;
}
public void setActiveRevision(PublisherRevision activeRevision) {
this.activeRevision = activeRevision;
}
public Set<PublisherRevision> getRevisions() {
return revisions;
}
public void setRevisions(Set<PublisherRevision> revisions) {
this.revisions = revisions;
}
public User getActiveValidator() {
return activeValidator;
}
public void setActiveValidator(User activeValidator) {
this.activeValidator = activeValidator;
}
public Timestamp getValidationDateTime() {
return validationDateTime;
}
public void setValidationDateTime(Timestamp validationDateTime) {
this.validationDateTime = validationDateTime;
}
@Override
public String toString() {
return "PUBLISHER_ID = " + publisherId + ", Active Revision = " + activeRevision + ", Validator = " + activeValidator + ", Validation DateTime = " + validationDateTime;
}
}