PublisherRevision.java 4.92 KB
package org.legrog.entities;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

@Entity
public class PublisherRevision {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "PUBLISHER_REVISION_ID")
    private int publisherRevisionId;
    @ManyToOne
    private Publisher publisher;
    private String publisherName;
    private String publisherStreetAddress;
    private String publisherPostalCode;
    private String publisherPostOfficeBoxNumber;
    private String publisherAddressRegion;
    private String publisherAddressLocality;
    @ManyToOne
    private Country publisherAddressCountry;
    private String publisherTelephone;
    private String publisherEmail;
    private String publisherURL;
    private boolean publisherActive;
    private String publisherHistory;
    @ManyToOne
    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;
    }

    public Country getPublisherAddressCountry() {
        return publisherAddressCountry;
    }

    public void setPublisherAddressCountry(Country publisherAddressCountry) {
        this.publisherAddressCountry = publisherAddressCountry;
    }

    public User getPublisherRevisionAuthor() {
        return publisherRevisionAuthor;
    }

    public void setPublisherRevisionAuthor(User publisherRevisionAuthor) {
        this.publisherRevisionAuthor = publisherRevisionAuthor;
    }

    @Override
    public String toString() {
        return "PUBLISHER_REVISION_ID = " + publisherRevisionId + ", Name = " + publisherName + ", St Address = " +
                publisherStreetAddress + ", CP = " + publisherPostalCode + ", BP = " + publisherPostOfficeBoxNumber +
                ", Region = " + publisherAddressRegion + ", Ville = " + publisherAddressLocality + ", Pays = " +
                publisherAddressCountry + ", Telephone = " + publisherTelephone + ", email = " + publisherEmail +
                ", URL = " + publisherURL + ", actif = " + publisherActive + ", History = " + publisherHistory +
                ", Revision Author = " + publisherRevisionAuthor + ", Revision DateTime = " + publisherRevisionDatetime;
    }
}