View Javadoc

1   /*
2    * Copyright 2007-2009 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.kim.bo.entity.dto;
17  
18  import java.io.Serializable;
19  
20  import org.kuali.rice.kim.bo.entity.KimEntityName;
21  
22  /**
23   * @author Kuali Rice Team (rice.collab@kuali.org)
24   */
25  public class KimEntityNameInfo extends KimDefaultableInfo implements KimEntityName, Serializable {
26  
27  	private static final long serialVersionUID = 1L;
28  
29  	protected String entityNameId;
30  	protected String nameTypeCode;
31  	protected String firstName;
32  	protected String firstNameUnmasked;
33  	protected String middleName;
34  	protected String middleNameUnmasked;
35  	protected String lastName;
36  	protected String lastNameUnmasked;
37  	protected String title;
38  	protected String titleUnmasked;
39  	protected String suffix;
40  	protected String suffixUnmasked;
41  	
42  	protected boolean suppressName = false;
43  	
44  	protected String formattedName;
45  	protected String formattedNameUnmasked;
46  
47  	/**
48  	 * construct an empty {@link KimEntityNameInfo}
49  	 */
50  	public KimEntityNameInfo() {
51  		super();
52  		active = true;
53  	}
54  	
55  	/**
56  	 * construct a {@link KimEntityNameInfo} derived from the given {@link KimEntityName}
57  	 */
58  	public KimEntityNameInfo( KimEntityName name ) {
59  		this();
60  		if ( name != null ) {
61  		    this.entityNameId = name.getEntityNameId();
62  		    this.nameTypeCode = name.getNameTypeCode();
63  		    this.firstName = name.getFirstName();
64  		    this.firstNameUnmasked = name.getFirstNameUnmasked();
65  		    this.middleName = name.getMiddleName();
66  		    this.middleNameUnmasked = name.getMiddleNameUnmasked();
67  		    this.lastName = name.getLastName();
68  		    this.lastNameUnmasked = name.getLastNameUnmasked();
69  		    this.title = name.getTitle();
70  		    this.titleUnmasked = name.getTitleUnmasked();
71  		    this.suffix = name.getSuffix();
72  		    this.suffixUnmasked = name.getSuffixUnmasked();
73  		    this.active = name.isActive();
74  		    this.dflt = name.isDefault();
75  		    this.suppressName = name.isSuppressName();
76  		    
77  		    this.formattedName = name.getFormattedName();
78  		    this.formattedNameUnmasked = name.getFormattedNameUnmasked();
79  		}
80  	}
81  
82  	/**
83  	 * {@inheritDoc} 
84  	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getEntityNameId()
85  	 */
86  	public String getEntityNameId() {
87  		return entityNameId;
88  	}
89  
90  	/**
91  	 * @param entityNameId the entityNameId to set
92  	 */
93  	public void setEntityNameId(String entityNameId) {
94  		this.entityNameId = entityNameId;
95  	}
96  
97  	/**
98  	 * {@inheritDoc} 
99  	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getNameTypeCode()
100 	 */
101 	public String getNameTypeCode() {
102 		return nameTypeCode;
103 	}
104 
105 	/**
106 	 * @param nameTypeCode the nameTypeCode to set
107 	 */
108 	public void setNameTypeCode(String nameTypeCode) {
109 		this.nameTypeCode = nameTypeCode;
110 	}
111 
112 	/**
113 	 * {@inheritDoc} 
114 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getFirstName()
115 	 */
116 	public String getFirstName() {
117 		return firstName;
118 	}
119 
120 	/**
121 	 * @param firstName the firstName to set
122 	 */
123 	public void setFirstName(String firstName) {
124 		this.firstName = firstName;
125 	}
126 
127 	/**
128 	 * {@inheritDoc} 
129 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getFirstNameUnmasked()
130 	 */
131 	public String getFirstNameUnmasked() {
132 		return firstNameUnmasked;
133 	}
134 
135 	/**
136 	 * @param firstNameUnmasked the firstNameUnmasked to set
137 	 */
138 	public void setFirstNameUnmasked(String firstNameUnmasked) {
139 		this.firstNameUnmasked = firstNameUnmasked;
140 	}
141 
142 	/**
143 	 * {@inheritDoc} 
144 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getMiddleName()
145 	 */
146 	public String getMiddleName() {
147 		return middleName;
148 	}
149 
150 	/**
151 	 * @param middleName the middleName to set
152 	 */
153 	public void setMiddleName(String middleName) {
154 		this.middleName = middleName;
155 	}
156 
157 	/**
158 	 * {@inheritDoc} 
159 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getMiddleNameUnmasked()
160 	 */
161 	public String getMiddleNameUnmasked() {
162 		return middleNameUnmasked;
163 	}
164 
165 	/**
166 	 * @param middleNameUnmasked the middleNameUnmasked to set
167 	 */
168 	public void setMiddleNameUnmasked(String middleNameUnmasked) {
169 		this.middleNameUnmasked = middleNameUnmasked;
170 	}
171 
172 	/**
173 	 * {@inheritDoc} 
174 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getLastName()
175 	 */
176 	public String getLastName() {
177 		return lastName;
178 	}
179 
180 	/**
181 	 * @param lastName the lastName to set
182 	 */
183 	public void setLastName(String lastName) {
184 		this.lastName = lastName;
185 	}
186 
187 	/**
188 	 * {@inheritDoc} 
189 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getLastNameUnmasked()
190 	 */
191 	public String getLastNameUnmasked() {
192 		return lastNameUnmasked;
193 	}
194 
195 	/**
196 	 * @param lastNameUnmasked the lastNameUnmasked to set
197 	 */
198 	public void setLastNameUnmasked(String lastNameUnmasked) {
199 		this.lastNameUnmasked = lastNameUnmasked;
200 	}
201 
202 	/**
203 	 * {@inheritDoc} 
204 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getTitle()
205 	 */
206 	public String getTitle() {
207 		return title;
208 	}
209 
210 	/**
211 	 * @param title the title to set
212 	 */
213 	public void setTitle(String title) {
214 		this.title = title;
215 	}
216 
217 	/**
218 	 * {@inheritDoc} 
219 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getTitleUnmasked()
220 	 */
221 	public String getTitleUnmasked() {
222 		return titleUnmasked;
223 	}
224 
225 	/**
226 	 * @param titleUnmasked the titleUnmasked to set
227 	 */
228 	public void setTitleUnmasked(String titleUnmasked) {
229 		this.titleUnmasked = titleUnmasked;
230 	}
231 
232 	/**
233 	 * {@inheritDoc} 
234 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getSuffix()
235 	 */
236 	public String getSuffix() {
237 		return suffix;
238 	}
239 
240 	/**
241 	 * @param suffix the suffix to set
242 	 */
243 	public void setSuffix(String suffix) {
244 		this.suffix = suffix;
245 	}
246 
247 	/**
248 	 * {@inheritDoc} 
249 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getSuffixUnmasked()
250 	 */
251 	public String getSuffixUnmasked() {
252 		return suffixUnmasked;
253 	}
254 
255 	/**
256 	 * @param suffixUnmasked the suffixUnmasked to set
257 	 */
258 	public void setSuffixUnmasked(String suffixUnmasked) {
259 		this.suffixUnmasked = suffixUnmasked;
260 	}
261 
262 	/**
263 	 * {@inheritDoc} 
264 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#isSuppressName()
265 	 */
266 	public boolean isSuppressName() {
267 		return this.suppressName;
268 	}
269 
270 	/**
271 	 * @param suppressName the suppressName to set
272 	 */
273 	public void setSuppressName(boolean suppressName) {
274 		this.suppressName = suppressName;
275 	}
276 
277 	/**
278 	 * {@inheritDoc} 
279 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getFormattedName()
280 	 */
281 	public String getFormattedName() {
282 		return formattedName;
283 	}
284 
285 	/**
286 	 * @param formattedName the formattedName to set
287 	 */
288 	public void setFormattedName(String formattedName) {
289 		this.formattedName = formattedName;
290 	}
291 
292 	/**
293 	 * {@inheritDoc} 
294 	 * @see org.kuali.rice.kim.bo.entity.KimEntityName#getFormattedNameUnmasked()
295 	 */
296 	public String getFormattedNameUnmasked() {
297 		return formattedNameUnmasked;
298 	}
299 
300 	/**
301 	 * @param formattedNameUnmasked the formattedNameUnmasked to set
302 	 */
303 	public void setFormattedNameUnmasked(String formattedNameUnmasked) {
304 		this.formattedNameUnmasked = formattedNameUnmasked;
305 	}
306 
307 }