1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.sampleu.travel.bo;
18
19 import java.util.LinkedHashMap;
20
21 import javax.persistence.Column;
22 import javax.persistence.Entity;
23 import javax.persistence.FetchType;
24 import javax.persistence.Id;
25 import javax.persistence.JoinColumn;
26 import javax.persistence.OneToOne;
27 import javax.persistence.Table;
28
29 import org.kuali.rice.kns.bo.PersistableBusinessObjectExtensionBase;
30
31 @Entity
32 @Table(name="TRV_ACCT_EXT")
33 public class TravelAccountExtension extends PersistableBusinessObjectExtensionBase {
34
35 @Id
36 @Column(name="acct_num")
37 private String number;
38
39 @Column(name="acct_type")
40 private String accountTypeCode;
41
42 @OneToOne(fetch=FetchType.EAGER)
43 @JoinColumn(name="acct_type", insertable=false, updatable=false)
44 private TravelAccountType accountType;
45
46 public String getNumber() {
47 return number;
48 }
49
50 public void setNumber(String number) {
51 this.number = number;
52 }
53
54 @Override
55 protected LinkedHashMap toStringMapper() {
56 LinkedHashMap propMap = new LinkedHashMap();
57 propMap.put("number", getNumber());
58 propMap.put("accountTypeCode", getAccountTypeCode());
59 return propMap;
60 }
61
62 public String getAccountTypeCode() {
63 return accountTypeCode;
64 }
65
66 public void setAccountTypeCode(String accountTypeCode) {
67 this.accountTypeCode = accountTypeCode;
68 }
69
70 public TravelAccountType getAccountType() {
71 return accountType;
72 }
73
74 public void setAccountType(TravelAccountType accountType) {
75 this.accountType = accountType;
76 }
77
78
79 }