Guest User

Untitled

a guest
Dec 7th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. package com.batul.domain.entity;
  2.  
  3. import javax.persistence.*;
  4.  
  5. @Entity
  6. @Table(name = "USER")
  7. public class UserEntity {
  8. @GeneratedValue
  9. @Id
  10. @Column(name = "ID")
  11. private Long id;
  12. @Column(name = "USERNAME", nullable = false, unique = true)
  13. private String username;
  14. @Column(name = "PASSWORD")
  15. private String password;
  16. @Column(name = "ROLE")
  17. private String role;
  18. @Column(name = "IS_ACCOUNT_EXPIRED", nullable = false)
  19. private Boolean isAccountExpired;
  20. @Column(name = "IS_ACCOUNT_LOCKED", nullable = false)
  21. private Boolean isAccountLocked;
  22. @Column(name = "IS_CREDENTIALS_EXPIRED", nullable = false)
  23. private Boolean isCredentialsExpired;
  24. @Column(name = "IS_USER_ENABLED", nullable = false)
  25. private Boolean isUserEnabled;
  26.  
  27. public Long getId() {
  28. return id;
  29. }
  30.  
  31. public void setId(Long id) {
  32. this.id = id;
  33. }
  34.  
  35. public String getUsername() {
  36. return username;
  37. }
  38.  
  39. public void setUsername(String username) {
  40. this.username = username;
  41. }
  42.  
  43. public String getPassword() {
  44. return password;
  45. }
  46.  
  47. public void setPassword(String password) {
  48. this.password = password;
  49. }
  50.  
  51. public String getRole() {
  52. return role;
  53. }
  54.  
  55. public void setRole(String role) {
  56. this.role = role;
  57. }
  58.  
  59. public Boolean getAccountExpired() {
  60. return isAccountExpired;
  61. }
  62.  
  63. public void setAccountExpired(Boolean accountExpired) {
  64. isAccountExpired = accountExpired;
  65. }
  66.  
  67. public Boolean getAccountLocked() {
  68. return isAccountLocked;
  69. }
  70.  
  71. public void setAccountLocked(Boolean accountLocked) {
  72. isAccountLocked = accountLocked;
  73. }
  74.  
  75. public Boolean getCredentialsExpired() {
  76. return isCredentialsExpired;
  77. }
  78.  
  79. public void setCredentialsExpired(Boolean credentialsExpired) {
  80. isCredentialsExpired = credentialsExpired;
  81. }
  82.  
  83. public Boolean getUserEnabled() {
  84. return isUserEnabled;
  85. }
  86.  
  87. public void setUserEnabled(Boolean userEnabled) {
  88. isUserEnabled = userEnabled;
  89. }
  90.  
  91. @Override
  92. public String toString() {
  93. return "UserEntity{" +
  94. "id=" + id +
  95. ", username='" + username + '\'' +
  96. ", password='" + password + '\'' +
  97. ", role='" + role + '\'' +
  98. ", isAccountExpired=" + isAccountExpired +
  99. ", isAccountLocked=" + isAccountLocked +
  100. ", isCredentialsExpired=" + isCredentialsExpired +
  101. ", isUserEnabled=" + isUserEnabled +
  102. '}';
  103. }
  104. }
Add Comment
Please, Sign In to add comment