Jean-Francois Leveque

Premier jet historique editeur avce import User v2 inclus

1 +package org.legrog.entities;
2 +
3 +import javax.persistence.*;
4 +import java.util.Set;
5 +
6 +@Entity
7 +//@Table(name = "editeur")
8 +public class Publisher /* extends org.roliste.data.DbLinkableEntity */ {
9 +// TODO L'éventuel usage de Linkable reste à confirmer https://tree.taiga.io/project/jr-utily-grog-v3/us/48
10 +// TODO Attention, en v2 Linkable implique Traceable (journalisable) qui devrait aussi être évalué
11 + @Id
12 +// @Column(name = "ID_EDITEUR")
13 + @GeneratedValue(strategy = GenerationType.AUTO)
14 + private int publisherId;
15 +
16 + @OneToOne
17 + private PublisherRevision activeRevision;
18 +
19 + @OneToOne
20 + private User activeValidator;
21 +
22 + @OneToMany
23 + private Set<PublisherRevision> revisions;
24 +
25 + public int getPublisherId() {
26 + return publisherId;
27 + }
28 +
29 + public void setPublisherId(int publisherId) {
30 + this.publisherId = publisherId;
31 + }
32 +
33 + public PublisherRevision getActiveRevision() {
34 + return activeRevision;
35 + }
36 +
37 + public void setActiveRevision(PublisherRevision activeRevision) {
38 + this.activeRevision = activeRevision;
39 + }
40 +
41 + public Set<PublisherRevision> getRevisions() {
42 + return revisions;
43 + }
44 +
45 + public void setRevisions(Set<PublisherRevision> revisions) {
46 + this.revisions = revisions;
47 + }
48 +
49 + public User getActiveValidator() {
50 + return activeValidator;
51 + }
52 +
53 + public void setActiveValidator(User activeValidator) {
54 + this.activeValidator = activeValidator;
55 + }
56 +}
1 +package org.legrog.entities;
2 +
3 +import javax.persistence.*;
4 +import java.sql.Timestamp;
5 +
6 +@Entity
7 +public class PublisherRevision {
8 + @Id
9 + @GeneratedValue(strategy = GenerationType.AUTO)
10 + private int publisherRevisionId;
11 + private String publisherName;
12 + private String publisherStreetAddress;
13 + private String publisherPostalCode;
14 + private String publisherPostOfficeBoxNumber;
15 + private String publisherAddressRegion;
16 + private String publisherAddressLocality;
17 + // TODO Créer l'entité Country
18 +// private Country publisherAddressCountry;
19 + private String publisherTelephone;
20 + private String publisherEmail;
21 + private String publisherURL;
22 + private boolean publisherActive;
23 + private String publisherHistory;
24 + @OneToOne
25 + private User publisherRevisionAuthor;
26 + private Timestamp publisherRevisionDatetime;
27 +
28 + public Timestamp getPublisherRevisionDatetime() {
29 + return publisherRevisionDatetime;
30 + }
31 +
32 + public void setPublisherRevisionDatetime(Timestamp publisherRevisionDatetime) {
33 + this.publisherRevisionDatetime = publisherRevisionDatetime;
34 + }
35 +
36 + public boolean isPublisherActive() {
37 + return publisherActive;
38 + }
39 +
40 + public void setPublisherActive(boolean publisherActive) {
41 + this.publisherActive = publisherActive;
42 + }
43 +
44 + public String getPublisherHistory() {
45 + return publisherHistory;
46 + }
47 +
48 + public void setPublisherHistory(String publisherHistory) {
49 + this.publisherHistory = publisherHistory;
50 + }
51 +
52 + public String getPublisherStreetAddress() {
53 + return publisherStreetAddress;
54 + }
55 +
56 + public void setPublisherStreetAddress(String publisherStreetAddress) {
57 + this.publisherStreetAddress = publisherStreetAddress;
58 + }
59 +
60 + public String getPublisherPostalCode() {
61 + return publisherPostalCode;
62 + }
63 +
64 + public void setPublisherPostalCode(String publisherPostalCode) {
65 + this.publisherPostalCode = publisherPostalCode;
66 + }
67 +
68 + public String getPublisherPostOfficeBoxNumber() {
69 + return publisherPostOfficeBoxNumber;
70 + }
71 +
72 + public void setPublisherPostOfficeBoxNumber(String publisherPostOfficeBoxNumber) {
73 + this.publisherPostOfficeBoxNumber = publisherPostOfficeBoxNumber;
74 + }
75 +
76 + public String getPublisherAddressRegion() {
77 + return publisherAddressRegion;
78 + }
79 +
80 + public void setPublisherAddressRegion(String publisherAddressRegion) {
81 + this.publisherAddressRegion = publisherAddressRegion;
82 + }
83 +
84 + public String getPublisherAddressLocality() {
85 + return publisherAddressLocality;
86 + }
87 +
88 + public void setPublisherAddressLocality(String publisherAddressLocality) {
89 + this.publisherAddressLocality = publisherAddressLocality;
90 + }
91 +
92 + public String getPublisherTelephone() {
93 + return publisherTelephone;
94 + }
95 +
96 + public void setPublisherTelephone(String publisherTelephone) {
97 + this.publisherTelephone = publisherTelephone;
98 + }
99 +
100 + public String getPublisherEmail() {
101 + return publisherEmail;
102 + }
103 +
104 + public void setPublisherEmail(String publisherEmail) {
105 + this.publisherEmail = publisherEmail;
106 + }
107 +
108 + public String getPublisherURL() {
109 + return publisherURL;
110 + }
111 +
112 + public void setPublisherURL(String publisherURL) {
113 + this.publisherURL = publisherURL;
114 + }
115 +
116 + public int getPublisherRevisionId() {
117 + return publisherRevisionId;
118 + }
119 +
120 + public void setPublisherRevisionId(int publisherRevisionId) {
121 + this.publisherRevisionId = publisherRevisionId;
122 + }
123 +
124 + public String getPublisherName() {
125 + return publisherName;
126 + }
127 +
128 + public void setPublisherName(String publisherName) {
129 + this.publisherName = publisherName;
130 + }
131 +}
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.