KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.Collection JavaDoc;
29 import java.io.Serializable JavaDoc;
30
31 public class Project implements Serializable JavaDoc
32 {
33     private int id;
34     private String JavaDoc title;
35     private String JavaDoc description;
36     private Collection JavaDoc persons;
37     private Collection JavaDoc roles;
38
39
40     public Project()
41     {
42     }
43
44     public Project(int pId, String JavaDoc pTitle, String JavaDoc pDescription)
45     {
46         id = pId;
47         title = pTitle;
48         description = pDescription;
49     }
50
51     public Collection JavaDoc getRoles()
52     {
53         return roles;
54     }
55
56     public void setRoles(Collection JavaDoc roles)
57     {
58         this.roles = roles;
59     }
60
61     public int getId()
62     {
63         return id;
64     }
65
66     public void setId(int id)
67     {
68         this.id = id;
69     }
70
71     public String JavaDoc getTitle()
72     {
73         return title;
74     }
75
76     public void setTitle(String JavaDoc title)
77     {
78         this.title = title;
79     }
80
81     public String JavaDoc getDescription()
82     {
83         return description;
84     }
85
86     public void setDescription(String JavaDoc description)
87     {
88         this.description = description;
89     }
90
91     public Collection JavaDoc getPersons()
92     {
93         return persons;
94     }
95
96     public void setPersons(Collection JavaDoc persons)
97     {
98         this.persons = persons;
99     }
100
101
102     public String JavaDoc toString()
103     {
104         String JavaDoc result = title;
105         result += " ";
106         result += persons;
107
108         return result;
109     }
110 }
111
Popular Tags