KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > broker > Role


1 /*
2  * ObJectRelationalBridge - Bridging Java Objects and Relational Databases
3  * http://objectbridge.sourceforge.net
4  * Copyright (C) 2000, 2001 Thomas Mahler, et al.
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */

20
21
22 /*
23  * Created by: thma
24  * Date: May 6, 2001
25  */

26 package org.apache.ojb.broker;
27
28 import org.apache.commons.lang.builder.ToStringBuilder;
29
30 import java.util.Collection JavaDoc;
31 import java.io.Serializable JavaDoc;
32
33 public class Role implements Serializable JavaDoc
34 {
35     private int person_id;
36     private int project_id;
37     private Person person;
38     private Project project;
39     private String JavaDoc roleName;
40     private Collection JavaDoc tasks;
41
42     public Role()
43     {
44     }
45
46     public Role(int pPersonId, int pProjectId, String JavaDoc pRolename)
47     {
48         person_id = pPersonId;
49         project_id = pProjectId;
50         roleName = pRolename;
51     }
52
53
54     public String JavaDoc getRoleName()
55     {
56         return roleName;
57     }
58
59     public void setRoleName(String JavaDoc roleName)
60     {
61         this.roleName = roleName;
62     }
63
64     public int getPerson_id()
65     {
66         return person_id;
67     }
68
69     public void setPerson_id(int person_id)
70     {
71         this.person_id = person_id;
72     }
73
74     public int getProject_id()
75     {
76         return project_id;
77     }
78
79     public void setProject_id(int project_id)
80     {
81         this.project_id = project_id;
82     }
83
84     public Person getPerson()
85     {
86         return person;
87     }
88
89     public void setPerson(Person person)
90     {
91         this.person = person;
92     }
93
94     public Project getProject()
95     {
96         return project;
97     }
98
99     public void setProject(Project project)
100     {
101         this.project = project;
102     }
103
104     public Collection JavaDoc getTasks()
105     {
106         return tasks;
107     }
108
109     public void setTasks(Collection JavaDoc tasks)
110     {
111         this.tasks = tasks;
112     }
113
114     public String JavaDoc toString()
115     {
116         ToStringBuilder buf = new ToStringBuilder(this);
117         buf.append("roleName", roleName).
118         append("personId", person_id).
119         append("person", person).
120         append("projectId", project_id).
121         append("project", project).
122         append("tasks", tasks);
123         return buf.toString();
124     }
125 }
126
Popular Tags