1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kim.test.bo;
17
18
19 import org.kuali.rice.kim.api.identity.Person;
20 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
21 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
22
23 import javax.persistence.Column;
24 import javax.persistence.Id;
25 import javax.persistence.Transient;
26
27
28
29
30
31
32
33 public class BOContainingPerson extends PersistableBusinessObjectBase {
34
35 @Id
36 @Column(name="pk")
37 protected String boPrimaryKey;
38
39 @Column(name="prncpl_id")
40 protected String principalId;
41
42 @Transient
43 protected Person person;
44
45 public String getBoPrimaryKey() {
46 return this.boPrimaryKey;
47 }
48
49 public void setBoPrimaryKey(String boPrimaryKey) {
50 this.boPrimaryKey = boPrimaryKey;
51 }
52
53 public String getPrincipalId() {
54 return this.principalId;
55 }
56
57 public void setPrincipalId(String principalId) {
58 this.principalId = principalId;
59 }
60
61 public Person getPerson() {
62 person = KimApiServiceLocator.getPersonService().updatePersonIfNecessary( principalId, person );
63 return this.person;
64 }
65
66 public void setPerson(Person person) {
67 this.person = person;
68 }
69 }