KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ivata > groupware > business > calendar > event > EventDO


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: EventDO.java,v $
31  * Revision 1.3 2005/04/10 20:09:41 colinmacleod
32  * Added new themes.
33  * Changed id type to String.
34  * Changed i tag to em and b tag to strong.
35  * Improved PicoContainerFactory with NanoContainer scripts.
36  *
37  * Revision 1.2 2005/04/09 17:19:16 colinmacleod
38  * Changed copyright text to GPL v2 explicitly.
39  *
40  * Revision 1.1.1.1 2005/03/10 17:47:45 colinmacleod
41  * Restructured ivata op around Hibernate/PicoContainer.
42  * Renamed ivata groupware.
43  *
44  * Revision 1.4 2004/11/03 15:49:50 colinmacleod
45  * Changed todo comments to TODO: all caps.
46  *
47  * Revision 1.3 2004/07/13 19:42:12 colinmacleod
48  * Moved project to POJOs from EJBs.
49  * Applied PicoContainer to services layer (replacing session EJBs).
50  * Applied Hibernate to persistence layer (replacing entity EJBs).
51  *
52  * Revision 1.2 2004/03/21 21:16:21 colinmacleod
53  * Shortened name to ivata op.
54  *
55  * Revision 1.1.1.1 2004/01/27 20:58:20 colinmacleod
56  * Moved ivata openportal to SourceForge..
57  *
58  * Revision 1.2 2003/10/15 13:57:23 colin
59  * fixing for XDoclet
60  *
61  * Revision 1.2 2003/03/03 16:42:37 colin
62  * added created, modifiedBy and userName (applied it) to event
63  *
64  * Revision 1.1 2003/02/24 19:09:21 colin
65  * moved to business
66  *
67  * Revision 1.8 2003/02/04 17:41:45 colin
68  * renamed dayevent to allDayEvent
69  *
70  * Revision 1.7 2002/09/06 07:20:00 colin
71  * changed country implementation to new AddressCountry bean
72  *
73  * Revision 1.6 2002/08/02 16:21:13 jano
74  * added Public Holiday
75  *
76  * Revision 1.5 2002/07/30 08:06:58 jano
77  * added field TYPE to Event
78  *
79  * Revision 1.4 2002/07/22 12:59:30 jano
80  * change Calendar to Calendar in EventDO
81  *
82  * Revision 1.3 2002/07/15 11:59:25 jano
83  * added property DAYEVENT to EventBean
84  *
85  * Revision 1.2 2002/07/11 13:10:09 jano
86  * commiting all calendar files for sure
87  *
88  * Revision 1.1 2002/07/05 09:34:28 jano
89  * first version of EventDO
90  * -----------------------------------------------------------------------------
91  */

92 package com.ivata.groupware.business.calendar.event;
93
94 import java.util.Calendar JavaDoc;
95
96 import com.ivata.groupware.container.persistence.TimestampDO;
97
98 /**
99  * <p>Event for Calendar</p>
100  *
101  * @since 2002-07-05
102  * @author Jan Boros <janboros@sourceforge.net>
103  * @author Colin MacLeod
104  * <a HREF='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
105  * @version $Revision: 1.3 $
106  *
107  * @hibernate.class
108  * table="calendar_event"
109  * @hibernate.cache
110  * usage="read-write"
111  */

112 public class EventDO extends TimestampDO {
113     /**
114      * <p>Store whether or not this is an 'all-day' event.</p>
115      */

116     private boolean allDayEvent;
117
118     /**
119      * <p>Store the description with additional information about the event.</p>
120      */

121     private String JavaDoc description;
122
123     /**
124      * <p>Store the finish Calendar/time of the event.</p>
125      */

126     private Calendar JavaDoc finish;
127
128     /**
129      * <p>Store the start Calendar/time of the event.</p>
130      */

131     private Calendar JavaDoc start;
132
133     /**
134      * <p>Store the subject of this event.</p>
135      */

136     private String JavaDoc subject;
137
138     /**
139      * <p>Get the description with additional information about the event.</p>
140      *
141      * @return current value of description.
142      * @hibernate.property
143      */

144     public final String JavaDoc getDescription() {
145         return description;
146     }
147
148     /**
149      * <p>Get the time the event will finish.</p>
150      *
151      * @return time the event will finish.
152      * @hibernate.property
153      */

154     public final Calendar JavaDoc getFinish() {
155         return finish;
156     }
157
158     /**
159      * <p>Get the time the event will start.</p>
160      *
161      * @return time the event will start.
162      * @hibernate.property
163      */

164     public final Calendar JavaDoc getStart() {
165         return start;
166     }
167
168     /**
169      * <p>Get the brief subject describing the purpose of the event.</p>
170      *
171      * @return current value of subject.
172      * @hibernate.property
173      */

174     public final String JavaDoc getSubject() {
175         return subject;
176     }
177
178     /**
179      * <p>Get whether or not this is an 'all-day' event.</p>
180      *
181      * @return <code>true</code> if this is an 'all-day' event,
182      * otherwise <code>false</code>.
183      *
184      * TODO: change the column in the table
185      * @hibernate.property
186      * column="dayevent"
187      */

188     public boolean isAllDayEvent() {
189         return allDayEvent;
190     }
191
192     /**
193      * <p>Set whether or not this is an 'all-day' event.</p>
194      *
195      * @param allDayEvent <code>true</code> if this is an 'all-day' event,
196      * otherwise <code>false</code>.
197      */

198     public final void setAllDayEvent(final boolean allDayEvent) {
199         this.allDayEvent = allDayEvent;
200     }
201
202     /**
203      * <p>Set the description with additional information about the event.</p>
204      *
205      * @param description new value of description.
206      */

207     public final void setDescription(final String JavaDoc description) {
208         this.description = description;
209     }
210
211     /**
212      * <p>Set the time the event will finish.</p>
213      */

214     public final void setFinish(final Calendar JavaDoc finish) {
215         this.finish = finish;
216     }
217
218     /**
219      * <p>Set the time the event will start.</p>
220      *
221      * @param start new time the event will start.
222      */

223     public final void setStart(final Calendar JavaDoc start) {
224         this.start = start;
225     }
226     /**
227      * <p>Set the brief subject describing the purpose of the event.</p>
228      *
229      * @param subject new value of subject.
230      */

231     public final void setSubject(final String JavaDoc subject) {
232         this.subject = subject;
233     }
234
235 }
236
Popular Tags