private CostRateTableEntry getCostRateTableEntry ( Date date ) { CostRateTableEntry result ; CostRateTable table = getCostRateTable ( ) ; if ( table == null ) { Resource resource = getResource ( ) ; result = new CostRateTableEntry ( resource . getStandardRate ( ) , TimeUnit . HOURS , resource . getOvertimeRate ( ) , TimeUnit . HOURS , resource . getCostPerUse ( ) , null ) ; } else { if ( table . size ( ) == 1 ) { result = table . get ( 0 ) ; } else { result = table . getEntryByDate ( date ) ; } } return result ; }
Retrieves the cost rate table entry active on a given date .