Class User
java.lang.Object
io.github.webbasedwodt.common.model.User
This model class demonstrates how to use a custom serialization (in this case JSON-Serialization with Jackson) for
Messages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The content type of the serialization output. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEmail()
Get the email of the user.Get the username of the user.void
Set a new email for the user.void
setUserName
(String userName) Set the username of the user.toString()
-
Field Details
-
USER_CUSTOM_CONTENT_TYPE
The content type of the serialization output.- See Also:
-
-
Constructor Details
-
User
public User()Empty constructor. -
User
Default constructor- Parameters:
userName
- the username of the useremail
- the email of the user
-
-
Method Details
-
getUserName
Get the username of the user.- Returns:
- the username of the user
-
setUserName
Set the username of the user.- Parameters:
userName
- the new username to set
-
getEmail
Get the email of the user.- Returns:
- the email of the user
-
setEmail
Set a new email for the user.- Parameters:
email
- the new email to set
-
toString
-