| 1 |  |   | 
  | 2 |  |   | 
  | 3 |  |   | 
  | 4 |  |   | 
  | 5 |  |   | 
  | 6 |  |   | 
  | 7 |  |   | 
  | 8 |  |   | 
  | 9 |  |   | 
  | 10 |  |   | 
  | 11 |  |   | 
  | 12 |  |   | 
  | 13 |  |   | 
  | 14 |  |   | 
  | 15 |  |   | 
  | 16 |  |  package org.kuali.rice.kim.bo.reference.impl; | 
  | 17 |  |   | 
  | 18 |  |  import javax.persistence.AttributeOverride; | 
  | 19 |  |  import javax.persistence.AttributeOverrides; | 
  | 20 |  |  import javax.persistence.Column; | 
  | 21 |  |  import javax.persistence.Entity; | 
  | 22 |  |  import javax.persistence.Table; | 
  | 23 |  |   | 
  | 24 |  |  import org.hibernate.annotations.Type; | 
  | 25 |  |  import org.kuali.rice.kim.bo.reference.AffiliationType; | 
  | 26 |  |  import org.kuali.rice.kim.bo.reference.dto.AffiliationTypeInfo; | 
  | 27 |  |  import org.kuali.rice.kns.util.ObjectUtils; | 
  | 28 |  |   | 
  | 29 |  |   | 
  | 30 |  |   | 
  | 31 |  |   | 
  | 32 |  |  @Entity | 
  | 33 |  |  @Table(name="KRIM_AFLTN_TYP_T") | 
  | 34 |  |  @AttributeOverrides({ | 
  | 35 |  |          @AttributeOverride(name="code",column=@Column(name="AFLTN_TYP_CD")), | 
  | 36 |  |          @AttributeOverride(name="name",column=@Column(name="NM")) | 
  | 37 |  |  }) | 
  | 38 | 0 |  public class AffiliationTypeImpl extends KimCodeBase implements AffiliationType { | 
  | 39 |  |   | 
  | 40 |  |          private static final long serialVersionUID = 1L; | 
  | 41 |  |      @Type(type="yes_no") | 
  | 42 |  |      @Column(name="EMP_AFLTN_TYP_IND") | 
  | 43 |  |      protected boolean employmentAffiliationType; | 
  | 44 |  |   | 
  | 45 |  |   | 
  | 46 |  |           | 
  | 47 |  |   | 
  | 48 |  |   | 
  | 49 |  |          public String getAffiliationTypeCode() { | 
  | 50 | 0 |                  return getCode(); | 
  | 51 |  |          } | 
  | 52 |  |   | 
  | 53 |  |           | 
  | 54 |  |   | 
  | 55 |  |   | 
  | 56 |  |          public String getAffiliationTypeName() { | 
  | 57 | 0 |                  return getName(); | 
  | 58 |  |          } | 
  | 59 |  |   | 
  | 60 |  |           | 
  | 61 |  |   | 
  | 62 |  |   | 
  | 63 |  |          public void setAffiliationTypeCode(String affiliationTypeCode) { | 
  | 64 | 0 |                  setCode(affiliationTypeCode); | 
  | 65 | 0 |          } | 
  | 66 |  |   | 
  | 67 |  |           | 
  | 68 |  |   | 
  | 69 |  |   | 
  | 70 |  |          public void setAffiliationTypeName(String affiliationTypeName) { | 
  | 71 | 0 |                  setName(affiliationTypeName); | 
  | 72 | 0 |          } | 
  | 73 |  |   | 
  | 74 |  |          public boolean isEmploymentAffiliationType() { | 
  | 75 | 0 |                  if(ObjectUtils.isNull(this.employmentAffiliationType)) | 
  | 76 | 0 |                          return false; | 
  | 77 | 0 |                  return this.employmentAffiliationType; | 
  | 78 |  |          } | 
  | 79 |  |   | 
  | 80 |  |          public void setEmploymentAffiliationType(boolean employmentAffiliationType) { | 
  | 81 | 0 |                  this.employmentAffiliationType = employmentAffiliationType; | 
  | 82 | 0 |          } | 
  | 83 |  |           | 
  | 84 |  |          public AffiliationTypeInfo toInfo() { | 
  | 85 | 0 |                  AffiliationTypeInfo info = new AffiliationTypeInfo(); | 
  | 86 | 0 |                  info.setCode(code); | 
  | 87 | 0 |                  info.setName(name); | 
  | 88 | 0 |                  info.setDisplaySortCode(displaySortCode); | 
  | 89 | 0 |                  info.setActive(active); | 
  | 90 | 0 |                  return info; | 
  | 91 |  |          } | 
  | 92 |  |           | 
  | 93 |  |  } |