Class User

java.lang.Object
it.unimib.unimibmodules.model.User

@Entity public class User extends Object
Representation of a user in a general website way.
Version:
0.4.1
Author:
Gianlorenzo Martini
  • Field Details

    • id

      private int id
      The id of the user.
    • email

      @Nullable private String email
      The email of the user.
    • password

      private String password
      The password of the user.
    • username

      private String username
      The username of the user.
    • name

      @Nullable private String name
      The name of the user.
    • surname

      @Nullable private String surname
      The surname of the user.
    • compilationId

      @Nullable private String compilationId
      The id used to recognize a user not registered.
    • surveysCreated

      private Set<Survey> surveysCreated
      The list of the surveys created by the user.
    • questionsCreated

      private Set<Question> questionsCreated
      The list of the questions created by the user.
    • answers

      private Set<Answer> answers
      The list of the answers that the user gave in the surveys he compiled.
  • Constructor Details

    • User

      public User()
      Creates an empty user.
  • Method Details

    • setUsername

      public void setUsername(String username) throws EmptyFieldException
      Modifies the username of a user, setting username as the new value
      Parameters:
      username - the new username value
      Throws:
      EmptyFieldException - if the username is empty