java.lang.Object
com.foreach.across.modules.hibernate.business.SettableIdBasedEntity<T>
All Implemented Interfaces:
com.foreach.across.modules.hibernate.business.Auditable<String>, com.foreach.across.modules.hibernate.business.EntityWithDto<User>, com.foreach.across.modules.hibernate.business.IdBasedEntity, com.foreach.across.modules.hibernate.repositories.Undeletable, com.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipal, com.foreach.across.modules.spring.security.infrastructure.business.SecurityPrincipalHierarchy, IdBasedSecurityPrincipal, org.springframework.data.domain.Persistable<Long>

@NotThreadSafe @Entity public class User extends GroupedPrincipal<User> implements com.foreach.across.modules.hibernate.repositories.Undeletable
  • Constructor Details

    • User

      public User()
  • Method Details

    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • getFirstName

      public String getFirstName()
    • setFirstName

      public void setFirstName(String firstName)
    • getLastName

      public String getLastName()
    • setLastName

      public void setLastName(String lastName)
    • getDisplayName

      public String getDisplayName()
    • setDisplayName

      public void setDisplayName(String displayName)
    • getEmail

      public String getEmail()
    • setEmail

      public void setEmail(String email)
    • getLabel

      public String getLabel()
      Returns a display label for this user. Uses the display name if set, else first and last name and falls back to username if none of them are set.
      Returns:
      label
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getEmailConfirmed

      public boolean getEmailConfirmed()
    • setEmailConfirmed

      public void setEmailConfirmed(boolean emailConfirmed)
    • isDeleted

      public boolean isDeleted()
      Specified by:
      isDeleted in interface com.foreach.across.modules.hibernate.repositories.Undeletable
    • setDeleted

      public void setDeleted(boolean deleted)
      Specified by:
      setDeleted in interface com.foreach.across.modules.hibernate.repositories.Undeletable
    • getRestrictions

      public Set<UserRestriction> getRestrictions()
    • setRestrictions

      public void setRestrictions(Collection<UserRestriction> restrictions)
    • hasRestriction

      public boolean hasRestriction(UserRestriction restriction)
    • hasRestrictions

      public boolean hasRestrictions()
    • isAccountNonExpired

      public boolean isAccountNonExpired()
    • isAccountNonLocked

      public boolean isAccountNonLocked()
    • isCredentialsNonExpired

      public boolean isCredentialsNonExpired()
    • isEnabled

      public boolean isEnabled()
    • toDto

      public User toDto()
      Specified by:
      toDto in interface com.foreach.across.modules.hibernate.business.EntityWithDto<User>
      Overrides:
      toDto in class com.foreach.across.modules.hibernate.business.SettableIdBasedEntity<User>