KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > blojsom > blog > database > DatabaseUser


1 /**
2  * Copyright (c) 2003-2006, David A. Czarnecki
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * Redistributions of source code must retain the above copyright notice, this list of conditions and the
9  * following disclaimer.
10  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
11  * following disclaimer in the documentation and/or other materials provided with the distribution.
12  * Neither the name of "David A. Czarnecki" and "blojsom" nor the names of its contributors may be used to
13  * endorse or promote products derived from this software without specific prior written permission.
14  * Products derived from this software may not be called "blojsom", nor may "blojsom" appear in their name,
15  * without prior written permission of David A. Czarnecki.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
18  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
19  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
20  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
21  * EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */

31 package org.blojsom.blog.database;
32
33 import org.blojsom.blog.User;
34
35 import java.util.Date JavaDoc;
36 import java.util.Map JavaDoc;
37 import java.util.HashMap JavaDoc;
38 import java.io.Serializable JavaDoc;
39
40 /**
41  * DatabaseUser
42  *
43  * @author David Czarnecki
44  * @version $Id: DatabaseUser.java,v 1.5 2006/09/26 02:55:22 czarneckid Exp $
45  * @since blojsom 3.0
46  */

47 public class DatabaseUser implements User, Serializable JavaDoc {
48
49     protected Integer JavaDoc _id;
50     protected Integer JavaDoc _blogId;
51     protected String JavaDoc _userLogin;
52     protected String JavaDoc _userPassword;
53     protected String JavaDoc _userName;
54     protected String JavaDoc _userEmail;
55     protected String JavaDoc _userStatus;
56     protected Date JavaDoc _userRegistered;
57     protected Map JavaDoc _metaData;
58
59     /**
60      * Create a new instance of the database user
61      */

62     public DatabaseUser() {
63     }
64
65     /**
66      * Get the user ID
67      *
68      * @return User ID
69      */

70     public Integer JavaDoc getId() {
71         return _id;
72     }
73
74     /**
75      * Set the user ID
76      *
77      * @param id User ID
78      */

79     public void setId(Integer JavaDoc id) {
80         _id = id;
81     }
82
83     /**
84      * Get the blog ID
85      *
86      * @return Blog ID
87      */

88     public Integer JavaDoc getBlogId() {
89         return _blogId;
90     }
91
92     /**
93      * Set the blog ID
94      *
95      * @param blogId Blog ID
96      */

97     public void setBlogId(Integer JavaDoc blogId) {
98         _blogId = blogId;
99     }
100
101     /**
102      * Get the user login
103      *
104      * @return User login
105      */

106     public String JavaDoc getUserLogin() {
107         return _userLogin;
108     }
109
110     /**
111      * Set the user login
112      *
113      * @param userLogin User login
114      */

115     public void setUserLogin(String JavaDoc userLogin) {
116         _userLogin = userLogin;
117     }
118
119     /**
120      * Get the password
121      *
122      * @return Password
123      */

124     public String JavaDoc getUserPassword() {
125         return _userPassword;
126     }
127
128     /**
129      * Set the password
130      *
131      * @param userPassword Password
132      */

133     public void setUserPassword(String JavaDoc userPassword) {
134         _userPassword = userPassword;
135     }
136
137     /**
138      * Get the user name
139      *
140      * @return User name
141      */

142     public String JavaDoc getUserName() {
143         return _userName;
144     }
145
146     /**
147      * Set the user name
148      *
149      * @param userName User name
150      */

151     public void setUserName(String JavaDoc userName) {
152         _userName = userName;
153     }
154
155     /**
156      * Get the user e-mail
157      *
158      * @return User e-mail
159      */

160     public String JavaDoc getUserEmail() {
161         return _userEmail;
162     }
163
164     /**
165      * Set the user e-mail
166      *
167      * @param userEmail User e-mail
168      */

169     public void setUserEmail(String JavaDoc userEmail) {
170         _userEmail = userEmail;
171     }
172
173     /**
174      * Get the user registered date
175      *
176      * @return User registered date
177      */

178     public Date JavaDoc getUserRegistered() {
179         return _userRegistered;
180     }
181
182     /**
183      * Set the user registered date
184      *
185      * @param userRegistered User registered date
186      */

187     public void setUserRegistered(Date JavaDoc userRegistered) {
188         _userRegistered = userRegistered;
189     }
190
191     /**
192      * Get the user status
193      *
194      * @return User status
195      */

196     public String JavaDoc getUserStatus() {
197         return _userStatus;
198     }
199
200     /**
201      * Set the user status
202      *
203      * @param userStatus User status
204      */

205     public void setUserStatus(String JavaDoc userStatus) {
206         _userStatus = userStatus;
207     }
208
209     /**
210      * Get the meta-data
211      *
212      * @return Meta-data
213      */

214     public Map JavaDoc getMetaData() {
215         if (_metaData == null) {
216             return new HashMap JavaDoc();
217         }
218
219         return _metaData;
220     }
221
222
223     /**
224      * Set the meta-data
225      *
226      * @param metaData Meta-data
227      */

228     public void setMetaData(Map JavaDoc metaData) {
229         _metaData = metaData;
230     }
231 }
232
Popular Tags