KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > instancepersistence > HibernateProcess


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

4
5
6 package org.enhydra.shark.instancepersistence;
7
8 import org.enhydra.shark.api.internal.instancepersistence.ProcessPersistenceInterface;
9 import org.enhydra.shark.utilities.hibernate.HibernateGeneric;
10 import org.enhydra.shark.utilities.hibernate.HibernateObjectUtil;
11
12 /**
13  * Simple Hibernate POJO class
14  * @author Vladislav Pernin
15  */

16 public class HibernateProcess extends HibernateObjectUtil implements ProcessPersistenceInterface, HibernateGeneric {
17
18     private String JavaDoc idPro;
19     private String JavaDoc managerName;
20     private String JavaDoc actRequesterId;
21     private String JavaDoc actRequesterProcessId;
22     private String JavaDoc resRequesterId;
23     private String JavaDoc state;
24     private String JavaDoc name;
25     private String JavaDoc description;
26     private int priority;
27     private long startedTime;
28     private long lastStateTime;
29     
30     private int stateId;
31     
32     private int dbId = -1;
33     
34     public int getDbId() {
35         return dbId;
36     }
37
38     public void setDbId(int dbId) {
39         this.dbId = dbId;
40     }
41
42     public void setId(String JavaDoc id) {
43         this.idPro = id;
44     }
45
46     public String JavaDoc getId() {
47         return idPro;
48     }
49
50     public void setProcessMgrName(String JavaDoc mgrName) {
51         this.managerName = mgrName;
52     }
53
54     public String JavaDoc getProcessMgrName() {
55         return managerName;
56     }
57
58     public void setActivityRequesterId(String JavaDoc actReqId) {
59         this.actRequesterId = actReqId;
60     }
61
62     public String JavaDoc getActivityRequesterId() {
63         return actRequesterId;
64     }
65
66     public void setActivityRequestersProcessId(String JavaDoc actReqProcId) {
67         this.actRequesterProcessId = actReqProcId;
68     }
69
70     public String JavaDoc getActivityRequestersProcessId() {
71         return actRequesterProcessId;
72     }
73
74     public void setResourceRequesterId(String JavaDoc resReqId) {
75         this.resRequesterId = resReqId;
76     }
77
78     public String JavaDoc getResourceRequesterId() {
79         return resRequesterId;
80     }
81
82     public String JavaDoc getName() {
83         return name;
84     }
85
86     public void setName(String JavaDoc name) {
87         this.name = name;
88     }
89
90     public String JavaDoc getDescription() {
91         return description;
92     }
93
94     public void setDescription(String JavaDoc desc) {
95         this.description = desc;
96     }
97
98     public int getPriority() {
99         return priority;
100     }
101
102     public void setPriority(int priority) {
103         this.priority = priority;
104     }
105     
106     public String JavaDoc getState() {
107         return state;
108     }
109
110     public int getStateId() {
111         return stateId;
112     }
113
114     public void setState(String JavaDoc string) {
115         state = string;
116     }
117
118     public void setStateId(int i) {
119         stateId = i;
120     }
121     
122     public long getLastStateTime() {
123        return lastStateTime;
124     }
125
126     public void setLastStateTime(long timestamp) {
127        lastStateTime = timestamp;
128     }
129
130     public long getStartedTime() {
131        return startedTime;
132     }
133
134     public void setStartedTime(long timestamp) {
135        startedTime = timestamp;
136     }
137     
138     public String JavaDoc toString(){
139         StringBuffer JavaDoc strBuffer = new StringBuffer JavaDoc();
140         strBuffer.append("idDB = " + this.dbId + "\n");
141         strBuffer.append("id = " + this.idPro + "\n");
142         strBuffer.append("managerName = " + this.managerName + "\n");
143         strBuffer.append("actRequesterId = " + this.actRequesterId + "\n");
144         strBuffer.append("actRequesterProcessId = " + this.actRequesterProcessId + "\n");
145         strBuffer.append("resRequesterId = " + this.resRequesterId + "\n");
146         strBuffer.append("state = " + this.state + "\n");
147         strBuffer.append("stateId = " + this.stateId + "\n");
148         strBuffer.append("name = " + this.name + "\n");
149         strBuffer.append("description = " + this.description + "\n");
150         strBuffer.append("priority = " + this.priority + "\n");
151         strBuffer.append("lastStateTime = " + this.lastStateTime + "\n");
152         strBuffer.append("startedTime = " + this.startedTime + "\n");
153         return strBuffer.toString();
154         
155     }
156
157 }
158
Popular Tags