KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > roller > pojos > ObjectAuditData


1 /*
2  * Copyright 2005 Sun Microsystems, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.roller.pojos;
18
19 import java.util.Date JavaDoc;
20
21 /**
22  * Records change that a user has made to an object.
23  * @ejb:bean name="ObjectAuditData"
24  * @struts.form include-all="true"
25  * @hibernate.class lazy="false" table="roller_audit_log"
26  *
27  * @author Dave Johnson
28  */

29 public class ObjectAuditData extends PersistentObject
30 {
31     private String JavaDoc id; // primary key
32
private String JavaDoc userId; // user that made change
33
private String JavaDoc objectId; // id of associated object, if any
34
private String JavaDoc objectClass; // name of associated object class (e.g. WeblogEntryData)
35
private String JavaDoc comment; // description of change
36
private Date JavaDoc changeTime; // time that change was made
37

38     public void setData(PersistentObject vo)
39     {
40     }
41
42     /**
43      * @ejb:persistent-field
44      * @hibernate.id column="id"
45      * generator-class="uuid.hex" unsaved-value="null"
46      */

47     public String JavaDoc getId()
48     {
49         return id;
50     }
51     /** @ejb:persistent-field */
52     public void setId(String JavaDoc id)
53     {
54         this.id = id;
55     }
56     /**
57      * @ejb:persistent-field
58      * @hibernate.property column="change_time" non-null="true" unique="false"
59      */

60     public Date JavaDoc getChangeTime()
61     {
62         return changeTime;
63     }
64     /** @ejb:persistent-field */
65     public void setChangeTime(Date JavaDoc changeTime)
66     {
67         this.changeTime = changeTime;
68     }
69     /**
70      * @ejb:persistent-field
71      * @hibernate.property column="comment_text" non-null="true" unique="false"
72      */

73     public String JavaDoc getComment()
74     {
75         return comment;
76     }
77     /** @ejb:persistent-field */
78     public void setComment(String JavaDoc comment)
79     {
80         this.comment = comment;
81     }
82     /**
83      * @ejb:persistent-field
84      * @hibernate.property column="object_class" non-null="true" unique="false"
85      */

86     public String JavaDoc getObjectClass()
87     {
88         return objectClass;
89     }
90     /** @ejb:persistent-field */
91     public void setObjectClass(String JavaDoc objectClass)
92     {
93         this.objectClass = objectClass;
94     }
95     /**
96      * @ejb:persistent-field
97      * @hibernate.property column="object_id" non-null="true" unique="false"
98      */

99     public String JavaDoc getObjectId()
100     {
101         return objectId;
102     }
103     /** @ejb:persistent-field */
104     public void setObjectId(String JavaDoc objectId)
105     {
106         this.objectId = objectId;
107     }
108     /**
109      * @ejb:persistent-field
110      * @hibernate.property column="user_id" non-null="true" unique="false"
111      */

112     public String JavaDoc getUserId()
113     {
114         return userId;
115     }
116     /** @ejb:persistent-field */
117     public void setUserId(String JavaDoc userId)
118     {
119         this.userId = userId;
120     }
121 }
122
Popular Tags