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 | 0 | 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 | 0 | return name; |
46 | |
} |
47 | |
|
48 | |
public void setName(String name) { |
49 | 0 | this.name = name; |
50 | 0 | } |
51 | |
|
52 | |
public String getNumber() { |
53 | 0 | return number; |
54 | |
} |
55 | |
|
56 | |
public void setNumber(String number) { |
57 | 0 | this.number = number; |
58 | 0 | } |
59 | |
|
60 | |
public FiscalOfficer getFiscalOfficer() { |
61 | 0 | return fiscalOfficer; |
62 | |
} |
63 | |
|
64 | |
public void setFiscalOfficer(FiscalOfficer fiscalOfficer) { |
65 | 0 | this.fiscalOfficer = fiscalOfficer; |
66 | 0 | } |
67 | |
|
68 | |
public Long getFoId() { |
69 | 0 | return foId; |
70 | |
} |
71 | |
|
72 | |
public void setFoId(Long foId) { |
73 | 0 | this.foId = foId; |
74 | 0 | } |
75 | |
|
76 | |
@Override |
77 | |
protected LinkedHashMap toStringMapper() { |
78 | 0 | LinkedHashMap propMap = new LinkedHashMap(); |
79 | 0 | propMap.put("number", getNumber()); |
80 | 0 | propMap.put("name", getName()); |
81 | 0 | return propMap; |
82 | |
} |
83 | |
|
84 | |
} |