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 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 return accountTypeCode;
44 }
45
46
47 public void setAccountTypeCode(String accountTypeCode) {
48 this.accountTypeCode = accountTypeCode;
49 }
50
51
52 public String getName() {
53 return name;
54 }
55
56
57 public void setName(String name) {
58 this.name = name;
59 }
60
61 public String getCodeAndDescription() {
62 return accountTypeCode + " - " + name;
63 }
64
65 @Override
66 protected LinkedHashMap toStringMapper() {
67 LinkedHashMap propMap = new LinkedHashMap();
68 propMap.put("accountTypeCode", accountTypeCode);
69 propMap.put("name", name);
70 return propMap;
71 }
72
73
74 }