KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > partmappersistence > data > HibernateGroupUser


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

4
5 package org.enhydra.shark.partmappersistence.data;
6
7 import java.util.ArrayList JavaDoc;
8 import java.util.List JavaDoc;
9
10 /**
11  * Simple POJO class, part of the participant mapping model
12  *
13  * @author Vladislav Pernin
14  */

15 public class HibernateGroupUser {
16
17     private String JavaDoc userName;
18     private List JavaDoc procLevelParts = new ArrayList JavaDoc();
19     private List JavaDoc packLevelParts = new ArrayList JavaDoc();
20
21     public HibernateGroupUser() {
22     }
23
24     public String JavaDoc getUserName() {
25         return userName;
26     }
27     public void setUserName(String JavaDoc userName) {
28         this.userName = userName;
29     }
30     
31     public List JavaDoc getProcLevelParts() {
32         return procLevelParts;
33     }
34
35     public void setProcLevelParts(List JavaDoc procLevelParts) {
36         this.procLevelParts = procLevelParts;
37     }
38     
39     public void addProcLevelParts(HibernateProcessLevelParticipant proLevelPart){
40         if(!procLevelParts.contains(proLevelPart)){
41             procLevelParts.add(proLevelPart);
42         }
43     }
44     
45     public void removeProcLevelParts(HibernateProcessLevelParticipant proLevelPart){
46         procLevelParts.remove(proLevelPart);
47     }
48     
49     public List JavaDoc getPackLevelParts() {
50         return packLevelParts;
51     }
52
53     public void setPackLevelParts(List JavaDoc packLevelParts) {
54         this.packLevelParts = packLevelParts;
55     }
56     
57     public void addPackLevelParts(HibernatePackageLevelParticipant packLevelPart){
58         if(!packLevelParts.contains(packLevelPart)){
59             packLevelParts.add(packLevelPart);
60         }
61     }
62     
63     public void removePackLevelParts(HibernatePackageLevelParticipant packLevelPart){
64         packLevelParts.remove(packLevelPart);
65     }
66     
67     public String JavaDoc toString() {
68         String JavaDoc retVal = "";
69         retVal += "\nusername = "+this.userName;
70         return retVal;
71     }
72
73 }
Popular Tags