Guest User

Untitled

a guest
Apr 15th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. package demo.model;
  2.  
  3. import java.io.Serializable;
  4.  
  5.  
  6. import javax.persistence.*;
  7.  
  8. @Entity
  9. @Table(name = "users")
  10. public class User implements Serializable {
  11.  
  12. private static final long serialVersionUID = 1L;
  13.  
  14. @Id
  15. @GeneratedValue(strategy = GenerationType.AUTO)
  16. @Column(name="userid")
  17. private Long userId;
  18.  
  19. @Column(name = "username")
  20. private String userName;
  21.  
  22. @Column(name = "password")
  23. private String password;
  24.  
  25. @Column(name = "email")
  26. private String email;
  27.  
  28. @Column(name ="enabled")
  29. private int enabled;
  30.  
  31. public User(){
  32.  
  33. }
  34.  
  35. public User(User user) {
  36. this.userId = user.userId;
  37. this.userName = user.userName;
  38. this.email = user.email;
  39. this.password = user.password;
  40. this.enabled=user.enabled;
  41. }
  42.  
  43. public int getEnabled() {
  44. return enabled;
  45. }
  46.  
  47. public void setEnabled(int enabled) {
  48. this.enabled = enabled;
  49. }
  50.  
  51. public Long getUserid() {
  52. return userId;
  53. }
  54.  
  55. public void setUserid(Long userid) {
  56. this.userId = userid;
  57. }
  58.  
  59. public String getPassword() {
  60. return password;
  61. }
  62.  
  63. public void setPassword(String password) {
  64. this.password = password;
  65. }
  66.  
  67. public String getEmail() {
  68. return email;
  69. }
  70.  
  71. public void setEmail(String email) {
  72. this.email = email;
  73. }
  74.  
  75. public String getUserName() {
  76. return userName;
  77. }
  78.  
  79. public void setUserName(String userName) {
  80. this.userName = userName;
  81. }
  82.  
  83.  
  84.  
  85. }
Add Comment
Please, Sign In to add comment