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