Coverage Report - org.kuali.student.core.bo.util.InactivatableFromToHelper
 
Classes in this File Line Coverage Branch Coverage Complexity
InactivatableFromToHelper
0%
0/5
0%
0/10
5
 
 1  
 package org.kuali.student.core.bo.util;
 2  
 
 3  
 import org.kuali.rice.kns.bo.InactivateableFromTo;
 4  
 
 5  0
 public class InactivatableFromToHelper {
 6  
 
 7  
         public static boolean isActive(InactivateableFromTo 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  
 }