Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package M3106;
- import java.time.LocalDate;
- import java.util.HashSet;
- import java.util.Set;
- import javax.persistence.Entity;
- import javax.persistence.GeneratedValue;
- import javax.persistence.Id;
- import javax.persistence.ManyToMany;
- import javax.persistence.ManyToOne;
- @Entity
- public class Document {
- @Id @GeneratedValue
- private int idDocument;
- private String resume;
- private LocalDate dateDocument;
- private String url;
- @ManyToOne
- private Utilisateur poste;
- @ManyToMany
- private Set<Tag> document;
- public Document() {
- document = new HashSet<>();
- }
- public Document(int idDocument, String resume, LocalDate dateDocument, String url, Utilisateur poste) {
- super();
- this.resume = resume;
- this.dateDocument = dateDocument;
- this.url = url;
- this.poste = poste;
- }
- public int getIdDocument() {
- return idDocument;
- }
- public String getResume() {
- return resume;
- }
- public void setResume(String resume) {
- this.resume = resume;
- }
- public LocalDate getDateDocument() {
- return dateDocument;
- }
- public void setDateDocument(LocalDate dateDocument) {
- this.dateDocument = dateDocument;
- }
- public String getUrl() {
- return url;
- }
- public void setUrl(String url) {
- this.url = url;
- }
- @Override
- public String toString() {
- return "Document [idDocument=" + idDocument + ", resume=" + resume + ", dateDocument=" + dateDocument + ", url="
- + url + "]";
- }
- public Utilisateur getPoste() {
- return poste;
- }
- public void setPoste(Utilisateur poste) {
- this.poste = poste;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement