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 StringThe id used to recognize a user not registered.private StringThe email of the user.private intThe id of the user.private StringThe name of the user.private StringThe password of the user.The list of the questions created by the user.private StringThe surname of the user.The list of the surveys created by the user.private StringThe username of the user. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUsername(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
-