001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/course-management/tags/sakai_2-4-1/cm-impl/hibernate-impl/hibernate/src/java/org/sakaiproject/coursemanagement/impl/AbstractPersistentCourseManagementObjectCmImpl.java $
003: * $Id: AbstractPersistentCourseManagementObjectCmImpl.java 13913 2006-08-22 20:25:48Z jholtzman@berkeley.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 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.coursemanagement.impl;
021:
022: import java.io.Serializable;
023: import java.util.Date;
024:
025: public abstract class AbstractPersistentCourseManagementObjectCmImpl
026: implements Serializable {
027:
028: public static final String AUTHORITY = "Sakai";
029:
030: /**
031: * The DB's primary key for this object / record.
032: */
033: protected Long key;
034:
035: /**
036: * The object instance version for optimistic locking.
037: */
038: protected int version;
039:
040: /**
041: * The agent (either a user id or a process id) that last modified this object.
042: */
043: protected String lastModifiedBy;
044:
045: /**
046: * The timestamp when this object was last modified.
047: */
048: protected Date lastModifiedDate;
049:
050: /**
051: * The agent (either a user id or a process id) that created this object.
052: */
053: protected String createdBy;
054:
055: /**
056: * The timestamp when this object was created.
057: */
058: protected Date createdDate;
059:
060: public Long getKey() {
061: return key;
062: }
063:
064: public void setKey(Long key) {
065: this .key = key;
066: }
067:
068: public int getVersion() {
069: return version;
070: }
071:
072: public void setVersion(int version) {
073: this .version = version;
074: }
075:
076: public String getCreatedBy() {
077: return createdBy;
078: }
079:
080: public void setCreatedBy(String createdBy) {
081: this .createdBy = createdBy;
082: }
083:
084: public Date getCreatedDate() {
085: return createdDate;
086: }
087:
088: public void setCreatedDate(Date createdDate) {
089: this .createdDate = createdDate;
090: }
091:
092: public String getLastModifiedBy() {
093: return lastModifiedBy;
094: }
095:
096: public void setLastModifiedBy(String lastModifiedBy) {
097: this .lastModifiedBy = lastModifiedBy;
098: }
099:
100: public Date getLastModifiedDate() {
101: return lastModifiedDate;
102: }
103:
104: public void setLastModifiedDate(Date lastModifiedDate) {
105: this .lastModifiedDate = lastModifiedDate;
106: }
107:
108: public String getAuthority() {
109: return AUTHORITY;
110: }
111:
112: public void setAuthority(String authority) {
113: throw new RuntimeException(
114: "You can not change the authority of this CM object. Authority = "
115: + AbstractPersistentCourseManagementObjectCmImpl.AUTHORITY);
116: }
117: }
|