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 getUserLastLocked ();
131 * Getter for "locked" timestamp
133 * @param userLocked "locked" timestamp
135 void setUserLastLocked (final Calendar userLocked);
138 * Getter for reason of last locked
140 * @return Reason of last locked
142 public String getLastLockedReason ();
145 * Setter for reason of last locked
147 * @param lastLockedReason Reason of last locked
149 public void setLastLockedReason (final String lastLockedReason);
152 * Getter for user name
156 String getUserName ();
159 * Setter for user name
161 * @param userName User name
163 void setUserName (final String userName);
166 * Getter for public user profile flag
168 * @return Whether the user has a public profile
170 ProfileMode getUserProfileMode ();
173 * Setter for public user profile flag
175 * @param userPublicProfile Whether the user has a public profile
177 void setUserProfileMode (final ProfileMode userPublicProfile);
180 * Getter for updated timestamp
182 * @return Updated timestamp
184 Calendar getUserUpdated ();
187 * Setter for updated timestamp
189 * @param userUpdated Updated timestamp
191 void setUserUpdated (final Calendar userUpdated);
194 * Checks if object is a User instance and whether it matches with this
197 * @param object Object to be checked
198 * @return Whether it matches this object
201 boolean equals (final Object object);
204 * Hash code caluclation for this object
206 * @return Hash code for this object