Source Code Cross Referenced for SyllabusItemImpl.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » component » app » syllabus » 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.syllabus 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:         * $URL: https://source.sakaiproject.org/svn/syllabus/tags/sakai_2-4-1/syllabus-hbm/src/java/org/sakaiproject/component/app/syllabus/SyllabusItemImpl.java $
003:         * $Id: SyllabusItemImpl.java 8802 2006-05-03 15:06:26Z cwen@iupui.edu $
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2003, 2004, 2005, 2006 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.syllabus;
021:
022:        import java.util.Set;
023:
024:        import java.util.TreeSet;
025:
026:        import org.sakaiproject.api.app.syllabus.SyllabusItem;
027:
028:        /**
029:         * A syllabus item contains information relating to a syllabus and an order
030:         * within a particular context (site).
031:         * 
032:         * @author Jarrod Lannan
033:         * @version $Id: 
034:         * 
035:         */
036:
037:        public class SyllabusItemImpl implements  SyllabusItem {
038:            private Long surrogateKey;
039:            private String userId;
040:            private String contextId;
041:            private String redirectURL;
042:            private Integer lockId; // optimistic lock
043:
044:            private Set syllabi = new TreeSet();
045:
046:            /**
047:             *  Public no-arg Constructor.
048:             */
049:            public SyllabusItemImpl() {
050:
051:                ;
052:            }
053:
054:            /**
055:             * @param userId
056:             * @param contextId
057:             * @param redirectURL
058:             *        SyllabusEntry Constructor. Package protected.
059:             */
060:            public SyllabusItemImpl(String userId, String contextId,
061:                    String redirectURL) {
062:
063:                if (userId == null || contextId == null) {
064:                    throw new IllegalArgumentException();
065:                }
066:
067:                this .userId = userId;
068:                this .contextId = contextId;
069:                this .redirectURL = redirectURL;
070:            }
071:
072:            /**
073:             * @return Returns the syllabi.
074:             */
075:            public Set getSyllabi() {
076:                return syllabi;
077:            }
078:
079:            /**
080:             * @param syllabi The syllabi to set.
081:             */
082:            public void setSyllabi(Set syllabi) {
083:                this .syllabi = syllabi;
084:            }
085:
086:            /**
087:             * @return Returns the contextId.
088:             */
089:            public String getContextId() {
090:                return contextId;
091:            }
092:
093:            /**
094:             * @param contextId The contextId to set.
095:             */
096:            public void setContextId(String contextId) {
097:                this .contextId = contextId;
098:            }
099:
100:            /**
101:             * @return Returns the lockId.
102:             */
103:            public Integer getLockId() {
104:                return lockId;
105:            }
106:
107:            /**
108:             * @param lockId The lockId to set.
109:             */
110:            public void setLockId(Integer lockId) {
111:                this .lockId = lockId;
112:            }
113:
114:            /**
115:             * @return Returns the surrogateKey.
116:             */
117:            public Long getSurrogateKey() {
118:                return surrogateKey;
119:            }
120:
121:            /**
122:             * @param surrogateKey The surrogateKey to set.
123:             */
124:            private void setSurrogateKey(Long surrogateKey) {
125:                this .surrogateKey = surrogateKey;
126:            }
127:
128:            /**
129:             * @return Returns the userId.
130:             */
131:            public String getUserId() {
132:                return userId;
133:            }
134:
135:            /**
136:             * @param userId The userId to set.
137:             */
138:            public void setUserId(String userId) {
139:                this .userId = userId;
140:            }
141:
142:            /**
143:             * @return Returns the redirectURL.
144:             */
145:            public String getRedirectURL() {
146:                if (redirectURL != null && redirectURL.length() > 1) {
147:                    redirectURL = redirectURL.trim();
148:                }
149:                return redirectURL;
150:            }
151:
152:            /**
153:             * @param redirectURL The redirectURL to set.
154:             */
155:            public void setRedirectURL(String redirectURL) {
156:                if (redirectURL != null && redirectURL.length() > 1) {
157:                    redirectURL = redirectURL.trim();
158:                }
159:                this .redirectURL = redirectURL;
160:            }
161:
162:            /**
163:             * @see java.lang.Object#equals(java.lang.Object)
164:             */
165:            public boolean equals(Object obj) {
166:                if (this  == obj)
167:                    return true;
168:                if (!(obj instanceof  SyllabusItemImpl))
169:                    return false;
170:                SyllabusItemImpl other = (SyllabusItemImpl) obj;
171:
172:                if ((userId == null ? other.userId == null : userId
173:                        .equals(other.userId))
174:                        && (contextId == null ? other.contextId == null
175:                                : contextId.equals(other.contextId))
176:                        && (redirectURL == null ? other.redirectURL == null
177:                                : redirectURL.equals(other.redirectURL))) {
178:                    return true;
179:                }
180:                return false;
181:            }
182:
183:            /**
184:             * @see java.lang.Object#hashCode()
185:             */
186:            public int hashCode() {
187:                return userId.hashCode() + contextId.hashCode()
188:                        + redirectURL.hashCode();
189:            }
190:
191:            /**
192:             * @see java.lang.Object#toString()
193:             */
194:            public String toString() {
195:                StringBuffer sb = new StringBuffer();
196:                sb.append("{surrogateKey=");
197:                sb.append(surrogateKey);
198:                sb.append(", userId=");
199:                sb.append(userId);
200:                sb.append(", contextId=");
201:                sb.append(contextId);
202:                sb.append(", redirectURL=");
203:                sb.append(redirectURL);
204:                sb.append(", lockId=");
205:                sb.append(lockId);
206:                sb.append("}");
207:                return sb.toString();
208:            }
209:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.