public Date getCompleteThrough ( ) { Date value = ( Date ) getCachedValue ( TaskField . COMPLETE_THROUGH ) ; if ( value == null ) { int percentComplete = NumberHelper . getInt ( getPercentageComplete ( ) ) ; switch ( percentComplete ) { case 0 : { break ; } case 100 : { value = getActualFinish ( ) ; break ; } default : { Date actualStart = getActualStart ( ) ; Duration duration = getDuration ( ) ; if ( actualStart != null && duration != null ) { double durationValue = ( duration . getDuration ( ) * percentComplete ) / 100d ; duration = Duration . getInstance ( durationValue , duration . getUnits ( ) ) ; ProjectCalendar calendar = getEffectiveCalendar ( ) ; value = calendar . getDate ( actualStart , duration , true ) ; } break ; } } set ( TaskField . COMPLETE_THROUGH , value ) ; } return value ; }
Retrieve the complete through date .