KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > samples > photos > Person


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

17
18 package org.objectweb.jac.samples.photos;
19
20 import java.util.HashSet JavaDoc;
21 import java.util.Set JavaDoc;
22
23 import org.objectweb.jac.aspects.user.Profile;
24
25 public class Person {
26
27    /**
28     * the last name of the person
29     */

30    String JavaDoc lastName = "";
31    public void setLastName(String JavaDoc value) {
32       this.lastName=value;
33    }
34    public String JavaDoc getLastName() {
35       return lastName;
36    }
37
38    /**
39     * the first name of the person
40     */

41    String JavaDoc firstName = "";
42    public void setFirstName(String JavaDoc value) {
43       this.firstName=value;
44    }
45    public String JavaDoc getFirstName() {
46       return firstName;
47    }
48
49    /**
50     * the email address of the person
51     */

52    String JavaDoc email;
53    public void setEmail(String JavaDoc value) {
54       this.email=value;
55    }
56    public String JavaDoc getEmail() {
57       return email;
58    }
59
60    /**
61     * the password of the person
62     */

63    String JavaDoc password;
64    public String JavaDoc getPassword() {
65       return password;
66    }
67    public void setPassword(String JavaDoc v) {
68       this.password = v;
69    }
70
71    Profile profile;
72    public Profile getProfile() {
73       return profile;
74    }
75    public void setProfile(Profile v) {
76       this.profile = v;
77    }
78    
79    public Person() {
80    }
81
82    public Person(String JavaDoc firstName, String JavaDoc lastName,
83                  String JavaDoc email, String JavaDoc password) {
84       this.firstName = firstName;
85       this.lastName = lastName;
86       this.email = email;
87       this.password = password;
88    }
89
90    HashSet JavaDoc photos = new HashSet JavaDoc();
91
92    /**
93     * Get the value of photos
94     * @return value of photos
95     */

96    public Set JavaDoc getPhotos() {
97       return photos;
98    }
99
100    /**
101     * Add a photo to photos
102     * @param photo the photo to add
103     */

104    public void addPhoto(Photo photo) {
105       photos.add(photo);
106    }
107
108    /**
109     * Remove a photo from photos
110     * @param photo the photo to remove
111     */

112    public void removePhoto(Photo photo) {
113       photos.remove(photo);
114    }
115
116 }
117
Popular Tags