1 |
|
package org.kuali.student.core.bo.util; |
2 |
|
|
3 |
|
import org.kuali.rice.kns.bo.InactivateableFromTo; |
4 |
|
|
|
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 2 |
Complexity Density: 0.4 |
|
5 |
|
public class InactivatableFromToHelper { |
6 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
7 |
0
|
public static boolean isActive(InactivateableFromTo bo) {... |
8 |
0
|
long asOfDate; |
9 |
|
|
10 |
0
|
if (bo.getActiveAsOfDate() != null) { |
11 |
0
|
asOfDate = bo.getActiveAsOfDate().getTime(); |
12 |
|
} |
13 |
|
else { |
14 |
0
|
asOfDate = System.currentTimeMillis(); |
15 |
|
} |
16 |
|
|
17 |
0
|
return (bo.getActiveFromDate() == null || asOfDate >= bo.getActiveFromDate().getTime()) |
18 |
|
&& (bo.getActiveToDate() == null || asOfDate < bo.getActiveToDate().getTime()); |
19 |
|
} |
20 |
|
} |