Class User


  • @Entity
    public class User
    extends MyDataEntity
    MyData-user compatible with spring-security.
    Author:
    Fraunhofer IESE
    • Field Detail

      • userUUID

        @Pattern(regexp="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
        protected @Pattern(regexp="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") String userUUID
      • username

        @NotBlank
        protected @NotBlank String username
      • email

        @NotBlank
        @Email
        protected @NotBlank @Email String email
        Email is not kept unique intentionally
      • firstName

        @NotBlank
        protected @NotBlank String firstName
      • lastName

        @NotBlank
        protected @NotBlank String lastName
      • encryptedPassword

        @NotBlank
        protected @NotBlank String encryptedPassword
      • accountLocked

        protected boolean accountLocked
      • password

        protected String password
        Password wont be stored in database, used for sending passwords via UI to backend
      • role

        @NotNull
        @Valid
        protected @NotNull @Valid MyDataRole role
    • Constructor Detail

      • User

        public User()
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isSuperAdmin

        public boolean isSuperAdmin()
      • isAdmin

        public boolean isAdmin()
      • isDev

        public boolean isDev()
      • setAccountLocked

        public void setAccountLocked​(boolean accountLocked)
      • isAccountNonLocked

        public boolean isAccountNonLocked()
      • isAccountNonExpired

        public boolean isAccountNonExpired()
      • setSolutions

        public void setSolutions​(Set<Solution> solutions)
        needed for JPA/Hibernate if the solutions set is null, a new set is initialized, else, it re-uses the previous object then updates the current list (set) of solutions for this affiliation
        Parameters:
        solutions - the new list(set) of solutions for this affiliation
      • addSolution

        public void addSolution​(Solution solution)
      • removeSolution

        public void removeSolution​(Solution solution)