Source Code Cross Referenced for AreaImpl.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » component » app » messageforums » dao » hibernate » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.sakaiproject.component.app.messageforums.dao.hibernate 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:         * $URL: https://source.sakaiproject.org/svn/msgcntr/trunk/messageforums-hbm/src/java/org/sakaiproject/component/app/messageforums/dao/hibernate/AreaImpl.java $
003:         * $Id: AreaImpl.java 9227 2006-05-15 15:02:42Z cwen@iupui.edu $
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2003, 2004, 2005, 2006, 2007 The Sakai Foundation.
007:         * 
008:         * Licensed under the Educational Community License, Version 1.0 (the "License"); 
009:         * you may not use this file except in compliance with the License. 
010:         * You may obtain a copy of the License at
011:         * 
012:         *      http://www.opensource.org/licenses/ecl1.php
013:         * 
014:         * Unless required by applicable law or agreed to in writing, software 
015:         * distributed under the License is distributed on an "AS IS" BASIS, 
016:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
017:         * See the License for the specific language governing permissions and 
018:         * limitations under the License.
019:         *
020:         **********************************************************************************/package org.sakaiproject.component.app.messageforums.dao.hibernate;
021:
022:        import java.util.HashSet;
023:        import java.util.List;
024:        import java.util.Set;
025:        import java.util.TreeSet;
026:
027:        import org.apache.commons.logging.Log;
028:        import org.apache.commons.logging.LogFactory;
029:        import org.sakaiproject.api.app.messageforums.Area;
030:        import org.sakaiproject.api.app.messageforums.BaseForum;
031:        import org.sakaiproject.api.app.messageforums.DBMembershipItem;
032:
033:        public class AreaImpl extends MutableEntityImpl implements  Area {
034:
035:            private static final Log LOG = LogFactory.getLog(AreaImpl.class);
036:
037:            private String contextId;
038:
039:            private String name;
040:
041:            private Boolean hidden;
042:
043:            private Boolean locked;
044:
045:            private Boolean moderated;
046:
047:            private Boolean enabled;
048:
049:            private String typeUuid;
050:
051:            //private List openForums = new UniqueArrayList();
052:            //private List privateForums = new UniqueArrayList();
053:            //private List discussionForums = new UniqueArrayList();
054:
055:            private Set openForumsSet;// = new HashSet();
056:            private Set privateForumsSet;// = new HashSet();
057:            private Set discussionForumsSet;// = new HashSet();
058:            private Set membershipItemSet;
059:
060:            public void setVersion(Integer version) {
061:                this .version = version;
062:            }
063:
064:            public String getContextId() {
065:                return contextId;
066:            }
067:
068:            public void setContextId(String contextId) {
069:                this .contextId = contextId;
070:            }
071:
072:            public Boolean getHidden() {
073:                return hidden;
074:            }
075:
076:            public void setHidden(Boolean hidden) {
077:                this .hidden = hidden;
078:            }
079:
080:            public String getName() {
081:                return name;
082:            }
083:
084:            public void setName(String name) {
085:                this .name = name;
086:            }
087:
088:            public String getTypeUuid() {
089:                return typeUuid;
090:            }
091:
092:            public void setTypeUuid(String typeUuid) {
093:                this .typeUuid = typeUuid;
094:            }
095:
096:            public Boolean getEnabled() {
097:                return enabled;
098:            }
099:
100:            public void setEnabled(Boolean enabled) {
101:                this .enabled = enabled;
102:            }
103:
104:            public List getOpenForums() {
105:                return Util.setToList(openForumsSet);
106:            }
107:
108:            public void setOpenForums(List openForums) {
109:                this .openForumsSet = Util.listToSet(openForums);
110:            }
111:
112:            public List getPrivateForums() {
113:                return Util.setToList(privateForumsSet);
114:            }
115:
116:            public void setPrivateForums(List privateForums) {
117:                this .privateForumsSet = Util.listToSet(privateForums);
118:            }
119:
120:            public List getDiscussionForums() {
121:                return Util.setToList(discussionForumsSet);
122:            }
123:
124:            public void setDiscussionForums(List discussionForums) {
125:                this .discussionForumsSet = Util.listToSet(discussionForums);
126:            }
127:
128:            public String toString() {
129:                //return "Area.id:" + id;
130:                return "Area/" + id;
131:            }
132:
133:            public Boolean getLocked() {
134:                return locked;
135:            }
136:
137:            public void setLocked(Boolean locked) {
138:                this .locked = locked;
139:            }
140:
141:            public Boolean getModerated() {
142:                return moderated;
143:            }
144:
145:            public void setModerated(Boolean moderated) {
146:                this .moderated = moderated;
147:            }
148:
149:            public Set getDiscussionForumsSet() {
150:                return discussionForumsSet;
151:            }
152:
153:            public void setDiscussionForumsSet(Set discussionForumsSet) {
154:                this .discussionForumsSet = discussionForumsSet;
155:            }
156:
157:            public Set getOpenForumsSet() {
158:                return openForumsSet;
159:            }
160:
161:            public void setOpenForumsSet(Set openForumsSet) {
162:                this .openForumsSet = openForumsSet;
163:            }
164:
165:            public Set getPrivateForumsSet() {
166:                return privateForumsSet;
167:            }
168:
169:            public void setPrivateForumsSet(Set privateForumsSet) {
170:                this .privateForumsSet = privateForumsSet;
171:            }
172:
173:            public Set getMembershipItemSet() {
174:                return membershipItemSet;
175:            }
176:
177:            public void setMembershipItemSet(Set membershipItemSet) {
178:                this .membershipItemSet = membershipItemSet;
179:            }
180:
181:            ////////////////////////////////////////////////////////////////////////
182:            // helper methods for collections
183:            ////////////////////////////////////////////////////////////////////////
184:
185:            public void addPrivateForum(BaseForum forum) {
186:                if (LOG.isDebugEnabled()) {
187:                    LOG.debug("addPrivateForum(forum " + forum + ")");
188:                }
189:
190:                if (forum == null) {
191:                    throw new IllegalArgumentException("forum == null");
192:                }
193:
194:                if (privateForumsSet == null) {
195:                    privateForumsSet = new TreeSet();
196:                }
197:                forum.setArea(this );
198:                privateForumsSet.add(forum);
199:            }
200:
201:            public void removePrivateForum(BaseForum forum) {
202:                if (LOG.isDebugEnabled()) {
203:                    LOG.debug("removePrivateForum(forum " + forum + ")");
204:                }
205:
206:                if (forum == null) {
207:                    throw new IllegalArgumentException(
208:                            "Illegal topic argument passed!");
209:                }
210:
211:                forum.setArea(null);
212:                privateForumsSet.remove(forum);
213:            }
214:
215:            public void addDiscussionForum(BaseForum forum) {
216:                if (LOG.isDebugEnabled()) {
217:                    LOG.debug("addForum(forum " + forum + ")");
218:                }
219:
220:                if (forum == null) {
221:                    throw new IllegalArgumentException("forum == null");
222:                }
223:
224:                if (discussionForumsSet == null) {
225:                    discussionForumsSet = new TreeSet();
226:                }
227:                forum.setArea(this );
228:                discussionForumsSet.add(forum);
229:            }
230:
231:            public void removeDiscussionForum(BaseForum forum) {
232:                if (LOG.isDebugEnabled()) {
233:                    LOG.debug("removeDiscussionForum(forum " + forum + ")");
234:                }
235:
236:                if (forum == null) {
237:                    throw new IllegalArgumentException(
238:                            "Illegal topic argument passed!");
239:                }
240:
241:                forum.setArea(null);
242:                discussionForumsSet.remove(forum);
243:                openForumsSet.remove(forum);
244:            }
245:
246:            public void addOpenForum(BaseForum forum) {
247:                if (LOG.isDebugEnabled()) {
248:                    LOG.debug("addOpenForum(forum " + forum + ")");
249:                }
250:
251:                if (forum == null) {
252:                    throw new IllegalArgumentException("forum == null");
253:                }
254:
255:                if (openForumsSet == null) {
256:                    openForumsSet = new TreeSet();
257:                }
258:                forum.setArea(this );
259:                openForumsSet.add(forum);
260:            }
261:
262:            public void removeOpenForum(BaseForum forum) {
263:                if (LOG.isDebugEnabled()) {
264:                    LOG.debug("removeOpenForum(forum " + forum + ")");
265:                }
266:
267:                if (forum == null) {
268:                    throw new IllegalArgumentException(
269:                            "Illegal topic argument passed!");
270:                }
271:
272:                forum.setArea(null);
273:                openForumsSet.remove(forum);
274:            }
275:
276:            public void addMembershipItem(DBMembershipItem item) {
277:                if (LOG.isDebugEnabled()) {
278:                    LOG.debug("addMembershipItem(item " + item + ")");
279:                }
280:
281:                if (item == null) {
282:                    throw new IllegalArgumentException("item == null");
283:                }
284:
285:                if (membershipItemSet == null) {
286:                    membershipItemSet = new HashSet();
287:                }
288:                membershipItemSet.add(item);
289:            }
290:
291:            public void removeMembershipItem(DBMembershipItem item) {
292:                if (LOG.isDebugEnabled()) {
293:                    LOG.debug("removeMembershipItem(item " + item + ")");
294:                }
295:
296:                if (item == null) {
297:                    throw new IllegalArgumentException(
298:                            "Illegal level argument passed!");
299:                }
300:
301:                membershipItemSet.remove(item);
302:            }
303:
304:        }
w__w_w.j__a__v__a_2__s._co___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.