2 * Copyright (C) 2015 Roland Haeder
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 package org.mxchange.jusercore.model.user;
19 import java.io.Serializable;
20 import java.util.Calendar;
21 import org.mxchange.jcontacts.contact.Contact;
22 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
23 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
26 * A customer interface
28 * @author Roland Haeder<roland@mxchange.org>
30 public interface User extends Serializable {
33 * Copies all attributes from other customer object to this
35 * @param userSource Source instance
37 void copyAll (final User userSource);
40 * Getter for account status
42 * @return Account status
44 UserAccountStatus getUserAccountStatus ();
47 * Setter for account status
49 * @param userStatus Account status
51 void setUserAccountStatus (final UserAccountStatus userStatus);
54 * Getter for confirmation key
56 * @return Confirmation key
58 String getUserConfirmKey ();
61 * Setter for confirmation key
63 * @param userConfirmKey Confirmation key
65 void setUserConfirmKey (final String userConfirmKey);
68 * Getter for contact instance
70 * @return Contact id number
72 Contact getUserContact ();
75 * Setter for contact instance
77 * @param contact Contact instance
79 void setUserContact (final Contact contact);
82 * Getter for "created" timestamp
84 * @return "created" timestamp
86 Calendar getUserCreated ();
89 * Setter for "created" timestamp
91 * @param userCreated "created" timestamp
93 void setUserCreated (final Calendar userCreated);
96 * Getter for encrypted password
98 * @return Encrypted password
100 String getUserEncryptedPassword ();
103 * Setter for password hash
105 * @param userEncryptedPassword Encrypted password
107 void setUserEncryptedPassword (final String userEncryptedPassword);
110 * Getter for customer id number
112 * @return User id number
117 * Settte for customer id number
119 * @param customerId User id number
121 void setUserId (final Long customerId);
124 * Getter for "locked" timestamp
126 * @return "locked" timestamp
128 Calendar getUserLocked ();
131 * Getter for "locked" timestamp
133 * @param userLocked "locked" timestamp
135 void setUserLocked (final Calendar userLocked);
138 * Getter for user name
142 String getUserName ();
145 * Setter for user name
147 * @param userName User name
149 void setUserName (final String userName);
152 * Getter for public user profile flag
154 * @return Whether the user has a public profile
156 ProfileMode getUserProfileMode ();
159 * Setter for public user profile flag
161 * @param userPublicProfile Whether the user has a public profile
163 void setUserProfileMode (final ProfileMode userPublicProfile);
166 * Checks if object is a User instance and whether it matches with this
169 * @param object Object to be checked
170 * @return Whether it matches this object
173 boolean equals (final Object object);
176 * Hash code caluclation for this object
178 * @return Hash code for this object