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 javax.persistence.Column; |
20 | |
import javax.persistence.Id; |
21 | |
import javax.persistence.CascadeType; |
22 | |
import javax.persistence.Table; |
23 | |
import javax.persistence.Entity; |
24 | |
|
25 | |
import java.util.LinkedHashMap; |
26 | |
|
27 | |
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; |
28 | |
|
29 | |
|
30 | |
|
31 | |
@Entity |
32 | |
@Table(name="TRV_ACCT_TYPE") |
33 | 0 | public class TravelAccountType extends PersistableBusinessObjectBase { |
34 | |
|
35 | |
@Id |
36 | |
@Column(name="acct_type") |
37 | |
private String accountTypeCode; |
38 | |
@Column(name="acct_type_name") |
39 | |
private String name; |
40 | |
|
41 | |
|
42 | |
public String getAccountTypeCode() { |
43 | 0 | return accountTypeCode; |
44 | |
} |
45 | |
|
46 | |
|
47 | |
public void setAccountTypeCode(String accountTypeCode) { |
48 | 0 | this.accountTypeCode = accountTypeCode; |
49 | 0 | } |
50 | |
|
51 | |
|
52 | |
public String getName() { |
53 | 0 | return name; |
54 | |
} |
55 | |
|
56 | |
|
57 | |
public void setName(String name) { |
58 | 0 | this.name = name; |
59 | 0 | } |
60 | |
|
61 | |
public String getCodeAndDescription() { |
62 | 0 | return accountTypeCode + " - " + name; |
63 | |
} |
64 | |
|
65 | |
@Override |
66 | |
protected LinkedHashMap toStringMapper() { |
67 | 0 | LinkedHashMap propMap = new LinkedHashMap(); |
68 | 0 | propMap.put("accountTypeCode", accountTypeCode); |
69 | 0 | propMap.put("name", name); |
70 | 0 | return propMap; |
71 | |
} |
72 | |
|
73 | |
|
74 | |
} |