1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package edu.sampleu.travel.document; |
17 |
|
|
18 |
|
import edu.sampleu.travel.bo.TravelAccount; |
19 |
|
import org.kuali.rice.kns.document.SessionDocument; |
20 |
|
import org.kuali.rice.kns.document.TransactionalDocumentBase; |
21 |
|
|
22 |
|
import javax.persistence.*; |
23 |
|
import java.util.ArrayList; |
24 |
|
import java.util.List; |
25 |
|
|
26 |
|
|
27 |
|
@Entity |
28 |
|
@Table(name="TRV_DOC_2") |
|
|
| 0% |
Uncovered Elements: 32 (32) |
Complexity: 15 |
Complexity Density: 0.94 |
|
29 |
|
public class TravelDocument2 extends TransactionalDocumentBase implements SessionDocument { |
30 |
|
|
31 |
|
@Column(name="traveler") |
32 |
|
private String traveler; |
33 |
|
@Column(name="org") |
34 |
|
private String origin; |
35 |
|
@Column(name="dest") |
36 |
|
private String destination; |
37 |
|
@Column(name="request_trav") |
38 |
|
private String requestType; |
39 |
|
@Transient |
40 |
|
private String accountType; |
41 |
|
|
42 |
|
@ManyToMany(fetch = FetchType.EAGER) |
43 |
|
@JoinTable(name="TRAV_DOC_2_ACCOUNTS", |
44 |
|
joinColumns={@JoinColumn(name="fdoc_nbr", referencedColumnName="fdoc_nbr", unique=false)}, |
45 |
|
inverseJoinColumns={@JoinColumn(name="acct_num", referencedColumnName="acct_num", unique=false)} |
46 |
|
) |
47 |
|
private List<TravelAccount> travelAccounts; |
48 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
49 |
0
|
public TravelDocument2() {... |
50 |
0
|
travelAccounts = new ArrayList<TravelAccount>(); |
51 |
|
} |
52 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
53 |
0
|
public String getDestination() {... |
54 |
0
|
return destination; |
55 |
|
} |
56 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
57 |
0
|
public void setDestination(String destination) {... |
58 |
0
|
this.destination = destination; |
59 |
|
} |
60 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
61 |
0
|
public String getOrigin() {... |
62 |
0
|
return origin; |
63 |
|
} |
64 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
0
|
public void setOrigin(String origin) {... |
66 |
0
|
this.origin = origin; |
67 |
|
} |
68 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
69 |
0
|
public String getTraveler() {... |
70 |
0
|
return traveler; |
71 |
|
} |
72 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
73 |
0
|
public void setTraveler(String traveler) {... |
74 |
0
|
this.traveler = traveler; |
75 |
|
} |
76 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
77 |
0
|
public List<TravelAccount> getTravelAccounts() {... |
78 |
0
|
return travelAccounts; |
79 |
|
} |
80 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
81 |
0
|
public void setTravelAccounts(List<TravelAccount> travelAccounts) {... |
82 |
0
|
this.travelAccounts = travelAccounts; |
83 |
|
} |
84 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
85 |
0
|
public TravelAccount getTravelAccount(int index) {... |
86 |
0
|
while(travelAccounts.size() - 1 < index) { |
87 |
0
|
travelAccounts.add(new TravelAccount()); |
88 |
|
} |
89 |
0
|
return travelAccounts.get(index); |
90 |
|
} |
91 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
0
|
public String getRequestType() {... |
93 |
0
|
return requestType; |
94 |
|
} |
95 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
96 |
0
|
public void setRequestType(String requestType) {... |
97 |
0
|
this.requestType = requestType; |
98 |
|
} |
99 |
|
|
100 |
|
|
101 |
|
@param |
102 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
0
|
public void setAccountType(String accountType) {... |
104 |
0
|
this.accountType = accountType; |
105 |
|
} |
106 |
|
|
107 |
|
|
108 |
|
@return |
109 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
110 |
0
|
public String getAccountType() {... |
111 |
0
|
return accountType; |
112 |
|
} |
113 |
|
|
114 |
|
} |