@Entity public class UserEntity extends Object
Constructor and Description |
---|
UserEntity() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Boolean |
getActive() |
String |
getActiveWidgetLayouts() |
List<UserAuthenticationEntity> |
getAuthenticationEntities() |
Integer |
getConsecutiveFailures()
Returns the number of consecutive authentication failures since the last successful login.
|
long |
getCreateTime() |
String |
getDisplayName()
Returns the display name for this user.
|
String |
getLocalUsername()
Gets the local username for this user.
|
Set<MemberEntity> |
getMemberEntities() |
PrincipalEntity |
getPrincipal()
Get the admin principal entity.
|
Integer |
getUserId() |
String |
getUserName() |
Long |
getVersion()
Returns the version number of the relevant data stored in the database.
|
int |
hashCode() |
void |
incrementConsecutiveFailures()
Increments the number of consecutive authentication failures since the last successful login.
|
protected void |
onCreate()
Ensure the create time is set properly when the record is created.
|
void |
setActive(Boolean active) |
void |
setActiveWidgetLayouts(String activeWidgetLayouts) |
void |
setAuthenticationEntities(List<UserAuthenticationEntity> authenticationEntities) |
void |
setConsecutiveFailures(Integer consecutiveFailures)
Sets the number of consecutive authentication failures since the last successful login.
|
void |
setCreateTime(long createTime) |
void |
setDisplayName(String displayName)
Sets the display name for this user.
|
void |
setLocalUsername(String localUsername)
Sets the local username for this user.
|
void |
setMemberEntities(Set<MemberEntity> memberEntities) |
void |
setPrincipal(PrincipalEntity principal)
Set the admin principal entity.
|
void |
setUserId(Integer userId) |
void |
setUserName(String userName) |
void |
setVersion(Long version)
Sets the version number of the relevant data stored in the database.
|
public Integer getUserId()
public void setUserId(Integer userId)
public String getUserName()
public void setUserName(String userName)
public Integer getConsecutiveFailures()
This value may be used to throttle authentication attempts or lock out users. It is expected that
this value is reset to 0
when a successful authentication attempt was made.
public void setConsecutiveFailures(Integer consecutiveFailures)
This value may be used to throttle authentication attempts or lock out users. It is expected that
this value is reset to 0
when a successful authentication attempt was made.
For each failed authentication attempt, incrementConsecutiveFailures()
should be called
rather than explicitly setting an incremented value.
consecutiveFailures
- a number of consecutive authentication failures since the last successful loginpublic void incrementConsecutiveFailures()
This value may be used to throttle authentication attempts or lock out users. It is expected that
this value is reset to 0
when a successful authentication attempt was made.
TODO: Ensure that this value is consistent when updating concurrently
public String getDisplayName()
This value may be used in user interfaces rather than the username to show who it logged in. If
empty, it is expected that the user's userName
value would be used instead.
public void setDisplayName(String displayName)
This value may be used in user interfaces rather than the username to show who it logged in. If
empty, it is expected that the user's userName
value would be used instead.
displayName
- the user's display namepublic String getLocalUsername()
This value is intended to be used when accessing services via Ambari Views. If
empty, it is expected that the user's userName
value would be used instead.
public void setLocalUsername(String localUsername)
This value is intended to be used when accessing services via Ambari Views. If
empty, it is expected that the user's userName
value would be used instead.
localUsername
- the user's local usernamepublic long getCreateTime()
public void setCreateTime(long createTime)
public Long getVersion()
This is used to help ensure that collisions updatin the relevant data in the database are handled properly via Optimistic locking.
public void setVersion(Long version)
This is used to help ensure that collisions updatin the relevant data in the database are handled properly via Optimistic locking. It is recommended that this value is not manually updated, else issues may occur when persisting the data.
version
- a version numberpublic Set<MemberEntity> getMemberEntities()
public void setMemberEntities(Set<MemberEntity> memberEntities)
public Boolean getActive()
public void setActive(Boolean active)
public PrincipalEntity getPrincipal()
public void setPrincipal(PrincipalEntity principal)
principal
- the principal entitypublic String getActiveWidgetLayouts()
public void setActiveWidgetLayouts(String activeWidgetLayouts)
public List<UserAuthenticationEntity> getAuthenticationEntities()
public void setAuthenticationEntities(List<UserAuthenticationEntity> authenticationEntities)
protected void onCreate()
Copyright © 2022 Apache Software Foundation. All rights reserved.