1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.test.document.bo;
17
18 import org.kuali.rice.krad.bo.DataObjectBase;
19 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
20 import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
21
22 import javax.persistence.CascadeType;
23 import javax.persistence.Column;
24 import javax.persistence.Entity;
25 import javax.persistence.FetchType;
26 import javax.persistence.GeneratedValue;
27 import javax.persistence.Id;
28 import javax.persistence.JoinColumn;
29 import javax.persistence.ManyToOne;
30 import javax.persistence.Table;
31
32 @Entity
33 @Table(name = "TRV_ACCT")
34 public class AccountNonUpdatableFK extends DataObjectBase {
35 private static final long serialVersionUID = 1L;
36
37 @Id
38 @GeneratedValue(generator = "KRTST_GENERATED_PK_S")
39 @PortableSequenceGenerator(name = "KRTST_GENERATED_PK_S")
40 @Column(name="acct_num")
41 private String number;
42
43 @Column(name="acct_name")
44 private String name;
45
46 @Column(name="acct_fo_id", insertable = false, updatable = false)
47 private Long accountManagerId;
48
49 @ManyToOne(cascade = CascadeType.ALL)
50 @JoinColumn(name="acct_fo_id")
51 private AccountManagerGeneratedPK accountManager;
52
53 public String getNumber() {
54 return number;
55 }
56
57 public void setNumber(String number) {
58 this.number = number;
59 }
60
61 public String getName() {
62 return name;
63 }
64
65 public void setName(String name) {
66 this.name = name;
67 }
68
69 public Long getAccountManagerId() {
70 return accountManagerId;
71 }
72
73 public void setAccountManagerId(Long accountManagerId) {
74 this.accountManagerId = accountManagerId;
75 }
76
77 public AccountManagerGeneratedPK getAccountManager() {
78 return accountManager;
79 }
80
81 public void setAccountManager(AccountManagerGeneratedPK accountManager) {
82 this.accountManager = accountManager;
83 }
84
85 }