Guest User

Untitled

a guest
Dec 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.45 KB | None | 0 0
  1. package pl.szczerbakowski.magenta.model.entities;
  2.  
  3. import java.io.Serializable;
  4. import java.util.Date;
  5.  
  6. import javax.persistence.Column;
  7. import javax.persistence.Entity;
  8. import javax.persistence.FetchType;
  9. import javax.persistence.GeneratedValue;
  10. import javax.persistence.Id;
  11. import javax.persistence.ManyToOne;
  12. import javax.validation.constraints.NotNull;
  13. import javax.validation.constraints.Size;
  14.  
  15. /**
  16.  * Entity implementation class for Entity: Comment
  17.  *
  18.  */
  19. @Entity
  20. public class Comment implements Serializable {
  21.  
  22.     /**
  23.      *
  24.      */
  25.     private static final long serialVersionUID = -8427235077824098399L;
  26.  
  27.     @Id
  28.     @GeneratedValue
  29.     private long id;
  30.  
  31. //  @ManyToOne(fetch=FetchType.EAGER)
  32. //  private Article article;
  33.    
  34.    
  35.     @NotNull
  36.     @Column(name = "nick")
  37.     @Size(min = 2, max = 32)
  38.     private String nick;
  39.  
  40.     @NotNull
  41.     @Column(name = "content")
  42.     @Size(max = 512)
  43.     private String content;
  44.  
  45.     @NotNull
  46.     private Date timeStamp;
  47.  
  48.     public long getId() {
  49.         return id;
  50.     }
  51.  
  52.     public void setId(long id) {
  53.         this.id = id;
  54.     }
  55.  
  56.     public String getNick() {
  57.         return nick;
  58.     }
  59.  
  60.     public void setNick(String nick) {
  61.         this.nick = nick;
  62.     }
  63.  
  64.     public String getContent() {
  65.         return content;
  66.     }
  67.  
  68.     public void setContent(String content) {
  69.         this.content = content;
  70.     }
  71.  
  72.     public Date getTimeStamp() {
  73.         return timeStamp;
  74.     }
  75.  
  76.     public void setTimeStamp(Date timeStamp) {
  77.         this.timeStamp = timeStamp;
  78.     }
  79.  
  80.     public Comment() {
  81.         super();
  82.     }
  83.  
  84. }
Add Comment
Please, Sign In to add comment