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: AttendeeDO.java,v $
031: * Revision 1.7 2005/10/11 18:58:59 colinmacleod
032: * Fixed some checkstyle and javadoc issues.
033: *
034: * Revision 1.6 2005/10/02 14:08:56 colinmacleod
035: * Added/improved log4j logging.
036: *
037: * Revision 1.5 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.4 2005/09/14 15:12:20 colinmacleod
042: * Added serialVersionUID.
043: *
044: * Revision 1.3 2005/04/10 20:09:41 colinmacleod
045: * Added new themes.
046: * Changed id type to String.
047: * Changed i tag to em and b tag to strong.
048: * Improved PicoContainerFactory with NanoContainer scripts.
049: *
050: * Revision 1.2 2005/04/09 17:19:17 colinmacleod
051: * Changed copyright text to GPL v2 explicitly.
052: *
053: * Revision 1.1.1.1 2005/03/10 17:47:46 colinmacleod
054: * Restructured ivata op around Hibernate/PicoContainer.
055: * Renamed ivata groupware.
056: *
057: * Revision 1.1 2004/07/13 19:42:13 colinmacleod
058: * Moved project to POJOs from EJBs.
059: * Applied PicoContainer to services layer (replacing session EJBs).
060: * Applied Hibernate to persistence layer (replacing entity EJBs).
061: *
062: * Revision 1.3 2004/03/21 21:16:22 colinmacleod
063: * Shortened name to ivata op.
064: *
065: * Revision 1.2 2004/02/01 22:07:29 colinmacleod
066: * Added full names to author tags
067: *
068: * Revision 1.1.1.1 2004/01/27 20:58:20 colinmacleod
069: * Moved ivata openportal to SourceForge..
070: *
071: * Revision 1.5 2003/11/03 11:28:48 jano
072: * commiting calendar,
073: * tryinjg to fix deploying problem
074: *
075: * Revision 1.4 2003/10/28 13:10:23 jano
076: * commiting calendar,
077: * still fixing compile and building openGroupware project
078: *
079: * Revision 1.3 2003/10/15 14:03:06 jano
080: * converting to XDoclet
081: *
082: * Revision 1.2 2003/10/15 13:57:23 colin
083: * fixing for XDoclet
084: *
085: * Revision 1.3 2003/05/01 12:13:22 jano
086: * tidy up names of sequeneces
087: *
088: * Revision 1.2 2003/02/25 14:38:13 colin
089: * implemented setModified methods on entity beans thro IvataEntityBean
090: * superclass
091: *
092: * Revision 1.1 2003/02/24 19:09:21 colin
093: * moved to business
094: *
095: * Revision 1.9 2003/02/04 17:41:57 colin
096: * copyright notice
097: *
098: * Revision 1.8 2002/09/10 09:05:44 jano
099: * fixing ejbCreate method
100: *
101: * Revision 1.6 2002/08/14 09:25:00 jano
102: * *** empty log message ***
103: *
104: * Revision 1.5 2002/07/15 11:59:25 jano
105: * added property DAYEVENT to EventBean
106: *
107: * Revision 1.4 2002/07/05 10:29:10 colin
108: * changes trying to move project to jano
109: *
110: * Revision 1.3 2002/07/04 12:28:04 colin
111: * resolved conficts
112: *
113: * Revision 1.2 2002/07/04 12:11:34 jano
114: * *** empty log message ***
115: *
116: * Revision 1.1 2002/06/21 12:45:26 colin
117: * restructured com.ivata.groupware.web
118: * -----------------------------------------------------------------------------
119: */
120: package com.ivata.groupware.business.calendar.event.meeting.attendee;
121:
122: import org.apache.log4j.Logger;
123:
124: import com.ivata.groupware.business.addressbook.person.PersonDO;
125: import com.ivata.groupware.business.calendar.event.meeting.MeetingDO;
126: import com.ivata.groupware.container.persistence.BaseDO;
127:
128: /**
129: * <p>Every meeting in ivata groupware may have many attendees, each of whom may
130: * or may not be intranet users themselves. This class records which of the
131: * invited attendees have confirmed they will attend.</p>
132: *
133: * @since 2002-06-18
134: * @author Colin MacLeod
135: * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
136: * @version $Revision: 1.7 $
137: *
138: * @hibernate.class
139: * table="meeting_attendee"
140: * @hibernate.cache
141: * usage="read-write"
142: */
143: public class AttendeeDO extends BaseDO {
144: /**
145: * Logger for this class.
146: */
147: private static final Logger logger = Logger
148: .getLogger(AttendeeDO.class);
149:
150: /**
151: * Serialization version (for <code>Serializable</code> interface).
152: */
153: private static final long serialVersionUID = 1L;
154:
155: /**
156: * <p>
157: * Find out whether or not this attendess has confirmed s/he will
158: * attend.
159: * </p>
160: */
161: private boolean confirmed;
162:
163: /**
164: * <p>The meeting this attendee refers to.</p>
165: */
166: private MeetingDO meeting;
167:
168: /**
169: * <p>Person who should attend.</p>
170: */
171: private PersonDO person;
172:
173: /**
174: * <p>
175: * Find out whether or not this attendess has confirmed s/he will attend.
176: * </p>
177: *
178: * @return <code>true</code> if the attendee will attend, otherwise
179: * <code>false</code>.
180: *
181: * @hibernate.property
182: */
183: public final boolean getConfirmed() {
184: if (logger.isDebugEnabled()) {
185: logger.debug("getConfirmed() - start");
186: }
187:
188: if (logger.isDebugEnabled()) {
189: logger.debug("getConfirmed() - end - return value = "
190: + confirmed);
191: }
192: return confirmed;
193: }
194:
195: /**
196: * <p>Get the meeting this attendee refers to.</p>
197: *
198: * @return the meeting this attendee refers to.
199: *
200: * @hibernate.many-to-one
201: * class = com.ivata.groupware.business.calendar.event.EventDO
202: */
203: public final MeetingDO getMeeting() {
204: if (logger.isDebugEnabled()) {
205: logger.debug("getMeeting() - start");
206: }
207:
208: if (logger.isDebugEnabled()) {
209: logger.debug("getMeeting() - end - return value = "
210: + meeting);
211: }
212: return meeting;
213: }
214:
215: /**
216: * <p>Get person who should attend.</p>
217: *
218: * @return person who should attend.
219: *
220: * @hibernate.many-to-one
221: */
222: public PersonDO getPerson() {
223: if (logger.isDebugEnabled()) {
224: logger.debug("getPerson() - start");
225: }
226:
227: if (logger.isDebugEnabled()) {
228: logger
229: .debug("getPerson() - end - return value = "
230: + person);
231: }
232: return person;
233: }
234:
235: /**
236: * <p>Set whether or not this attendess has confirmed s/he will attend.</p>
237: *
238: * @param confirmedParam <code>true</code> if the attendee will attend,
239: * otherwise <code>false</code>.
240: */
241: public final void setConfirmed(final boolean confirmedParam) {
242: if (logger.isDebugEnabled()) {
243: logger.debug("setConfirmed(boolean confirmed = "
244: + confirmedParam + ") - start");
245: }
246:
247: checkSetter();
248: this .confirmed = confirmedParam;
249:
250: if (logger.isDebugEnabled()) {
251: logger.debug("setConfirmed(boolean) - end");
252: }
253: }
254:
255: /**
256: * <p>Set the meeting this attendee refers to.</p>
257: *
258: * @param meetingParam meeting this attendee refers to.
259: */
260: public final void setMeeting(final MeetingDO meetingParam) {
261: if (logger.isDebugEnabled()) {
262: logger.debug("setMeeting(MeetingDO meeting = "
263: + meetingParam + ") - start");
264: }
265:
266: checkSetter();
267: this .meeting = meetingParam;
268:
269: if (logger.isDebugEnabled()) {
270: logger.debug("setMeeting(MeetingDO) - end");
271: }
272: }
273:
274: /**
275: * <p>Set person who should attend.</p>
276: *
277: * @param personParam person who should attend.
278: */
279: public final void setPerson(final PersonDO personParam) {
280: if (logger.isDebugEnabled()) {
281: logger.debug("setPerson(PersonDO person = " + personParam
282: + ") - start");
283: }
284:
285: checkSetter();
286: this .person = personParam;
287:
288: if (logger.isDebugEnabled()) {
289: logger.debug("setPerson(PersonDO) - end");
290: }
291: }
292: }
|