001: /*
002: * Copyright (c) 2001 - 2005 ivata limited.
003: * All rights reserved.
004: * -----------------------------------------------------------------------------
005: * ivata groupware may be redistributed under the GNU General Public
006: * License as published by the Free Software Foundation;
007: * version 2 of the License.
008: *
009: * These programs are free software; you can redistribute them and/or
010: * modify them under the terms of the GNU General Public License
011: * as published by the Free Software Foundation; version 2 of the License.
012: *
013: * These programs are distributed in the hope that they will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016: *
017: * See the GNU General Public License in the file LICENSE.txt for more
018: * details.
019: *
020: * If you would like a copy of the GNU General Public License write to
021: *
022: * Free Software Foundation, Inc.
023: * 59 Temple Place - Suite 330
024: * Boston, MA 02111-1307, USA.
025: *
026: *
027: * To arrange commercial support and licensing, contact ivata at
028: * http://www.ivata.com/contact.jsp
029: * -----------------------------------------------------------------------------
030: * $Log: MeetingDO.java,v $
031: * Revision 1.6 2005/10/11 18:56:34 colinmacleod
032: * Fixed some checkstyle and javadoc issues.
033: *
034: * Revision 1.5 2005/10/02 14:08:56 colinmacleod
035: * Added/improved log4j logging.
036: *
037: * Revision 1.4 2005/09/29 13:22:45 colinmacleod
038: * Added read-only functionality to data object classes (with a check on each
039: * setter).
040: *
041: * Revision 1.3 2005/09/14 15:12:19 colinmacleod
042: * Added serialVersionUID.
043: *
044: * Revision 1.2 2005/04/09 17:19:16 colinmacleod
045: * Changed copyright text to GPL v2 explicitly.
046: *
047: * Revision 1.1.1.1 2005/03/10 17:47:46 colinmacleod
048: * Restructured ivata op around Hibernate/PicoContainer.
049: * Renamed ivata groupware.
050: *
051: * Revision 1.1 2004/07/13 19:42:13 colinmacleod
052: * Moved project to POJOs from EJBs.
053: * Applied PicoContainer to services layer (replacing session EJBs).
054: * Applied Hibernate to persistence layer (replacing entity EJBs).
055: *
056: * Revision 1.3 2004/03/21 21:16:22 colinmacleod
057: * Shortened name to ivata op.
058: *
059: * Revision 1.2 2004/02/01 22:07:29 colinmacleod
060: * Added full names to author tags
061: *
062: * Revision 1.1.1.1 2004/01/27 20:58:20 colinmacleod
063: * Moved ivata openportal to SourceForge..
064: *
065: * Revision 1.3 2004/01/19 21:13:14 colin
066: * Removed minutes for ivata groupware v0.9
067: *
068: * Revision 1.2 2003/10/15 13:57:23 colin
069: * fixing for XDoclet
070: *
071: * Revision 1.1 2003/02/24 19:09:21 colin
072: * moved to business
073: *
074: * Revision 1.11 2003/02/13 08:45:42 colin
075: * conversion to Struts/popups
076: *
077: * Revision 1.10 2003/02/04 17:41:57 colin
078: * copyright notice
079: *
080: * Revision 1.9 2002/10/24 10:00:28 peter
081: * added libraryItemTopic field
082: *
083: * Revision 1.8 2002/10/22 08:24:19 peter
084: * added libraryItemId field
085: *
086: * Revision 1.7 2002/10/14 16:00:48 colin
087: * changed checkLibraryItemExist to checkLibraryItemExists
088: *
089: * Revision 1.6 2002/09/10 08:21:12 jano
090: * field libraryItemExist was add, its information if we allready have minutes
091: * for that meeting, it's mean article
092: *
093: * Revision 1.5 2002/09/09 14:28:57 jano
094: * libraryItemId did add to meetingDO|
095: *
096: * Revision 1.4 2002/09/03 15:05:59 jano
097: * i don't know
098: *
099: * Revision 1.3 2002/08/16 13:38:57 jano
100: * *** empty log message ***
101: *
102: * Revision 1.2 2002/08/07 16:18:55 jano
103: * *** empty log message ***
104: *
105: * Revision 1.1 2002/06/21 12:45:01 colin
106: * restructured com.ivata.groupware.web
107: * -----------------------------------------------------------------------------
108: */
109: package com.ivata.groupware.business.calendar.event.meeting;
110:
111: import org.apache.log4j.Logger;
112:
113: import java.util.Set;
114:
115: import com.ivata.groupware.business.addressbook.person.PersonDO;
116: import com.ivata.groupware.business.calendar.event.EventDO;
117:
118: /**
119: * <p>Represents a meeting which takes place in the organization. This is
120: * responsible for storing the details of the meeting, and interacting with the
121: * library to create the minutes and agenda.</p>
122: *
123: * @since 2002-06-18
124: * @author Colin MacLeod
125: * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
126: * @version $Revision: 1.6 $
127: * @see MeetingBean
128: *
129: * @hibernate.joined-subclass
130: * table="meeting"
131: * @hibernate.joined-subclass-key
132: * column="calendar_event"
133: */
134: public class MeetingDO extends EventDO {
135: /**
136: * Logger for this class.
137: */
138: private static final Logger logger = Logger
139: .getLogger(MeetingDO.class);
140:
141: /**
142: * Serialization version (for <code>Serializable</code> interface).
143: */
144: private static final long serialVersionUID = 1L;
145:
146: /**
147: * <p>Stores all people who will attend the meeting.</p>
148: */
149: private Set attendees;
150:
151: /**
152: * <p>Stores categories of meeting minutes.</p>
153: */
154: private Set categories;
155:
156: /**
157: * <p>Stores person in charge of the meeting.</p>
158: */
159: private PersonDO chairPerson;
160:
161: /**
162: * <p>Stores the client-specific text describing the location of the
163: * meeting.</p>
164: */
165: private String location;
166:
167: /**
168: * <p>Get all people who will attend the meeting.</p>
169: *
170: * @return people who will attend the meeting.
171: *
172: * @nosuch.hibernate.set
173: * @nosuch.hibernate.collection-key
174: * column="meeting"
175: * @nosuch.hibernate.collection-one-to-many
176: * class="com.ivata.groupware.business.calendar.event.meeting.attendee
177: * .AttendeeDO"
178: */
179: public final Set getAttendees() {
180: if (logger.isDebugEnabled()) {
181: logger.debug("getAttendees() - start");
182: }
183:
184: if (logger.isDebugEnabled()) {
185: logger.debug("getAttendees() - end - return value = "
186: + attendees);
187: }
188: return attendees;
189: }
190:
191: /**
192: * <p>Get all meeting categories.</p>
193: *
194: * @return all meeting categories.
195: *
196: * @nosuch.hibernate.set
197: * @nosuch.hibernate.collection-key
198: * column="meeting"
199: * @nosuch.hibernate.collection-one-to-many
200: * class="com.ivata.groupware.business.calendar.event.meeting.category
201: * .MeetingCategoryDO"
202: */
203: public final Set getCategories() {
204: if (logger.isDebugEnabled()) {
205: logger.debug("getCategories() - start");
206: }
207:
208: if (logger.isDebugEnabled()) {
209: logger.debug("getCategories() - end - return value = "
210: + categories);
211: }
212: return categories;
213: }
214:
215: /**
216: * <p>Get the person who is in charge of the meeting.</p>
217: *
218: * @return current value of the person in charge of the meeting.
219: * @hibernate.many-to-one
220: * column="chair_person"
221: */
222: public PersonDO getChairPerson() {
223: if (logger.isDebugEnabled()) {
224: logger.debug("getChairPerson() - start");
225: }
226:
227: if (logger.isDebugEnabled()) {
228: logger.debug("getChairPerson() - end - return value = "
229: + chairPerson);
230: }
231: return chairPerson;
232: }
233:
234: /**
235: * <p>Get the location of the meeting.</p>
236: *
237: * @return current value of client-specific location text.
238: * @hibernate.property
239: */
240: public final String getLocation() {
241: if (logger.isDebugEnabled()) {
242: logger.debug("getLocation() - start");
243: }
244:
245: if (logger.isDebugEnabled()) {
246: logger.debug("getLocation() - end - return value = "
247: + location);
248: }
249: return location;
250: }
251:
252: /**
253: * <p>Set all people who will attend the meeting.</p>
254: *
255: * @param attendeesParam People who will attend the meeting.
256: */
257: public final void setAttendees(final Set attendeesParam) {
258: if (logger.isDebugEnabled()) {
259: logger.debug("setAttendees(Set attendees = "
260: + attendeesParam + ") - start");
261: }
262:
263: checkSetter();
264: this .attendees = attendeesParam;
265:
266: if (logger.isDebugEnabled()) {
267: logger.debug("setAttendees(Set) - end");
268: }
269: }
270:
271: /**
272: * <p>Set all of meeting categories.</p>
273: *
274: * @param categoriesParam new value of category names.
275: */
276: public final void setCategories(final Set categoriesParam) {
277: if (logger.isDebugEnabled()) {
278: logger.debug("setCategories(Set categories = "
279: + categoriesParam + ") - start");
280: }
281:
282: checkSetter();
283: this .categories = categoriesParam;
284:
285: if (logger.isDebugEnabled()) {
286: logger.debug("setCategories(Set) - end");
287: }
288: }
289:
290: /**
291: * <p>Set the person who is in charge of the meeting.</p>
292: *
293: * @param chairPersonParam new value of the person in
294: * charge of the meeting.
295: */
296: public final void setChairPerson(final PersonDO chairPersonParam) {
297: if (logger.isDebugEnabled()) {
298: logger.debug("setChairPerson(PersonDO chairPerson = "
299: + chairPersonParam + ") - start");
300: }
301:
302: checkSetter();
303: this .chairPerson = chairPersonParam;
304:
305: if (logger.isDebugEnabled()) {
306: logger.debug("setChairPerson(PersonDO) - end");
307: }
308: }
309:
310: /**
311: * <p>Set the location of the meeting.</p>
312: *
313: * @param locationParam new value of client-specific location text.
314: */
315: public final void setLocation(final String locationParam) {
316: if (logger.isDebugEnabled()) {
317: logger.debug("setLocation(String location = "
318: + locationParam + ") - start");
319: }
320:
321: checkSetter();
322: this .location = locationParam;
323:
324: if (logger.isDebugEnabled()) {
325: logger.debug("setLocation(String) - end");
326: }
327: }
328: }
|