Package org.apache.juneau.petstore.dto
Class User
java.lang.Object
org.apache.juneau.petstore.dto.User
User domain bean.
Represents a registered petstore user. The username is the primary key.
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEmail()Returns the email address.Returns the first name.Returns the last name.Returns the password.getPhone()Returns the phone number.Returns the username (primary key).Returns the user account status.Sets the email address.setFirstName(String value) Sets the first name.setLastName(String value) Sets the last name.setPassword(String value) Sets the password.Sets the phone number.setUsername(String value) Sets the username.setUserStatus(UserStatus value) Sets the user account status.
-
Constructor Details
-
User
public User()
-
-
Method Details
-
getUsername
Returns the username (primary key).- Returns:
- The username.
-
setUsername
Sets the username.- Parameters:
value- The new value.- Returns:
- This object.
-
getFirstName
Returns the first name.- Returns:
- The first name. Can be
null if not set.
-
setFirstName
Sets the first name.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getLastName
Returns the last name.- Returns:
- The last name. Can be
null if not set.
-
setLastName
Sets the last name.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getEmail
Returns the email address.- Returns:
- The email address. Can be
null if not set.
-
setEmail
Sets the email address.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getPassword
Returns the password.Stored in plaintext for sample purposes only. Do not use this pattern in production.
Write-only: the password is accepted on create and update but is never serialized, so no response carries it.
- Returns:
- The password. Can be
null if not set.
-
setPassword
Sets the password.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getPhone
Returns the phone number.- Returns:
- The phone number. Can be
null if not set.
-
setPhone
Sets the phone number.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getUserStatus
Returns the user account status.- Returns:
- The user account status.
-
setUserStatus
Sets the user account status.- Parameters:
value- The new value.- Returns:
- This object.
-