Jean-Francois Leveque

Premier jet historique editeur avce import User v2 inclus

package org.legrog.entities;
import javax.persistence.*;
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 = "ID_EDITEUR")
@GeneratedValue(strategy = GenerationType.AUTO)
private int publisherId;
@OneToOne
private PublisherRevision activeRevision;
@OneToOne
private User activeValidator;
@OneToMany
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;
}
}
package org.legrog.entities;
import javax.persistence.*;
import java.sql.Timestamp;
@Entity
public class PublisherRevision {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int publisherRevisionId;
private String publisherName;
private String publisherStreetAddress;
private String publisherPostalCode;
private String publisherPostOfficeBoxNumber;
private String publisherAddressRegion;
private String publisherAddressLocality;
// TODO Créer l'entité Country
// private Country publisherAddressCountry;
private String publisherTelephone;
private String publisherEmail;
private String publisherURL;
private boolean publisherActive;
private String publisherHistory;
@OneToOne
private User publisherRevisionAuthor;
private Timestamp publisherRevisionDatetime;
public Timestamp getPublisherRevisionDatetime() {
return publisherRevisionDatetime;
}
public void setPublisherRevisionDatetime(Timestamp publisherRevisionDatetime) {
this.publisherRevisionDatetime = publisherRevisionDatetime;
}
public boolean isPublisherActive() {
return publisherActive;
}
public void setPublisherActive(boolean publisherActive) {
this.publisherActive = publisherActive;
}
public String getPublisherHistory() {
return publisherHistory;
}
public void setPublisherHistory(String publisherHistory) {
this.publisherHistory = publisherHistory;
}
public String getPublisherStreetAddress() {
return publisherStreetAddress;
}
public void setPublisherStreetAddress(String publisherStreetAddress) {
this.publisherStreetAddress = publisherStreetAddress;
}
public String getPublisherPostalCode() {
return publisherPostalCode;
}
public void setPublisherPostalCode(String publisherPostalCode) {
this.publisherPostalCode = publisherPostalCode;
}
public String getPublisherPostOfficeBoxNumber() {
return publisherPostOfficeBoxNumber;
}
public void setPublisherPostOfficeBoxNumber(String publisherPostOfficeBoxNumber) {
this.publisherPostOfficeBoxNumber = publisherPostOfficeBoxNumber;
}
public String getPublisherAddressRegion() {
return publisherAddressRegion;
}
public void setPublisherAddressRegion(String publisherAddressRegion) {
this.publisherAddressRegion = publisherAddressRegion;
}
public String getPublisherAddressLocality() {
return publisherAddressLocality;
}
public void setPublisherAddressLocality(String publisherAddressLocality) {
this.publisherAddressLocality = publisherAddressLocality;
}
public String getPublisherTelephone() {
return publisherTelephone;
}
public void setPublisherTelephone(String publisherTelephone) {
this.publisherTelephone = publisherTelephone;
}
public String getPublisherEmail() {
return publisherEmail;
}
public void setPublisherEmail(String publisherEmail) {
this.publisherEmail = publisherEmail;
}
public String getPublisherURL() {
return publisherURL;
}
public void setPublisherURL(String publisherURL) {
this.publisherURL = publisherURL;
}
public int getPublisherRevisionId() {
return publisherRevisionId;
}
public void setPublisherRevisionId(int publisherRevisionId) {
this.publisherRevisionId = publisherRevisionId;
}
public String getPublisherName() {
return publisherName;
}
public void setPublisherName(String publisherName) {
this.publisherName = publisherName;
}
}
\ No newline at end of file
This diff is collapsed. Click to expand it.