KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * $Id: Link.java,v 1.4 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
30 /**
31  * @hibernate.class table="BLOG_LINKS" dynamic-insert = "true"
32  * dynamic-update = "true"
33  *
34  * @author michelson
35  * @version $$
36  * @since 0.1
37  *
38  *
39  */

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

45     private static final long serialVersionUID = 3618697487452615737L;
46
47     private Long JavaDoc id;
48
49     private String JavaDoc name;
50
51     private String JavaDoc url;
52
53     private Blog blog;
54
55     private int order = 0;
56
57     public Link() {
58
59     }
60
61     public Link(String JavaDoc name, String JavaDoc url, int order) {
62         this.name = name;
63         this.url = url;
64         this.order = order;
65     }
66
67     /**
68      * @hibernate.id generator-class="increment" type="long"
69      * column="ID" unsaved-value="null"
70      *
71      * @return Returns the id.
72      */

73     public Long JavaDoc getId() {
74         return id;
75     }
76
77     /**
78      * @param id
79      * The id to set.
80      */

81     public void setId(Long JavaDoc id) {
82         this.id = id;
83     }
84
85     /**
86      * @hibernate.property name="name" column="NAME" type="string"
87      * not-null="true" unique="false"
88      *
89      * @return Returns the name.
90      */

91     public String JavaDoc getName() {
92         return name;
93     }
94
95     /**
96      * @param name
97      * The name to set.
98      */

99     public void setName(String JavaDoc name) {
100         this.name = name;
101     }
102
103     /**
104      * @hibernate.property name="url" column="URL" type="string"
105      * not-null="true" unique="false"
106      *
107      * @return Returns the url.
108      */

109     public String JavaDoc getUrl() {
110         return url;
111     }
112
113     /**
114      * @param url
115      * The url to set.
116      */

117     public void setUrl(String JavaDoc url) {
118         this.url = url;
119     }
120
121     /**
122      * @hibernate.many-to-one column="BLOG_ID"
123      * class="com.j2biz.blogunity.pojo.Blog"
124      *
125      *
126      * @return Returns the blog.
127      */

128     public Blog getBlog() {
129         return blog;
130     }
131
132     /**
133      * @param blog
134      * The blog to set.
135      */

136     public void setBlog(Blog blog) {
137         this.blog = blog;
138     }
139
140     /**
141      * @hibernate.property name="order" column="ORDER_LEVEL" type="integer"
142      * not-null="true" unique="false"
143      *
144      * @return Returns the order.
145      */

146     public int getOrder() {
147         return order;
148     }
149
150     /**
151      * @param order
152      * The order to set.
153      */

154     public void setOrder(int order) {
155         this.order = order;
156     }
157 }
Popular Tags