Package sk.gursky.films.persist.users
Class MyUser
java.lang.Object
sk.gursky.films.persist.users.MyUser
public class MyUser
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static long
TOKEN_VALIDITY
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
addGroupId(long groupId)
java.lang.String
checkPasswordAndGetToken(java.lang.String password)
boolean
checkToken(java.lang.String token)
boolean
deleteToken(java.lang.String token)
java.lang.String
getEmail()
java.util.List<java.lang.Long>
getGroupIds()
java.lang.Long
getId()
java.time.LocalDateTime
getLastLogin()
java.lang.String
getName()
java.lang.String
getPasswordHash()
java.lang.String
getSalt()
SimpleUser
getSimpleUser()
java.util.Map<java.lang.String,java.lang.Long>
getTokens()
User
getUser()
boolean
hasGroupWithId(long groupId)
boolean
isActive()
void
setActive(boolean active)
void
setEmail(java.lang.String email)
void
setId(java.lang.Long id)
void
setName(java.lang.String name)
void
setPassword(java.lang.String password)
void
setUser(User user)
java.lang.String
toString()
-
Field Details
-
TOKEN_VALIDITY
public static final long TOKEN_VALIDITY- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
getId
public java.lang.Long getId() -
setId
public void setId(java.lang.Long id) -
getName
public java.lang.String getName() -
setName
public void setName(java.lang.String name) -
setPassword
public void setPassword(java.lang.String password) -
checkPasswordAndGetToken
public java.lang.String checkPasswordAndGetToken(java.lang.String password) -
checkToken
public boolean checkToken(java.lang.String token) -
deleteToken
public boolean deleteToken(java.lang.String token) -
getEmail
public java.lang.String getEmail() -
setEmail
public void setEmail(java.lang.String email) -
getLastLogin
public java.time.LocalDateTime getLastLogin() -
isActive
public boolean isActive() -
setActive
public void setActive(boolean active) -
addGroupId
public void addGroupId(long groupId) -
hasGroupWithId
public boolean hasGroupWithId(long groupId) -
setUser
-
getUser
-
getSimpleUser
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getPasswordHash
public java.lang.String getPasswordHash() -
getSalt
public java.lang.String getSalt() -
getGroupIds
public java.util.List<java.lang.Long> getGroupIds() -
getTokens
public java.util.Map<java.lang.String,java.lang.Long> getTokens()
-