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


001:        /**********************************************************************************
002:         * $URL: https://source.sakaiproject.org/svn/profile/tags/sakai_2-4-1/common-composite-component-data/src/java/org/sakaiproject/component/common/manager/PersistableImpl.java $
003:         * $Id: PersistableImpl.java 8424 2006-04-27 20:23:44Z ggolden@umich.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.common.manager;
021:
022:        import java.util.Date;
023:
024:        import org.apache.commons.logging.Log;
025:        import org.apache.commons.logging.LogFactory;
026:        import org.sakaiproject.api.common.manager.Persistable;
027:
028:        /**
029:         * @author <a href="mailto:lance@indiana.edu">Lance Speelmon</a>
030:         */
031:        public abstract class PersistableImpl implements  Persistable {
032:            private static final Log LOG = LogFactory
033:                    .getLog(PersistableImpl.class);
034:
035:            protected Long id;
036:
037:            protected Integer version;
038:
039:            protected String uuid;
040:
041:            protected String lastModifiedBy;
042:
043:            protected Date lastModifiedDate;
044:
045:            protected String createdBy;
046:
047:            protected Date createdDate;
048:
049:            /**
050:             * @return Returns the id surrogateKey.
051:             */
052:            public Long getId() {
053:                LOG.trace("getId()");
054:
055:                return id;
056:            }
057:
058:            /**
059:             * @param id
060:             *        The id surrogateKey to set.
061:             */
062:            public void setId(Long id) {
063:                if (LOG.isDebugEnabled()) {
064:                    LOG.debug("setId(Long " + id + ")");
065:                }
066:                if (id == null)
067:                    throw new IllegalArgumentException(
068:                            "Illegal id argument passed!");
069:
070:                this .id = id;
071:            }
072:
073:            /**
074:             * @return Returns the version (optimistic lock).
075:             */
076:            public Integer getVersion() {
077:                LOG.trace("getVersion()");
078:
079:                return version;
080:            }
081:
082:            /**
083:             * @param version
084:             *        The version (optimistic lock) to set.
085:             */
086:            public void setVersion(Integer version) {
087:                if (LOG.isDebugEnabled()) {
088:                    LOG.debug("setVersion(Integer " + version + ")");
089:                }
090:                ; // validation removed to enable hibernate's reflection optimizer
091:
092:                this .version = version;
093:            }
094:
095:            /**
096:             * @see org.sakaiproject.api.common.manager.Persistable#getUuid()
097:             */
098:            public String getUuid() {
099:                LOG.trace("getUuid()");
100:
101:                return uuid;
102:            }
103:
104:            public void setUuid(String uuid) {
105:                if (LOG.isDebugEnabled()) {
106:                    LOG.debug("setUuid(String " + uuid + ")");
107:                }
108:                if (uuid == null || uuid.length() < 1)
109:                    throw new IllegalArgumentException(
110:                            "Illegal uuid argument passed!");
111:
112:                this .uuid = uuid;
113:            }
114:
115:            /**
116:             * @see org.sakaiproject.api.common.manager.Persistable#getLastModifiedBy()
117:             */
118:            public String getLastModifiedBy() {
119:                LOG.trace("getLastModifiedBy()");
120:
121:                return lastModifiedBy;
122:            }
123:
124:            public void setLastModifiedBy(String lastModifiedBy) {
125:                if (LOG.isDebugEnabled()) {
126:                    LOG.debug("setLastModifiedBy(String " + lastModifiedBy
127:                            + ")");
128:                }
129:                // FIXME
130:                // if (lastModifiedBy == null || lastModifiedBy.length() < 1)
131:                // throw new IllegalArgumentException(
132:                // "Illegal lastModifiedBy argument passed!");
133:
134:                this .lastModifiedBy = lastModifiedBy;
135:            }
136:
137:            /**
138:             * @see org.sakaiproject.api.common.manager.Persistable#getLastModifiedDate()
139:             */
140:            public Date getLastModifiedDate() {
141:                LOG.trace("getLastModifiedDate()");
142:
143:                return lastModifiedDate;
144:            }
145:
146:            public void setLastModifiedDate(Date lastModifiedDate) {
147:                if (LOG.isDebugEnabled()) {
148:                    LOG.debug("setLastModifiedDate(Date " + lastModifiedDate
149:                            + ")");
150:                }
151:                // FIXME
152:                // if (lastModifiedDate == null)
153:                // throw new IllegalArgumentException(
154:                // "Illegal lastModifiedDate argument passed!");
155:
156:                this .lastModifiedDate = lastModifiedDate;
157:            }
158:
159:            /**
160:             * @see org.sakaiproject.api.common.manager.Persistable#getCreatedBy()
161:             */
162:            public String getCreatedBy() {
163:                LOG.trace("getCreatedBy()");
164:
165:                return createdBy;
166:            }
167:
168:            public void setCreatedBy(String createdBy) {
169:                if (LOG.isDebugEnabled()) {
170:                    LOG.debug("setCreatedBy(String " + createdBy + ")");
171:                }
172:                // FIXME
173:                // if (createdBy == null || createdBy.length() < 1)
174:                // throw new IllegalArgumentException("Illegal createdBy argument passed!");
175:
176:                this .createdBy = createdBy;
177:            }
178:
179:            /**
180:             * @see org.sakaiproject.api.common.manager.Persistable#getCreatedDate()
181:             */
182:            public Date getCreatedDate() {
183:                LOG.trace("getCreatedDate()");
184:
185:                return createdDate;
186:            }
187:
188:            public void setCreatedDate(Date createdDate) {
189:                if (LOG.isDebugEnabled()) {
190:                    LOG.debug("setCreatedDate(Date " + createdDate + ")");
191:                }
192:                // FIXME
193:                // if (createdDate == null)
194:                // throw new IllegalArgumentException("Illegal createdDate argument passed!");
195:
196:                this .createdDate = createdDate;
197:            }
198:
199:            /**
200:             * @see java.lang.Object#toString()
201:             */
202:            public String toString() {
203:                LOG.trace("toString()");
204:
205:                StringBuffer sb = new StringBuffer();
206:                sb.append("{id=");
207:                sb.append(id);
208:                sb.append(", lastModifiedBy=");
209:                sb.append(lastModifiedBy);
210:                sb.append(", lastModifiedDate=");
211:                sb.append(lastModifiedDate);
212:                sb.append(", createdBy=");
213:                sb.append(createdBy);
214:                sb.append(", createdDate=");
215:                sb.append(createdDate);
216:                sb.append(", uuid=");
217:                sb.append(uuid);
218:                sb.append(", version=");
219:                sb.append(version);
220:                return sb.toString();
221:            }
222:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.