KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > partmappersistence > HibernateParticipantMap


1 /*
2  * Shark Hibernate PartMapPersistence - Open Wide
3  */

4 package org.enhydra.shark.partmappersistence;
5
6 import org.enhydra.shark.api.internal.partmappersistence.ParticipantMap;
7
8 /**
9  * Implementation of ParticipantMap interface.If value for field is
10  * not set, field will have value null.
11  *
12  * @author Vladislav Pernin
13  */

14 public class HibernateParticipantMap
15    implements ParticipantMap {
16
17    private String JavaDoc participantId;
18    private String JavaDoc packageId;
19    private String JavaDoc processDefinitionId;
20    private String JavaDoc username;
21    private boolean isGroupUser;
22
23    public HibernateParticipantMap() {
24    }
25
26    public HibernateParticipantMap(
27       String JavaDoc participantId,
28       String JavaDoc packageId,
29       String JavaDoc processDefinitionId,
30       String JavaDoc username
31    ) {
32       setParticipantId( participantId );
33       setPackageId( packageId );
34       setProcessDefinitionId( processDefinitionId );
35       setUsername( username );
36    }
37
38    public void setParticipantId( String JavaDoc id ) {
39       if ( id != null && !id.trim().equals( "" ) )
40          this.participantId = id;
41       else
42          this.participantId = null;
43    }
44
45    public String JavaDoc getParticipantId() {
46       return this.participantId;
47    }
48
49    public void setPackageId( String JavaDoc id ) {
50       if ( id != null && !id.trim().equals( "" ) )
51          this.packageId = id;
52       else
53          this.packageId = null;
54    }
55
56    public String JavaDoc getPackageId() {
57       return this.packageId;
58    }
59
60    public void setProcessDefinitionId( String JavaDoc id ) {
61       if ( id != null && !id.trim().equals( "" ) )
62          this.processDefinitionId = id;
63       else
64          this.processDefinitionId = null;
65    }
66
67    public String JavaDoc getProcessDefinitionId() {
68       return this.processDefinitionId;
69    }
70
71    public void setUsername( String JavaDoc username ) {
72       if ( username != null && !username.trim().equals( "" ) )
73          this.username = username;
74       else
75          this.username = null;
76    }
77
78    public String JavaDoc getUsername() {
79       return this.username;
80    }
81
82    public boolean getIsGroupUser() {
83       return isGroupUser;
84    }
85
86    public void setIsGroupUser(boolean isGroupUser) {
87       this.isGroupUser = isGroupUser;
88    }
89
90    public String JavaDoc toString() {
91       String JavaDoc retVal = "";
92       retVal += "\nprocessDefId = "+this.processDefinitionId;
93       retVal += "\npackageId = "+this.packageId;
94       retVal += "\nusername = "+this.username;
95       retVal += "\nparticipantId = "+this.participantId;
96       retVal += "\nisGroupUser="+this.isGroupUser;
97       return retVal;
98    }
99
100 }
101
Popular Tags