private void updateBaseCalendarNames ( List < Pair < ProjectCalendar , Integer > > baseCalendars ) { for ( Pair < ProjectCalendar , Integer > pair : baseCalendars ) { ProjectCalendar cal = pair . getFirst ( ) ; Integer baseCalendarID = pair . getSecond ( ) ; ProjectCalendar baseCal = m_calendarMap . get ( baseCalendarID ) ; if ( baseCal != null ) { cal . setParent ( baseCal ) ; } } }
The way calendars are stored in an MPP8 file means that there can be forward references between the base calendar unique ID for a derived calendar and the base calendar itself . To get around this we initially populate the base calendar name attribute with the base calendar unique ID and now in this method we can convert those ID values into the correct names .