1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kim.impl.identity.residency;
17
18 import org.joda.time.DateTime;
19 import org.kuali.rice.kim.api.identity.CodedAttributeContract;
20 import org.kuali.rice.kim.api.identity.residency.EntityResidency;
21 import org.kuali.rice.kim.api.identity.residency.EntityResidencyContract;
22 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
23 import org.kuali.rice.krad.data.jpa.eclipselink.PortableSequenceGenerator;
24
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.GeneratedValue;
28 import javax.persistence.Id;
29 import javax.persistence.Table;
30
31 @Entity
32 @Table(name = "KRIM_ENTITY_RESIDENCY_T")
33 public class EntityResidencyBo extends PersistableBusinessObjectBase implements EntityResidencyContract {
34 private static final long serialVersionUID = 1L;
35 @Id
36 @GeneratedValue(generator = "KRIM_ENTITY_RESIDENCY_ID_S")
37 @PortableSequenceGenerator(name = "KRIM_ENTITY_RESIDENCY_ID_S")
38 @Column(name = "ID")
39 private String id;
40 @Column(name = "ENTITY_ID")
41 private String entityId;
42 @Column(name = "DETERMINATION_METHOD")
43 private String determinationMethod;
44 @Column(name = "IN_STATE")
45 private String inState;
46
47 public static EntityResidency to(EntityResidencyBo bo) {
48 if (bo == null) {
49 return null;
50 }
51
52 return EntityResidency.Builder.create(bo).build();
53 }
54
55
56
57
58
59
60
61 public static EntityResidencyBo from(EntityResidency immutable) {
62 if (immutable == null) {
63 return null;
64 }
65
66 EntityResidencyBo bo = new EntityResidencyBo();
67 bo.entityId = immutable.getEntityId();
68 bo.id = immutable.getId();
69 bo.determinationMethod = immutable.getDeterminationMethod();
70 bo.inState = immutable.getInState();
71 bo.setVersionNumber(immutable.getVersionNumber());
72 bo.setObjectId(immutable.getObjectId());
73
74 return bo;
75 }
76
77 @Override
78 public DateTime getEstablishedDate() {
79 return null;
80 }
81
82 @Override
83 public DateTime getChangeDate() {
84 return null;
85 }
86
87 @Override
88 public String getCountryCode() {
89 return null;
90 }
91
92 @Override
93 public String getCountyCode() {
94 return null;
95 }
96
97 @Override
98 public String getStateProvinceCode() {
99 return null;
100 }
101
102 @Override
103 public CodedAttributeContract getResidencyStatus() {
104 return null;
105 }
106
107 @Override
108 public CodedAttributeContract getResidencyType() {
109 return null;
110 }
111
112 @Override
113 public String getId() {
114 return id;
115 }
116
117 public void setId(String id) {
118 this.id = id;
119 }
120
121 @Override
122 public String getEntityId() {
123 return entityId;
124 }
125
126 public void setEntityId(String entityId) {
127 this.entityId = entityId;
128 }
129
130 @Override
131 public String getDeterminationMethod() {
132 return determinationMethod;
133 }
134
135 public void setDeterminationMethod(String determinationMethod) {
136 this.determinationMethod = determinationMethod;
137 }
138
139 @Override
140 public String getInState() {
141 return inState;
142 }
143
144 public void setInState(String inState) {
145 this.inState = inState;
146 }
147
148 }