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 org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
20
21 import javax.persistence.*;
22 import java.util.LinkedHashMap;
23
24 @Entity
25 @Table(name="TRV_ACCT")
26 public class TravelAccount extends PersistableBusinessObjectBase {
27
28 private static final long serialVersionUID = -7739303391609093875L;
29
30 @Id
31 @Column(name="acct_num")
32 private String number;
33
34 @Column(name="acct_name")
35 private String name;
36
37 @Column(name="acct_fo_id")
38 private Long foId;
39
40 @ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.PERSIST, CascadeType.MERGE})
41 @JoinColumn(name="acct_fo_id", insertable=false, updatable=false)
42 private FiscalOfficer fiscalOfficer;
43
44 public String getName() {
45 return name;
46 }
47
48 public void setName(String name) {
49 this.name = name;
50 }
51
52 public String getNumber() {
53 return number;
54 }
55
56 public void setNumber(String number) {
57 this.number = number;
58 }
59
60 public FiscalOfficer getFiscalOfficer() {
61 return fiscalOfficer;
62 }
63
64 public void setFiscalOfficer(FiscalOfficer fiscalOfficer) {
65 this.fiscalOfficer = fiscalOfficer;
66 }
67
68 public Long getFoId() {
69 return foId;
70 }
71
72 public void setFoId(Long foId) {
73 this.foId = foId;
74 }
75
76 @Override
77 protected LinkedHashMap toStringMapper() {
78 LinkedHashMap propMap = new LinkedHashMap();
79 propMap.put("number", getNumber());
80 propMap.put("name", getName());
81 return propMap;
82 }
83
84 }