]> git.mxchange.org Git - juser-login-core.git/blob - src/org/mxchange/jusercore/model/user/User.java
added timestamp when the user has updated profile
[juser-login-core.git] / src / org / mxchange / jusercore / model / user / User.java
1 /*
2  * Copyright (C) 2015 Roland Haeder
3  *
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.
8  *
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.
13  *
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/>.
16  */
17 package org.mxchange.jusercore.model.user;
18
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;
24
25 /**
26  * A customer interface
27  * <p>
28  * @author Roland Haeder<roland@mxchange.org>
29  */
30 public interface User extends Serializable {
31
32         /**
33          * Copies all attributes from other customer object to this
34          * <p>
35          * @param userSource Source instance
36          */
37         void copyAll (final User userSource);
38
39         /**
40          * Getter for account status
41          * <p>
42          * @return Account status
43          */
44         UserAccountStatus getUserAccountStatus ();
45
46         /**
47          * Setter for account status
48          * <p>
49          * @param userStatus Account status
50          */
51         void setUserAccountStatus (final UserAccountStatus userStatus);
52
53         /**
54          * Getter for confirmation key
55          * <p>
56          * @return Confirmation key
57          */
58         String getUserConfirmKey ();
59
60         /**
61          * Setter for confirmation key
62          * <p>
63          * @param userConfirmKey Confirmation key
64          */
65         void setUserConfirmKey (final String userConfirmKey);
66
67         /**
68          * Getter for contact instance
69          * <p>
70          * @return Contact id number
71          */
72         Contact getUserContact ();
73
74         /**
75          * Setter for contact instance
76          * <p>
77          * @param contact Contact instance
78          */
79         void setUserContact (final Contact contact);
80
81         /**
82          * Getter for "created" timestamp
83          * <p>
84          * @return "created" timestamp
85          */
86         Calendar getUserCreated ();
87
88         /**
89          * Setter for "created" timestamp
90          * <p>
91          * @param userCreated "created" timestamp
92          */
93         void setUserCreated (final Calendar userCreated);
94
95         /**
96          * Getter for encrypted password
97          * <p>
98          * @return Encrypted password
99          */
100         String getUserEncryptedPassword ();
101
102         /**
103          * Setter for password hash
104          * <p>
105          * @param userEncryptedPassword Encrypted password
106          */
107         void setUserEncryptedPassword (final String userEncryptedPassword);
108
109         /**
110          * Getter for customer id number
111          * <p>
112          * @return User id number
113          */
114         Long getUserId ();
115
116         /**
117          * Settte for customer id number
118          * <p>
119          * @param customerId User id number
120          */
121         void setUserId (final Long customerId);
122
123         /**
124          * Getter for "locked" timestamp
125          * <p>
126          * @return "locked" timestamp
127          */
128         Calendar getUserLastLocked ();
129
130         /**
131          * Getter for "locked" timestamp
132          * <p>
133          * @param userLocked "locked" timestamp
134          */
135         void setUserLastLocked (final Calendar userLocked);
136
137         /**
138          * Getter for reason of last locked
139          * <p>
140          * @return Reason of last locked
141          */
142         public String getLastLockedReason ();
143
144         /**
145          * Setter for reason of last locked
146          * <p>
147          * @param lastLockedReason Reason of last locked
148          */
149         public void setLastLockedReason (final String lastLockedReason);
150
151         /**
152          * Getter for user name
153          * <p>
154          * @return User name
155          */
156         String getUserName ();
157
158         /**
159          * Setter for user name
160          * <p>
161          * @param userName User name
162          */
163         void setUserName (final String userName);
164
165         /**
166          * Getter for public user profile flag
167          * <p>
168          * @return Whether the user has a public profile
169          */
170         ProfileMode getUserProfileMode ();
171
172         /**
173          * Setter for public user profile flag
174          * <p>
175          * @param userPublicProfile Whether the user has a public profile
176          */
177         void setUserProfileMode (final ProfileMode userPublicProfile);
178
179         /**
180          * Getter for updated timestamp
181          * <p>
182          * @return Updated timestamp
183          */
184         Calendar getUserUpdated ();
185
186         /**
187          * Setter for updated timestamp
188          * <p>
189          * @param userUpdated Updated timestamp
190          */
191         void setUserUpdated (final Calendar userUpdated);
192
193         /**
194          * Checks if object is a User instance and whether it matches with this
195          * object.
196          * <p>
197          * @param object Object to be checked
198          * @return Whether it matches this object
199          */
200         @Override
201         boolean equals (final Object object);
202
203         /**
204          * Hash code caluclation for this object
205          * <p>
206          * @return Hash code for this object
207          */
208         @Override
209         int hashCode ();
210 }