1 | |
package org.kuali.rice.kim.impl.identity.affiliation |
2 | |
|
3 | |
import javax.persistence.Column |
4 | |
import javax.persistence.Entity |
5 | |
import javax.persistence.Id |
6 | |
import javax.persistence.Table |
7 | |
import org.kuali.rice.kim.api.identity.Type |
8 | |
import org.kuali.rice.kim.api.identity.TypeContract |
9 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
10 | |
import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationTypeContract |
11 | |
import org.kuali.rice.kim.api.identity.affiliation.EntityAffiliationType |
12 | |
|
13 | |
@Entity |
14 | |
@Table(name="KRIM_AFLTN_TYP_T") |
15 | |
public class EntityAffiliationTypeBo extends PersistableBusinessObjectBase implements EntityAffiliationTypeContract { |
16 | |
@Id |
17 | |
@Column(name="EMP_TYP_CD") |
18 | |
String code; |
19 | |
@Column(name="NM") |
20 | |
String name; |
21 | |
@org.hibernate.annotations.Type(type="yes_no") |
22 | |
@Column(name="ACTV_IND") |
23 | |
boolean active; |
24 | |
@Column(name="DISPLAY_SORT_CD") |
25 | |
String sortCode; |
26 | |
|
27 | |
@org.hibernate.annotations.Type(type="yes_no") |
28 | |
@Column(name="EMP_AFLTN_TYP_IND") |
29 | |
boolean employmentAffiliationType; |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
static EntityAffiliationType to(EntityAffiliationTypeBo bo) { |
38 | 0 | if (bo == null) { return null } |
39 | 0 | return EntityAffiliationType.Builder.create(bo).build() |
40 | |
} |
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
static EntityAffiliationTypeBo from(EntityAffiliationType immutable) { |
48 | 0 | if (immutable == null) {return null} |
49 | |
|
50 | 0 | EntityAffiliationTypeBo bo = new EntityAffiliationTypeBo() |
51 | 0 | bo.code = immutable.code |
52 | 0 | bo.name = immutable.name |
53 | 0 | bo.sortCode = immutable.sortCode |
54 | 0 | bo.employmentAffiliationType = immutable.employmentAffiliationType |
55 | 0 | bo.active = immutable.active |
56 | 0 | bo.versionNumber = immutable.versionNumber |
57 | 0 | bo.objectId = immutable.objectId |
58 | |
|
59 | 0 | return bo; |
60 | |
} |
61 | |
} |