KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

15 public class HibernateActivity extends HibernateObjectUtil implements ActivityPersistenceInterface, HibernateGeneric {
16
17     private String JavaDoc idAct;
18     private String JavaDoc activityDefinitionId;
19     private String JavaDoc activitySetDefinitionId;
20     private String JavaDoc processId;
21     private String JavaDoc resourceUsername;
22     private String JavaDoc subflowProcessId;
23     private String JavaDoc state;
24     private String JavaDoc blockActivityId;
25     private String JavaDoc name;
26     private String JavaDoc description;
27     private int priority;
28     private long lastStateTime;
29     private long accepted;
30     private long activated;
31     
32     private int stateId;
33     
34     private int dbId = -1;
35     
36     public int getDbId() {
37         return dbId;
38     }
39
40     public void setDbId(int dbId) {
41         this.dbId = dbId;
42     }
43
44     public void setActivitySetDefinitionId (String JavaDoc asdId) {
45         this.activitySetDefinitionId=asdId;
46     }
47
48     public String JavaDoc getActivitySetDefinitionId () {
49         return activitySetDefinitionId;
50     }
51     
52     public void setId(String JavaDoc id) {
53         this.idAct = id;
54     }
55
56     public String JavaDoc getId() {
57         return idAct;
58     }
59
60     public void setActivityDefinitionId(String JavaDoc adId) {
61         this.activityDefinitionId = adId;
62     }
63
64     public String JavaDoc getActivityDefinitionId() {
65         return activityDefinitionId;
66     }
67
68     public void setProcessId(String JavaDoc procId) {
69         this.processId = procId;
70     }
71
72     public String JavaDoc getProcessId() {
73         return processId;
74     }
75
76     public void setResourceUsername(String JavaDoc username) {
77         this.resourceUsername = username;
78     }
79
80     public String JavaDoc getResourceUsername() {
81         return resourceUsername;
82     }
83
84     public void setSubflowProcessId(String JavaDoc procId) {
85         this.subflowProcessId = procId;
86     }
87
88     public String JavaDoc getSubflowProcessId() {
89         return subflowProcessId;
90     }
91
92     public void setState(String JavaDoc state) {
93         this.state = state;
94     }
95
96     public String JavaDoc getState() {
97         return state;
98     }
99
100     public void setBlockActivityId(String JavaDoc baId) {
101         blockActivityId = baId;
102     }
103
104     public String JavaDoc getBlockActivityId() {
105         return blockActivityId;
106     }
107
108     public String JavaDoc getName() {
109         return name;
110     }
111
112     public void setName(String JavaDoc name) {
113         this.name = name;
114     }
115
116     public String JavaDoc getDescription() {
117         return description;
118     }
119
120     public void setDescription(String JavaDoc desc) {
121         this.description = desc;
122     }
123
124     public int getPriority() {
125         return priority;
126     }
127
128     public void setPriority(int priority) {
129         this.priority = priority;
130     }
131
132     public int getStateId() {
133         return stateId;
134     }
135
136     public void setStateId(int i) {
137         stateId = i;
138     }
139     
140     public long getLastStateTime() {
141        return lastStateTime;
142     }
143
144     public void setLastStateTime(long timestamp) {
145        lastStateTime = timestamp;
146     }
147
148     public long getActivatedTime() {
149        return activated;
150     }
151
152     public void setAcceptedTime(long timestamp) {
153        activated = timestamp;
154     }
155
156     public long getAcceptedTime() {
157        return accepted;
158     }
159
160     public void setActivatedTime(long timestamp) {
161        accepted = timestamp;
162     }
163
164     public String JavaDoc toString(){
165         StringBuffer JavaDoc strBuffer = new StringBuffer JavaDoc();
166         strBuffer.append("idDB = " + this.dbId + "\n");
167         strBuffer.append("id = " + this.idAct + "\n");
168         strBuffer.append("activityDefinitionId = " + this.activityDefinitionId + "\n");
169         strBuffer.append("processId = " + this.processId + "\n");
170         strBuffer.append("resourceUsername = " + this.resourceUsername + "\n");
171         strBuffer.append("subflowProcessId = " + this.subflowProcessId + "\n");
172         strBuffer.append("state = " + this.state + "\n");
173         strBuffer.append("blockActivityId = " + this.blockActivityId + "\n");
174         strBuffer.append("name = " + this.name + "\n");
175         strBuffer.append("description = " + this.description + "\n");
176         strBuffer.append("priority = " + this.priority + "\n");
177         strBuffer.append("lastStateTime = " + this.lastStateTime + "\n");
178         strBuffer.append("accepted = " + this.accepted + "\n");
179         strBuffer.append("activated = " + this.activated + "\n");
180         return strBuffer.toString();
181     }
182
183 }
184
Popular Tags