View Javadoc

1   /**
2    * Copyright 2011 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15   
16  package org.kuali.mobility.people.entity;
17  
18  import java.io.Serializable;
19  import java.util.ArrayList;
20  import java.util.List;
21  import javax.xml.bind.annotation.XmlRootElement;
22  
23  @XmlRootElement(name="person")
24  public class PersonImpl implements Serializable, Person {
25  
26  	private static final long serialVersionUID = -2125754188712894101L;
27  	
28  	private String firstName;
29  	private String lastName;
30  	private String displayName;
31  	private String userName;
32  	
33  	private List<String> locations;
34  	private List<String> affiliations;
35  	private List<String> departments;
36  	
37  	private String email;
38  	private String phone;
39  	private String address;
40  	
41  	public PersonImpl() {
42  		locations = new ArrayList<String>();
43  		affiliations = new ArrayList<String>();
44  		departments = new ArrayList<String>();
45  	}
46  	
47  	/* (non-Javadoc)
48  	 * @see org.kuali.mobility.people.entity.People#getHashedUserName()
49  	 */
50  	@Override
51  	public String getHashedUserName() {
52  		return Integer.toString(Math.abs(userName.hashCode()));
53  	}
54  	/* (non-Javadoc)
55  	 * @see org.kuali.mobility.people.entity.People#getFirstName()
56  	 */
57  	@Override
58  	public String getFirstName() {
59  		return firstName;
60  	}
61  	/* (non-Javadoc)
62  	 * @see org.kuali.mobility.people.entity.People#setFirstName(java.lang.String)
63  	 */
64  	@Override
65  	public void setFirstName(String firstName) {
66  		this.firstName = firstName;
67  	}
68  	/* (non-Javadoc)
69  	 * @see org.kuali.mobility.people.entity.People#getLastName()
70  	 */
71  	@Override
72  	public String getLastName() {
73  		return lastName;
74  	}
75  	/* (non-Javadoc)
76  	 * @see org.kuali.mobility.people.entity.People#setLastName(java.lang.String)
77  	 */
78  	@Override
79  	public void setLastName(String lastName) {
80  		this.lastName = lastName;
81  	}
82  	/* (non-Javadoc)
83  	 * @see org.kuali.mobility.people.entity.People#getUserName()
84  	 */
85  	@Override
86  	public String getUserName() {
87  		return userName;
88  	}
89  	/* (non-Javadoc)
90  	 * @see org.kuali.mobility.people.entity.People#setUserName(java.lang.String)
91  	 */
92  	@Override
93  	public void setUserName(String userName) {
94  		this.userName = userName;
95  	}
96  	/* (non-Javadoc)
97  	 * @see org.kuali.mobility.people.entity.People#getDisplayName()
98  	 */
99  	@Override
100 	public String getDisplayName() {
101 		return displayName;
102 	}
103 	/* (non-Javadoc)
104 	 * @see org.kuali.mobility.people.entity.People#setDisplayName(java.lang.String)
105 	 */
106 	@Override
107 	public void setDisplayName(String displayName) {
108 		this.displayName = displayName;
109 	}
110 	/* (non-Javadoc)
111 	 * @see org.kuali.mobility.people.entity.People#getEmail()
112 	 */
113 	@Override
114 	public String getEmail() {
115 		return email;
116 	}
117 	/* (non-Javadoc)
118 	 * @see org.kuali.mobility.people.entity.People#setEmail(java.lang.String)
119 	 */
120 	@Override
121 	public void setEmail(String email) {
122 		this.email = email;
123 	}
124 	/* (non-Javadoc)
125 	 * @see org.kuali.mobility.people.entity.People#getPhone()
126 	 */
127 	@Override
128 	public String getPhone() {
129 		return phone;
130 	}
131 	/* (non-Javadoc)
132 	 * @see org.kuali.mobility.people.entity.People#setPhone(java.lang.String)
133 	 */
134 	@Override
135 	public void setPhone(String phone) {
136 		this.phone = phone;
137 	}
138 	/* (non-Javadoc)
139 	 * @see org.kuali.mobility.people.entity.People#getAddress()
140 	 */
141 	@Override
142 	public String getAddress() {
143 		return address;
144 	}
145 	/* (non-Javadoc)
146 	 * @see org.kuali.mobility.people.entity.People#setAddress(java.lang.String)
147 	 */
148 	@Override
149 	public void setAddress(String address) {
150 		this.address = address;
151 	}
152 	/* (non-Javadoc)
153 	 * @see org.kuali.mobility.people.entity.People#getLocations()
154 	 */
155 	@Override
156 	public List<String> getLocations() {
157 		return locations;
158 	}
159 	/* (non-Javadoc)
160 	 * @see org.kuali.mobility.people.entity.People#setLocations(java.util.List)
161 	 */
162 	@Override
163 	public void setLocations(List<String> locations) {
164 		this.locations = locations;
165 	}
166 	/* (non-Javadoc)
167 	 * @see org.kuali.mobility.people.entity.People#getAffiliations()
168 	 */
169 	@Override
170 	public List<String> getAffiliations() {
171 		return affiliations;
172 	}
173 	/* (non-Javadoc)
174 	 * @see org.kuali.mobility.people.entity.People#setAffiliations(java.util.List)
175 	 */
176 	@Override
177 	public void setAffiliations(List<String> affiliations) {
178 		this.affiliations = affiliations;
179 	}
180 	/* (non-Javadoc)
181 	 * @see org.kuali.mobility.people.entity.People#getDepartments()
182 	 */
183 	@Override
184 	public List<String> getDepartments() {
185 		return departments;
186 	}
187 	/* (non-Javadoc)
188 	 * @see org.kuali.mobility.people.entity.People#setDepartments(java.util.List)
189 	 */
190 	@Override
191 	public void setDepartments(List<String> departments) {
192 		this.departments = departments;
193 	}
194 }