1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.rice.kim.bo.ui; |
17 |
|
|
18 |
|
import java.sql.Date; |
19 |
|
import java.sql.Timestamp; |
20 |
|
|
21 |
|
import javax.persistence.AttributeOverride; |
22 |
|
import javax.persistence.AttributeOverrides; |
23 |
|
import javax.persistence.Column; |
24 |
|
import javax.persistence.MappedSuperclass; |
25 |
|
|
26 |
|
import org.hibernate.annotations.Type; |
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
@author |
32 |
|
|
33 |
|
|
34 |
|
@MappedSuperclass |
35 |
|
@AttributeOverrides({ |
36 |
|
@AttributeOverride(name="edit",column=@Column(name="EDIT_FLAG")) |
37 |
|
}) |
|
|
| 0% |
Uncovered Elements: 17 (17) |
Complexity: 8 |
Complexity Density: 0.89 |
|
38 |
|
public class KimDocumentBoActivatableToFromEditableBase extends KimDocumentBoBase { |
39 |
|
private static final long serialVersionUID = 9042706897191231673L; |
40 |
|
@Type(type="yes_no") |
41 |
|
@Column(name="ACTV_IND") |
42 |
|
protected boolean active = true; |
43 |
|
|
44 |
|
@Type(type="yes_no") |
45 |
|
@Column(name="EDIT_FLAG") |
46 |
|
protected boolean edit; |
47 |
|
|
48 |
|
|
49 |
|
@Column(name="ACTV_FRM_DT") |
50 |
|
protected Timestamp activeFromDate; |
51 |
|
@Column(name="ACTV_TO_DT") |
52 |
|
protected Timestamp activeToDate; |
53 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
54 |
0
|
public boolean isActive() {... |
55 |
0
|
long now = System.currentTimeMillis(); |
56 |
0
|
return (activeFromDate == null || now > activeFromDate.getTime()) && (activeToDate == null || now < activeToDate.getTime()); |
57 |
|
} |
58 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
59 |
0
|
public void setActive(boolean active) {... |
60 |
0
|
this.active = active; |
61 |
|
} |
62 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
0
|
public boolean isEdit() {... |
64 |
0
|
return this.edit; |
65 |
|
} |
66 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
67 |
0
|
public void setEdit(boolean edit) {... |
68 |
0
|
this.edit = edit; |
69 |
|
} |
70 |
|
|
71 |
|
|
72 |
|
@return |
73 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
0
|
public Timestamp getActiveFromDate() {... |
75 |
0
|
return this.activeFromDate; |
76 |
|
} |
77 |
|
|
78 |
|
|
79 |
|
@param |
80 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
81 |
0
|
public void setActiveFromDate(Timestamp activeFromDate) {... |
82 |
0
|
this.activeFromDate = activeFromDate; |
83 |
|
} |
84 |
|
|
85 |
|
|
86 |
|
@return |
87 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
88 |
0
|
public Timestamp getActiveToDate() {... |
89 |
0
|
return this.activeToDate; |
90 |
|
} |
91 |
|
|
92 |
|
|
93 |
|
@param |
94 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
95 |
0
|
public void setActiveToDate(Timestamp activeToDate) {... |
96 |
0
|
this.activeToDate = activeToDate; |
97 |
|
} |
98 |
|
|
99 |
|
} |