01: /*
02: * ObJectRelationalBridge - Bridging Java Objects and Relational Databases
03: * http://objectbridge.sourceforge.net
04: * Copyright (C) 2000, 2001 Thomas Mahler, et al.
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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: * Created by: thma
23: * Date: May 6, 2001
24: */
25: package org.apache.ojb.broker;
26:
27: import java.util.Collection;
28: import java.io.Serializable;
29:
30: public class Person implements Serializable {
31:
32: private int id;
33: private String firstname;
34: private String lastname;
35: private Collection projects;
36: private Collection roles;
37:
38: public Person() {
39: }
40:
41: public Person(int pId, String pFirstname, String pLastname) {
42: id = pId;
43: firstname = pFirstname;
44: lastname = pLastname;
45: }
46:
47: public Collection getRoles() {
48: return roles;
49: }
50:
51: public void setRoles(Collection roles) {
52: this .roles = roles;
53: }
54:
55: public int getId() {
56: return id;
57: }
58:
59: public void setId(int id) {
60: this .id = id;
61: }
62:
63: public String getFirstname() {
64: return firstname;
65: }
66:
67: public void setFirstname(String firstname) {
68: this .firstname = firstname;
69: }
70:
71: public String getLastname() {
72: return lastname;
73: }
74:
75: public void setLastname(String lastname) {
76: this .lastname = lastname;
77: }
78:
79: public Collection getProjects() {
80: return projects;
81: }
82:
83: public void setProjects(Collection projects) {
84: this .projects = projects;
85: }
86:
87: public String toString() {
88: String result = firstname;
89: return result;
90: }
91:
92: }
|