KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

14 public class HibernateAssignment extends HibernateObjectUtil implements AssignmentPersistenceInterface, HibernateGeneric {
15
16     private String JavaDoc activityId;
17     private String JavaDoc resourceUsername;
18
19     // this is redundant information, but we need it because of transaction
20
// locking
21
private String JavaDoc processId;
22     
23     private int dbId = -1;
24     
25     public int getDbId() {
26         return dbId;
27     }
28
29     public void setDbId(int dbId) {
30         this.dbId = dbId;
31     }
32
33     public void setActivityId(String JavaDoc actId) {
34         this.activityId = actId;
35     }
36
37     public String JavaDoc getActivityId() {
38         return activityId;
39     }
40
41     public void setResourceUsername(String JavaDoc resUsername) {
42         this.resourceUsername = resUsername;
43     }
44
45     public String JavaDoc getResourceUsername() {
46         return resourceUsername;
47     }
48
49     public void setProcessId(String JavaDoc procId) {
50         this.processId = procId;
51     }
52
53     public String JavaDoc getProcessId() {
54         return processId;
55     }
56     
57     public String JavaDoc toString() {
58         StringBuffer JavaDoc strBuffer = new StringBuffer JavaDoc();
59         strBuffer.append("idDB = " + this.dbId + "\n");
60         strBuffer.append("activityId = " + this.activityId + "\n");
61         strBuffer.append("resourceUsername = " + this.resourceUsername + "\n");
62         strBuffer.append("processId = " + this.processId + "\n");
63         return strBuffer.toString();
64     }
65     
66 }
67
Popular Tags