KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ojb > odmg > shared > 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.odmg.shared;
27
28 import java.util.Collection JavaDoc;
29 import java.io.Serializable JavaDoc;
30
31 import org.apache.commons.lang.builder.ToStringBuilder;
32
33 public class Project implements Serializable JavaDoc
34 {
35     private int id;
36     private String JavaDoc title;
37     private String JavaDoc description;
38     private Collection JavaDoc members;
39     private Collection JavaDoc roles;
40
41
42     public Project()
43     {
44     }
45
46     public Project(int pId, String JavaDoc pTitle, String JavaDoc pDescription)
47     {
48         id = pId;
49         title = pTitle;
50         description = pDescription;
51     }
52
53     public Collection JavaDoc getRoles()
54     {
55         return roles;
56     }
57
58     public void setRoles(Collection JavaDoc roles)
59     {
60         this.roles = roles;
61     }
62
63     public int getId()
64     {
65         return id;
66     }
67
68     public void setId(int id)
69     {
70         this.id = id;
71     }
72
73     public String JavaDoc getTitle()
74     {
75         return title;
76     }
77
78     public void setTitle(String JavaDoc title)
79     {
80         this.title = title;
81     }
82
83     public String JavaDoc getDescription()
84     {
85         return description;
86     }
87
88     public void setDescription(String JavaDoc description)
89     {
90         this.description = description;
91     }
92
93     public Collection JavaDoc getMembers()
94     {
95         return members;
96     }
97
98     public void setMembers(Collection JavaDoc members)
99     {
100         this.members = members;
101     }
102
103
104     public String JavaDoc toString()
105     {
106         return new ToStringBuilder(this)
107                 .append("id", id)
108                 .append("title", title)
109                 .append("description", description)
110                 .append("Memberss size", members != null ? members.size() : 0)
111                 .append("Roles size", members != null ? members.size() : 0)
112                 .toString();
113     }
114 }
115
Popular Tags