@Entity public class User extends Object
Because this class performs its own Realm and Permission checks, and these can happen frequently
enough in a production application, it is highly recommended that the internal User
getRoles()
collection be cached in a 2nd-level cache when using JPA and/or Hibernate. The
hibernate xml configuration for this sample application does in fact do this for your reference
(see User.hbm.xml - the 'roles' declaration).
Constructor and Description |
---|
User() |
Modifier and Type | Method and Description |
---|---|
String |
getEmail() |
Long |
getId() |
String |
getPassword()
Returns the password for this user.
|
Set<Role> |
getRoles() |
String |
getUsername()
Returns the username associated with this user account;
|
void |
setEmail(String email) |
void |
setId(Long id) |
void |
setPassword(String password) |
void |
setRoles(Set<Role> roles) |
void |
setUsername(String username) |
public Long getId()
public void setId(Long id)
public String getUsername()
public void setUsername(String username)
public String getEmail()
public void setEmail(String email)
public String getPassword()
public void setPassword(String password)
Copyright © 2015. All rights reserved.