Coverage Report - org.kuali.rice.kim.bo.ui.PersonDocumentAffiliation
 
Classes in this File Line Coverage Branch Coverage Complexity
PersonDocumentAffiliation
0%
0/37
0%
0/8
1.5
 
 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.ui;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.LinkedHashMap;
 20  
 import java.util.List;
 21  
 
 22  
 import javax.persistence.Column;
 23  
 import javax.persistence.Entity;
 24  
 import javax.persistence.Id;
 25  
 import javax.persistence.Table;
 26  
 
 27  
 import org.kuali.rice.kim.bo.reference.impl.AffiliationTypeImpl;
 28  
 import org.kuali.rice.kns.util.ObjectUtils;
 29  
 
 30  
 /**
 31  
  * This is a description of what this class does - shyu don't forget to fill this in. 
 32  
  * 
 33  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 34  
  *
 35  
  */
 36  
 @Entity
 37  
 @Table(name = "KRIM_PND_AFLTN_MT")
 38  
 public class PersonDocumentAffiliation extends PersonDocumentBoDefaultBase {
 39  
         private static final long serialVersionUID = 1L;
 40  
 
 41  
         @Id
 42  
         @Column(name = "ENTITY_AFLTN_ID")
 43  
         protected String entityAffiliationId;
 44  
 
 45  
         @Column(name = "AFLTN_TYP_CD")
 46  
         protected String affiliationTypeCode;
 47  
 
 48  
         @Column(name = "CAMPUS_CD")
 49  
         protected String campusCode;
 50  
 
 51  
         protected AffiliationTypeImpl affiliationType;
 52  
         protected PersonDocumentEmploymentInfo newEmpInfo;
 53  
         protected List<PersonDocumentEmploymentInfo> empInfos;
 54  
 
 55  0
         public PersonDocumentAffiliation() {
 56  0
                 empInfos = new ArrayList<PersonDocumentEmploymentInfo>();
 57  0
                 setNewEmpInfo(new PersonDocumentEmploymentInfo());
 58  0
                 this.active = true;
 59  0
         }
 60  
 
 61  
         /**
 62  
          * @see org.kuali.rice.kim.bo.entity.KimEntityAffiliation#getAffiliationTypeCode()
 63  
          */
 64  
         public String getAffiliationTypeCode() {
 65  0
                 if(ObjectUtils.isNull(affiliationTypeCode))
 66  0
                         return "";
 67  0
                 return affiliationTypeCode;
 68  
         }
 69  
 
 70  
         /**
 71  
          * @see org.kuali.rice.kim.bo.entity.KimEntityAffiliation#getCampusCode()
 72  
          */
 73  
         public String getCampusCode() {
 74  0
                 return campusCode;
 75  
         }
 76  
 
 77  
         /**
 78  
          * @see org.kuali.rice.kim.bo.entity.KimEntityAffiliation#getEntityAffiliationId()
 79  
          */
 80  
         public String getEntityAffiliationId() {
 81  0
                 if(ObjectUtils.isNull(entityAffiliationId))
 82  0
                         return "";
 83  0
                 return entityAffiliationId;
 84  
         }
 85  
 
 86  
         /**
 87  
          * @see org.kuali.rice.kim.bo.entity.KimEntityAffiliation#setAffiliationTypeCode(java.lang.String)
 88  
          */
 89  
         public void setAffiliationTypeCode(String affiliationTypeCode) {
 90  0
                 this.affiliationTypeCode = affiliationTypeCode;
 91  0
         }
 92  
 
 93  
         /**
 94  
          * @see org.kuali.rice.kim.bo.entity.KimEntityAffiliation#setCampusCode(java.lang.String)
 95  
          */
 96  
         public void setCampusCode(String campusCode) {
 97  0
                 this.campusCode = campusCode;
 98  0
         }
 99  
 
 100  
         /**
 101  
          * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
 102  
          */
 103  
         @Override
 104  
         protected LinkedHashMap toStringMapper() {
 105  0
                 LinkedHashMap m = super.toStringMapper();
 106  0
                 m.put("entityAffiliationId", entityAffiliationId);
 107  0
                 m.put("affiliationTypeCode", affiliationTypeCode);
 108  0
                 return m;
 109  
         }
 110  
 
 111  
         public void setEntityAffiliationId(String entityAffiliationId) {
 112  0
                 this.entityAffiliationId = entityAffiliationId;
 113  0
         }
 114  
 
 115  
         public PersonDocumentEmploymentInfo getNewEmpInfo() {
 116  0
                 return this.newEmpInfo;
 117  
         }
 118  
 
 119  
         public void setNewEmpInfo(PersonDocumentEmploymentInfo newEmpInfo) {
 120  0
                 this.newEmpInfo = newEmpInfo;
 121  0
         }
 122  
 
 123  
         public List<PersonDocumentEmploymentInfo> getEmpInfos() {
 124  0
                 return this.empInfos;
 125  
         }
 126  
 
 127  
         public void setEmpInfos(List<PersonDocumentEmploymentInfo> empInfos) {
 128  0
                 this.empInfos = empInfos;
 129  0
         }
 130  
 
 131  
         public AffiliationTypeImpl getAffiliationType() {
 132  0
                 if(ObjectUtils.isNull(affiliationType))
 133  0
                         return null;
 134  0
                 return this.affiliationType;
 135  
         }
 136  
 
 137  
         public boolean isEmploymentAffiliationType() {
 138  0
                 if(ObjectUtils.isNull(affiliationType))
 139  0
                         return false;
 140  0
                 return this.affiliationType.isEmploymentAffiliationType();
 141  
         }
 142  
          
 143  
         public void setAffiliationType(AffiliationTypeImpl affiliationType) {
 144  0
                 this.affiliationType = affiliationType;
 145  0
         }
 146  
 
 147  
         @Override
 148  
         public boolean isActive(){
 149  0
                 return this.active;
 150  
         }
 151  
 
 152  
 }