KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > eventaudit > HibernateStateEventAudit


1 /*
2  * Shark Hibernate persistent layer - Open Wide
3  */

4
5 package org.enhydra.shark.eventaudit;
6
7 import org.enhydra.shark.api.internal.eventaudit.*;
8
9 /**
10  * Simple Hibernate POJO class
11  * @author Vladislav Pernin
12  */

13 public class HibernateStateEventAudit extends HibernateEventAudit implements
14         StateEventAuditPersistenceInterface {
15
16     private String JavaDoc oldState;
17     private String JavaDoc newState;
18
19     public void setOldState(String JavaDoc os) {
20         this.oldState = os;
21     }
22
23     public String JavaDoc getOldState() {
24         return oldState;
25     }
26
27     public void setNewState(String JavaDoc ns) {
28         this.newState = ns;
29     }
30
31     public String JavaDoc getNewState() {
32         return newState;
33     }
34
35     public String JavaDoc toString() {
36         StringBuffer JavaDoc strBuffer = new StringBuffer JavaDoc();
37         strBuffer.append("IdDB = " + this.dbId + "\n");
38         strBuffer.append("timeStamp = " + this.getUTCTime() + "\n");
39         strBuffer.append("eventType = " + this.getType() + "\n");
40         strBuffer.append("activityId = " + this.getActivityId() + "\n");
41         strBuffer.append("activityName = " + this.getActivityName() + "\n");
42         strBuffer.append("processId = " + this.getProcessId() + "\n");
43         strBuffer.append("processName = " + this.getProcessName() + "\n");
44         strBuffer.append("processMgrName = " + this.getProcessDefinitionName()
45                 + "\n");
46         strBuffer.append("processMgrVersion = "
47                 + this.getProcessDefinitionVersion() + "\n");
48         strBuffer.append("activityDefinitionId = "
49                 + this.getActivityDefinitionId() + "\n");
50         strBuffer.append("processDefinitionId = "
51                 + this.getProcessDefinitionId() + "\n");
52         strBuffer.append("packageId = " + this.getPackageId() + "\n");
53         strBuffer.append("oldState = " + this.getOldState() + "\n");
54         strBuffer.append("newState = " + this.getNewState() + "\n");
55
56         return strBuffer.toString();
57     }
58
59 }
Popular Tags