| | |
| | | public boolean isAuthenticated;
|
| | | public AccountType accountType;
|
| | |
|
| | | public UserPreferences userPreferences;
|
| | | |
| | | public UserModel(String username) {
|
| | | this.username = username;
|
| | | this.isAuthenticated = true;
|
| | | this.accountType = AccountType.LOCAL;
|
| | | this.userPreferences = new UserPreferences(this.username);
|
| | | }
|
| | |
|
| | | private UserModel() {
|
| | | this.username = "$anonymous";
|
| | | this.isAuthenticated = false;
|
| | | this.accountType = AccountType.LOCAL;
|
| | | this.userPreferences = new UserPreferences(this.username);
|
| | | }
|
| | |
|
| | | public boolean isLocalAccount() {
|
| | |
| | | return "~" + username;
|
| | | }
|
| | |
|
| | | public UserPreferences getPreferences() {
|
| | | return userPreferences;
|
| | | }
|
| | | |
| | | @Override
|
| | | public int hashCode() {
|
| | | return username.hashCode();
|