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: MeetingCategoryDO.java,v $
031: * Revision 1.7 2005/10/11 18:58:58 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:42 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:35 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.2 2003/02/25 14:38:13 colin
086: * implemented setModified methods on entity beans thro IvataEntityBean
087: * superclass
088: *
089: * Revision 1.1 2003/02/24 19:09:21 colin
090: * moved to business
091: *
092: * Revision 1.8 2003/02/04 17:41:57 colin
093: * copyright notice
094: *
095: * Revision 1.7 2002/09/10 09:12:31 jano
096: * fixing ejbCreate method
097: *
098: * Revision 1.5 2002/07/15 11:59:25 jano
099: * added property DAYEVENT to EventBean
100: *
101: * Revision 1.4 2002/07/05 10:29:10 colin
102: * changes trying to move project to jano
103: *
104: * Revision 1.3 2002/07/04 12:42:04 colin
105: * resolved conflicts in cvs
106: *
107: * Revision 1.2 2002/07/04 12:11:34 jano
108: * *** empty log message ***
109: *
110: * Revision 1.1 2002/06/21 12:45:37 colin
111: * restructured com.ivata.groupware.web
112: * -----------------------------------------------------------------------------
113: */
114: package com.ivata.groupware.business.calendar.event.meeting.category;
115:
116: import org.apache.log4j.Logger;
117:
118: import java.util.Set;
119:
120: import com.ivata.groupware.business.calendar.event.meeting.MeetingDO;
121: import com.ivata.groupware.container.persistence.BaseDO;
122: import com.ivata.groupware.container.persistence.NamedDO;
123:
124: /**
125: * <p>The many agenda points which make up the meeting are grouped into
126: * categories by this class.</p>
127: *
128: * @since 2002-06-18
129: * @author Colin MacLeod
130: * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
131: * @version $Revision: 1.7 $
132: *
133: * @hibernate.class
134: * table="meeting_category"
135: * @hibernate.cache
136: * usage="read-write"
137: */
138: public class MeetingCategoryDO extends BaseDO implements NamedDO {
139: /**
140: * Logger for this class.
141: */
142: private static final Logger logger = Logger
143: .getLogger(MeetingCategoryDO.class);
144:
145: /**
146: * Serialization version (for <code>Serializable</code> interface).
147: */
148: private static final long serialVersionUID = 1L;
149:
150: /**
151: * <p>The agenda points contained int his category.</p>
152: */
153: private Set agendaPoints;
154:
155: /**
156: * <p>The meeting this category refers to.</p>
157: */
158: private MeetingDO meeting;
159: /**
160: * <p>Name of this meeting category.</p>
161: */
162: private String name;
163:
164: /**
165: * <p>Get the agenda points contained int his category.</p>
166: *
167: * @return the agenda points contained int his category.
168: *
169: * @hibernate.set
170: * @hibernate.collection-key
171: * column="category"
172: * @hibernate.collection-one-to-many
173: * class="com.ivata.groupware.business.calendar.event.meeting.agendapoint
174: * .AgendaPointDO"
175: */
176: public final Set getAgendaPoints() {
177: if (logger.isDebugEnabled()) {
178: logger.debug("getAgendaPoints() - start");
179: }
180:
181: if (logger.isDebugEnabled()) {
182: logger.debug("getAgendaPoints() - end - return value = "
183: + agendaPoints);
184: }
185: return agendaPoints;
186: }
187:
188: /**
189: * <p>Get the meeting this category refers to.</p>
190: *
191: * @return the meeting this category refers to.
192: *
193: * @hibernate.many-to-one
194: */
195: public final MeetingDO getMeeting() {
196: if (logger.isDebugEnabled()) {
197: logger.debug("getMeeting() - start");
198: }
199:
200: if (logger.isDebugEnabled()) {
201: logger.debug("getMeeting() - end - return value = "
202: + meeting);
203: }
204: return meeting;
205: }
206:
207: /**
208: * <p>Get the name of this meeting category.</p>
209: *
210: * @return name of this meeting category
211: *
212: * @hibernate.property
213: */
214: public final String getName() {
215: if (logger.isDebugEnabled()) {
216: logger.debug("getName() - start");
217: }
218:
219: if (logger.isDebugEnabled()) {
220: logger.debug("getName() - end - return value = " + name);
221: }
222: return name;
223: }
224:
225: /**
226: * <p>Aet the agenda points contained int his category.</p>
227: *
228: * @param agendaPointsParam the agenda points contained int his category.
229: */
230: public final void setAgendaPoints(final Set agendaPointsParam) {
231: if (logger.isDebugEnabled()) {
232: logger.debug("setAgendaPoints(Set agendaPoints = "
233: + agendaPointsParam + ") - start");
234: }
235:
236: checkSetter();
237: this .agendaPoints = agendaPointsParam;
238:
239: if (logger.isDebugEnabled()) {
240: logger.debug("setAgendaPoints(Set) - end");
241: }
242: }
243:
244: /**
245: * <p>Set the meeting this category refers to.</p>
246: *
247: * @param meetingParam the meeting this category refers to.
248: */
249: public final void setMeeting(final MeetingDO meetingParam) {
250: if (logger.isDebugEnabled()) {
251: logger.debug("setMeeting(MeetingDO meeting = "
252: + meetingParam + ") - start");
253: }
254:
255: checkSetter();
256: this .meeting = meetingParam;
257:
258: if (logger.isDebugEnabled()) {
259: logger.debug("setMeeting(MeetingDO) - end");
260: }
261: }
262:
263: /**
264: * <p>Set the name of this meeting category.</p>
265: *
266: * @param nameParam name of this meeting category
267: */
268: public final void setName(final String nameParam) {
269: if (logger.isDebugEnabled()) {
270: logger.debug("setName(String name = " + nameParam
271: + ") - start");
272: }
273:
274: checkSetter();
275: this .name = nameParam;
276:
277: if (logger.isDebugEnabled()) {
278: logger.debug("setName(String) - end");
279: }
280: }
281: }
|