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