KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > nava > informa > impl > hibernate > TextInput


1 //
2
// Informa -- RSS Library for Java
3
// Copyright (c) 2002 by Niko Schmuck
4
//
5
// Niko Schmuck
6
// http://sourceforge.net/projects/informa
7
// mailto:niko_schmuck@users.sourceforge.net
8
//
9
// This library is free software.
10
//
11
// You may redistribute it and/or modify it under the terms of the GNU
12
// Lesser General Public License as published by the Free Software Foundation.
13
//
14
// Version 2.1 of the license should be included with this distribution in
15
// the file LICENSE. If the license is not included with this distribution,
16
// you may find a copy at the FSF web site at 'www.gnu.org' or 'www.fsf.org',
17
// or you may write to the Free Software Foundation, 675 Mass Ave, Cambridge,
18
// MA 02139 USA.
19
//
20
// This library is distributed in the hope that it will be useful,
21
// but WITHOUT ANY WARRANTY; without even the implied waranty of
22
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
// Lesser General Public License for more details.
24
//
25

26
27 // $Id: TextInput.java,v 1.3 2003/09/29 14:27:34 mharhen Exp $
28

29 package de.nava.informa.impl.hibernate;
30
31 import java.net.URL JavaDoc;
32 import de.nava.informa.core.TextInputIF;
33
34 /**
35  * Hibernate implementation of the TextInputIF interface.
36  *
37  * @author Niko Schmuck (niko@nava.de)
38  *
39  * @hibernate.class
40  * table="TEXTINPUTS"
41  */

42 public class TextInput implements TextInputIF, java.io.Serializable JavaDoc {
43
44   private int id;
45   private String JavaDoc title;
46   private String JavaDoc description;
47   private String JavaDoc name;
48   private URL JavaDoc link;
49
50   public TextInput() {
51     this("[Unknown TextInput]", null, null, null);
52   }
53
54   public TextInput(String JavaDoc title, String JavaDoc description, String JavaDoc name, URL JavaDoc link) {
55     this.title = title;
56     this.description = description;
57     this.name = name;
58     this.link = link;
59   }
60
61   /**
62    * @hibernate.id
63    * column="TEXTINPUT_ID"
64    * generator-class="native"
65    * type="integer"
66    */

67   public int getIntId() {
68     return id;
69   }
70
71   public void setIntId(int id) {
72     this.id = id;
73   }
74
75   public long getId() {
76     return id;
77   }
78
79   public void setId(long longid) {
80     this.id = (int) longid;
81   }
82
83   // --------------------------------------------------------------
84
// implementation of TextInputIF interface
85
// --------------------------------------------------------------
86

87   /**
88    * @hibernate.property
89    * column="TITLE"
90    * not-null="true"
91    */

92   public String JavaDoc getTitle() {
93     return title;
94   }
95
96   public void setTitle(String JavaDoc title) {
97     this.title = title;
98   }
99
100   /**
101    * @hibernate.property
102    * column="DESCRIPTION"
103    */

104   public String JavaDoc getDescription() {
105     return description;
106   }
107
108   public void setDescription(String JavaDoc description) {
109     this.description = description;
110   }
111
112   /**
113    * @hibernate.property
114    * column="NAME"
115    */

116   public String JavaDoc getName() {
117     return name;
118   }
119
120   public void setName(String JavaDoc name) {
121     this.name = name;
122   }
123
124   /**
125    * @hibernate.property
126    * column="LINK"
127    */

128   public URL JavaDoc getLink() {
129     return link;
130   }
131
132   public void setLink(URL JavaDoc link) {
133     this.link = link;
134   }
135
136 }
137
Popular Tags