1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package edu.sampleu.travel.bo; |
17 |
|
|
18 |
|
import org.apache.commons.lang.ObjectUtils; |
19 |
|
import org.apache.commons.lang.StringUtils; |
20 |
|
import org.apache.commons.lang.builder.HashCodeBuilder; |
21 |
|
import org.kuali.rice.core.framework.persistence.jpa.annotations.Sequence; |
22 |
|
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; |
23 |
|
|
24 |
|
import javax.persistence.*; |
25 |
|
import java.util.List; |
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
@Entity |
31 |
|
@Table(name="TRV_ACCT_FO") |
32 |
|
@Sequence(name="seq_acct_fo_id", property="id") |
|
|
| 0% |
Uncovered Elements: 29 (29) |
Complexity: 12 |
Complexity Density: 0.8 |
|
33 |
|
public class FiscalOfficer extends PersistableBusinessObjectBase { |
34 |
|
|
35 |
|
private static final long serialVersionUID = -4645124696676896963L; |
36 |
|
|
37 |
|
@Id |
38 |
|
@Column(name="acct_fo_id") |
39 |
|
private Long id; |
40 |
|
|
41 |
|
@Column(name="acct_fo_user_name") |
42 |
|
private String userName; |
43 |
|
|
44 |
|
@Column(name="acct_fo_user_name") |
45 |
|
private String firstName; |
46 |
|
|
47 |
|
@OneToMany(cascade={CascadeType.PERSIST, CascadeType.MERGE}, fetch=FetchType.EAGER, mappedBy="fiscalOfficer") |
48 |
|
private List<TravelAccount> accounts; |
49 |
|
|
50 |
|
|
51 |
|
@return |
52 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
53 |
0
|
public String getFirstName() {... |
54 |
0
|
return this.firstName; |
55 |
|
} |
56 |
|
|
57 |
|
|
58 |
|
@param |
59 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
60 |
0
|
public void setFirstName(String firstName) {... |
61 |
0
|
this.firstName = firstName; |
62 |
|
} |
63 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
64 |
0
|
public void setUserName(String userId) {... |
65 |
0
|
userName = userId; |
66 |
|
} |
67 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
68 |
0
|
public String getUserName() {... |
69 |
0
|
return userName; |
70 |
|
} |
71 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
72 |
0
|
public final boolean equals(Object o) {... |
73 |
0
|
if (o == null) return false; |
74 |
0
|
if (!(o instanceof FiscalOfficer)) return false; |
75 |
0
|
FiscalOfficer f = (FiscalOfficer) o; |
76 |
0
|
return StringUtils.equals(userName, f.getUserName()) && |
77 |
|
ObjectUtils.equals(id, f.getId()); |
78 |
|
} |
79 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
80 |
0
|
public int hashCode() {... |
81 |
0
|
return new HashCodeBuilder().append(id).append(userName).toHashCode(); |
82 |
|
} |
83 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
84 |
0
|
public Long getId() {... |
85 |
0
|
return id; |
86 |
|
} |
87 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
88 |
0
|
public void setId(Long id) {... |
89 |
0
|
this.id = id; |
90 |
|
} |
91 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
92 |
0
|
public List<TravelAccount> getAccounts() {... |
93 |
0
|
return accounts; |
94 |
|
} |
95 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
96 |
0
|
public void setAccounts(List<TravelAccount> accounts) {... |
97 |
0
|
this.accounts = accounts; |
98 |
|
} |
99 |
|
} |