KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ivata > groupware > business > search > item > SearchItemDO


1 /*
2  * Copyright (c) 2001 - 2005 ivata limited.
3  * All rights reserved.
4  * -----------------------------------------------------------------------------
5  * ivata groupware may be redistributed under the GNU General Public
6  * License as published by the Free Software Foundation;
7  * version 2 of the License.
8  *
9  * These programs are free software; you can redistribute them and/or
10  * modify them under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; version 2 of the License.
12  *
13  * These programs are distributed in the hope that they will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  * See the GNU General Public License in the file LICENSE.txt for more
18  * details.
19  *
20  * If you would like a copy of the GNU General Public License write to
21  *
22  * Free Software Foundation, Inc.
23  * 59 Temple Place - Suite 330
24  * Boston, MA 02111-1307, USA.
25  *
26  *
27  * To arrange commercial support and licensing, contact ivata at
28  * http://www.ivata.com/contact.jsp
29  * -----------------------------------------------------------------------------
30  * $Log: SearchItemDO.java,v $
31  * Revision 1.4 2005/04/29 02:48:20 colinmacleod
32  * Data bugfixes.
33  * Changed primary key back to Integer.
34  *
35  * Revision 1.3 2005/04/10 20:09:48 colinmacleod
36  * Added new themes.
37  * Changed id type to String.
38  * Changed i tag to em and b tag to strong.
39  * Improved PicoContainerFactory with NanoContainer scripts.
40  *
41  * Revision 1.2 2005/04/09 17:19:55 colinmacleod
42  * Changed copyright text to GPL v2 explicitly.
43  *
44  * Revision 1.1.1.1 2005/03/10 17:52:38 colinmacleod
45  * Restructured ivata op around Hibernate/PicoContainer.
46  * Renamed ivata groupware.
47  *
48  * Revision 1.2 2004/09/30 15:02:08 colinmacleod
49  * Fixed hibernate tags.
50  *
51  * Revision 1.1 2004/08/01 11:40:30 colinmacleod
52  * Moved search classes to separate subproject.
53  *
54  * -----------------------------------------------------------------------------
55  */

56 package com.ivata.groupware.business.search.item;
57
58
59 import java.util.Set JavaDoc;
60
61 import com.ivata.groupware.container.persistence.BaseDO;
62
63
64 /**
65  * <p>
66  * Each item which can be queried as a result of a search is abstracted by an
67  * instance of this class.
68  * </p>
69  *
70  * @since 2004-07-31
71  * @author Colin MacLeod
72  * <a HREF='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
73  * @version $Revision: 1.4 $
74  *
75  * @hibernate.class
76  * table="search_item"
77  * @hibernate.cache
78  * usage="read-write"
79  */

80 public class SearchItemDO extends BaseDO {
81     /**
82      * <p>
83      * Extra string to describe the category or topic associated with the indexed
84      * object. Used in conjunction with <code>type</code> and
85      * <code>targetId</code> to uniquely identify the target.
86      * </p>
87      */

88     private String JavaDoc category;
89
90     /**
91      * <p>
92      * Refers to all the indexed contents of this item.
93      * </p>
94      */

95     private Set JavaDoc contents;
96
97     /**
98      * <p>
99      * Unique identifier of the object being indexed.
100      * </p>
101      */

102     private Integer JavaDoc targetId;
103     /**
104      * <p>
105      * This is a text to describe the type of the object being indexed. In
106      * <strong>ivata groupware</strong>, this always refers to the class of the
107      * indexed object.
108      * </p>
109      */

110     private String JavaDoc type;
111
112     /**
113      * <p>
114      * Extra string to describe the category or topic associated with the indexed
115      * object. Used in conjunction with <code>type</code> and
116      * <code>targetId</code> to uniquely identify the target.
117      * </p>
118      *
119      * @return Returns the category.
120      * @hibernate.property
121      */

122     public final String JavaDoc getCategory() {
123         return category;
124     }
125     /**
126      * <p>
127      * Refers to all the indexed contents of this item.
128      * </p>
129      *
130      * @hibernate.set
131      * cascade="all"
132      * @hibernate.collection-key
133      * column="search_item"
134      * @hibernate.collection-one-to-many
135      * class="com.ivata.groupware.business.library.page.PageDO"
136      * @return Returns the contents.
137      */

138     public final Set JavaDoc getContents() {
139         return contents;
140     }
141
142     /**
143      * <p>
144      * Unique identifier of the object being indexed.
145      * </p>
146      *
147      * @return Returns the targetId.
148      * @hibernate.property
149      * column="target_id"
150      */

151     public final Integer JavaDoc getTargetId() {
152         return targetId;
153     }
154     /**
155      * <p>
156      * This is a text to describe the type of the object being indexed. In
157      * <strong>ivata groupware</strong>, this always refers to the class of the
158      * indexed object.
159      * </p>
160      *
161      * @return Returns the type.
162      * @hibernate.property
163      */

164     public final String JavaDoc getType() {
165         return type;
166     }
167     /**
168      * <p>
169      * Extra string to describe the category or topic associated with the indexed
170      * object. Used in conjunction with <code>type</code> and
171      * <code>targetId</code> to uniquely identify the target.
172      * </p>
173      *
174      * @param category The category to set.
175      */

176     public final void setCategory(final String JavaDoc category) {
177         this.category = category;
178     }
179     /**
180      * <p>
181      * Refers to all the indexed contents of this item.
182      * </p>
183      *
184      * @param contents The contents to set.
185      */

186     public final void setContents(final Set JavaDoc contents) {
187         this.contents = contents;
188     }
189     /**
190      * <p>
191      * Unique identifier of the object being indexed.
192      * </p>
193      *
194      * @param targetId The targetId to set.
195      */

196     public final void setTargetId(final Integer JavaDoc targetId) {
197         this.targetId = targetId;
198     }
199     /**
200      * <p>
201      * This is a text to describe the type of the object being indexed. In
202      * <strong>ivata groupware</strong>, this always refers to the class of the
203      * indexed object.
204      * </p>
205      *
206      * @param type The type to set.
207      */

208     public final void setType(final String JavaDoc type) {
209         this.type = type;
210     }
211 }
212
Popular Tags