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