Package it.unimib.unimibmodules.model
Class User
java.lang.Object
it.unimib.unimibmodules.model.User
Representation of a user in a general website way.
- Version:
- 0.4.1
- Author:
- Gianlorenzo Martini
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe list of the answers that the user gave in the surveys he compiled.private String
The id used to recognize a user not registered.private String
The email of the user.private int
The id of the user.private String
The name of the user.private String
The password of the user.The list of the questions created by the user.private String
The surname of the user.The list of the surveys created by the user.private String
The username of the user. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setUsername
(String username) Modifies the username of a user, setting username as the new value
-
Field Details
-
id
private int idThe id of the user. -
email
The email of the user. -
password
The password of the user. -
username
The username of the user. -
name
The name of the user. -
surname
The surname of the user. -
compilationId
The id used to recognize a user not registered. -
surveysCreated
The list of the surveys created by the user. -
questionsCreated
The list of the questions created by the user. -
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
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
-