KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > j2biz > blogunity > pojo > Userpic


1 /*
2  * $Id: Userpic.java,v 1.3 2004/12/30 19:11:19 keyboardsamurai Exp $
3  *
4  * Copyright (c) 2004 j2biz Group, http://www.j2biz.com
5  * Koeln / Duesseldorf , Germany
6  *
7  * @author Max Kalina
8  *
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23  *
24  */

25
26 package com.j2biz.blogunity.pojo;
27
28 import java.io.Serializable JavaDoc;
29 import java.util.Date JavaDoc;
30
31 /**
32  * @hibernate.class table="USER_PICS" dynamic-insert = "true"
33  * dynamic-update = "true"
34  *
35  * @author michelson
36  * @version $$
37  * @since 0.1
38  *
39  *
40  */

41 public class Userpic implements Serializable JavaDoc{
42
43     /**
44      * Comment for <code>serialVersionUID</code>
45      */

46     private static final long serialVersionUID = 3689917253630047798L;
47
48     private Long JavaDoc id;
49
50     private String JavaDoc name;
51
52     private String JavaDoc url;
53
54     private boolean isDefault;
55
56     private User user;
57
58     private Date JavaDoc createTime = new Date JavaDoc();
59
60     public Userpic() {
61
62     }
63
64     public Userpic(String JavaDoc name, String JavaDoc url, boolean isDefault,
65             User user) {
66
67         setName(name);
68         setUrl(url);
69         setDefault(isDefault);
70         setUser(user);
71
72     }
73
74     /**
75      * @hibernate.id generator-class="increment" type="long"
76      * column="ID" unsaved-value="null"
77      *
78      * @return Returns the id.
79      */

80     public Long JavaDoc getId() {
81         return id;
82     }
83
84     /**
85      * @param id
86      * The id to set.
87      */

88     public void setId(Long JavaDoc id) {
89         this.id = id;
90     }
91
92     /**
93      * @hibernate.property name="default" column="IS_DEFAULT"
94      * type="boolean" not-null="true"
95      * unique="false"
96      *
97      * @return Returns the isDefault.
98      */

99     public boolean getDefault() {
100         return isDefault;
101     }
102
103     /**
104      * @return Returns the isDefault.
105      */

106     public boolean isDefault() {
107         return isDefault;
108     }
109
110     /**
111      * @param isDefault
112      * The isDefault to set.
113      */

114     public void setDefault(boolean isDefault) {
115         this.isDefault = isDefault;
116     }
117
118     /**
119      * @hibernate.property name="name" column="NAME" type="string"
120      * not-null="true" unique="false"
121      *
122      * @return Returns the name.
123      */

124     public String JavaDoc getName() {
125         return name;
126     }
127
128     /**
129      * @param name
130      * The name to set.
131      */

132     public void setName(String JavaDoc name) {
133         this.name = name;
134     }
135
136     /**
137      * @hibernate.property name="url" column="URL" type="string"
138      * not-null="true" unique="false"
139      *
140      * @return Returns the url.
141      */

142     public String JavaDoc getUrl() {
143         return url;
144     }
145
146     /**
147      * @param url
148      * The url to set.
149      */

150     public void setUrl(String JavaDoc url) {
151         this.url = url;
152     }
153
154     /**
155      * @hibernate.many-to-one column="USER_ID"
156      * class="com.j2biz.blogunity.pojo.User"
157      *
158      *
159      * @return Returns the user.
160      */

161     public User getUser() {
162         return user;
163     }
164
165     /**
166      * @param user
167      * The user to set.
168      */

169     public void setUser(User user) {
170         this.user = user;
171     }
172
173     /**
174      * @hibernate.property name="createTime" column="CREATE_TIME"
175      * type="date" not-null="true" unique="false"
176      *
177      * @return Returns the createTime.
178      */

179     public Date JavaDoc getCreateTime() {
180         return createTime;
181     }
182
183     /**
184      * @param createTime
185      * The createTime to set.
186      */

187     public void setCreateTime(Date JavaDoc createTime) {
188         this.createTime = createTime;
189     }
190 }
Popular Tags