Coverage Report - org.kuali.rice.kim.bo.impl.PersonImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
PersonImpl
0%
0/254
0%
0/88
1.829
 
 1  
 /*
 2  
  * Copyright 2007-2008 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.impl;
 17  
 
 18  
 import org.apache.commons.lang.StringUtils;
 19  
 import org.kuali.rice.core.util.type.KualiDecimal;
 20  
 import org.kuali.rice.kim.api.entity.address.EntityAddressContract;
 21  
 import org.kuali.rice.kim.api.entity.email.EntityEmailContract;
 22  
 import org.kuali.rice.kim.api.entity.principal.Principal;
 23  
 import org.kuali.rice.kim.bo.entity.KimEntityAffiliation;
 24  
 import org.kuali.rice.kim.bo.entity.KimEntityEmploymentInformation;
 25  
 import org.kuali.rice.kim.bo.entity.KimEntityExternalIdentifier;
 26  
 import org.kuali.rice.kim.bo.entity.KimEntityName;
 27  
 
 28  
 import org.kuali.rice.kim.bo.entity.dto.KimEntityDefaultInfo;
 29  
 import org.kuali.rice.kim.api.entity.phone.EntityPhoneContract;
 30  
 import org.kuali.rice.kim.api.entity.type.EntityTypeDataDefault;
 31  
 import org.kuali.rice.kim.api.services.IdentityManagementService;
 32  
 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
 33  
 import org.kuali.rice.kim.bo.Person;
 34  
 import org.kuali.rice.kim.bo.entity.impl.KimEntityDefaultInfoCacheImpl;
 35  
 import org.kuali.rice.kim.bo.reference.impl.EmploymentStatusImpl;
 36  
 import org.kuali.rice.kim.bo.reference.impl.EmploymentTypeImpl;
 37  
 import org.kuali.rice.kim.service.PersonService;
 38  
 import org.kuali.rice.kim.util.KimCommonUtilsInternal;
 39  
 import org.kuali.rice.kim.util.KimConstants;
 40  
 import org.kuali.rice.kns.bo.TransientBusinessObjectBase;
 41  
 
 42  
 import java.util.ArrayList;
 43  
 import java.util.HashMap;
 44  
 import java.util.List;
 45  
 import java.util.Map;
 46  
 //import org.kuali.rice.shareddata.api.campus.Campus;
 47  
 
 48  
 /**
 49  
  * This is a description of what this class does - jonathan don't forget to fill this in. 
 50  
  * 
 51  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 52  
  *
 53  
  */
 54  
 public class PersonImpl extends TransientBusinessObjectBase implements Person {
 55  
 
 56  
         private static final long serialVersionUID = 1L;
 57  
         
 58  
         protected static PersonService personService;
 59  
         protected static IdentityManagementService identityManagementService;
 60  
 
 61  
         private String lookupRoleNamespaceCode;
 62  
         private String lookupRoleName;
 63  
         
 64  
         // principal data
 65  
         protected String principalId;
 66  
         protected String principalName;
 67  
         protected String entityId;
 68  
         protected String entityTypeCode;
 69  
         // name data
 70  0
         protected String firstName = "";
 71  0
         protected String middleName = "";
 72  0
         protected String lastName = "";
 73  
         
 74  0
         protected String name = "";
 75  
         // address data
 76  0
         protected String addressLine1 = "";
 77  0
         protected String addressLine2 = "";
 78  0
         protected String addressLine3 = "";
 79  0
         protected String addressCityName = "";
 80  0
         protected String addressStateCode = "";
 81  0
         protected String addressPostalCode = "";
 82  0
         protected String addressCountryCode = "";
 83  
         // email data
 84  0
         protected String emailAddress = "";
 85  
         // phone data
 86  0
         protected String phoneNumber = "";
 87  
         // privacy preferences data
 88  0
         protected boolean suppressName = false;
 89  0
         protected boolean suppressAddress = false;
 90  0
         protected boolean suppressPhone = false;
 91  0
         protected boolean suppressPersonal = false;
 92  0
         protected boolean suppressEmail = false;
 93  
         // affiliation data
 94  
         protected List<? extends KimEntityAffiliation> affiliations;
 95  
         
 96  0
         protected String campusCode = "";
 97  
         //protected Campus campus;
 98  
         // external identifier data
 99  0
         protected Map<String,String> externalIdentifiers = null;
 100  
         // employment data
 101  0
         protected String employeeStatusCode = "";
 102  
         protected EmploymentStatusImpl employeeStatus;
 103  0
         protected String employeeTypeCode = "";
 104  
         protected EmploymentTypeImpl employeeType;
 105  0
         protected String primaryDepartmentCode = "";
 106  0
         protected String employeeId = "";
 107  
         
 108  0
         protected KualiDecimal baseSalaryAmount = KualiDecimal.ZERO;
 109  0
         protected boolean active = true;
 110  
         
 111  0
         public PersonImpl() {}
 112  
         
 113  
         public PersonImpl( Principal principal, String personEntityTypeCode ) {
 114  0
                 this( principal, null, personEntityTypeCode );
 115  0
         }
 116  
 
 117  0
         public PersonImpl( Principal principal, KimEntityDefaultInfo entity, String personEntityTypeCode ) {
 118  0
                 setPrincipal( principal, entity, personEntityTypeCode );
 119  0
         }
 120  
         
 121  
         public PersonImpl( String principalId, String personEntityTypeCode ) {
 122  0
                 this( getIdentityManagementService().getPrincipal(principalId), personEntityTypeCode );
 123  0
         }
 124  
         
 125  0
         public PersonImpl( KimEntityDefaultInfoCacheImpl p ) {
 126  0
                 entityId = p.getEntityId();
 127  0
                 principalId = p.getPrincipalId();
 128  0
                 principalName = p.getPrincipalName();
 129  0
                 entityTypeCode = p.getEntityTypeCode();
 130  0
                 firstName = p.getFirstName();
 131  0
                 middleName = p.getMiddleName();
 132  0
                 lastName = p.getLastName();
 133  0
                 name = p.getName();
 134  0
                 campusCode = p.getCampusCode();
 135  0
                 primaryDepartmentCode = p.getPrimaryDepartmentCode();
 136  0
                 employeeId = p.getEmployeeId();
 137  0
                 affiliations = new ArrayList<KimEntityAffiliation>( 0 );
 138  0
                 externalIdentifiers = new HashMap<String,String>( 0 );
 139  0
         }
 140  
 
 141  
         /**
 142  
          * Sets the principal object and populates the person object from that. 
 143  
          */
 144  
         public void setPrincipal(Principal principal, KimEntityDefaultInfo entity, String personEntityTypeCode) {
 145  0
                 populatePrincipalInfo( principal );
 146  0
                 if ( entity == null ) {
 147  0
                         entity = getIdentityManagementService().getEntityDefaultInfo( principal.getEntityId() );
 148  
                 }
 149  0
                 populateEntityInfo( entity, principal, personEntityTypeCode );
 150  0
         }
 151  
 
 152  
         
 153  
         protected void populatePrincipalInfo( Principal principal ) {
 154  0
                 entityId = principal.getEntityId();
 155  0
                 principalId = principal.getPrincipalId();
 156  0
                 principalName = principal.getPrincipalName();
 157  0
                 active = principal.isActive();
 158  0
         }
 159  
         
 160  
         protected void populateEntityInfo( KimEntityDefaultInfo entity, Principal principal, String personEntityTypeCode ) {
 161  0
                 if(entity!=null){
 162  0
                     populatePrivacyInfo (entity );
 163  0
                         EntityTypeDataDefault entityTypeDataDefault = entity.getEntityType( personEntityTypeCode );
 164  0
                         entityTypeCode = personEntityTypeCode;
 165  0
                         populateNameInfo( personEntityTypeCode, entity, principal );
 166  0
                         populateAddressInfo( entityTypeDataDefault );
 167  0
                         populateEmailInfo( entityTypeDataDefault );
 168  0
                         populatePhoneInfo( entityTypeDataDefault );
 169  0
                         populateAffiliationInfo( entity );
 170  0
                         populateEmploymentInfo( entity );
 171  0
                         populateExternalIdentifiers( entity );
 172  
                 }
 173  0
         }
 174  
         
 175  
         protected void populateNameInfo( String entityTypeCode, KimEntityDefaultInfo entity, Principal principal ) {
 176  0
                 if(entity!=null){
 177  0
                         KimEntityName entityName = entity.getDefaultName();
 178  0
                         if ( entityName != null ) {
 179  0
                                 firstName = unNullify( entityName.getFirstName());
 180  0
                                 middleName = unNullify( entityName.getMiddleName() );
 181  0
                                 lastName = unNullify( entityName.getLastName() );
 182  0
                                 if ( entityTypeCode.equals( KimConstants.EntityTypes.SYSTEM ) ) {
 183  0
                                         name = principal.getPrincipalName().toUpperCase();
 184  
                                 } else {
 185  0
                                         name = unNullify( entityName.getFormattedName() );
 186  0
                                         if(name.equals("") || name == null){
 187  0
                                                 name = lastName + ", " + firstName;                                        
 188  
                                         }
 189  
                                 }
 190  
                         } else {
 191  0
                                 firstName = "";
 192  0
                                 middleName = "";
 193  0
                                 if ( entityTypeCode.equals( KimConstants.EntityTypes.SYSTEM ) ) {
 194  0
                                         name = principal.getPrincipalName().toUpperCase();
 195  0
                                         lastName = principal.getPrincipalName().toUpperCase();
 196  
                                 } else {
 197  0
                                         name = "";
 198  0
                                         lastName = "";
 199  
                                 }
 200  
                         }
 201  
                 }
 202  0
         }
 203  
         
 204  
         protected void populatePrivacyInfo (KimEntityDefaultInfo entity) {
 205  0
             if(entity!=null) {
 206  0
                 if (entity.getPrivacyPreferences() != null) {
 207  0
                     suppressName = entity.getPrivacyPreferences().isSuppressName();
 208  0
                     suppressAddress = entity.getPrivacyPreferences().isSuppressAddress();
 209  0
                     suppressPhone = entity.getPrivacyPreferences().isSuppressPhone();
 210  0
                     suppressPersonal = entity.getPrivacyPreferences().isSuppressPersonal();
 211  0
                     suppressEmail = entity.getPrivacyPreferences().isSuppressEmail();
 212  
                 }
 213  
             }
 214  0
         }
 215  
         
 216  
         protected void populateAddressInfo( EntityTypeDataDefault entityTypeData ) {
 217  0
                 if(entityTypeData!=null){
 218  0
                         EntityAddressContract defaultAddress = entityTypeData.getDefaultAddress();
 219  0
                         if ( defaultAddress != null ) {                        
 220  0
                                 addressLine1 = unNullify( defaultAddress.getLine1Unmasked() );
 221  0
                                 addressLine2 = unNullify( defaultAddress.getLine2Unmasked() );
 222  0
                                 addressLine3 = unNullify( defaultAddress.getLine3Unmasked() );
 223  0
                                 addressCityName = unNullify( defaultAddress.getCityNameUnmasked() );
 224  0
                                 addressStateCode = unNullify( defaultAddress.getStateCodeUnmasked() );
 225  0
                                 addressPostalCode = unNullify( defaultAddress.getPostalCodeUnmasked() );
 226  0
                                 addressCountryCode = unNullify( defaultAddress.getCountryCodeUnmasked() );
 227  
                         } else {
 228  0
                                 addressLine1 = "";
 229  0
                                 addressLine2 = "";
 230  0
                                 addressLine3 = "";
 231  0
                                 addressCityName = "";
 232  0
                                 addressStateCode = "";
 233  0
                                 addressPostalCode = "";
 234  0
                                 addressCountryCode = "";
 235  
                         }
 236  
                 }
 237  0
         }
 238  
         
 239  
         protected void populateEmailInfo( EntityTypeDataDefault entityTypeData ) {
 240  0
                 if(entityTypeData!=null){
 241  0
                         EntityEmailContract entityEmail = entityTypeData.getDefaultEmailAddress();
 242  0
                         if ( entityEmail != null ) {
 243  0
                                 emailAddress = unNullify( entityEmail.getEmailAddressUnmasked() );
 244  
                         } else {
 245  0
                                 emailAddress = "";
 246  
                         }
 247  
                 }
 248  0
         }
 249  
         
 250  
         protected void populatePhoneInfo( EntityTypeDataDefault entityTypeData ) {
 251  0
                 if(entityTypeData!=null){
 252  0
                         EntityPhoneContract entityPhone = entityTypeData.getDefaultPhoneNumber();
 253  0
                         if ( entityPhone != null ) {
 254  0
                                 phoneNumber = unNullify( entityPhone.getFormattedPhoneNumberUnmasked() );
 255  
                         } else {
 256  0
                                 phoneNumber = "";
 257  
                         }
 258  
                 }
 259  0
         }
 260  
         
 261  
         protected void populateAffiliationInfo( KimEntityDefaultInfo entity ) {
 262  0
                 if(entity!=null){
 263  0
                         affiliations = entity.getAffiliations();
 264  0
                         KimEntityAffiliation defaultAffiliation = entity.getDefaultAffiliation();
 265  0
                         if ( defaultAffiliation != null  ) {
 266  0
                                 campusCode = unNullify( defaultAffiliation.getCampusCode() );
 267  
                         } else {
 268  0
                                 campusCode = "";
 269  
                         }
 270  
                 }
 271  0
         }
 272  
         
 273  
         protected void populateEmploymentInfo( KimEntityDefaultInfo entity ) {
 274  0
                 if(entity!=null){
 275  0
                         KimEntityEmploymentInformation employmentInformation = entity.getPrimaryEmployment();
 276  0
                         if ( employmentInformation != null ) {
 277  0
                                 employeeStatusCode = unNullify( employmentInformation.getEmployeeStatusCode() );
 278  0
                                 employeeTypeCode = unNullify( employmentInformation.getEmployeeTypeCode() );
 279  0
                                 primaryDepartmentCode = unNullify( employmentInformation.getPrimaryDepartmentCode() );
 280  0
                                 employeeId = unNullify( employmentInformation.getEmployeeId() );
 281  0
                                 if ( employmentInformation.getBaseSalaryAmount() != null ) {
 282  0
                                         baseSalaryAmount = employmentInformation.getBaseSalaryAmount();
 283  
                                 } else {
 284  0
                                         baseSalaryAmount = KualiDecimal.ZERO;
 285  
                                 }
 286  
                         } else {
 287  0
                                 employeeStatusCode = "";
 288  0
                                 employeeTypeCode = "";
 289  0
                                 primaryDepartmentCode = "";
 290  0
                                 employeeId = "";
 291  0
                                 baseSalaryAmount = KualiDecimal.ZERO;
 292  
                         }
 293  
                 }
 294  0
         }
 295  
         
 296  
         protected void populateExternalIdentifiers( KimEntityDefaultInfo entity ) {
 297  0
                 if(entity!=null){
 298  0
                         List<? extends KimEntityExternalIdentifier> externalIds = entity.getExternalIdentifiers();
 299  0
                         externalIdentifiers = new HashMap<String,String>( externalIds.size() );
 300  0
                         for ( KimEntityExternalIdentifier eei : externalIds ) {
 301  0
                                 externalIdentifiers.put( eei.getExternalIdentifierTypeCode(), eei.getExternalId() );
 302  
                         }
 303  
                 }
 304  0
         }
 305  
         
 306  
         /** So users of this class don't need to program around nulls. */
 307  
         private String unNullify( String str ) {
 308  0
                 if ( str == null ) {
 309  0
                         return "";
 310  
                 }
 311  0
                 return str;
 312  
         }
 313  
         
 314  
         /**
 315  
          * @see org.kuali.rice.kim.bo.Person#getEntityId()
 316  
          */
 317  
         public String getEntityId() {
 318  0
                 return entityId;
 319  
         }
 320  
         
 321  
         /**
 322  
          * @see org.kuali.rice.kim.bo.Person#getPrincipalId()
 323  
          */
 324  
         public String getPrincipalId() {
 325  0
                 return principalId;
 326  
         }
 327  
         
 328  
         /**
 329  
          * This overridden method ...
 330  
          * 
 331  
          * @see org.kuali.rice.kim.bo.Person#getPrincipalName()
 332  
          */
 333  
         public String getPrincipalName() {
 334  0
                 return principalName;
 335  
         }
 336  
         
 337  
         /**
 338  
          * @see org.kuali.rice.kim.bo.Person#getFirstName()
 339  
          */
 340  
         public String getFirstName() {
 341  0
             if (KimCommonUtilsInternal.isSuppressName(getEntityId())){
 342  0
                 return KimConstants.RESTRICTED_DATA_MASK;
 343  
             }
 344  0
                 return firstName;
 345  
         }
 346  
         
 347  
         /**
 348  
      * @see org.kuali.rice.kim.bo.Person#getFirstNameUnmasked()
 349  
      */
 350  
     public String getFirstNameUnmasked() {
 351  0
         return firstName;
 352  
     }
 353  
 
 354  
         /**
 355  
          * @see org.kuali.rice.kim.bo.Person#getMiddleName()
 356  
          */
 357  
         public String getMiddleName() {
 358  0
             if (KimCommonUtilsInternal.isSuppressName(getEntityId())){
 359  0
             return KimConstants.RESTRICTED_DATA_MASK;
 360  
         }
 361  0
                 return middleName;
 362  
         }
 363  
         
 364  
         /**
 365  
      * @see org.kuali.rice.kim.bo.Person#getMiddleNameUnmasked()
 366  
      */
 367  
         public String getMiddleNameUnmasked() {
 368  0
             return middleName;
 369  
         }
 370  
         
 371  
         /**
 372  
          * @see org.kuali.rice.kim.bo.Person#getLastName()
 373  
          */
 374  
         public String getLastName() {
 375  0
             if (KimCommonUtilsInternal.isSuppressName(getEntityId())){
 376  0
             return KimConstants.RESTRICTED_DATA_MASK;
 377  
         }
 378  0
                 return lastName;
 379  
         }
 380  
         
 381  
         /**
 382  
      * @see org.kuali.rice.kim.bo.Person#getLastNameUnmasked()
 383  
      */
 384  
     public String getLastNameUnmasked() {
 385  0
         return lastName;
 386  
     }
 387  
         
 388  
         /**
 389  
          * @see org.kuali.rice.kim.bo.Person#getName()
 390  
          */
 391  
         public String getName() {
 392  0
         if (StringUtils.isNotBlank(getEntityId()) && KimCommonUtilsInternal.isSuppressName(getEntityId())) {
 393  0
             return KimConstants.RESTRICTED_DATA_MASK;
 394  
         }
 395  0
         return name;
 396  
     }
 397  
         
 398  
         public String getNameUnmasked() {
 399  0
             return this.name;
 400  
         }
 401  
         
 402  
         /**
 403  
          * @see org.kuali.rice.kim.bo.Person#getPhoneNumber()
 404  
          */
 405  
         public String getPhoneNumber() {
 406  0
             if (KimCommonUtilsInternal.isSuppressPhone(getEntityId())){
 407  0
             return KimConstants.RESTRICTED_DATA_MASK;
 408  
         }
 409  0
                 return phoneNumber;
 410  
         }
 411  
         
 412  
            /**
 413  
      * @see org.kuali.rice.kim.bo.Person#getPhoneNumberUnmasked()
 414  
      */
 415  
     public String getPhoneNumberUnmasked() {
 416  0
         return phoneNumber;
 417  
     }
 418  
 
 419  
         /**
 420  
          * @see org.kuali.rice.kim.bo.Person#getEmailAddress()
 421  
          */
 422  
         public String getEmailAddress() {
 423  0
             if (KimCommonUtilsInternal.isSuppressEmail(getEntityId())){
 424  0
             return KimConstants.RESTRICTED_DATA_MASK;
 425  
         }
 426  0
                 return emailAddress;
 427  
         }
 428  
         
 429  
         public String getEmailAddressUnmasked() {
 430  0
             return emailAddress;
 431  
         }
 432  
         
 433  
         public List<? extends KimEntityAffiliation> getAffiliations() {
 434  0
                 return affiliations;
 435  
         }
 436  
         
 437  
         /**
 438  
          * This overridden method ...
 439  
          * 
 440  
          * @see org.kuali.rice.kim.bo.Person#hasAffiliationOfType(java.lang.String)
 441  
          */
 442  
         public boolean hasAffiliationOfType(String affiliationTypeCode) {
 443  0
                 return getCampusCodesForAffiliationOfType(affiliationTypeCode).size() > 0;
 444  
         }
 445  
         
 446  
         
 447  
         public List<String> getCampusCodesForAffiliationOfType(String affiliationTypeCode) {
 448  0
                 ArrayList<String> campusCodes = new ArrayList<String>( 3 );
 449  0
                 if ( affiliationTypeCode == null ) {
 450  0
                         return campusCodes;
 451  
                 }
 452  0
                 for ( KimEntityAffiliation a : getAffiliations() ) {
 453  0
                         if ( a.getAffiliationTypeCode().equals(affiliationTypeCode)  ) {
 454  0
                                 campusCodes.add( a.getCampusCode() );
 455  
                         }
 456  
                 }
 457  0
                 return campusCodes;
 458  
         }
 459  
         
 460  
         /**
 461  
          * @see org.kuali.rice.kim.bo.Person#getExternalId(java.lang.String)
 462  
          */
 463  
         public String getExternalId(String externalIdentifierTypeCode) {
 464  0
                 return externalIdentifiers.get( externalIdentifierTypeCode );
 465  
         }
 466  
         
 467  
         /**
 468  
          * Pulls the campus code from the default affiliation for the entity.
 469  
          * Returns null if no default affiliation is set.
 470  
          * @see org.kuali.rice.kim.bo.Person#getCampusCode()
 471  
          */
 472  
         public String getCampusCode() {
 473  0
                 return campusCode;
 474  
         }
 475  
 
 476  
         /**
 477  
          * @return the personService
 478  
          */
 479  
         @SuppressWarnings("unchecked")
 480  
         public static PersonService getPersonService() {
 481  0
                 if ( personService == null ) {
 482  0
                         personService = KimApiServiceLocator.getPersonService();
 483  
                 }
 484  0
                 return personService;
 485  
         }
 486  
 
 487  
         /**
 488  
          * @return the identityManagementService
 489  
          */
 490  
         public static IdentityManagementService getIdentityManagementService() {
 491  0
                 if ( identityManagementService == null ) {
 492  0
                         identityManagementService = KimApiServiceLocator.getIdentityManagementService();
 493  
                 }
 494  0
                 return identityManagementService;
 495  
         }
 496  
 
 497  
         /**
 498  
          * @see org.kuali.rice.kim.bo.Person#getExternalIdentifiers()
 499  
          */
 500  
         public Map<String,String> getExternalIdentifiers() {
 501  0
                 return externalIdentifiers;
 502  
         }
 503  
 
 504  
         public String getAddressLine1() {
 505  0
             if (KimCommonUtilsInternal.isSuppressAddress(getEntityId())){
 506  0
             return KimConstants.RESTRICTED_DATA_MASK;
 507  
         }
 508  0
                 return this.addressLine1;
 509  
         }
 510  
         
 511  
         public String getAddressLine1Unmasked() {
 512  0
             return this.addressLine1;
 513  
         }
 514  
 
 515  
         public String getAddressLine2() {
 516  0
             if (KimCommonUtilsInternal.isSuppressAddress(getEntityId())){
 517  0
             return KimConstants.RESTRICTED_DATA_MASK;
 518  
         }
 519  0
                 return this.addressLine2;
 520  
         }
 521  
         
 522  
         public String getAddressLine2Unmasked() {
 523  0
         return this.addressLine2;
 524  
     }
 525  
 
 526  
         public String getAddressLine3() {
 527  0
             if (KimCommonUtilsInternal.isSuppressAddress(getEntityId())){
 528  0
             return KimConstants.RESTRICTED_DATA_MASK;
 529  
         }
 530  0
                 return this.addressLine3;
 531  
         }
 532  
         
 533  
         public String getAddressLine3Unmasked() {
 534  0
         return this.addressLine3;
 535  
     }
 536  
 
 537  
         public String getAddressCityName() {
 538  0
             if (KimCommonUtilsInternal.isSuppressAddress(getEntityId())){
 539  0
             return KimConstants.RESTRICTED_DATA_MASK;
 540  
         }
 541  0
                 return this.addressCityName;
 542  
         }
 543  
         
 544  
         public String getAddressCityNameUnmasked() {
 545  0
         return this.addressCityName;
 546  
     }
 547  
 
 548  
         public String getAddressStateCode() {
 549  0
             if (KimCommonUtilsInternal.isSuppressAddress(getEntityId())){
 550  0
             return KimConstants.RESTRICTED_DATA_MASK;
 551  
         }
 552  0
                 return this.addressStateCode;
 553  
         }
 554  
         
 555  
         public String getAddressStateCodeUnmasked() {
 556  0
         return this.addressStateCode;
 557  
     }
 558  
 
 559  
         public String getAddressPostalCode() {
 560  0
             if (KimCommonUtilsInternal.isSuppressAddress(getEntityId())){
 561  0
             return KimConstants.RESTRICTED_DATA_MASK;
 562  
         }
 563  0
                 return this.addressPostalCode;
 564  
         }
 565  
         
 566  
         public String getAddressPostalCodeUnmasked() {
 567  0
         return this.addressPostalCode;
 568  
     }
 569  
 
 570  
         public String getAddressCountryCode() {
 571  0
             if (KimCommonUtilsInternal.isSuppressAddress(getEntityId())){
 572  0
             return KimConstants.RESTRICTED_DATA_MASK;
 573  
         }
 574  0
                 return this.addressCountryCode;
 575  
         }
 576  
         
 577  
         public String getAddressCountryCodeUnmasked() {
 578  0
         return this.addressCountryCode;
 579  
     }
 580  
 
 581  
         public String getEmployeeStatusCode() {
 582  0
                 return this.employeeStatusCode;
 583  
         }
 584  
 
 585  
         public String getEmployeeTypeCode() {
 586  0
                 return this.employeeTypeCode;
 587  
         }
 588  
 
 589  
         public KualiDecimal getBaseSalaryAmount() {
 590  0
                 return this.baseSalaryAmount;
 591  
         }
 592  
 
 593  
         public String getEmployeeId() {
 594  0
                 return this.employeeId;
 595  
         }
 596  
 
 597  
         public String getPrimaryDepartmentCode() {
 598  0
                 return this.primaryDepartmentCode;
 599  
         }
 600  
 
 601  
         public String getEntityTypeCode() {
 602  0
                 return this.entityTypeCode;
 603  
         }
 604  
 
 605  
         public boolean isActive() {
 606  0
                 return this.active;
 607  
         }
 608  
 
 609  
         public void setActive(boolean active) {
 610  0
                 this.active = active;
 611  0
         }
 612  
 
 613  
         /**
 614  
          * @return the lookupRoleNamespaceCode
 615  
          */
 616  
         public String getLookupRoleNamespaceCode() {
 617  0
                 return this.lookupRoleNamespaceCode;
 618  
         }
 619  
 
 620  
         /**
 621  
          * @param lookupRoleNamespaceCode the lookupRoleNamespaceCode to set
 622  
          */
 623  
         public void setLookupRoleNamespaceCode(String lookupRoleNamespaceCode) {
 624  0
                 this.lookupRoleNamespaceCode = lookupRoleNamespaceCode;
 625  0
         }
 626  
 
 627  
         /**
 628  
          * @return the lookupRoleName
 629  
          */
 630  
         public String getLookupRoleName() {
 631  0
                 return this.lookupRoleName;
 632  
         }
 633  
 
 634  
         /**
 635  
          * @param lookupRoleName the lookupRoleName to set
 636  
          */
 637  
         public void setLookupRoleName(String lookupRoleName) {
 638  0
                 this.lookupRoleName = lookupRoleName;
 639  0
         }
 640  
 
 641  
         /**
 642  
          * @param principalName the principalName to set
 643  
          */
 644  
         public void setPrincipalName(String principalName) {
 645  0
                 this.principalName = principalName;
 646  0
         }
 647  
 
 648  
         /**
 649  
          * @param name the name to set
 650  
          */
 651  
         public void setName(String name) {
 652  0
                 this.name = name;
 653  0
         }
 654  
 
 655  
         //public Campus getCampus() {
 656  
         //        return this.campus;
 657  
         //}
 658  
 
 659  
         public EmploymentStatusImpl getEmployeeStatus() {
 660  0
                 return this.employeeStatus;
 661  
         }
 662  
 
 663  
         public EmploymentTypeImpl getEmployeeType() {
 664  0
                 return this.employeeType;
 665  
         }
 666  
 }