Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
InactivatableFromToHelper |
|
| 5.0;5 |
1 | package org.kuali.student.core.bo.util; | |
2 | ||
3 | import org.kuali.rice.krad.bo.InactivatableFromTo; | |
4 | ||
5 | 0 | public class InactivatableFromToHelper { |
6 | ||
7 | public static boolean isActive(InactivatableFromTo bo) { | |
8 | 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 | } |