1 package org.usermanagement.dao.entity;
3 import java.io.Serializable;
5 import java.util.HashSet;
8 import javax.persistence.Column;
9 import javax.persistence.Entity;
10 import javax.persistence.FetchType;
11 import javax.persistence.GeneratedValue;
12 import javax.persistence.GenerationType;
13 import javax.persistence.Id;
14 import javax.persistence.JoinColumn;
15 import javax.persistence.JoinTable;
16 import javax.persistence.ManyToMany;
17 import javax.persistence.ManyToOne;
18 import javax.persistence.Table;
26 @Table(
name =
"KILDA_USER")
30 private static final long serialVersionUID = 1L;
34 @Column(
name =
"USER_ID", nullable =
false)
35 @GeneratedValue(strategy = GenerationType.SEQUENCE)
39 @Column(
name =
"USERNAME", nullable =
false)
40 private String username;
43 @Column(
name =
"PASSWORD", nullable =
false)
44 private String password;
47 @Column(
name =
"NAME")
51 @Column(
name =
"EMAIL")
55 @Column(
name =
"LOGIN_TIME")
56 private Date loginTime;
59 @Column(
name =
"LOGOUT_TIME")
60 private Date logoutTime;
63 @Column(
name =
"ACTIVE_FLAG")
64 private String activeFlag;
67 @Column(
name =
"IS_AUTHORIZED")
68 private String isAuthorized;
71 @Column(
name =
"is_two_fa_enabled", nullable =
true)
72 private Boolean is2FaEnabled;
74 @Column(
name =
"two_fa_key", nullable =
true)
75 private String twoFaKey;
77 @Column(
name =
"is_two_fa_configured", nullable =
true)
78 private Boolean is2FaConfigured;
81 @JoinColumn(
name =
"status_id", nullable =
false)
85 @ManyToMany(
fetch = FetchType.EAGER)
86 @JoinTable(
name =
"user_role", joinColumns = {@JoinColumn(
name =
"user_id")},
87 inverseJoinColumns = {@JoinColumn(
name =
"role_id")})
88 private Set<RoleEntity> roles =
new HashSet<RoleEntity>();
104 public void setRoles(
final Set<RoleEntity> roles) {
123 this.userId = userId;
141 this.username = username;
159 this.password = password;
213 this.loginTime = loginTime;
231 this.logoutTime = logoutTime;
240 return activeFlag.equalsIgnoreCase(
"true") ? true :
false;
249 this.activeFlag = activeFlag.toString();
258 this.activeFlag = activeFlag;
267 return isAuthorized.equalsIgnoreCase(
"true") ? true :
false;
276 this.isAuthorized = isAuthorized.toString();
285 this.isAuthorized = isAuthorized;
303 this.statusEntity = statusEntity;
321 this.is2FaEnabled = is2FaEnabled;
330 return is2FaConfigured;
339 this.is2FaConfigured = is2FaConfigured;
357 this.twoFaKey = twoFaKey;
365 return "UserEntity [userId=" + userId +
", username=" + username +
", password=" + password +
", name=" +
name 366 +
", email=" + email +
", loginTime=" + loginTime +
", logoutTime=" + logoutTime +
", activeFlag=" 367 + activeFlag +
", isAuthorized=" + isAuthorized +
", statusEntity=" + statusEntity +
", roles=" + roles
void setUserId(final Long userId)
StatusEntity getStatusEntity()
Boolean getIsAuthorized()
void setIs2FaConfigured(final boolean is2FaConfigured)
boolean getIs2FaConfigured()
void setRoles(final Set< RoleEntity > roles)
void setLogoutTime(final Date logoutTime)
void setUsername(final String username)
void setTwoFaKey(final String twoFaKey)
boolean getIs2FaEnabled()
void setIs2FaEnabled(final boolean is2FaEnabled)
void setIsAuthorized(final String isAuthorized)
void setName(final String name)
void setPassword(final String password)
void setIsAuthorized(final Boolean isAuthorized)
Set< RoleEntity > getRoles()
void setLoginTime(final Date loginTime)
void setEmail(final String email)
void setStatusEntity(final StatusEntity statusEntity)
void setActiveFlag(final Boolean activeFlag)
void setActiveFlag(final String activeFlag)