Groovy Documentation

org.devnull.security.model
[Groovy] Class User

java.lang.Object
  org.devnull.security.model.User
All Implemented Interfaces:
java.io.Serializable, org.springframework.security.core.userdetails.UserDetails

@Entity
@Table(name = "SecurityUser", uniqueConstraints = [
    @UniqueConstraint(columnNames=["userName"])
])
@EqualsAndHashCode(excludes = "roles")
@ToString(excludes = "roles", includeNames = true)
class User
extends java.lang.Object

Property Summary
java.lang.String email

java.lang.Boolean enabled

java.lang.String firstName

java.lang.Integer id

java.lang.String lastName

static java.lang.Object log

java.util.List roles

static long serialVersionUID

java.lang.String userName

 
Method Summary
void addToRoles(Role role)

java.util.Collection getAuthorities()

java.lang.String getPassword()

java.lang.String getUsername()

boolean isAccountNonExpired()

boolean isAccountNonLocked()

boolean isCredentialsNonExpired()

boolean isEnabled()

void setId(java.lang.Long id)

Immutable once set

void setUserName(java.lang.String openId)

Immutable once set

 
Methods inherited from class java.lang.Object
java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long)
 

Property Detail

email

@Pattern(regexp=".{1,50}\\@.{1,100}", message="Email must be properly formatted")
java.lang.String email


enabled

@NotNull
java.lang.Boolean enabled


firstName

@Size(min=1, message="First name cannot be empty")
java.lang.String firstName


id

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
java.lang.Integer id


lastName

@Size(min=1, message="Last name cannot be empty")
java.lang.String lastName


log

static final java.lang.Object log


roles

@ManyToMany(cascade = [CascadeType.MERGE, CascadeType.PERSIST], fetch=FetchType.EAGER)
@JoinTable(
    name = "SecurityUserRole",
    joinColumns = @JoinColumn(name = "UserId"),
    inverseJoinColumns = @JoinColumn(name = "RoleId")
    )
java.util.List roles


serialVersionUID

static final long serialVersionUID


userName

java.lang.String userName


 
Method Detail

addToRoles

void addToRoles(Role role)


getAuthorities

java.util.Collection getAuthorities()


getPassword

java.lang.String getPassword()


getUsername

java.lang.String getUsername()


isAccountNonExpired

boolean isAccountNonExpired()


isAccountNonLocked

boolean isAccountNonLocked()


isCredentialsNonExpired

boolean isCredentialsNonExpired()


isEnabled

boolean isEnabled()


setId

void setId(java.lang.Long id)
Immutable once set
Parameters:
id


setUserName

void setUserName(java.lang.String openId)
Immutable once set
Parameters:
id


 

Groovy Documentation