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