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.PersistableBusinessObjectExtensionBase;
19 import org.kuali.rice.krad.data.provider.annotation.ExtensionFor;
20
21 import javax.persistence.CascadeType;
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.FetchType;
25 import javax.persistence.Id;
26 import javax.persistence.JoinColumn;
27 import javax.persistence.ManyToOne;
28 import javax.persistence.OneToOne;
29 import javax.persistence.Table;
30
31 @Entity
32 @Table(name="TRV_ACCT_EXT")
33 @ExtensionFor(Account.class)
34 public class AccountExtension extends PersistableBusinessObjectExtensionBase {
35
36 private static final long serialVersionUID = -3231626970774119782L;
37
38 @Id
39 @OneToOne
40 @JoinColumn(name = "ACCT_NUM")
41 private Account account;
42
43 @Column(name = "ACCT_TYPE")
44 private String accountTypeCode;
45
46 @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.DETACH,CascadeType.REFRESH})
47 @JoinColumn(name = "ACCT_TYPE", insertable=false, updatable=false)
48 private AccountType accountType;
49
50 @Column(name = "ACCT_NUM", insertable = false, updatable = false)
51 private String number;
52
53 public Account getAccount() {
54 return account;
55 }
56
57 public void setAccount(Account account) {
58 this.account = account;
59 }
60
61 public String getAccountTypeCode() {
62 return accountTypeCode;
63 }
64
65 public void setAccountTypeCode(String accountTypeCode) {
66 this.accountTypeCode = accountTypeCode;
67 }
68
69 public AccountType getAccountType() {
70 return accountType;
71 }
72
73 public void setAccountType(AccountType accountType) {
74 this.accountType = accountType;
75 }
76
77 public String getNumber() {
78 return number;
79 }
80
81 public void setNumber(String number) {
82 this.number = number;
83 }
84 }