Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.56 KB | None | 0 0
  1. @Entity
  2. public class User extends LightEntity implements Serializable {
  3.     private static final long serialVersionUID = 1L;
  4.  
  5.     @Id
  6.     @SequenceGenerator(name="USER_UID_GENERATOR", sequenceName="U_ID")
  7.     @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="USER_UID_GENERATOR")
  8.     @Column(name="u_id")
  9.     private Long uId;
  10.  
  11.     private String email;
  12.  
  13.     private Boolean enabled;
  14.  
  15.     private String password;
  16.  
  17.     private String role;
  18.  
  19.     private String username;
  20.  
  21.     //bi-directional many-to-one association to Comment
  22.     @OneToMany(mappedBy="user", fetch=FetchType.EAGER)
  23.     private Set<Comment> comments = new HashSet<Comment>();
  24.  
  25.     public User() {
  26.     }
  27.  
  28.     public Long getUId() {
  29.         return this.uId;
  30.     }
  31.  
  32.     public void setUId(Long uId) {
  33.         this.uId = uId;
  34.     }
  35.  
  36.     public String getEmail() {
  37.         return this.email;
  38.     }
  39.  
  40.     public void setEmail(String email) {
  41.         this.email = email;
  42.     }
  43.  
  44.     public Boolean getEnabled() {
  45.         return this.enabled;
  46.     }
  47.  
  48.     public void setEnabled(Boolean enabled) {
  49.         this.enabled = enabled;
  50.     }
  51.  
  52.     public String getPassword() {
  53.         return this.password;
  54.     }
  55.  
  56.     public void setPassword(String password) {
  57.         this.password = password;
  58.     }
  59.  
  60.     public String getRole() {
  61.         return this.role;
  62.     }
  63.  
  64.     public void setRole(String role) {
  65.         this.role = role;
  66.     }
  67.  
  68.     public String getUsername() {
  69.         return this.username;
  70.     }
  71.  
  72.     public void setUsername(String username) {
  73.         this.username = username;
  74.     }
  75.  
  76.     public Set<Comment> getComments() {
  77.         return this.comments;
  78.     }
  79.  
  80.     public void setComments(Set<Comment> comments) {
  81.         this.comments = comments;
  82.     }
  83.    
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement