001: /*
002: * Copyright 2005 Sun Microsystems, Inc.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: package org.apache.roller.pojos;
018:
019: import java.util.Date;
020:
021: /**
022: * Records change that a user has made to an object.
023: * @ejb:bean name="ObjectAuditData"
024: * @struts.form include-all="true"
025: * @hibernate.class lazy="false" table="roller_audit_log"
026: *
027: * @author Dave Johnson
028: */
029: public class ObjectAuditData extends PersistentObject {
030: private String id; // primary key
031: private String userId; // user that made change
032: private String objectId; // id of associated object, if any
033: private String objectClass; // name of associated object class (e.g. WeblogEntryData)
034: private String comment; // description of change
035: private Date changeTime; // time that change was made
036:
037: public void setData(PersistentObject vo) {
038: }
039:
040: /**
041: * @ejb:persistent-field
042: * @hibernate.id column="id"
043: * generator-class="uuid.hex" unsaved-value="null"
044: */
045: public String getId() {
046: return id;
047: }
048:
049: /** @ejb:persistent-field */
050: public void setId(String id) {
051: this .id = id;
052: }
053:
054: /**
055: * @ejb:persistent-field
056: * @hibernate.property column="change_time" non-null="true" unique="false"
057: */
058: public Date getChangeTime() {
059: return changeTime;
060: }
061:
062: /** @ejb:persistent-field */
063: public void setChangeTime(Date changeTime) {
064: this .changeTime = changeTime;
065: }
066:
067: /**
068: * @ejb:persistent-field
069: * @hibernate.property column="comment_text" non-null="true" unique="false"
070: */
071: public String getComment() {
072: return comment;
073: }
074:
075: /** @ejb:persistent-field */
076: public void setComment(String comment) {
077: this .comment = comment;
078: }
079:
080: /**
081: * @ejb:persistent-field
082: * @hibernate.property column="object_class" non-null="true" unique="false"
083: */
084: public String getObjectClass() {
085: return objectClass;
086: }
087:
088: /** @ejb:persistent-field */
089: public void setObjectClass(String objectClass) {
090: this .objectClass = objectClass;
091: }
092:
093: /**
094: * @ejb:persistent-field
095: * @hibernate.property column="object_id" non-null="true" unique="false"
096: */
097: public String getObjectId() {
098: return objectId;
099: }
100:
101: /** @ejb:persistent-field */
102: public void setObjectId(String objectId) {
103: this .objectId = objectId;
104: }
105:
106: /**
107: * @ejb:persistent-field
108: * @hibernate.property column="user_id" non-null="true" unique="false"
109: */
110: public String getUserId() {
111: return userId;
112: }
113:
114: /** @ejb:persistent-field */
115: public void setUserId(String userId) {
116: this.userId = userId;
117: }
118: }
|